diff --git a/README.md b/README.md index b39a2a82..9587d53f 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ APIv4 provides operations related to spot, margin, and contract trading, includi This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v4.106.39 -- Package version: 7.2.39 +- API version: v4.106.100 +- Package version: 7.2.100 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) @@ -77,24 +77,31 @@ 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" + 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.CrossExApi(api_client) -symbols = 'symbols_example' # str | 币对列表,多个以逗号分隔 示例值: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT (optional) +api_instance = gate_api.ActivityApi(api_client) try: - # [Public Interface] Query Trading Pair Information - api_response = api_instance.list_crossex_rule_symbols(symbols=symbols) + # My activity entry + api_response = api_instance.get_my_activity_entry() 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 CrossExApi->list_crossex_rule_symbols: %s\n" % e) + print("Exception when calling ActivityApi->get_my_activity_entry: %s\n" % e) ``` @@ -106,9 +113,12 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*CrossExApi* | [**list_crossex_rule_symbols**](docs/CrossExApi.md#list_crossex_rule_symbols) | **GET** /crossex/rule/symbols | [Public Interface] Query Trading Pair Information -*CrossExApi* | [**list_crossex_rule_risk_limits**](docs/CrossExApi.md#list_crossex_rule_risk_limits) | **GET** /crossex/rule/risk_limits | [Public Interface] Query Risk Limit Information -*CrossExApi* | [**list_crossex_transfer_coins**](docs/CrossExApi.md#list_crossex_transfer_coins) | **GET** /crossex/transfers/coin | [Public Interface] Query Supported Transfer Currencies +*ActivityApi* | [**get_my_activity_entry**](docs/ActivityApi.md#get_my_activity_entry) | **GET** /rewards/activity/my-activity-entry | My activity entry +*ActivityApi* | [**list_activities**](docs/ActivityApi.md#list_activities) | **GET** /rewards/activity/activity-list | Recommended activity list +*ActivityApi* | [**list_activity_types**](docs/ActivityApi.md#list_activity_types) | **GET** /rewards/activity/activity-type | Activity type list +*CrossExApi* | [**list_crossex_rule_symbols**](docs/CrossExApi.md#list_crossex_rule_symbols) | **GET** /crossex/rule/symbols | Query symbol information +*CrossExApi* | [**list_crossex_rule_risk_limits**](docs/CrossExApi.md#list_crossex_rule_risk_limits) | **GET** /crossex/rule/risk_limits | Query risk limit information +*CrossExApi* | [**list_crossex_transfer_coins**](docs/CrossExApi.md#list_crossex_transfer_coins) | **GET** /crossex/transfers/coin | Query supported transfer currencies *CrossExApi* | [**list_crossex_transfers**](docs/CrossExApi.md#list_crossex_transfers) | **GET** /crossex/transfers | Query Fund Transfer History *CrossExApi* | [**create_crossex_transfer**](docs/CrossExApi.md#create_crossex_transfer) | **POST** /crossex/transfers | Fund Transfer *CrossExApi* | [**create_crossex_order**](docs/CrossExApi.md#create_crossex_order) | **POST** /crossex/orders | Create an order @@ -136,7 +146,7 @@ Class | Method | HTTP request | Description *CrossExApi* | [**list_crossex_history_margin_interests**](docs/CrossExApi.md#list_crossex_history_margin_interests) | **GET** /crossex/history_margin_interests | Query Leveraged Interest Deduction History *CrossExApi* | [**list_crossex_history_trades**](docs/CrossExApi.md#list_crossex_history_trades) | **GET** /crossex/history_trades | queryfilledhistory *CrossExApi* | [**list_crossex_account_book**](docs/CrossExApi.md#list_crossex_account_book) | **GET** /crossex/account_book | Query Account Asset Change History -*CrossExApi* | [**list_crossex_coin_discount_rate**](docs/CrossExApi.md#list_crossex_coin_discount_rate) | **GET** /crossex/coin_discount_rate | Query currency discount rate (discount rate of margin currency in isolated exchange mode) +*CrossExApi* | [**list_crossex_coin_discount_rate**](docs/CrossExApi.md#list_crossex_coin_discount_rate) | **GET** /crossex/coin_discount_rate | Query Currency Discount Rate *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 @@ -159,9 +169,14 @@ Class | Method | HTTP request | Description *OTCApi* | [**create_otc_quote**](docs/OTCApi.md#create_otc_quote) | **POST** /otc/quote | Fiat and stablecoin quote *OTCApi* | [**create_otc_order**](docs/OTCApi.md#create_otc_order) | **POST** /otc/order/create | Create fiat order *OTCApi* | [**create_stable_coin_order**](docs/OTCApi.md#create_stable_coin_order) | **POST** /otc/stable_coin/order/create | Create stablecoin order -*OTCApi* | [**get_user_default_bank**](docs/OTCApi.md#get_user_default_bank) | **GET** /otc/get_user_def_bank | Get user's default bank account information -*OTCApi* | [**get_bank_list**](docs/OTCApi.md#get_bank_list) | **GET** /otc/bank_list | Get user bank card list -*OTCApi* | [**mark_otc_order_paid**](docs/OTCApi.md#mark_otc_order_paid) | **POST** /otc/order/paid | Mark fiat order as paid +*OTCApi* | [**get_bank_list_inner_path**](docs/OTCApi.md#get_bank_list_inner_path) | **GET** /otc/bank/list | Get user bank card list +*OTCApi* | [**create_otc_bank**](docs/OTCApi.md#create_otc_bank) | **POST** /otc/bank/create | Create bank card +*OTCApi* | [**delete_otc_bank**](docs/OTCApi.md#delete_otc_bank) | **POST** /otc/bank/delete | Delete bank card +*OTCApi* | [**set_default_otc_bank**](docs/OTCApi.md#set_default_otc_bank) | **POST** /otc/bank/set_default | Set default bank card +*OTCApi* | [**get_otc_bank_supplement_checklist**](docs/OTCApi.md#get_otc_bank_supplement_checklist) | **GET** /otc/bank/bank_supplement_checklist | Query the checklist of materials to supplement for a bank card +*OTCApi* | [**submit_otc_bank_personal_supplement**](docs/OTCApi.md#submit_otc_bank_personal_supplement) | **POST** /otc/bank/personal/bank_supplement | Submit Bank Card Supplement Materials (Personal) +*OTCApi* | [**submit_otc_bank_enterprise_supplement**](docs/OTCApi.md#submit_otc_bank_enterprise_supplement) | **POST** /otc/bank/enterprise/bank_supplement | Submit Bank Card Supplement Materials (Enterprise) +*OTCApi* | [**mark_otc_order_paid**](docs/OTCApi.md#mark_otc_order_paid) | **POST** /otc/order/paid | Mark fiat order as paid (deposit confirmation) *OTCApi* | [**cancel_otc_order**](docs/OTCApi.md#cancel_otc_order) | **POST** /otc/order/cancel | Fiat order cancellation *OTCApi* | [**list_otc_orders**](docs/OTCApi.md#list_otc_orders) | **GET** /otc/order/list | Fiat order list *OTCApi* | [**list_stable_coin_orders**](docs/OTCApi.md#list_stable_coin_orders) | **GET** /otc/stable_coin/order/list | Stablecoin order list @@ -192,6 +207,7 @@ Class | Method | HTTP request | Description *TradFiApi* | [**update_order**](docs/TradFiApi.md#update_order) | **PUT** /tradfi/orders/{order_id} | Modify order *TradFiApi* | [**delete_order**](docs/TradFiApi.md#delete_order) | **DELETE** /tradfi/orders/{order_id} | Cancel order *TradFiApi* | [**query_order_history_list**](docs/TradFiApi.md#query_order_history_list) | **GET** /tradfi/orders/history | Query historical order list +*TradFiApi* | [**query_order_log**](docs/TradFiApi.md#query_order_log) | **GET** /tradfi/orders/log/{log_id} | Get order details by log ID *TradFiApi* | [**query_position_list**](docs/TradFiApi.md#query_position_list) | **GET** /tradfi/positions | Query active position list *TradFiApi* | [**update_position**](docs/TradFiApi.md#update_position) | **PUT** /tradfi/positions/{position_id} | Modify position *TradFiApi* | [**close_position**](docs/TradFiApi.md#close_position) | **POST** /tradfi/positions/{position_id}/close | Close position @@ -218,6 +234,10 @@ Class | Method | HTTP request | Description *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 +*UnifiedApi* | [**get_estimated_quick_repayment**](docs/UnifiedApi.md#get_estimated_quick_repayment) | **GET** /unified/estimated_quick_repayment | Estimated quick repayment details +*UnifiedApi* | [**create_quick_repayment**](docs/UnifiedApi.md#create_quick_repayment) | **POST** /unified/quick_repayment | Quick repayment +*UnifiedApi* | [**get_unified_delta_neutral**](docs/UnifiedApi.md#get_unified_delta_neutral) | **GET** /unified/delta_neutral | Query the account Delta-neutral strategy mode setting +*UnifiedApi* | [**set_unified_delta_neutral**](docs/UnifiedApi.md#set_unified_delta_neutral) | **POST** /unified/delta_neutral | Set the account Delta-neutral strategy mode *AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Retrieve user account information *AccountApi* | [**get_account_main_keys**](docs/AccountApi.md#get_account_main_keys) | **GET** /account/main_keys | Query All Main Account Key Information *AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information @@ -237,6 +257,25 @@ Class | Method | HTTP request | Description *AlphaApi* | [**list_alpha_currencies**](docs/AlphaApi.md#list_alpha_currencies) | **GET** /alpha/currencies | Query currency information *AlphaApi* | [**list_alpha_tickers**](docs/AlphaApi.md#list_alpha_tickers) | **GET** /alpha/tickers | Query currency ticker *AlphaApi* | [**list_alpha_tokens**](docs/AlphaApi.md#list_alpha_tokens) | **GET** /alpha/tokens | Query Token Information +*AssetswapApi* | [**list_asset_swap_assets**](docs/AssetswapApi.md#list_asset_swap_assets) | **GET** /asset-swap/asset/list | Portfolio optimization — currency list +*AssetswapApi* | [**get_asset_swap_config**](docs/AssetswapApi.md#get_asset_swap_config) | **GET** /asset-swap/config | Portfolio optimization — configuration +*AssetswapApi* | [**evaluate_asset_swap**](docs/AssetswapApi.md#evaluate_asset_swap) | **GET** /asset-swap/evaluate | Portfolio optimization — valuation +*AssetswapApi* | [**create_asset_swap_order_v1**](docs/AssetswapApi.md#create_asset_swap_order_v1) | **POST** /asset-swap/order/create | Portfolio optimization — place order +*AssetswapApi* | [**list_asset_swap_orders_v1**](docs/AssetswapApi.md#list_asset_swap_orders_v1) | **GET** /asset-swap/order/list | Portfolio optimization — order list +*AssetswapApi* | [**preview_asset_swap_order_v1**](docs/AssetswapApi.md#preview_asset_swap_order_v1) | **POST** /asset-swap/order/preview | Portfolio optimization — preview +*AssetswapApi* | [**get_asset_swap_order_v1**](docs/AssetswapApi.md#get_asset_swap_order_v1) | **GET** /asset-swap/order/{order_id} | Portfolio optimization — query order +*BotApi* | [**get_ai_hub_strategy_recommend**](docs/BotApi.md#get_ai_hub_strategy_recommend) | **GET** /bot/strategy/recommend | Get AIHub strategy recommendations +*BotApi* | [**post_ai_hub_spot_grid_create**](docs/BotApi.md#post_ai_hub_spot_grid_create) | **POST** /bot/spot-grid/create | Create spot grid +*BotApi* | [**post_ai_hub_margin_grid_create**](docs/BotApi.md#post_ai_hub_margin_grid_create) | **POST** /bot/margin-grid/create | Create a lever grid +*BotApi* | [**post_ai_hub_infinite_grid_create**](docs/BotApi.md#post_ai_hub_infinite_grid_create) | **POST** /bot/infinite-grid/create | Create infinite grid +*BotApi* | [**post_ai_hub_futures_grid_create**](docs/BotApi.md#post_ai_hub_futures_grid_create) | **POST** /bot/futures-grid/create | Create a contract grid +*BotApi* | [**post_ai_hub_spot_martingale_create**](docs/BotApi.md#post_ai_hub_spot_martingale_create) | **POST** /bot/spot-martingale/create | Create Spot Martin +*BotApi* | [**post_ai_hub_contract_martingale_create**](docs/BotApi.md#post_ai_hub_contract_martingale_create) | **POST** /bot/contract-martingale/create | Create contract martin +*BotApi* | [**get_ai_hub_portfolio_running**](docs/BotApi.md#get_ai_hub_portfolio_running) | **GET** /bot/portfolio/running | Query the list of running policies +*BotApi* | [**get_ai_hub_portfolio_detail**](docs/BotApi.md#get_ai_hub_portfolio_detail) | **GET** /bot/portfolio/detail | Query order policy details +*BotApi* | [**post_ai_hub_portfolio_stop**](docs/BotApi.md#post_ai_hub_portfolio_stop) | **POST** /bot/portfolio/stop | Terminate a single running policy +*CouponApi* | [**list_user_coupons**](docs/CouponApi.md#list_user_coupons) | **GET** /coupon/user-coupon-list | Coupon Center list +*CouponApi* | [**get_user_coupon_detail**](docs/CouponApi.md#get_user_coupon_detail) | **GET** /coupon/user-coupon-detail | Coupon Center details *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 @@ -266,26 +305,49 @@ Class | Method | HTTP request | Description *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 | ETH swap -*EarnApi* | [**rate_list_eth2**](docs/EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | GTETH 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_dual_balance**](docs/EarnApi.md#list_dual_balance) | **GET** /earn/dual/balance | Dual-Currency Earning Assets -*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* | [**get_dual_order_refund_preview**](docs/EarnApi.md#get_dual_order_refund_preview) | **GET** /earn/dual/order-refund-preview | Dual-currency early redemption preview +*EarnApi* | [**place_dual_order_refund**](docs/EarnApi.md#place_dual_order_refund) | **POST** /earn/dual/order-refund | Dual-currency order early redemption +*EarnApi* | [**modify_dual_order_reinvest**](docs/EarnApi.md#modify_dual_order_reinvest) | **POST** /earn/dual/modify-order-reinvest | Modify dual-currency order reinvest +*EarnApi* | [**get_dual_project_recommend**](docs/EarnApi.md#get_dual_project_recommend) | **GET** /earn/dual/project-recommend | Dual-currency recommended projects *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 *EarnApi* | [**order_list**](docs/EarnApi.md#order_list) | **GET** /earn/staking/order_list | List of on-chain coin-earning orders *EarnApi* | [**award_list**](docs/EarnApi.md#award_list) | **GET** /earn/staking/award_list | On-chain coin-earning dividend records *EarnApi* | [**asset_list**](docs/EarnApi.md#asset_list) | **GET** /earn/staking/assets | On-chain coin-earning assets +*EarnApi* | [**create_auto_invest_plan**](docs/EarnApi.md#create_auto_invest_plan) | **POST** /earn/autoinvest/plans/create | Create auto invest plan +*EarnApi* | [**update_auto_invest_plan**](docs/EarnApi.md#update_auto_invest_plan) | **POST** /earn/autoinvest/plans/update | UpdateAuto invest plan +*EarnApi* | [**stop_auto_invest_plan**](docs/EarnApi.md#stop_auto_invest_plan) | **POST** /earn/autoinvest/plans/stop | StopAuto invest plan +*EarnApi* | [**add_position_auto_invest_plan**](docs/EarnApi.md#add_position_auto_invest_plan) | **POST** /earn/autoinvest/plans/add_position | Add position immediately +*EarnApi* | [**list_auto_invest_coins**](docs/EarnApi.md#list_auto_invest_coins) | **GET** /earn/autoinvest/coins | QueryCurrencies supporting auto invest +*EarnApi* | [**get_auto_invest_min_amount**](docs/EarnApi.md#get_auto_invest_min_amount) | **POST** /earn/autoinvest/min_invest_amount | Get minimum investment amount +*EarnApi* | [**list_auto_invest_plan_records**](docs/EarnApi.md#list_auto_invest_plan_records) | **GET** /earn/autoinvest/plans/records | List plan execution records +*EarnApi* | [**list_auto_invest_orders**](docs/EarnApi.md#list_auto_invest_orders) | **GET** /earn/autoinvest/orders | List plan execution recordsDetails(OrderDetails) +*EarnApi* | [**list_auto_invest_config**](docs/EarnApi.md#list_auto_invest_config) | **GET** /earn/autoinvest/config | List investment currency configuration +*EarnApi* | [**get_auto_invest_plan_detail**](docs/EarnApi.md#get_auto_invest_plan_detail) | **GET** /earn/autoinvest/plans/detail | QueryAuto invest planDetails +*EarnApi* | [**list_auto_invest_plans**](docs/EarnApi.md#list_auto_invest_plans) | **GET** /earn/autoinvest/plans/list_info | QueryAuto invest planList +*EarnApi* | [**list_earn_fixed_term_products**](docs/EarnApi.md#list_earn_fixed_term_products) | **GET** /earn/fixed-term/product | Get product list +*EarnApi* | [**list_earn_fixed_term_products_by_asset**](docs/EarnApi.md#list_earn_fixed_term_products_by_asset) | **GET** /earn/fixed-term/product/{asset}/list | Get product list by single currency +*EarnApi* | [**list_earn_fixed_term_lends**](docs/EarnApi.md#list_earn_fixed_term_lends) | **GET** /earn/fixed-term/user/lend | Subscription list +*EarnApi* | [**create_earn_fixed_term_lend**](docs/EarnApi.md#create_earn_fixed_term_lend) | **POST** /earn/fixed-term/user/lend | Subscription +*EarnApi* | [**create_earn_fixed_term_pre_redeem**](docs/EarnApi.md#create_earn_fixed_term_pre_redeem) | **POST** /earn/fixed-term/user/pre-redeem | Redeem +*EarnApi* | [**list_earn_fixed_term_history**](docs/EarnApi.md#list_earn_fixed_term_history) | **GET** /earn/fixed-term/user/history | Subscription history *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 | 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} | 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 +*FlashSwapApi* | [**create_flash_swap_multi_currency_many_to_one_order**](docs/FlashSwapApi.md#create_flash_swap_multi_currency_many_to_one_order) | **POST** /flash_swap/multi-currency/many-to-one/order/create | Flash Swap - Multi-currency exchange - Place order (many-to-one) +*FlashSwapApi* | [**preview_flash_swap_multi_currency_many_to_one_order**](docs/FlashSwapApi.md#preview_flash_swap_multi_currency_many_to_one_order) | **POST** /flash_swap/multi-currency/many-to-one/order/preview | Flash Swap - Multi-currency exchange - Preview (many-to-one) +*FlashSwapApi* | [**create_flash_swap_order_v1**](docs/FlashSwapApi.md#create_flash_swap_order_v1) | **POST** /flash_swap/order/create | Flash Swap - Place order (one-to-one) +*FlashSwapApi* | [**create_flash_swap_multi_currency_one_to_many_order**](docs/FlashSwapApi.md#create_flash_swap_multi_currency_one_to_many_order) | **POST** /flash_swap/multi-currency/one-to-many/order/create | Flash Swap - Multi-currency exchange - Place order (one-to-many) +*FlashSwapApi* | [**preview_flash_swap_multi_currency_one_to_many_order**](docs/FlashSwapApi.md#preview_flash_swap_multi_currency_one_to_many_order) | **POST** /flash_swap/multi-currency/one-to-many/order/preview | Flash Swap - Multi-currency exchange - Preview (one-to-many) +*FlashSwapApi* | [**preview_flash_swap_order_v1**](docs/FlashSwapApi.md#preview_flash_swap_order_v1) | **GET** /flash_swap/order/preview | Flash Swap - Preview (one-to-one) *FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | Query all futures contracts +*FuturesApi* | [**list_futures_contracts_all**](docs/FuturesApi.md#list_futures_contracts_all) | **GET** /futures/{settle}/contracts_all | Query all contract information (including delisted) *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 @@ -343,12 +405,32 @@ Class | Method | HTTP request | Description *FuturesApi* | [**get_trail_order_detail**](docs/FuturesApi.md#get_trail_order_detail) | **GET** /futures/{settle}/autoorder/v1/trail/detail | Get trail order details *FuturesApi* | [**update_trail_order**](docs/FuturesApi.md#update_trail_order) | **POST** /futures/{settle}/autoorder/v1/trail/update | Update trail order *FuturesApi* | [**get_trail_order_change_log**](docs/FuturesApi.md#get_trail_order_change_log) | **GET** /futures/{settle}/autoorder/v1/trail/change_log | Get trail order user modification records +*FuturesApi* | [**create_chase_order**](docs/FuturesApi.md#create_chase_order) | **POST** /futures/{settle}/autoorder/v1/chase/create | Create a chase order +*FuturesApi* | [**stop_chase_order**](docs/FuturesApi.md#stop_chase_order) | **POST** /futures/{settle}/autoorder/v1/chase/stop | Stop a chase order +*FuturesApi* | [**stop_all_chase_orders**](docs/FuturesApi.md#stop_all_chase_orders) | **POST** /futures/{settle}/autoorder/v1/chase/stop_all | Stop chase orders in batch +*FuturesApi* | [**get_chase_orders**](docs/FuturesApi.md#get_chase_orders) | **GET** /futures/{settle}/autoorder/v1/chase/list | List chase orders +*FuturesApi* | [**get_chase_order_detail**](docs/FuturesApi.md#get_chase_order_detail) | **GET** /futures/{settle}/autoorder/v1/chase/detail | Get chase order detail *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 -*FuturesApi* | [**update_price_triggered_order**](docs/FuturesApi.md#update_price_triggered_order) | **PUT** /futures/{settle}/price_orders/amend/{order_id} | Modify a Single Auto Order +*FuturesApi* | [**update_price_triggered_order**](docs/FuturesApi.md#update_price_triggered_order) | **PUT** /futures/{settle}/price_orders/amend | Modify a Single Auto Order +*LaunchApi* | [**list_launch_pool_projects**](docs/LaunchApi.md#list_launch_pool_projects) | **GET** /launch/project-list | Query LaunchPool project list +*LaunchApi* | [**create_launch_pool_order**](docs/LaunchApi.md#create_launch_pool_order) | **POST** /launch/create-order | Create LaunchPool staking order +*LaunchApi* | [**redeem_launch_pool**](docs/LaunchApi.md#redeem_launch_pool) | **POST** /launch/redeem | Redeem LaunchPool staked assets +*LaunchApi* | [**list_launch_pool_pledge_records**](docs/LaunchApi.md#list_launch_pool_pledge_records) | **GET** /launch/user-pledge-records | Query user pledge records +*LaunchApi* | [**list_launch_pool_reward_records**](docs/LaunchApi.md#list_launch_pool_reward_records) | **GET** /launch/get-user-reward-records | Query user reward records +*LaunchApi* | [**get_hodler_airdrop_project_list**](docs/LaunchApi.md#get_hodler_airdrop_project_list) | **GET** /launch/hodler-airdrop/project-list | Check the list of HODLer Airdrop activities +*LaunchApi* | [**hodler_airdrop_order**](docs/LaunchApi.md#hodler_airdrop_order) | **POST** /launch/hodler-airdrop/order | Participate in the HODLer Airdrop event +*LaunchApi* | [**get_hodler_airdrop_user_order_records**](docs/LaunchApi.md#get_hodler_airdrop_user_order_records) | **GET** /launch/hodler-airdrop/user-order-records | Check HODLer Airdrop participation records +*LaunchApi* | [**get_hodler_airdrop_user_airdrop_records**](docs/LaunchApi.md#get_hodler_airdrop_user_airdrop_records) | **GET** /launch/hodler-airdrop/user-airdrop-records | Query HODLer Airdrop records +*LaunchApi* | [**get_candy_drop_activity_list_v4**](docs/LaunchApi.md#get_candy_drop_activity_list_v4) | **GET** /launch/candydrop/activity-list | Query activity list +*LaunchApi* | [**register_candy_drop_v4**](docs/LaunchApi.md#register_candy_drop_v4) | **POST** /launch/candydrop/register | Sign up for events +*LaunchApi* | [**get_candy_drop_activity_rules_v4**](docs/LaunchApi.md#get_candy_drop_activity_rules_v4) | **GET** /launch/candydrop/activity-rules | Query activity rules +*LaunchApi* | [**get_candy_drop_task_progress_v4**](docs/LaunchApi.md#get_candy_drop_task_progress_v4) | **GET** /launch/candydrop/task-progress | Query task completion progress +*LaunchApi* | [**get_candy_drop_participation_records_v4**](docs/LaunchApi.md#get_candy_drop_participation_records_v4) | **GET** /launch/candydrop/participation-records | Query participation records +*LaunchApi* | [**get_candy_drop_airdrop_records_v4**](docs/LaunchApi.md#get_candy_drop_airdrop_records_v4) | **GET** /launch/candydrop/airdrop-records | Query airdrop records *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 | Query margin account balance change history *MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list @@ -405,6 +487,7 @@ Class | Method | HTTP request | Description *P2pApi* | [**p2p_merchant_account_get_user_info**](docs/P2pApi.md#p2p_merchant_account_get_user_info) | **POST** /p2p/merchant/account/get_user_info | Get account information *P2pApi* | [**p2p_merchant_account_get_counterparty_user_info**](docs/P2pApi.md#p2p_merchant_account_get_counterparty_user_info) | **POST** /p2p/merchant/account/get_counterparty_user_info | Get counterparty information *P2pApi* | [**p2p_merchant_account_get_myself_payment**](docs/P2pApi.md#p2p_merchant_account_get_myself_payment) | **POST** /p2p/merchant/account/get_myself_payment | Get payment method list +*P2pApi* | [**p2p_merchant_account_set_merchant_work_hours**](docs/P2pApi.md#p2p_merchant_account_set_merchant_work_hours) | **POST** /p2p/merchant/account/set_merchant_work_hours | Set merchant working status and custom working hours *P2pApi* | [**p2p_merchant_transaction_get_pending_transaction_list**](docs/P2pApi.md#p2p_merchant_transaction_get_pending_transaction_list) | **POST** /p2p/merchant/transaction/get_pending_transaction_list | Get pending orders *P2pApi* | [**p2p_merchant_transaction_get_completed_transaction_list**](docs/P2pApi.md#p2p_merchant_transaction_get_completed_transaction_list) | **POST** /p2p/merchant/transaction/get_completed_transaction_list | Get all/historical orders *P2pApi* | [**p2p_merchant_transaction_get_transaction_details**](docs/P2pApi.md#p2p_merchant_transaction_get_transaction_details) | **POST** /p2p/merchant/transaction/get_transaction_details | Query order details @@ -428,6 +511,9 @@ Class | Method | HTTP request | Description *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 +*RebateApi* | [**get_partner_application_recent**](docs/RebateApi.md#get_partner_application_recent) | **GET** /rebate/partner/applications/recent | Get recent partner application records +*RebateApi* | [**get_partner_eligibility**](docs/RebateApi.md#get_partner_eligibility) | **GET** /rebate/partner/eligibility | Check partner application eligibility +*RebateApi* | [**get_partner_agent_data_aggregated**](docs/RebateApi.md#get_partner_agent_data_aggregated) | **GET** /rebate/partner/data/aggregated | Aggregated partner agent statistics *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 @@ -460,6 +546,8 @@ Class | Method | HTTP request | Description *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 +*SquareApi* | [**list_square_ai_search**](docs/SquareApi.md#list_square_ai_search) | **GET** /social/message/search | AI MCP Dynamic Search +*SquareApi* | [**list_live_replay**](docs/SquareApi.md#list_live_replay) | **GET** /social/live/tag_coin_live_replay | Gate AI Assistant live stream data retrieval *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 | Get withdrawal records @@ -474,7 +562,7 @@ Class | Method | HTTP request | Description *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* | [**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 | 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 @@ -482,6 +570,10 @@ Class | Method | HTTP request | Description *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 *WalletApi* | [**get_low_cap_exchange_list**](docs/WalletApi.md#get_low_cap_exchange_list) | **GET** /wallet/getLowCapExchangeList | Retrieve the list of low-liquidity or low-cap tokens +*WelfareApi* | [**get_user_identity**](docs/WelfareApi.md#get_user_identity) | **GET** /rewards/getUserIdentity | Get user identity +*WelfareApi* | [**get_beginner_task_list**](docs/WelfareApi.md#get_beginner_task_list) | **GET** /rewards/getBeginnerTaskList | Get beginner task list +*WelfareApi* | [**claim_task**](docs/WelfareApi.md#claim_task) | **POST** /rewards/claimTask | Get the task +*WelfareApi* | [**claim_reward**](docs/WelfareApi.md#claim_reward) | **POST** /rewards/claimReward | Receive mission rewards *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 @@ -489,6 +581,22 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [AIHubCreateData](docs/AIHubCreateData.md) + - [AIHubCreateSuccessResponse](docs/AIHubCreateSuccessResponse.md) + - [AIHubDiscoverData](docs/AIHubDiscoverData.md) + - [AIHubDiscoverSuccessResponse](docs/AIHubDiscoverSuccessResponse.md) + - [AIHubPortfolioBaseInfo](docs/AIHubPortfolioBaseInfo.md) + - [AIHubPortfolioDetailData](docs/AIHubPortfolioDetailData.md) + - [AIHubPortfolioDetailSuccessResponse](docs/AIHubPortfolioDetailSuccessResponse.md) + - [AIHubPortfolioMetrics](docs/AIHubPortfolioMetrics.md) + - [AIHubPortfolioPosition](docs/AIHubPortfolioPosition.md) + - [AIHubPortfolioRunningData](docs/AIHubPortfolioRunningData.md) + - [AIHubPortfolioRunningItem](docs/AIHubPortfolioRunningItem.md) + - [AIHubPortfolioRunningSuccessResponse](docs/AIHubPortfolioRunningSuccessResponse.md) + - [AIHubPortfolioStopData](docs/AIHubPortfolioStopData.md) + - [AIHubPortfolioStopRequest](docs/AIHubPortfolioStopRequest.md) + - [AIHubPortfolioStopSuccessResponse](docs/AIHubPortfolioStopSuccessResponse.md) + - [AIHubRecommendation](docs/AIHubRecommendation.md) - [AccountBalance](docs/AccountBalance.md) - [AccountBookResponse](docs/AccountBookResponse.md) - [AccountDetail](docs/AccountDetail.md) @@ -504,10 +612,46 @@ Class | Method | HTTP request | Description - [AgencyCommissionHistory](docs/AgencyCommissionHistory.md) - [AgencyTransaction](docs/AgencyTransaction.md) - [AgencyTransactionHistory](docs/AgencyTransactionHistory.md) + - [AlphaCurrency](docs/AlphaCurrency.md) - [AlphaTicker](docs/AlphaTicker.md) + - [AmendOptionsOrderRequest](docs/AmendOptionsOrderRequest.md) + - [ApiResponseAssetSwapConfig](docs/ApiResponseAssetSwapConfig.md) + - [ApiResponseAssetSwapEvaluate](docs/ApiResponseAssetSwapEvaluate.md) + - [ApiResponseAssetSwapListAssets](docs/ApiResponseAssetSwapListAssets.md) + - [ApiResponseAssetSwapOrderCreateV1](docs/ApiResponseAssetSwapOrderCreateV1.md) + - [ApiResponseAssetSwapOrderListV1](docs/ApiResponseAssetSwapOrderListV1.md) + - [ApiResponseAssetSwapOrderPreviewV1](docs/ApiResponseAssetSwapOrderPreviewV1.md) + - [ApiResponseAssetSwapOrderQueryV1](docs/ApiResponseAssetSwapOrderQueryV1.md) + - [ApiResponseExSkillClaimRewardResp](docs/ApiResponseExSkillClaimRewardResp.md) + - [ApiResponseExSkillClaimRewardRespData](docs/ApiResponseExSkillClaimRewardRespData.md) + - [ApiResponseExSkillClaimTaskResp](docs/ApiResponseExSkillClaimTaskResp.md) + - [ApiResponseExSkillGetBeginnerTaskListResp](docs/ApiResponseExSkillGetBeginnerTaskListResp.md) + - [ApiResponseExSkillGetBeginnerTaskListRespData](docs/ApiResponseExSkillGetBeginnerTaskListRespData.md) + - [ApiResponseExSkillGetBeginnerTaskListRespDataTasks](docs/ApiResponseExSkillGetBeginnerTaskListRespDataTasks.md) + - [ApiResponseExSkillGetUserIdentityResp](docs/ApiResponseExSkillGetUserIdentityResp.md) + - [AssetListResp](docs/AssetListResp.md) + - [AssetSwapFrontend](docs/AssetSwapFrontend.md) + - [AutoInvestCoinsItem](docs/AutoInvestCoinsItem.md) + - [AutoInvestConfigItem](docs/AutoInvestConfigItem.md) + - [AutoInvestMinInvestAmount](docs/AutoInvestMinInvestAmount.md) + - [AutoInvestMinInvestAmountItems](docs/AutoInvestMinInvestAmountItems.md) + - [AutoInvestMinInvestAmountResp](docs/AutoInvestMinInvestAmountResp.md) + - [AutoInvestOrderItem](docs/AutoInvestOrderItem.md) + - [AutoInvestPlanAddPosition](docs/AutoInvestPlanAddPosition.md) + - [AutoInvestPlanCreate](docs/AutoInvestPlanCreate.md) + - [AutoInvestPlanCreateItems](docs/AutoInvestPlanCreateItems.md) + - [AutoInvestPlanCreateResp](docs/AutoInvestPlanCreateResp.md) + - [AutoInvestPlanDetail](docs/AutoInvestPlanDetail.md) + - [AutoInvestPlanListInfoResp](docs/AutoInvestPlanListInfoResp.md) + - [AutoInvestPlanRecordItem](docs/AutoInvestPlanRecordItem.md) + - [AutoInvestPlanRecordsResp](docs/AutoInvestPlanRecordsResp.md) + - [AutoInvestPlanStop](docs/AutoInvestPlanStop.md) + - [AutoInvestPlanUpdate](docs/AutoInvestPlanUpdate.md) + - [AutoInvestPortfolioItem](docs/AutoInvestPortfolioItem.md) - [AutoRepaySetting](docs/AutoRepaySetting.md) - [AwardListStruct](docs/AwardListStruct.md) - [AwardListStructList](docs/AwardListStructList.md) + - [BaseResponse](docs/BaseResponse.md) - [BatchAmendItem](docs/BatchAmendItem.md) - [BatchAmendOrderReq](docs/BatchAmendOrderReq.md) - [BatchFundingRatesRequest](docs/BatchFundingRatesRequest.md) @@ -516,16 +660,30 @@ Class | Method | HTTP request | Description - [BatchOrder](docs/BatchOrder.md) - [BorrowCurrencyInfo](docs/BorrowCurrencyInfo.md) - [BrokerCommission](docs/BrokerCommission.md) - - [BrokerCommission1](docs/BrokerCommission1.md) + - [BrokerCommissionItem](docs/BrokerCommissionItem.md) - [BrokerCommissionSubBrokerInfo](docs/BrokerCommissionSubBrokerInfo.md) - [BrokerTransaction](docs/BrokerTransaction.md) - - [BrokerTransaction1](docs/BrokerTransaction1.md) + - [BrokerTransactionHistory](docs/BrokerTransactionHistory.md) - [CancelBatchOrder](docs/CancelBatchOrder.md) - [CancelOrder](docs/CancelOrder.md) - [CancelOrderResult](docs/CancelOrderResult.md) + - [CandyDropV4ActivityCd01](docs/CandyDropV4ActivityCd01.md) + - [CandyDropV4ActivityRulesCd03](docs/CandyDropV4ActivityRulesCd03.md) + - [CandyDropV4AirdropRecordCd06](docs/CandyDropV4AirdropRecordCd06.md) + - [CandyDropV4ErrorCd01](docs/CandyDropV4ErrorCd01.md) + - [CandyDropV4ParticipationRecordCd05](docs/CandyDropV4ParticipationRecordCd05.md) + - [CandyDropV4PrizePoolCd03](docs/CandyDropV4PrizePoolCd03.md) + - [CandyDropV4RegisterReqCd02](docs/CandyDropV4RegisterReqCd02.md) + - [CandyDropV4RegisterRespCd02](docs/CandyDropV4RegisterRespCd02.md) + - [CandyDropV4TaskCd03](docs/CandyDropV4TaskCd03.md) + - [CandyDropV4TaskProgressCd04](docs/CandyDropV4TaskProgressCd04.md) + - [CandyDropV4TaskProgressItemCd04](docs/CandyDropV4TaskProgressItemCd04.md) - [Categories](docs/Categories.md) - [CategoriesData](docs/CategoriesData.md) - [CategoriesDataList](docs/CategoriesDataList.md) + - [ChaseOrder](docs/ChaseOrder.md) + - [ClaimRewardError](docs/ClaimRewardError.md) + - [ClaimTaskError](docs/ClaimTaskError.md) - [CollateralAdjust](docs/CollateralAdjust.md) - [CollateralAdjustRes](docs/CollateralAdjustRes.md) - [CollateralCurrency](docs/CollateralCurrency.md) @@ -540,15 +698,30 @@ Class | Method | HTTP request | Description - [ContractDetail](docs/ContractDetail.md) - [ContractDetailData](docs/ContractDetailData.md) - [ContractDetailDataList](docs/ContractDetailDataList.md) + - [ContractMartingaleCreateParams](docs/ContractMartingaleCreateParams.md) + - [ContractMartingaleCreateRequest](docs/ContractMartingaleCreateRequest.md) + - [ContractMartingaleDirection](docs/ContractMartingaleDirection.md) - [ContractStat](docs/ContractStat.md) + - [ConvertCurrenciesV2Item](docs/ConvertCurrenciesV2Item.md) - [ConvertSmallBalance](docs/ConvertSmallBalance.md) - [CountdownCancelAllFuturesTask](docs/CountdownCancelAllFuturesTask.md) - [CountdownCancelAllOptionsTask](docs/CountdownCancelAllOptionsTask.md) - [CountdownCancelAllSpotTask](docs/CountdownCancelAllSpotTask.md) + - [CreateChaseOrderReq](docs/CreateChaseOrderReq.md) + - [CreateChaseOrderResp](docs/CreateChaseOrderResp.md) + - [CreateEarnFixedTermLendResponse](docs/CreateEarnFixedTermLendResponse.md) + - [CreateEarnFixedTermLendResponseData](docs/CreateEarnFixedTermLendResponseData.md) + - [CreateEarnFixedTermPreRedeemResponse](docs/CreateEarnFixedTermPreRedeemResponse.md) - [CreateMultiCollateralOrder](docs/CreateMultiCollateralOrder.md) - [CreateOrder](docs/CreateOrder.md) - - [CreateOrderData](docs/CreateOrderData.md) + - [CreateOrder2](docs/CreateOrder2.md) + - [CreateOrder2Data](docs/CreateOrder2Data.md) + - [CreateOrderDetail](docs/CreateOrderDetail.md) + - [CreateOrderV4](docs/CreateOrderV4.md) + - [CreateParam](docs/CreateParam.md) - [CreateTrailOrder](docs/CreateTrailOrder.md) + - [CreateTrailOrderResponse](docs/CreateTrailOrderResponse.md) + - [CreateTrailOrderResult](docs/CreateTrailOrderResult.md) - [CreateTransaction](docs/CreateTransaction.md) - [CreateUniLend](docs/CreateUniLend.md) - [CreateUniLoan](docs/CreateUniLoan.md) @@ -557,17 +730,39 @@ Class | Method | HTTP request | Description - [CrossMarginBalance](docs/CrossMarginBalance.md) - [CrossMarginLoan](docs/CrossMarginLoan.md) - [CrossMarginRepayment](docs/CrossMarginRepayment.md) + - [CrossexAccount](docs/CrossexAccount.md) + - [CrossexAccountAsset](docs/CrossexAccountAsset.md) + - [CrossexAccountBookRecord](docs/CrossexAccountBookRecord.md) - [CrossexAccountUpdateRequest](docs/CrossexAccountUpdateRequest.md) + - [CrossexAccountUpdateResponse](docs/CrossexAccountUpdateResponse.md) + - [CrossexAdlRank](docs/CrossexAdlRank.md) - [CrossexClosePositionRequest](docs/CrossexClosePositionRequest.md) + - [CrossexCoinDiscountRate](docs/CrossexCoinDiscountRate.md) - [CrossexConvertOrderRequest](docs/CrossexConvertOrderRequest.md) + - [CrossexConvertOrderResponse](docs/CrossexConvertOrderResponse.md) - [CrossexConvertQuoteRequest](docs/CrossexConvertQuoteRequest.md) + - [CrossexConvertQuoteResponse](docs/CrossexConvertQuoteResponse.md) + - [CrossexHistoricalMarginPosition](docs/CrossexHistoricalMarginPosition.md) + - [CrossexHistoricalPosition](docs/CrossexHistoricalPosition.md) + - [CrossexInterestRate](docs/CrossexInterestRate.md) - [CrossexLeverageRequest](docs/CrossexLeverageRequest.md) + - [CrossexLeverageResponse](docs/CrossexLeverageResponse.md) + - [CrossexMarginInterestRecord](docs/CrossexMarginInterestRecord.md) + - [CrossexMarginPosition](docs/CrossexMarginPosition.md) + - [CrossexOrder](docs/CrossexOrder.md) + - [CrossexOrderActionResponse](docs/CrossexOrderActionResponse.md) - [CrossexOrderRequest](docs/CrossexOrderRequest.md) - [CrossexOrderUpdateRequest](docs/CrossexOrderUpdateRequest.md) - - [CrossexRuleRiskLimitsTiers](docs/CrossexRuleRiskLimitsTiers.md) + - [CrossexPosition](docs/CrossexPosition.md) + - [CrossexRiskLimit](docs/CrossexRiskLimit.md) + - [CrossexRiskLimitTier](docs/CrossexRiskLimitTier.md) + - [CrossexSpecialFee](docs/CrossexSpecialFee.md) + - [CrossexTrade](docs/CrossexTrade.md) + - [CrossexTransferCoin](docs/CrossexTransferCoin.md) + - [CrossexTransferRecord](docs/CrossexTransferRecord.md) - [CrossexTransferRequest](docs/CrossexTransferRequest.md) + - [CrossexTransferResponse](docs/CrossexTransferResponse.md) - [Currency](docs/Currency.md) - - [Currency2](docs/Currency2.md) - [CurrencyChain](docs/CurrencyChain.md) - [CurrencyPair](docs/CurrencyPair.md) - [CurrencyQuota](docs/CurrencyQuota.md) @@ -583,23 +778,66 @@ Class | Method | HTTP request | Description - [DeliveryMyTrade](docs/DeliveryMyTrade.md) - [DeliveryOrder](docs/DeliveryOrder.md) - [DeliveryOrderBook](docs/DeliveryOrderBook.md) + - [DeliveryOrderBookItem](docs/DeliveryOrderBookItem.md) - [DeliveryPosition](docs/DeliveryPosition.md) - [DeliveryPositionClose](docs/DeliveryPositionClose.md) - [DeliverySettlement](docs/DeliverySettlement.md) - [DeliveryTicker](docs/DeliveryTicker.md) - [DeliveryTrade](docs/DeliveryTrade.md) + - [DeltaNeutralEnabled](docs/DeltaNeutralEnabled.md) - [DepositAddress](docs/DepositAddress.md) - [DepositRecord](docs/DepositRecord.md) + - [DiscoverScene](docs/DiscoverScene.md) - [DualGetBalance](docs/DualGetBalance.md) - [DualGetOrders](docs/DualGetOrders.md) - [DualGetPlans](docs/DualGetPlans.md) - - [Error](docs/Error.md) - - [Eth2RateList](docs/Eth2RateList.md) - - [Eth2Swap](docs/Eth2Swap.md) - - [FindCoin](docs/FindCoin.md) + - [DualModifyOrderReinvestParams](docs/DualModifyOrderReinvestParams.md) + - [DualOrderRefundParams](docs/DualOrderRefundParams.md) + - [DualOrderRefundPreview](docs/DualOrderRefundPreview.md) + - [DualProjectRecommend](docs/DualProjectRecommend.md) + - [EarnFixedTermPreRedeemRequest](docs/EarnFixedTermPreRedeemRequest.md) + - [Eligibility](docs/Eligibility.md) + - [EligibilityResponse](docs/EligibilityResponse.md) + - [EligibilityResponseAllOf](docs/EligibilityResponseAllOf.md) + - [ErrCodeMsg](docs/ErrCodeMsg.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [EvaluateItem](docs/EvaluateItem.md) + - [EvaluateResp](docs/EvaluateResp.md) + - [ExSkillClaimRewardReq](docs/ExSkillClaimRewardReq.md) + - [ExSkillClaimTaskReq](docs/ExSkillClaimTaskReq.md) + - [FixedTermBonusInfo](docs/FixedTermBonusInfo.md) + - [FixedTermCouponInfo](docs/FixedTermCouponInfo.md) + - [FixedTermHistoryRecord](docs/FixedTermHistoryRecord.md) + - [FixedTermLendOrder](docs/FixedTermLendOrder.md) + - [FixedTermLendRequest](docs/FixedTermLendRequest.md) + - [FixedTermProduct](docs/FixedTermProduct.md) + - [FixedTermProductInfo](docs/FixedTermProductInfo.md) + - [FixedTermProductSimple](docs/FixedTermProductSimple.md) - [FlashSwapCurrencyPair](docs/FlashSwapCurrencyPair.md) + - [FlashSwapErrorResponse](docs/FlashSwapErrorResponse.md) + - [FlashSwapMultiCurrencyCreateParam](docs/FlashSwapMultiCurrencyCreateParam.md) + - [FlashSwapMultiCurrencyManyToOneOrderCreateReq](docs/FlashSwapMultiCurrencyManyToOneOrderCreateReq.md) + - [FlashSwapMultiCurrencyManyToOneOrderCreateResp](docs/FlashSwapMultiCurrencyManyToOneOrderCreateResp.md) + - [FlashSwapMultiCurrencyManyToOneOrderCreateRespData](docs/FlashSwapMultiCurrencyManyToOneOrderCreateRespData.md) + - [FlashSwapMultiCurrencyManyToOneOrderPreviewReq](docs/FlashSwapMultiCurrencyManyToOneOrderPreviewReq.md) + - [FlashSwapMultiCurrencyManyToOneOrderPreviewResp](docs/FlashSwapMultiCurrencyManyToOneOrderPreviewResp.md) + - [FlashSwapMultiCurrencyManyToOneOrderPreviewRespData](docs/FlashSwapMultiCurrencyManyToOneOrderPreviewRespData.md) + - [FlashSwapMultiCurrencyOneToManyOrderCreateReq](docs/FlashSwapMultiCurrencyOneToManyOrderCreateReq.md) + - [FlashSwapMultiCurrencyOneToManyOrderCreateResp](docs/FlashSwapMultiCurrencyOneToManyOrderCreateResp.md) + - [FlashSwapMultiCurrencyOneToManyOrderCreateRespData](docs/FlashSwapMultiCurrencyOneToManyOrderCreateRespData.md) + - [FlashSwapMultiCurrencyOneToManyOrderPreviewReq](docs/FlashSwapMultiCurrencyOneToManyOrderPreviewReq.md) + - [FlashSwapMultiCurrencyOneToManyOrderPreviewResp](docs/FlashSwapMultiCurrencyOneToManyOrderPreviewResp.md) + - [FlashSwapMultiCurrencyOneToManyOrderPreviewRespData](docs/FlashSwapMultiCurrencyOneToManyOrderPreviewRespData.md) + - [FlashSwapMultiCurrencyOrder](docs/FlashSwapMultiCurrencyOrder.md) + - [FlashSwapMultiCurrencyPreviewOrder](docs/FlashSwapMultiCurrencyPreviewOrder.md) + - [FlashSwapMultiCurrencyPreviewParam](docs/FlashSwapMultiCurrencyPreviewParam.md) - [FlashSwapOrder](docs/FlashSwapOrder.md) + - [FlashSwapOrderCreateReq](docs/FlashSwapOrderCreateReq.md) + - [FlashSwapOrderCreateResp](docs/FlashSwapOrderCreateResp.md) + - [FlashSwapOrderCreateRespData](docs/FlashSwapOrderCreateRespData.md) - [FlashSwapOrderPreview](docs/FlashSwapOrderPreview.md) + - [FlashSwapOrderPreviewResp](docs/FlashSwapOrderPreviewResp.md) + - [FlashSwapOrderPreviewRespData](docs/FlashSwapOrderPreviewRespData.md) - [FlashSwapOrderRequest](docs/FlashSwapOrderRequest.md) - [FlashSwapPreviewRequest](docs/FlashSwapPreviewRequest.md) - [FundingAccount](docs/FundingAccount.md) @@ -612,7 +850,10 @@ Class | Method | HTTP request | Description - [FuturesBBOOrder](docs/FuturesBBOOrder.md) - [FuturesBatchAmendOrderRequest](docs/FuturesBatchAmendOrderRequest.md) - [FuturesCandlestick](docs/FuturesCandlestick.md) + - [FuturesDirection](docs/FuturesDirection.md) - [FuturesFee](docs/FuturesFee.md) + - [FuturesGridCreateParams](docs/FuturesGridCreateParams.md) + - [FuturesGridCreateRequest](docs/FuturesGridCreateRequest.md) - [FuturesIndexConstituents](docs/FuturesIndexConstituents.md) - [FuturesInitialOrder](docs/FuturesInitialOrder.md) - [FuturesLeverage](docs/FuturesLeverage.md) @@ -623,7 +864,7 @@ Class | Method | HTTP request | Description - [FuturesOrderAmendment](docs/FuturesOrderAmendment.md) - [FuturesOrderBook](docs/FuturesOrderBook.md) - [FuturesOrderBookItem](docs/FuturesOrderBookItem.md) - - [FuturesOrderBookItem1](docs/FuturesOrderBookItem1.md) + - [FuturesOrderTimerange](docs/FuturesOrderTimerange.md) - [FuturesPositionCrossMode](docs/FuturesPositionCrossMode.md) - [FuturesPremiumIndex](docs/FuturesPremiumIndex.md) - [FuturesPriceTrigger](docs/FuturesPriceTrigger.md) @@ -632,109 +873,80 @@ Class | Method | HTTP request | Description - [FuturesTicker](docs/FuturesTicker.md) - [FuturesTrade](docs/FuturesTrade.md) - [FuturesUpdatePriceTriggeredOrder](docs/FuturesUpdatePriceTriggeredOrder.md) + - [GateErrorResponse](docs/GateErrorResponse.md) + - [GetBeginnerTaskListError](docs/GetBeginnerTaskListError.md) + - [GetChaseOrderDetailResp](docs/GetChaseOrderDetailResp.md) + - [GetChaseOrdersResp](docs/GetChaseOrdersResp.md) - [GetChatsListRequest](docs/GetChatsListRequest.md) - [GetCompletedTransactionListRequest](docs/GetCompletedTransactionListRequest.md) - [GetCounterpartyUserInfoRequest](docs/GetCounterpartyUserInfoRequest.md) + - [GetMyActivityEntryResponse](docs/GetMyActivityEntryResponse.md) + - [GetMyActivityEntryResponseData](docs/GetMyActivityEntryResponseData.md) - [GetMyselfPaymentRequest](docs/GetMyselfPaymentRequest.md) - [GetPendingTransactionListRequest](docs/GetPendingTransactionListRequest.md) - [GetTransactionDetailsRequest](docs/GetTransactionDetailsRequest.md) + - [GetUserCouponDetailResponse](docs/GetUserCouponDetailResponse.md) + - [GetUserCouponDetailResponseData](docs/GetUserCouponDetailResponseData.md) + - [GetUserIdentityError](docs/GetUserIdentityError.md) + - [HodlerAirdropV4ErrorResponse](docs/HodlerAirdropV4ErrorResponse.md) + - [HodlerAirdropV4OrderRequest](docs/HodlerAirdropV4OrderRequest.md) + - [HodlerAirdropV4OrderResponse](docs/HodlerAirdropV4OrderResponse.md) + - [HodlerAirdropV4ProjectItem](docs/HodlerAirdropV4ProjectItem.md) + - [HodlerAirdropV4UserAirdropRecord](docs/HodlerAirdropV4UserAirdropRecord.md) + - [HodlerAirdropV4UserOrderRecord](docs/HodlerAirdropV4UserOrderRecord.md) - [IndexConstituent](docs/IndexConstituent.md) - - [InlineObject](docs/InlineObject.md) - - [InlineObject1](docs/InlineObject1.md) + - [InfiniteGridCreateParams](docs/InfiniteGridCreateParams.md) + - [InfiniteGridCreateRequest](docs/InfiniteGridCreateRequest.md) - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2001](docs/InlineResponse2001.md) - - [InlineResponse20010](docs/InlineResponse20010.md) - - [InlineResponse20010Data](docs/InlineResponse20010Data.md) - - [InlineResponse20010DataLists](docs/InlineResponse20010DataLists.md) - - [InlineResponse20011](docs/InlineResponse20011.md) - - [InlineResponse20011Data](docs/InlineResponse20011Data.md) - - [InlineResponse20011DataCryptoCurrencyInfo](docs/InlineResponse20011DataCryptoCurrencyInfo.md) - - [InlineResponse20011DataFiatCurrencyInfo](docs/InlineResponse20011DataFiatCurrencyInfo.md) - - [InlineResponse20011DataList](docs/InlineResponse20011DataList.md) - - [InlineResponse20012](docs/InlineResponse20012.md) - - [InlineResponse20012Data](docs/InlineResponse20012Data.md) - - [InlineResponse20012DataList](docs/InlineResponse20012DataList.md) - - [InlineResponse20013](docs/InlineResponse20013.md) - - [InlineResponse20013Data](docs/InlineResponse20013Data.md) - - [InlineResponse20014](docs/InlineResponse20014.md) - - [InlineResponse20014Data](docs/InlineResponse20014Data.md) - - [InlineResponse20014DataMerchantInfo](docs/InlineResponse20014DataMerchantInfo.md) - - [InlineResponse20015](docs/InlineResponse20015.md) - - [InlineResponse20015Data](docs/InlineResponse20015Data.md) - - [InlineResponse20016](docs/InlineResponse20016.md) - - [InlineResponse20016Data](docs/InlineResponse20016Data.md) - - [InlineResponse20016List](docs/InlineResponse20016List.md) - - [InlineResponse20017](docs/InlineResponse20017.md) - - [InlineResponse20017Data](docs/InlineResponse20017Data.md) - - [InlineResponse20017DataConvertInfo](docs/InlineResponse20017DataConvertInfo.md) - - [InlineResponse20017DataList](docs/InlineResponse20017DataList.md) - - [InlineResponse20017DataTransTime](docs/InlineResponse20017DataTransTime.md) - - [InlineResponse20018](docs/InlineResponse20018.md) - - [InlineResponse20018Data](docs/InlineResponse20018Data.md) - - [InlineResponse20019](docs/InlineResponse20019.md) - - [InlineResponse2002](docs/InlineResponse2002.md) - - [InlineResponse20020](docs/InlineResponse20020.md) - - [InlineResponse20020Data](docs/InlineResponse20020Data.md) - - [InlineResponse20021](docs/InlineResponse20021.md) - - [InlineResponse20021Data](docs/InlineResponse20021Data.md) - - [InlineResponse20022](docs/InlineResponse20022.md) - - [InlineResponse20022Data](docs/InlineResponse20022Data.md) - - [InlineResponse20022DataLists](docs/InlineResponse20022DataLists.md) - - [InlineResponse20023](docs/InlineResponse20023.md) - - [InlineResponse20023Data](docs/InlineResponse20023Data.md) - - [InlineResponse20024](docs/InlineResponse20024.md) - - [InlineResponse20024Data](docs/InlineResponse20024Data.md) - - [InlineResponse20024DataMessages](docs/InlineResponse20024DataMessages.md) - - [InlineResponse20024DataMsgObj](docs/InlineResponse20024DataMsgObj.md) - - [InlineResponse20025](docs/InlineResponse20025.md) - - [InlineResponse20025Data](docs/InlineResponse20025Data.md) - - [InlineResponse20026](docs/InlineResponse20026.md) - - [InlineResponse20026Data](docs/InlineResponse20026Data.md) - - [InlineResponse20027](docs/InlineResponse20027.md) - - [InlineResponse20028](docs/InlineResponse20028.md) - - [InlineResponse20029](docs/InlineResponse20029.md) - - [InlineResponse2003](docs/InlineResponse2003.md) - - [InlineResponse20030](docs/InlineResponse20030.md) - - [InlineResponse20031](docs/InlineResponse20031.md) - - [InlineResponse20032](docs/InlineResponse20032.md) - - [InlineResponse20033](docs/InlineResponse20033.md) - - [InlineResponse20034](docs/InlineResponse20034.md) - - [InlineResponse20035](docs/InlineResponse20035.md) - - [InlineResponse20035Assets](docs/InlineResponse20035Assets.md) - - [InlineResponse20036](docs/InlineResponse20036.md) - - [InlineResponse20037](docs/InlineResponse20037.md) - - [InlineResponse20037SpecialFeeList](docs/InlineResponse20037SpecialFeeList.md) - - [InlineResponse20038](docs/InlineResponse20038.md) - - [InlineResponse20039](docs/InlineResponse20039.md) - - [InlineResponse2004](docs/InlineResponse2004.md) - - [InlineResponse20040](docs/InlineResponse20040.md) - - [InlineResponse20041](docs/InlineResponse20041.md) - - [InlineResponse20042](docs/InlineResponse20042.md) - - [InlineResponse20043](docs/InlineResponse20043.md) - - [InlineResponse20044](docs/InlineResponse20044.md) - - [InlineResponse20045](docs/InlineResponse20045.md) - - [InlineResponse20046](docs/InlineResponse20046.md) - - [InlineResponse20047](docs/InlineResponse20047.md) - - [InlineResponse2005](docs/InlineResponse2005.md) - - [InlineResponse2006](docs/InlineResponse2006.md) - - [InlineResponse2006Data](docs/InlineResponse2006Data.md) - - [InlineResponse2007](docs/InlineResponse2007.md) - - [InlineResponse2008](docs/InlineResponse2008.md) - - [InlineResponse2009](docs/InlineResponse2009.md) - - [InlineResponse2009Data](docs/InlineResponse2009Data.md) - - [InlineResponse201](docs/InlineResponse201.md) - - [InlineResponse201Data](docs/InlineResponse201Data.md) - - [InlineResponse202](docs/InlineResponse202.md) - - [InlineResponse2021](docs/InlineResponse2021.md) - [InsuranceRecord](docs/InsuranceRecord.md) - [Klines](docs/Klines.md) - [KlinesData](docs/KlinesData.md) - [KlinesDataList](docs/KlinesDataList.md) + - [LadderApr](docs/LadderApr.md) + - [LaunchPoolV4CreateOrderResponse](docs/LaunchPoolV4CreateOrderResponse.md) + - [LaunchPoolV4ErrorResponse](docs/LaunchPoolV4ErrorResponse.md) + - [LaunchPoolV4PledgeRecord](docs/LaunchPoolV4PledgeRecord.md) + - [LaunchPoolV4Project](docs/LaunchPoolV4Project.md) + - [LaunchPoolV4RewardPool](docs/LaunchPoolV4RewardPool.md) + - [LaunchPoolV4RewardRecord](docs/LaunchPoolV4RewardRecord.md) - [LedgerRecord](docs/LedgerRecord.md) - [LiquidateOrder](docs/LiquidateOrder.md) + - [ListActivitiesResponse](docs/ListActivitiesResponse.md) + - [ListActivitiesResponseData](docs/ListActivitiesResponseData.md) + - [ListActivitiesResponseDataList](docs/ListActivitiesResponseDataList.md) + - [ListActivityTypesResponse](docs/ListActivityTypesResponse.md) + - [ListActivityTypesResponseData](docs/ListActivityTypesResponseData.md) + - [ListActivityTypesResponseDataList](docs/ListActivityTypesResponseDataList.md) + - [ListEarnFixedTermHistoryResponse](docs/ListEarnFixedTermHistoryResponse.md) + - [ListEarnFixedTermHistoryResponseData](docs/ListEarnFixedTermHistoryResponseData.md) + - [ListEarnFixedTermLendsResponse](docs/ListEarnFixedTermLendsResponse.md) + - [ListEarnFixedTermLendsResponseData](docs/ListEarnFixedTermLendsResponseData.md) + - [ListEarnFixedTermProductsByAssetResponse](docs/ListEarnFixedTermProductsByAssetResponse.md) + - [ListEarnFixedTermProductsByAssetResponseData](docs/ListEarnFixedTermProductsByAssetResponseData.md) + - [ListEarnFixedTermProductsResponse](docs/ListEarnFixedTermProductsResponse.md) + - [ListEarnFixedTermProductsResponseData](docs/ListEarnFixedTermProductsResponseData.md) + - [ListLiveReplayError](docs/ListLiveReplayError.md) + - [ListLiveReplayResponse](docs/ListLiveReplayResponse.md) + - [ListLiveReplayResponseData](docs/ListLiveReplayResponseData.md) + - [ListLiveReplayResponseDataList](docs/ListLiveReplayResponseDataList.md) + - [ListLiveReplayResponseDataLive](docs/ListLiveReplayResponseDataLive.md) + - [ListLiveReplayResponseDataLiveHost](docs/ListLiveReplayResponseDataLiveHost.md) + - [ListLiveReplayResponseDataVideo](docs/ListLiveReplayResponseDataVideo.md) + - [ListSquareAiSearchError](docs/ListSquareAiSearchError.md) + - [ListSquareAiSearchResponse](docs/ListSquareAiSearchResponse.md) + - [ListSquareAiSearchResponseData](docs/ListSquareAiSearchResponseData.md) + - [ListSquareAiSearchResponseDataItems](docs/ListSquareAiSearchResponseDataItems.md) + - [ListUserCouponsResponse](docs/ListUserCouponsResponse.md) + - [ListUserCouponsResponseData](docs/ListUserCouponsResponseData.md) + - [ListUserCouponsResponseDataHelpUrl](docs/ListUserCouponsResponseDataHelpUrl.md) + - [ListUserCouponsResponseDataJumpUrl](docs/ListUserCouponsResponseDataJumpUrl.md) + - [ListUserCouponsResponseDataList](docs/ListUserCouponsResponseDataList.md) + - [ListUserCouponsResponseDataProgressConfig](docs/ListUserCouponsResponseDataProgressConfig.md) - [MarginAccount](docs/MarginAccount.md) - [MarginAccountBook](docs/MarginAccountBook.md) - [MarginAccountCurrency](docs/MarginAccountCurrency.md) + - [MarginGridCreateParams](docs/MarginGridCreateParams.md) + - [MarginGridCreateRequest](docs/MarginGridCreateRequest.md) - [MarginLeverageTier](docs/MarginLeverageTier.md) - [MarginMarketLeverage](docs/MarginMarketLeverage.md) - [MarginTiers](docs/MarginTiers.md) @@ -785,6 +997,8 @@ Class | Method | HTTP request | Description - [Order](docs/Order.md) - [OrderBook](docs/OrderBook.md) - [OrderCancel](docs/OrderCancel.md) + - [OrderCreateV1Req](docs/OrderCreateV1Req.md) + - [OrderCreateV1Resp](docs/OrderCreateV1Resp.md) - [OrderHistoryList](docs/OrderHistoryList.md) - [OrderHistoryListData](docs/OrderHistoryListData.md) - [OrderHistoryListDataList](docs/OrderHistoryListDataList.md) @@ -793,14 +1007,93 @@ Class | Method | HTTP request | Description - [OrderListDataList](docs/OrderListDataList.md) - [OrderListStruct](docs/OrderListStruct.md) - [OrderListStructList](docs/OrderListStructList.md) + - [OrderListV1Resp](docs/OrderListV1Resp.md) + - [OrderLog](docs/OrderLog.md) + - [OrderLogData](docs/OrderLogData.md) - [OrderPatch](docs/OrderPatch.md) + - [OrderPreviewV1Req](docs/OrderPreviewV1Req.md) + - [OrderPreviewV1Resp](docs/OrderPreviewV1Resp.md) - [OrderResp](docs/OrderResp.md) - [OrderResponse](docs/OrderResponse.md) + - [OtcActionResponse](docs/OtcActionResponse.md) + - [OtcBankCreateMultipartRequest](docs/OtcBankCreateMultipartRequest.md) + - [OtcBankCreateResponse](docs/OtcBankCreateResponse.md) + - [OtcBankCreateResponseData](docs/OtcBankCreateResponseData.md) + - [OtcBankEnterpriseSupplementMultipartRequest](docs/OtcBankEnterpriseSupplementMultipartRequest.md) + - [OtcBankIdRequest](docs/OtcBankIdRequest.md) + - [OtcBankListItem](docs/OtcBankListItem.md) + - [OtcBankListResponse](docs/OtcBankListResponse.md) + - [OtcBankListResult](docs/OtcBankListResult.md) + - [OtcBankPersonalSupplementMultipartRequest](docs/OtcBankPersonalSupplementMultipartRequest.md) + - [OtcBankSupplementChecklistItem](docs/OtcBankSupplementChecklistItem.md) + - [OtcBankSupplementChecklistResponse](docs/OtcBankSupplementChecklistResponse.md) + - [OtcBankSupplementChecklistResponseData](docs/OtcBankSupplementChecklistResponseData.md) - [OtcMarkOrderPaidRequest](docs/OtcMarkOrderPaidRequest.md) + - [OtcOrderDetail](docs/OtcOrderDetail.md) + - [OtcOrderDetailResponse](docs/OtcOrderDetailResponse.md) + - [OtcOrderListCryptoCurrencyInfo](docs/OtcOrderListCryptoCurrencyInfo.md) + - [OtcOrderListFiatCurrencyInfo](docs/OtcOrderListFiatCurrencyInfo.md) + - [OtcOrderListItem](docs/OtcOrderListItem.md) + - [OtcOrderListResponse](docs/OtcOrderListResponse.md) + - [OtcOrderListResult](docs/OtcOrderListResult.md) - [OtcOrderRequest](docs/OtcOrderRequest.md) - [OtcQuoteRequest](docs/OtcQuoteRequest.md) + - [OtcQuoteResponse](docs/OtcQuoteResponse.md) + - [OtcQuoteResult](docs/OtcQuoteResult.md) + - [OtcStableCoinOrderCreateResponse](docs/OtcStableCoinOrderCreateResponse.md) + - [OtcStableCoinOrderListItem](docs/OtcStableCoinOrderListItem.md) + - [OtcStableCoinOrderListResponse](docs/OtcStableCoinOrderListResponse.md) + - [OtcStableCoinOrderListResult](docs/OtcStableCoinOrderListResult.md) - [OtcStableCoinOrderRequest](docs/OtcStableCoinOrderRequest.md) + - [OtherContact](docs/OtherContact.md) + - [P2pAdDetail](docs/P2pAdDetail.md) + - [P2pAdDetailResponse](docs/P2pAdDetailResponse.md) + - [P2pAdsListItem](docs/P2pAdsListItem.md) + - [P2pAdsListResponse](docs/P2pAdsListResponse.md) + - [P2pAdsUpdateStatusResponse](docs/P2pAdsUpdateStatusResponse.md) + - [P2pAdsUpdateStatusResult](docs/P2pAdsUpdateStatusResult.md) + - [P2pChatListResponse](docs/P2pChatListResponse.md) + - [P2pChatListResult](docs/P2pChatListResult.md) + - [P2pChatMessage](docs/P2pChatMessage.md) + - [P2pChatMessagePayload](docs/P2pChatMessagePayload.md) + - [P2pCounterpartyUserInfo](docs/P2pCounterpartyUserInfo.md) + - [P2pCounterpartyUserInfoResponse](docs/P2pCounterpartyUserInfoResponse.md) + - [P2pMerchantBooksPlaceBizPushOrderResponse](docs/P2pMerchantBooksPlaceBizPushOrderResponse.md) + - [P2pMerchantBooksPlaceBizPushOrderResponseData](docs/P2pMerchantBooksPlaceBizPushOrderResponseData.md) + - [P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent](docs/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent.md) + - [P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction](docs/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction.md) + - [P2pMerchantMarketInfo](docs/P2pMerchantMarketInfo.md) + - [P2pMerchantUserInfo](docs/P2pMerchantUserInfo.md) + - [P2pMerchantUserInfoResponse](docs/P2pMerchantUserInfoResponse.md) + - [P2pMerchantWorkHours](docs/P2pMerchantWorkHours.md) + - [P2pMerchantWorkHoursResponse](docs/P2pMerchantWorkHoursResponse.md) + - [P2pMyAd](docs/P2pMyAd.md) + - [P2pMyAdsListResponse](docs/P2pMyAdsListResponse.md) + - [P2pMyAdsListResult](docs/P2pMyAdsListResult.md) + - [P2pPaymentMethodAccount](docs/P2pPaymentMethodAccount.md) + - [P2pPaymentMethodGroup](docs/P2pPaymentMethodGroup.md) + - [P2pPaymentMethodsResponse](docs/P2pPaymentMethodsResponse.md) + - [P2pSendChatMessageResponse](docs/P2pSendChatMessageResponse.md) + - [P2pSendChatMessageResult](docs/P2pSendChatMessageResult.md) + - [P2pTransactionActionResponse](docs/P2pTransactionActionResponse.md) + - [P2pTransactionConvertInfo](docs/P2pTransactionConvertInfo.md) + - [P2pTransactionDetail](docs/P2pTransactionDetail.md) + - [P2pTransactionDetailPayOthers](docs/P2pTransactionDetailPayOthers.md) + - [P2pTransactionDetailResponse](docs/P2pTransactionDetailResponse.md) + - [P2pTransactionListItem](docs/P2pTransactionListItem.md) + - [P2pTransactionListResponse](docs/P2pTransactionListResponse.md) + - [P2pTransactionListResult](docs/P2pTransactionListResult.md) + - [P2pTransactionListResultPayOthers](docs/P2pTransactionListResultPayOthers.md) + - [P2pTransactionTimeMarker](docs/P2pTransactionTimeMarker.md) + - [P2pUploadChatFileResponse](docs/P2pUploadChatFileResponse.md) + - [P2pUploadChatFileResult](docs/P2pUploadChatFileResult.md) + - [PartnerApplication](docs/PartnerApplication.md) + - [PartnerApplicationResponse](docs/PartnerApplicationResponse.md) + - [PartnerApplicationResponseAllOf](docs/PartnerApplicationResponseAllOf.md) - [PartnerCommissionHistory](docs/PartnerCommissionHistory.md) + - [PartnerDataAggregated](docs/PartnerDataAggregated.md) + - [PartnerDataAggregatedResponse](docs/PartnerDataAggregatedResponse.md) + - [PartnerDataAggregatedResponseAllOf](docs/PartnerDataAggregatedResponseAllOf.md) - [PartnerSub](docs/PartnerSub.md) - [PartnerSubList](docs/PartnerSubList.md) - [PartnerTransactionHistory](docs/PartnerTransactionHistory.md) @@ -822,10 +1115,22 @@ Class | Method | HTTP request | Description - [PositionListData](docs/PositionListData.md) - [PositionListDataList](docs/PositionListDataList.md) - [PositionTimerange](docs/PositionTimerange.md) + - [PreviewFromParam](docs/PreviewFromParam.md) + - [PreviewOrder](docs/PreviewOrder.md) + - [PreviewOrderDetail](docs/PreviewOrderDetail.md) + - [PreviewToParam](docs/PreviewToParam.md) - [ProfitLossRange](docs/ProfitLossRange.md) + - [QuickEstimatedRepayment](docs/QuickEstimatedRepayment.md) + - [QuickRepaymentRequest](docs/QuickRepaymentRequest.md) + - [QuickRepaymentResponse](docs/QuickRepaymentResponse.md) - [QuoteRequest](docs/QuoteRequest.md) - [QuoteResponse](docs/QuoteResponse.md) - [RebateUserInfo](docs/RebateUserInfo.md) + - [Recommend](docs/Recommend.md) + - [RecommendV2Scheme](docs/RecommendV2Scheme.md) + - [RecommendV2Strategy](docs/RecommendV2Strategy.md) + - [RedeemLaunchPoolResponse](docs/RedeemLaunchPoolResponse.md) + - [RedeemV4](docs/RedeemV4.md) - [RepayCurrencyRes](docs/RepayCurrencyRes.md) - [RepayMultiLoan](docs/RepayMultiLoan.md) - [RepayRecordCurrency](docs/RepayRecordCurrency.md) @@ -835,23 +1140,32 @@ Class | Method | HTTP request | Description - [RiskUnits](docs/RiskUnits.md) - [SavedAddress](docs/SavedAddress.md) - [SendChatMessageRequest](docs/SendChatMessageRequest.md) + - [SetMerchantWorkHoursRequest](docs/SetMerchantWorkHoursRequest.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) + - [SpotGridCreateParams](docs/SpotGridCreateParams.md) + - [SpotGridCreateRequest](docs/SpotGridCreateRequest.md) - [SpotInsuranceHistory](docs/SpotInsuranceHistory.md) + - [SpotMartingaleCreateParams](docs/SpotMartingaleCreateParams.md) + - [SpotMartingaleCreateRequest](docs/SpotMartingaleCreateRequest.md) + - [SpotOrderStopLoss](docs/SpotOrderStopLoss.md) + - [SpotOrderStopProfit](docs/SpotOrderStopProfit.md) - [SpotPricePutOrder](docs/SpotPricePutOrder.md) - [SpotPriceTrigger](docs/SpotPriceTrigger.md) - [SpotPriceTriggeredOrder](docs/SpotPriceTriggeredOrder.md) + - [StopAllChaseOrdersReq](docs/StopAllChaseOrdersReq.md) + - [StopAllChaseOrdersResp](docs/StopAllChaseOrdersResp.md) - [StopAllTrailOrders](docs/StopAllTrailOrders.md) + - [StopChaseOrderReq](docs/StopChaseOrderReq.md) + - [StopChaseOrderResp](docs/StopChaseOrderResp.md) - [StopTrailOrder](docs/StopTrailOrder.md) - [StpGroup](docs/StpGroup.md) - [StpGroupUser](docs/StpGroupUser.md) - - [StructuredBuy](docs/StructuredBuy.md) - - [StructuredGetProjectList](docs/StructuredGetProjectList.md) - - [StructuredOrderList](docs/StructuredOrderList.md) + - [StrategyType](docs/StrategyType.md) - [SubAccount](docs/SubAccount.md) - [SubAccountBalance](docs/SubAccountBalance.md) - [SubAccountCrossMarginBalance](docs/SubAccountCrossMarginBalance.md) @@ -872,19 +1186,25 @@ Class | Method | HTTP request | Description - [SymbolsDataList](docs/SymbolsDataList.md) - [SystemTime](docs/SystemTime.md) - [Ticker](docs/Ticker.md) - - [Ticker2](docs/Ticker2.md) - - [Ticker2Data](docs/Ticker2Data.md) - [Tokens](docs/Tokens.md) - [TotalBalance](docs/TotalBalance.md) - [TradFiClosePositionRequest](docs/TradFiClosePositionRequest.md) + - [TradFiError](docs/TradFiError.md) - [TradFiOrderRequest](docs/TradFiOrderRequest.md) - [TradFiOrderUpdateRequest](docs/TradFiOrderUpdateRequest.md) - [TradFiPositionUpdateRequest](docs/TradFiPositionUpdateRequest.md) + - [TradFiTicker](docs/TradFiTicker.md) + - [TradFiTickerData](docs/TradFiTickerData.md) - [TradFiTransactionRequest](docs/TradFiTransactionRequest.md) - [Trade](docs/Trade.md) - [TradeFee](docs/TradeFee.md) - [TrailChangeLog](docs/TrailChangeLog.md) - [TrailOrder](docs/TrailOrder.md) + - [TrailOrderChangeLogResponse](docs/TrailOrderChangeLogResponse.md) + - [TrailOrderDetailResponse](docs/TrailOrderDetailResponse.md) + - [TrailOrderListResponse](docs/TrailOrderListResponse.md) + - [TrailOrderResponse](docs/TrailOrderResponse.md) + - [TransactionConfig](docs/TransactionConfig.md) - [TransactionID](docs/TransactionID.md) - [TransactionList](docs/TransactionList.md) - [TransactionListData](docs/TransactionListData.md) @@ -897,9 +1217,11 @@ Class | Method | HTTP request | Description - [UidPushOrder](docs/UidPushOrder.md) - [UidPushWithdrawal](docs/UidPushWithdrawal.md) - [UidPushWithdrawalResp](docs/UidPushWithdrawalResp.md) + - [UniChartPoint](docs/UniChartPoint.md) - [UniCurrency](docs/UniCurrency.md) - [UniCurrencyInterest](docs/UniCurrencyInterest.md) - [UniCurrencyPair](docs/UniCurrencyPair.md) + - [UniEstimatedRate](docs/UniEstimatedRate.md) - [UniInterestRecord](docs/UniInterestRecord.md) - [UniLend](docs/UniLend.md) - [UniLendInterest](docs/UniLendInterest.md) @@ -910,7 +1232,6 @@ Class | Method | HTTP request | Description - [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) @@ -927,9 +1248,14 @@ Class | Method | HTTP request | Description - [UnifiedModeSet](docs/UnifiedModeSet.md) - [UnifiedPortfolioInput](docs/UnifiedPortfolioInput.md) - [UnifiedPortfolioOutput](docs/UnifiedPortfolioOutput.md) + - [UnifiedQuickRepayAvailableItem](docs/UnifiedQuickRepayAvailableItem.md) + - [UnifiedQuickRepayDebtItem](docs/UnifiedQuickRepayDebtItem.md) + - [UnifiedQuickRepayRepaidInfo](docs/UnifiedQuickRepayRepaidInfo.md) + - [UnifiedQuickRepayUsedInfo](docs/UnifiedQuickRepayUsedInfo.md) - [UnifiedRiskUnits](docs/UnifiedRiskUnits.md) - [UnifiedSettings](docs/UnifiedSettings.md) - [UnifiedTransferable](docs/UnifiedTransferable.md) + - [UpdateDualCompPositionCrossModeRequest](docs/UpdateDualCompPositionCrossModeRequest.md) - [UpdateOrder](docs/UpdateOrder.md) - [UpdateOrderData](docs/UpdateOrderData.md) - [UpdatePosition](docs/UpdatePosition.md) diff --git a/docs/AIHubCreateData.md b/docs/AIHubCreateData.md new file mode 100644 index 00000000..4e9186be --- /dev/null +++ b/docs/AIHubCreateData.md @@ -0,0 +1,15 @@ +# AIHubCreateData + +Policy information returned after the policy is successfully created. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_id** | **str** | | +**strategy_type** | [**StrategyType**](StrategyType.md) | | +**market** | **str** | | +**status** | **str** | The initial state after successful creation, usually `running` | +**jump_url** | **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/InlineResponse20010.md b/docs/AIHubCreateSuccessResponse.md similarity index 64% rename from docs/InlineResponse20010.md rename to docs/AIHubCreateSuccessResponse.md index c233045f..cfb4d97b 100644 --- a/docs/InlineResponse20010.md +++ b/docs/AIHubCreateSuccessResponse.md @@ -1,12 +1,13 @@ -# InlineResponse20010 +# AIHubCreateSuccessResponse +The response body when the creation strategy is successful. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | | **message** | **str** | | -**data** | [**InlineResponse20010Data**](InlineResponse20010Data.md) | | -**timestamp** | **int** | | +**data** | [**AIHubCreateData**](AIHubCreateData.md) | | +**trace_id** | **str** | | [[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/AIHubDiscoverData.md b/docs/AIHubDiscoverData.md new file mode 100644 index 00000000..6bb9421a --- /dev/null +++ b/docs/AIHubDiscoverData.md @@ -0,0 +1,13 @@ +# AIHubDiscoverData + +Strategy recommendation result data. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scene** | [**DiscoverScene**](DiscoverScene.md) | | +**recommendations** | [**list[AIHubRecommendation]**](AIHubRecommendation.md) | | +**unsupported_filters** | **list[str]** | Filter conditions not supported in this issue | + +[[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/AIHubDiscoverSuccessResponse.md b/docs/AIHubDiscoverSuccessResponse.md new file mode 100644 index 00000000..a9e2bf4d --- /dev/null +++ b/docs/AIHubDiscoverSuccessResponse.md @@ -0,0 +1,14 @@ +# AIHubDiscoverSuccessResponse + +Get the response body when the strategy recommendation is successful. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**data** | [**AIHubDiscoverData**](AIHubDiscoverData.md) | | +**trace_id** | **str** | | + +[[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/AIHubPortfolioBaseInfo.md b/docs/AIHubPortfolioBaseInfo.md new file mode 100644 index 00000000..be8e92cc --- /dev/null +++ b/docs/AIHubPortfolioBaseInfo.md @@ -0,0 +1,16 @@ +# AIHubPortfolioBaseInfo + +Strategy detail base info. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_name** | **str** | | +**created_at** | **str** | Created time | +**running_duration** | **int** | Runtime duration in seconds. | +**invest_amount** | **str** | | +**total_profit** | **str** | | +**profit_rate** | **str** | | + +[[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/AIHubPortfolioDetailData.md b/docs/AIHubPortfolioDetailData.md new file mode 100644 index 00000000..a99af911 --- /dev/null +++ b/docs/AIHubPortfolioDetailData.md @@ -0,0 +1,18 @@ +# AIHubPortfolioDetailData + +Policy details data. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_id** | **str** | | +**strategy_type** | [**StrategyType**](StrategyType.md) | | +**market** | **str** | | +**status** | **str** | | +**base_info** | [**AIHubPortfolioBaseInfo**](AIHubPortfolioBaseInfo.md) | | +**metrics** | [**AIHubPortfolioMetrics**](AIHubPortfolioMetrics.md) | | +**position** | [**AIHubPortfolioPosition**](AIHubPortfolioPosition.md) | | [optional] +**stop_supported** | **bool** | | + +[[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/AIHubPortfolioDetailSuccessResponse.md b/docs/AIHubPortfolioDetailSuccessResponse.md new file mode 100644 index 00000000..f2bab25d --- /dev/null +++ b/docs/AIHubPortfolioDetailSuccessResponse.md @@ -0,0 +1,14 @@ +# AIHubPortfolioDetailSuccessResponse + +The response body when querying policy details is successful. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**data** | [**AIHubPortfolioDetailData**](AIHubPortfolioDetailData.md) | | +**trace_id** | **str** | | + +[[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/AIHubPortfolioMetrics.md b/docs/AIHubPortfolioMetrics.md new file mode 100644 index 00000000..88051543 --- /dev/null +++ b/docs/AIHubPortfolioMetrics.md @@ -0,0 +1,23 @@ +# AIHubPortfolioMetrics + +Strategy detail metrics; fields returned depend on strategy type. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**grid_profit** | **str** | | [optional] +**floating_pnl** | **str** | | [optional] +**arbitrage_count** | **int** | | [optional] +**price_range** | **str** | | [optional] +**grid_count** | **int** | | [optional] +**estimated_liquidation_price** | **str** | | [optional] +**price_floor** | **str** | | [optional] +**grid_profit_rate** | **str** | | [optional] +**realized_pnl** | **str** | | [optional] +**finished_rounds** | **int** | | [optional] +**avg_cost** | **str** | | [optional] +**take_profit_price** | **str** | | [optional] +**maintenance_margin_ratio** | **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/AIHubPortfolioPosition.md b/docs/AIHubPortfolioPosition.md new file mode 100644 index 00000000..9076d506 --- /dev/null +++ b/docs/AIHubPortfolioPosition.md @@ -0,0 +1,16 @@ +# AIHubPortfolioPosition + +Strategy detail position info; fields returned depend on strategy type. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | [optional] +**entry_price** | **str** | | [optional] +**quote_amount** | **str** | | [optional] +**position_value** | **str** | | [optional] +**margin** | **str** | | [optional] +**side** | **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/AIHubPortfolioRunningData.md b/docs/AIHubPortfolioRunningData.md new file mode 100644 index 00000000..1d14670a --- /dev/null +++ b/docs/AIHubPortfolioRunningData.md @@ -0,0 +1,14 @@ +# AIHubPortfolioRunningData + +Running policy list data. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**list[AIHubPortfolioRunningItem]**](AIHubPortfolioRunningItem.md) | | +**page** | **int** | | +**page_size** | **int** | | +**total** | **int** | | + +[[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/AIHubPortfolioRunningItem.md b/docs/AIHubPortfolioRunningItem.md new file mode 100644 index 00000000..18b5c6c7 --- /dev/null +++ b/docs/AIHubPortfolioRunningItem.md @@ -0,0 +1,19 @@ +# AIHubPortfolioRunningItem + +A single record in the list of running policies. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_id** | **str** | | +**strategy_type** | [**StrategyType**](StrategyType.md) | | +**strategy_name** | **str** | | +**market** | **str** | | +**status** | **str** | | +**pnl** | **str** | | [optional] +**pnl_rate** | **str** | | [optional] +**invest_amount** | **str** | | [optional] +**created_at** | **str** | 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/AIHubPortfolioRunningSuccessResponse.md b/docs/AIHubPortfolioRunningSuccessResponse.md new file mode 100644 index 00000000..fc443356 --- /dev/null +++ b/docs/AIHubPortfolioRunningSuccessResponse.md @@ -0,0 +1,14 @@ +# AIHubPortfolioRunningSuccessResponse + +The response body when querying the running policy list is successful. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**data** | [**AIHubPortfolioRunningData**](AIHubPortfolioRunningData.md) | | +**trace_id** | **str** | | + +[[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/AIHubPortfolioStopData.md b/docs/AIHubPortfolioStopData.md new file mode 100644 index 00000000..3e9285e0 --- /dev/null +++ b/docs/AIHubPortfolioStopData.md @@ -0,0 +1,14 @@ +# AIHubPortfolioStopData + +The result information returned after the termination strategy is successful. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_id** | **str** | | +**strategy_type** | [**StrategyType**](StrategyType.md) | | +**status** | **str** | The current implementation returns `stopping` | +**result_message** | **str** | | + +[[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/AIHubPortfolioStopRequest.md b/docs/AIHubPortfolioStopRequest.md new file mode 100644 index 00000000..b90fd206 --- /dev/null +++ b/docs/AIHubPortfolioStopRequest.md @@ -0,0 +1,12 @@ +# AIHubPortfolioStopRequest + +The request body to terminate a running policy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_id** | **str** | | +**strategy_type** | [**StrategyType**](StrategyType.md) | | + +[[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/AIHubPortfolioStopSuccessResponse.md b/docs/AIHubPortfolioStopSuccessResponse.md new file mode 100644 index 00000000..ae48a283 --- /dev/null +++ b/docs/AIHubPortfolioStopSuccessResponse.md @@ -0,0 +1,14 @@ +# AIHubPortfolioStopSuccessResponse + +The response body when the termination strategy is successful. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**data** | [**AIHubPortfolioStopData**](AIHubPortfolioStopData.md) | | +**trace_id** | **str** | | + +[[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/AIHubRecommendation.md b/docs/AIHubRecommendation.md new file mode 100644 index 00000000..32a5d78d --- /dev/null +++ b/docs/AIHubRecommendation.md @@ -0,0 +1,18 @@ +# AIHubRecommendation + +A single piece of strategy recommendation information. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recommendation_id** | **str** | | +**market** | **str** | | +**strategy_type** | [**StrategyType**](StrategyType.md) | | +**strategy_name** | **str** | | +**backtest_apr** | **str** | | [optional] +**max_drawdown** | **str** | | [optional] +**summary** | **str** | | +**strategy_params_preview** | **str** | Recommended-parameter preview as JSON text (string-encoded so clients deserialize it consistently). The value is a serialized JSON object whose structure varies by strategy type; callers or upper-layer models must parse it. | [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/ActivityApi.md b/docs/ActivityApi.md new file mode 100644 index 00000000..269391be --- /dev/null +++ b/docs/ActivityApi.md @@ -0,0 +1,211 @@ +# gate_api.ActivityApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_my_activity_entry**](ActivityApi.md#get_my_activity_entry) | **GET** /rewards/activity/my-activity-entry | My activity entry +[**list_activities**](ActivityApi.md#list_activities) | **GET** /rewards/activity/activity-list | Recommended activity list +[**list_activity_types**](ActivityApi.md#list_activity_types) | **GET** /rewards/activity/activity-type | Activity type list + + +# **get_my_activity_entry** +> GetMyActivityEntryResponse get_my_activity_entry() + +My activity entry + +Query user's Activity Center entry information, including activity icon and redirect link + +### 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.ActivityApi(api_client) + +try: + # My activity entry + api_response = api_instance.get_my_activity_entry() + 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 ActivityApi->get_my_activity_entry: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetMyActivityEntryResponse**](GetMyActivityEntryResponse.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 returns activity entry 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) + +# **list_activities** +> ListActivitiesResponse list_activities(recommend_type=recommend_type, type_ids=type_ids, keywords=keywords, page=page, page_size=page_size, sort_by=sort_by) + +Recommended activity list + +Query recommended activity list from Activity Center, supports pagination and sorting + +### 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.ActivityApi(api_client) +recommend_type = 'recommend_type_example' # str | Recommendation type: hot for popular activities, type for filtering by activity type (type_ids), scenario for matching by activity name (optional) +type_ids = 'type_ids_example' # str | Activity type ID, multiple IDs separated by commas (supports filtering by activity type through this field) (optional) +keywords = 'keywords_example' # str | Activity name. When scenario type is used, keyword matching is applied (optional) +page = 1 # int | Page number, starting from 1 (optional) (default to 1) +page_size = 10 # int | Items per page (optional) (default to 10) +sort_by = 'sort_by_example' # str | Sort order, e.g., hot for sorting by popularity (optional) + +try: + # Recommended activity list + api_response = api_instance.list_activities(recommend_type=recommend_type, type_ids=type_ids, keywords=keywords, page=page, page_size=page_size, sort_by=sort_by) + 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 ActivityApi->list_activities: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **recommend_type** | **str**| Recommendation type: hot for popular activities, type for filtering by activity type (type_ids), scenario for matching by activity name | [optional] + **type_ids** | **str**| Activity type ID, multiple IDs separated by commas (supports filtering by activity type through this field) | [optional] + **keywords** | **str**| Activity name. When scenario type is used, keyword matching is applied | [optional] + **page** | **int**| Page number, starting from 1 | [optional] [default to 1] + **page_size** | **int**| Items per page | [optional] [default to 10] + **sort_by** | **str**| Sort order, e.g., hot for sorting by popularity | [optional] + +### Return type + +[**ListActivitiesResponse**](ListActivitiesResponse.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 returns activity 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) + +# **list_activity_types** +> ListActivityTypesResponse list_activity_types() + +Activity type list + +Query all activity types supported by Activity Center + +### 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.ActivityApi(api_client) + +try: + # Activity type list + api_response = api_instance.list_activity_types() + 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 ActivityApi->list_activity_types: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListActivityTypesResponse**](ListActivityTypesResponse.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 returns activity type 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) + diff --git a/docs/AdsDetailRequest.md b/docs/AdsDetailRequest.md index 9fee75b4..932bb29d 100644 --- a/docs/AdsDetailRequest.md +++ b/docs/AdsDetailRequest.md @@ -4,7 +4,7 @@ Get ad details request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**adv_no** | **str** | | +**adv_no** | **str** | Advertisement ID. | [[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/AdsListRequest.md b/docs/AdsListRequest.md index 702bcca5..4dda2d6e 100644 --- a/docs/AdsListRequest.md +++ b/docs/AdsListRequest.md @@ -4,9 +4,9 @@ Get market ads list request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**asset** | **str** | Cryptocurrency | +**asset** | **str** | Cryptocurrency symbol. | **fiat_unit** | **str** | Fiat currency | -**trade_type** | **str** | Buy/Sell, sell/buy | +**trade_type** | **str** | Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. | [[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/AdsUpdateStatus.md b/docs/AdsUpdateStatus.md index 46a07646..d92f3f09 100644 --- a/docs/AdsUpdateStatus.md +++ b/docs/AdsUpdateStatus.md @@ -4,8 +4,8 @@ Ad status update request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**adv_no** | **int** | Ad ID | -**adv_status** | **int** | Ad status: 1=Active, 3=Inactive, 4=Closed | +**adv_no** | **int** | Advertisement ID. | +**adv_status** | **int** | Ad status. `1`: listed; `3`: delisted; `4`: closed. | [[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 11514234..64c978a6 100644 --- a/docs/AgencyCommission.md +++ b/docs/AgencyCommission.md @@ -6,7 +6,7 @@ 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] -**commission_amount** | **str** | Transaction amount | [optional] +**commission_amount** | **str** | Commission amount | [optional] **commission_asset** | **str** | Commission Asset | [optional] **source** | **str** | Commission source: SPOT - Spot commission, FUTURES - Futures commission | [optional] diff --git a/docs/AgencyTransaction.md b/docs/AgencyTransaction.md index 930d2b72..8afecc35 100644 --- a/docs/AgencyTransaction.md +++ b/docs/AgencyTransaction.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **fee_asset** | **str** | Fee currency | [optional] **currency_pair** | **str** | Currency pair | [optional] **amount** | **str** | Transaction amount | [optional] -**amount_asset** | **str** | Commission Asset | [optional] +**amount_asset** | **str** | Transaction amount currency | [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/AlphaApi.md b/docs/AlphaApi.md index a3265e29..bfe18b22 100644 --- a/docs/AlphaApi.md +++ b/docs/AlphaApi.md @@ -440,7 +440,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) # **list_alpha_currencies** -> list[Currency2] list_alpha_currencies(currency=currency, limit=limit, page=page) +> list[AlphaCurrency] list_alpha_currencies(currency=currency, limit=limit, page=page) Query currency information @@ -485,7 +485,7 @@ Name | Type | Description | Notes ### Return type -[**list[Currency2]**](Currency2.md) +[**list[AlphaCurrency]**](AlphaCurrency.md) ### Authorization diff --git a/docs/Currency2.md b/docs/AlphaCurrency.md similarity index 97% rename from docs/Currency2.md rename to docs/AlphaCurrency.md index 681b0de3..d3adda45 100644 --- a/docs/Currency2.md +++ b/docs/AlphaCurrency.md @@ -1,4 +1,4 @@ -# Currency2 +# AlphaCurrency ## Properties Name | Type | Description | Notes diff --git a/docs/InlineObject1.md b/docs/AmendOptionsOrderRequest.md similarity index 94% rename from docs/InlineObject1.md rename to docs/AmendOptionsOrderRequest.md index a1575172..439090d8 100644 --- a/docs/InlineObject1.md +++ b/docs/AmendOptionsOrderRequest.md @@ -1,4 +1,4 @@ -# InlineObject1 +# AmendOptionsOrderRequest Order Modification Request Body ## Properties diff --git a/docs/ApiResponseAssetSwapConfig.md b/docs/ApiResponseAssetSwapConfig.md new file mode 100644 index 00000000..bd660224 --- /dev/null +++ b/docs/ApiResponseAssetSwapConfig.md @@ -0,0 +1,15 @@ +# ApiResponseAssetSwapConfig + +Asset allocation optimization - configure unified response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | +**label** | **str** | Error identification code, empty string on success | [optional] +**message** | **str** | Description information | +**data** | **object** | Front-end configuration on success, null on failure | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ApiResponseAssetSwapEvaluate.md b/docs/ApiResponseAssetSwapEvaluate.md new file mode 100644 index 00000000..07751aef --- /dev/null +++ b/docs/ApiResponseAssetSwapEvaluate.md @@ -0,0 +1,15 @@ +# ApiResponseAssetSwapEvaluate + +Asset allocation optimization-unified response to valuation +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | +**label** | **str** | Error identification code, empty string on success | [optional] +**message** | **str** | Description information | +**data** | **object** | Estimated paginated data on success, null on failure | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ApiResponseAssetSwapListAssets.md b/docs/ApiResponseAssetSwapListAssets.md new file mode 100644 index 00000000..4055ea9f --- /dev/null +++ b/docs/ApiResponseAssetSwapListAssets.md @@ -0,0 +1,15 @@ +# ApiResponseAssetSwapListAssets + +Asset allocation optimization - unified response to currency list +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | +**label** | **str** | Error identification code, empty string on success | [optional] +**message** | **str** | Description information | +**data** | **object** | Currency list data on success, null on failure | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ApiResponseAssetSwapOrderCreateV1.md b/docs/ApiResponseAssetSwapOrderCreateV1.md new file mode 100644 index 00000000..c5f49068 --- /dev/null +++ b/docs/ApiResponseAssetSwapOrderCreateV1.md @@ -0,0 +1,15 @@ +# ApiResponseAssetSwapOrderCreateV1 + +Asset allocation optimization - unified response to orders +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | +**label** | **str** | Error identification code, empty string on success | [optional] +**message** | **str** | Description information | +**data** | **object** | It is the order result when successful, and null when it fails. | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ApiResponseAssetSwapOrderListV1.md b/docs/ApiResponseAssetSwapOrderListV1.md new file mode 100644 index 00000000..d3c79bf5 --- /dev/null +++ b/docs/ApiResponseAssetSwapOrderListV1.md @@ -0,0 +1,15 @@ +# ApiResponseAssetSwapOrderListV1 + +Asset allocation optimization - unified response to order list +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | +**label** | **str** | Error identification code, empty string on success | [optional] +**message** | **str** | Description information | +**data** | **object** | Order list data on success, null on failure | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ApiResponseAssetSwapOrderPreviewV1.md b/docs/ApiResponseAssetSwapOrderPreviewV1.md new file mode 100644 index 00000000..94a72274 --- /dev/null +++ b/docs/ApiResponseAssetSwapOrderPreviewV1.md @@ -0,0 +1,15 @@ +# ApiResponseAssetSwapOrderPreviewV1 + +Asset allocation optimization-preview unified response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | +**label** | **str** | Error identification code, empty string on success | [optional] +**message** | **str** | Description information | +**data** | **object** | Preview result when successful, null when failed | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ApiResponseAssetSwapOrderQueryV1.md b/docs/ApiResponseAssetSwapOrderQueryV1.md new file mode 100644 index 00000000..ad9bed29 --- /dev/null +++ b/docs/ApiResponseAssetSwapOrderQueryV1.md @@ -0,0 +1,15 @@ +# ApiResponseAssetSwapOrderQueryV1 + +Asset allocation optimization - unified response to query orders +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | +**label** | **str** | Error identification code, empty string on success | [optional] +**message** | **str** | Description information | +**data** | **object** | Order details on success, null on failure | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ApiResponseExSkillClaimRewardResp.md b/docs/ApiResponseExSkillClaimRewardResp.md new file mode 100644 index 00000000..ba9b9dd7 --- /dev/null +++ b/docs/ApiResponseExSkillClaimRewardResp.md @@ -0,0 +1,15 @@ +# ApiResponseExSkillClaimRewardResp + +Receive mission reward response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | [optional] +**label** | **str** | Error identifier code. Empty string on success, machine-readable error label on error | [optional] +**message** | **str** | Error description | [optional] +**data** | [**ApiResponseExSkillClaimRewardRespData**](ApiResponseExSkillClaimRewardRespData.md) | | [optional] +**timestamp** | **int** | Server 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/ApiResponseExSkillClaimRewardRespData.md b/docs/ApiResponseExSkillClaimRewardRespData.md new file mode 100644 index 00000000..d3e0e126 --- /dev/null +++ b/docs/ApiResponseExSkillClaimRewardRespData.md @@ -0,0 +1,12 @@ +# ApiResponseExSkillClaimRewardRespData + +Get reward results +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**has_m_n_task** | **bool** | Whether to choose n prize pool tasks for m. When it is true, it only prompts a jump and does not actually issue prizes. | [optional] +**coupon_full_name** | **str** | The full name of the card reward. It is an empty string when it is not a coupon reward or cannot be parsed. | [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/ApiResponseExSkillClaimTaskResp.md b/docs/ApiResponseExSkillClaimTaskResp.md new file mode 100644 index 00000000..4b33e3da --- /dev/null +++ b/docs/ApiResponseExSkillClaimTaskResp.md @@ -0,0 +1,15 @@ +# ApiResponseExSkillClaimTaskResp + +Receive task response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code, 0 means success | [optional] +**label** | **str** | Error identifier code. Empty string on success, machine-readable error label on error | [optional] +**message** | **str** | Error description | [optional] +**data** | [**object**](.md) | Empty object {} on success | [optional] +**timestamp** | **int** | Server 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/ApiResponseExSkillGetBeginnerTaskListResp.md b/docs/ApiResponseExSkillGetBeginnerTaskListResp.md new file mode 100644 index 00000000..8b9c47e6 --- /dev/null +++ b/docs/ApiResponseExSkillGetBeginnerTaskListResp.md @@ -0,0 +1,15 @@ +# ApiResponseExSkillGetBeginnerTaskListResp + +Get beginner task list response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code: 0 = success, 1007 = no task data, 1008 = not logged in | +**label** | **str** | Error identifier code. Empty string on success, machine-readable error label on error | [optional] +**message** | **str** | Error description | [optional] +**data** | [**ApiResponseExSkillGetBeginnerTaskListRespData**](ApiResponseExSkillGetBeginnerTaskListRespData.md) | | [optional] +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ApiResponseExSkillGetBeginnerTaskListRespData.md b/docs/ApiResponseExSkillGetBeginnerTaskListRespData.md new file mode 100644 index 00000000..2ace924a --- /dev/null +++ b/docs/ApiResponseExSkillGetBeginnerTaskListRespData.md @@ -0,0 +1,11 @@ +# ApiResponseExSkillGetBeginnerTaskListRespData + +Task list object on success, null on failure +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tasks** | [**list[ApiResponseExSkillGetBeginnerTaskListRespDataTasks]**](ApiResponseExSkillGetBeginnerTaskListRespDataTasks.md) | Getting started task list (registration tasks come first, guidance tasks follow; when conditions are met, an additional download task to be collected will 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/ApiResponseExSkillGetBeginnerTaskListRespDataTasks.md b/docs/ApiResponseExSkillGetBeginnerTaskListRespDataTasks.md new file mode 100644 index 00000000..9d34c8db --- /dev/null +++ b/docs/ApiResponseExSkillGetBeginnerTaskListRespDataTasks.md @@ -0,0 +1,19 @@ +# ApiResponseExSkillGetBeginnerTaskListRespDataTasks + +Getting started mission information. `task_center_id` and `status` are included in required: both are allowed to be 0 (registration tasks, download tasks to be received), And avoid Go SDK using omitempty for integer zero values, which will cause fields to be lost during client serialization. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**welfare_task_id** | **int** | Rewards Center task ID | [optional] +**task_center_id** | **int** | Task center task ID (fixed at 0 for registration tasks) | +**task_type** | **int** | Task type: 1=KYC secondary certification 2=Spot 3=Contract 4=Invitation 5=Quantification 6=Yu Bibao 7=startup 8=First deposit 10=Registration task 11=Guide task 23=Download task | [optional] +**task_name** | **str** | Task name | [optional] +**task_desc** | **str** | Task description, may contain <span> highlight tags | [optional] +**reward_num** | **str** | Reward value | [optional] +**reward_unit** | **str** | Reward unit (e.g., USDT, BTC) | [optional] +**prize_type** | **int** | Reward type: 1 = points, 2 = regular coupon, 3 = VIP coupon | [optional] +**status** | **int** | Task status: 0=Not claimed (typically a download task waiting to be claimed) 1=Received/in progress 2=Completed and waiting to be claimed 3=Rewards in progress 4=Completed/settled 5=Expired | + +[[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/ApiResponseExSkillGetUserIdentityResp.md b/docs/ApiResponseExSkillGetUserIdentityResp.md new file mode 100644 index 00000000..43c48ea7 --- /dev/null +++ b/docs/ApiResponseExSkillGetUserIdentityResp.md @@ -0,0 +1,15 @@ +# ApiResponseExSkillGetUserIdentityResp + +Get user identity response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Business error code: 0 = success, 1001 = existing user, 1002 = risk-controlled user, 1003 = sub-account, 1004 = agent, 1005 = market maker, 1006 = enterprise account, 1008 = not logged in | [optional] +**label** | **str** | Error identifier code. Empty string on success, machine-readable error label on error | [optional] +**message** | **str** | Error description | [optional] +**data** | [**object**](.md) | Empty object {} on success, null on failure | [optional] +**timestamp** | **int** | Server 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/AssetListResp.md b/docs/AssetListResp.md new file mode 100644 index 00000000..3689bdef --- /dev/null +++ b/docs/AssetListResp.md @@ -0,0 +1,10 @@ +# AssetListResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | **list[str]** | | + +[[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/AssetSwapFrontend.md b/docs/AssetSwapFrontend.md new file mode 100644 index 00000000..f5cfe792 --- /dev/null +++ b/docs/AssetSwapFrontend.md @@ -0,0 +1,19 @@ +# AssetSwapFrontend + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_evaluate_range** | **list[int]** | | +**banner_reappear_interval_hours** | **int** | | +**convert_currencies** | **list[str]** | | +**convert_currencies_v2** | [**list[ConvertCurrenciesV2Item]**](ConvertCurrenciesV2Item.md) | | +**default** | **dict(str, str)** | Mapping of string keys to string values, corresponding to Go's map[string]string. | +**max_select_currencies** | **int** | | +**min_evaluate_value** | **str** | | +**recommend** | [**Recommend**](Recommend.md) | | +**recommend_v2** | **dict(str, list[RecommendV2Strategy])** | Mapping of strategy grouping keys to RecommendV2Strategy lists. | +**title_tips** | **str** | | + +[[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/AssetswapApi.md b/docs/AssetswapApi.md new file mode 100644 index 00000000..95924979 --- /dev/null +++ b/docs/AssetswapApi.md @@ -0,0 +1,506 @@ +# gate_api.AssetswapApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_asset_swap_assets**](AssetswapApi.md#list_asset_swap_assets) | **GET** /asset-swap/asset/list | Portfolio optimization — currency list +[**get_asset_swap_config**](AssetswapApi.md#get_asset_swap_config) | **GET** /asset-swap/config | Portfolio optimization — configuration +[**evaluate_asset_swap**](AssetswapApi.md#evaluate_asset_swap) | **GET** /asset-swap/evaluate | Portfolio optimization — valuation +[**create_asset_swap_order_v1**](AssetswapApi.md#create_asset_swap_order_v1) | **POST** /asset-swap/order/create | Portfolio optimization — place order +[**list_asset_swap_orders_v1**](AssetswapApi.md#list_asset_swap_orders_v1) | **GET** /asset-swap/order/list | Portfolio optimization — order list +[**preview_asset_swap_order_v1**](AssetswapApi.md#preview_asset_swap_order_v1) | **POST** /asset-swap/order/preview | Portfolio optimization — preview +[**get_asset_swap_order_v1**](AssetswapApi.md#get_asset_swap_order_v1) | **GET** /asset-swap/order/{order_id} | Portfolio optimization — query order + + +# **list_asset_swap_assets** +> ApiResponseAssetSwapListAssets list_asset_swap_assets() + +Portfolio optimization — currency list + +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.AssetswapApi(api_client) + +try: + # Portfolio optimization — currency list + api_response = api_instance.list_asset_swap_assets() + 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 AssetswapApi->list_asset_swap_assets: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ApiResponseAssetSwapListAssets**](ApiResponseAssetSwapListAssets.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** | HTTP 200, business results are distinguished by the code field | - | + +[[Back to top]](#) [[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_asset_swap_config** +> ApiResponseAssetSwapConfig get_asset_swap_config() + +Portfolio optimization — configuration + +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.AssetswapApi(api_client) + +try: + # Portfolio optimization — configuration + api_response = api_instance.get_asset_swap_config() + 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 AssetswapApi->get_asset_swap_config: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ApiResponseAssetSwapConfig**](ApiResponseAssetSwapConfig.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** | HTTP 200, business results are distinguished by the code field | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **evaluate_asset_swap** +> ApiResponseAssetSwapEvaluate evaluate_asset_swap(max_evaluate_value=max_evaluate_value, cursor=cursor, size=size) + +Portfolio optimization — valuation + +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.AssetswapApi(api_client) +max_evaluate_value = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +cursor = 'cursor_example' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +size = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) + +try: + # Portfolio optimization — valuation + api_response = api_instance.evaluate_asset_swap(max_evaluate_value=max_evaluate_value, cursor=cursor, size=size) + 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 AssetswapApi->evaluate_asset_swap: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **max_evaluate_value** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **cursor** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **size** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + +### Return type + +[**ApiResponseAssetSwapEvaluate**](ApiResponseAssetSwapEvaluate.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** | HTTP 200, business results are distinguished by the code field | - | + +[[Back to top]](#) [[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_asset_swap_order_v1** +> ApiResponseAssetSwapOrderCreateV1 create_asset_swap_order_v1(order_create_v1_req) + +Portfolio optimization — place order + +Swap several source currencies in the account into the target currency side configuration according to the specified amount. **It is strongly recommended to call** `POST /asset-swap/order/preview` **and `code=0` before placing an official order, and then submit this interface with consistent semantics**. **The request body does not contain `ratio`** - This interface `OrderCreateV1Req` only contains `from` / `to`, and the array elements are all `CreateParam` (**only** `asset` + `amount`). **Do not** pass in `ratio` in the order JSON; the ratio field `ratio` only exists in the preview interface `OrderPreviewV1Req.to` (`PreviewToParam`). **Key differences from the preview interface (error-prone points)** - The `to` array element of this interface is `CreateParam`: **`asset` + `amount` (target side quantity, decimal string)**. - The preview interface `to` is **`asset` + `ratio` (ratio string)**, **the two cannot be mixed**: do not fill in the `ratio` in the preview to the `amount` of the order as it is, and do not use the `amount` of the order as the `ratio` of the preview. **Recommended calling order** 1. `GET /asset-swap/asset/list`: Confirm currency support. 2. `GET /asset-swap/config`: Read `recommend` / `recommend_v2` (such as `schemes` of a strategy under `recommend_v2.market`, use `scheme.name` as the target `asset`, `scheme.ratio` is only used for `to[].ratio` of **preview**). 3. `GET /asset-swap/evaluate` (optional): Refer to the sellable quantity. 4. `POST /asset-swap/order/preview`: `from` and `to` (ratio) construct inquiry. 5. After the preview is successful, map the preview results to the `from`/`to` (**both are amount**) of the order according to the product/server agreement and then call this interface. **Field Convention** - `from`: selling side, each item is `asset` + `amount` (string, decimal, indicating the selling amount of the currency). - `to`: Buy/target side, each item is `asset` + **`amount`** (string, decimal, indicating the amount of the target currency side; the semantics are different from the previewed `ratio`). - This interface only verifies the accuracy and range of the above `amount`; if not satisfied, it returns non-0 `code` and `message`. For the verification rules of `to[].ratio` on the preview side, see the `POST /asset-swap/order/preview` document. + +### 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.AssetswapApi(api_client) +order_create_v1_req = gate_api.OrderCreateV1Req() # OrderCreateV1Req | Order request body (`OrderCreateV1Req`). **No `ratio` field**; `from`/`to` items are only `asset` + `amount`. `to` uses the target side **amount** `amount`, which is different from the **ratio** (ratio) semantics of `to` in preview, do not mix them. + +try: + # Portfolio optimization — place order + api_response = api_instance.create_asset_swap_order_v1(order_create_v1_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 AssetswapApi->create_asset_swap_order_v1: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_create_v1_req** | [**OrderCreateV1Req**](OrderCreateV1Req.md)| Order request body (`OrderCreateV1Req`). **No `ratio` field**; `from`/`to` items are only `asset` + `amount`. `to` uses the target side **amount** `amount`, which is different from the **ratio** (ratio) semantics of `to` in preview, do not mix them. | + +### Return type + +[**ApiResponseAssetSwapOrderCreateV1**](ApiResponseAssetSwapOrderCreateV1.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** | HTTP 200, business results are distinguished by the code field | - | + +[[Back to top]](#) [[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_asset_swap_orders_v1** +> ApiResponseAssetSwapOrderListV1 list_asset_swap_orders_v1(_from=_from, to=to, status=status, offset=offset, size=size, sort_mode=sort_mode, order_by=order_by) + +Portfolio optimization — order list + +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.AssetswapApi(api_client) +_from = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +to = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +status = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +offset = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +size = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +sort_mode = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +order_by = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) + +try: + # Portfolio optimization — order list + api_response = api_instance.list_asset_swap_orders_v1(_from=_from, to=to, status=status, offset=offset, size=size, sort_mode=sort_mode, order_by=order_by) + 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 AssetswapApi->list_asset_swap_orders_v1: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_from** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **to** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **status** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **offset** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **size** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **sort_mode** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **order_by** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + +### Return type + +[**ApiResponseAssetSwapOrderListV1**](ApiResponseAssetSwapOrderListV1.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** | HTTP 200, business results are distinguished by the code field | - | + +[[Back to top]](#) [[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_asset_swap_order_v1** +> ApiResponseAssetSwapOrderPreviewV1 preview_asset_swap_order_v1(order_preview_v1_req) + +Portfolio optimization — preview + +The transaction and fees are estimated based on the quantity of coins sold and the **target allocation ratio**, and **no orders are written**. When `code=0`, `data` contains estimated `order` and `transaction_fee`. **Key differences from the order interface (error-prone points)** - The `to` array element of this interface is `PreviewToParam`: **`asset` + `ratio` (ratio, decimal string)**, which represents the weight/proportion of the target currency in the portfolio. - The `to` of the order interface `POST /asset-swap/order/create` is **`asset` + `amount` (absolute quantity)**, **not** `ratio`. Callers should never mix the two sets of fields. **How to construct `to`(ratio)** - Prioritize the value from `data.recommend_v2` of `GET /asset-swap/config`: find a certain `RecommendV2Strategy` in the strategy list (such as `name` is `top2`) by grouping key (such as `market`, `faith`, `conservative`), and map its `schemes` to a preview request: - `to[].asset` ← `scheme.name` (target currency symbol) - `to[].ratio` ← `scheme.ratio` (ratio string consistent with configuration) - You can also use the flat map (currency → ratio string) under `recommend` to expand it into a multi-element `to` (one `asset` + `ratio` for each item). - When there are multiple targets, it is recommended that each `ratio` be consistent with the front-end/operation configuration; whether it needs to be summed to 1 is subject to server-side verification. **`from` (sell side)** - Each item is `asset` + `amount` (string, decimal), indicating the amount of the currency participating in the exchange this time. The currency should be within the supported range of `GET /asset-swap/asset/list`; when the magnitude is too small or the market depth is insufficient, a non-0 `code` may be returned (if the price cannot be inquired). **Connection with order placement** - After the preview is successful, convert the preview results allowed by the business into the request body where **`from`/`to` is all amount** required for ordering and then call create (the specific mapping rules are subject to the product documentation or server agreement). + +### 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.AssetswapApi(api_client) +order_preview_v1_req = gate_api.OrderPreviewV1Req() # OrderPreviewV1Req | Preview the request body. `to` must be **ratio**; unlike create's **amount** semantics. + +try: + # Portfolio optimization — preview + api_response = api_instance.preview_asset_swap_order_v1(order_preview_v1_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 AssetswapApi->preview_asset_swap_order_v1: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_preview_v1_req** | [**OrderPreviewV1Req**](OrderPreviewV1Req.md)| Preview the request body. `to` must be **ratio**; unlike create's **amount** semantics. | + +### Return type + +[**ApiResponseAssetSwapOrderPreviewV1**](ApiResponseAssetSwapOrderPreviewV1.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** | HTTP 200, business results are distinguished by the code field | - | + +[[Back to top]](#) [[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_asset_swap_order_v1** +> ApiResponseAssetSwapOrderQueryV1 get_asset_swap_order_v1(order_id) + +Portfolio optimization — query order + +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.AssetswapApi(api_client) +order_id = 'order_id_example' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + +try: + # Portfolio optimization — query order + api_response = api_instance.get_asset_swap_order_v1(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 AssetswapApi->get_asset_swap_order_v1: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | + +### Return type + +[**ApiResponseAssetSwapOrderQueryV1**](ApiResponseAssetSwapOrderQueryV1.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** | HTTP 200, business results are distinguished by the code field | - | + +[[Back to top]](#) [[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/AutoInvestCoinsItem.md b/docs/AutoInvestCoinsItem.md new file mode 100644 index 00000000..cafbca59 --- /dev/null +++ b/docs/AutoInvestCoinsItem.md @@ -0,0 +1,14 @@ +# AutoInvestCoinsItem + +Currency item supporting auto invest +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | Currency code | +**value** | **str** | Currency name | +**asset_icon_url** | **str** | Currency icon URL | +**sort** | **int** | Sort | [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/AutoInvestConfigItem.md b/docs/AutoInvestConfigItem.md new file mode 100644 index 00000000..b63851c0 --- /dev/null +++ b/docs/AutoInvestConfigItem.md @@ -0,0 +1,12 @@ +# AutoInvestConfigItem + +Investment currency configuration item +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | Currency | +**max_limit** | **str** | InvestmentLimit | + +[[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/AutoInvestMinInvestAmount.md b/docs/AutoInvestMinInvestAmount.md new file mode 100644 index 00000000..da98ea78 --- /dev/null +++ b/docs/AutoInvestMinInvestAmount.md @@ -0,0 +1,12 @@ +# AutoInvestMinInvestAmount + +QueryAvailableInvestmentMinimumAmountRequest +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**money** | **str** | Currency, optional: USDT or BTC | +**items** | [**list[AutoInvestMinInvestAmountItems]**](AutoInvestMinInvestAmountItems.md) | | + +[[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/AutoInvestMinInvestAmountItems.md b/docs/AutoInvestMinInvestAmountItems.md new file mode 100644 index 00000000..7d267d40 --- /dev/null +++ b/docs/AutoInvestMinInvestAmountItems.md @@ -0,0 +1,11 @@ +# AutoInvestMinInvestAmountItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | Currency | +**ratio** | **str** | Ratio,e.g.100 | + +[[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/AutoInvestMinInvestAmountResp.md b/docs/AutoInvestMinInvestAmountResp.md new file mode 100644 index 00000000..beb6cb56 --- /dev/null +++ b/docs/AutoInvestMinInvestAmountResp.md @@ -0,0 +1,11 @@ +# AutoInvestMinInvestAmountResp + +AvailableInvestmentMinimumAmountResponse +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min_amount** | **str** | MinimumAmount | + +[[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/AutoInvestOrderItem.md b/docs/AutoInvestOrderItem.md new file mode 100644 index 00000000..02da072a --- /dev/null +++ b/docs/AutoInvestOrderItem.md @@ -0,0 +1,26 @@ +# AutoInvestOrderItem + +Auto invest order item +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | +**type** | **str** | type | +**amount** | **str** | Size | +**plan_id** | **int** | Plan ID | +**side** | **int** | direction | +**asset** | **str** | Currency | +**record_id** | **int** | Record ID | +**total_money** | **str** | TotalAmount | +**market** | **str** | Currency pair | +**price** | **str** | Price | +**create_time** | **int** | Creation time (Unix timestamp) | +**total** | **str** | Total | +**fund_flow** | **str** | Fund Flow Direction | +**error_code** | **int** | Error code | +**error_msg** | **str** | Error message | +**status** | **int** | Status | + +[[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/AutoInvestPlanAddPosition.md b/docs/AutoInvestPlanAddPosition.md new file mode 100644 index 00000000..c6fe23c2 --- /dev/null +++ b/docs/AutoInvestPlanAddPosition.md @@ -0,0 +1,12 @@ +# AutoInvestPlanAddPosition + +Add position immediatelyRequest +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **int** | Plan ID | +**amount** | **str** | 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/AutoInvestPlanCreate.md b/docs/AutoInvestPlanCreate.md new file mode 100644 index 00000000..9dfcd54d --- /dev/null +++ b/docs/AutoInvestPlanCreate.md @@ -0,0 +1,21 @@ +# AutoInvestPlanCreate + +Create auto invest planRequest +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_name** | **str** | Plan name。Length: 0-50 characters | [optional] +**plan_des** | **str** | Plan description | [optional] +**plan_money** | **str** | Pricing currency,SupportUSDT,BTC | +**plan_amount** | **str** | Per PeriodAuto InvestAmount,Must > 0,and not exceedThePricing currencyConfigurationSingleMaximumAmount | +**plan_period_type** | **str** | Enum: daily, weekly, biweekly, monthly, hourly, 4-hourly | +**plan_period_day** | **int** | Cycle day. For monthly: day of month (1-30); For weekly/biweekly: day of week (1-7, 1=Monday); For daily/hourly/4-hourly: ignored | +**plan_period_hour** | **int** | Execution hourAuto Invest 0-23 | +**items** | [**list[AutoInvestPlanCreateItems]**](AutoInvestPlanCreateItems.md) | Investment portfolio, asset cannot be repeated; Sum of all items' ratios must be 100 | +**fund_source** | **str** | Fund source: spot or earn, default: spot | [optional] +**fund_flow** | **str** | Fund flow direction: auto_invest or earn, default: auto_invest | [optional] +**type** | **int** | 0 Normal creation, 1 QuickInvestment | [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/AutoInvestPlanCreateItems.md b/docs/AutoInvestPlanCreateItems.md new file mode 100644 index 00000000..7e127500 --- /dev/null +++ b/docs/AutoInvestPlanCreateItems.md @@ -0,0 +1,11 @@ +# AutoInvestPlanCreateItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | Investment currency, e.g., BTC; Must be enabled and market exists; Cannot be repeated within the same plan | +**ratio** | **str** | The proportion of this currency in the portfolio,The sum of all items' ratios must be 100 | + +[[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/AutoInvestPlanCreateResp.md b/docs/AutoInvestPlanCreateResp.md new file mode 100644 index 00000000..fcc16e78 --- /dev/null +++ b/docs/AutoInvestPlanCreateResp.md @@ -0,0 +1,19 @@ +# AutoInvestPlanCreateResp + +Create auto invest planResponse +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Plan ID | +**amount** | **str** | Per PeriodAuto InvestAmount | [optional] +**money** | **str** | Quote currency | [optional] +**next_time** | **int** | Next execution time | [optional] +**period_type** | **str** | Cycle type | [optional] +**period_day** | **int** | Cycle day | [optional] +**period_hour** | **int** | CycleHours | [optional] +**fund_flow** | **str** | Fund Flow Direction | [optional] +**fund_source** | **str** | Fund source | [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/AutoInvestPlanDetail.md b/docs/AutoInvestPlanDetail.md new file mode 100644 index 00000000..e5d988ae --- /dev/null +++ b/docs/AutoInvestPlanDetail.md @@ -0,0 +1,26 @@ +# AutoInvestPlanDetail + +Auto invest planDetails +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Plan ID | +**version** | **int** | PlanVersion | [optional] +**name** | **str** | Plan name | +**create_time** | **int** | Creation time (Unix timestamp) | +**update_time** | **int** | Update time (Unix timestamp) | +**user_id** | **int** | User ID | +**money** | **str** | Quote Currency | +**amount** | **str** | Per PeriodInvestment amount | +**period_type** | **str** | Cycle type(e.g., monthly) | +**period_day** | **int** | Cycle day | +**period_hour** | **int** | CycleHours | +**portfolio** | [**list[AutoInvestPortfolioItem]**](AutoInvestPortfolioItem.md) | InvestmentPortfolio | +**next_time** | **int** | Next execution time (Unix timestamp) | +**period** | **int** | Executed periods | +**fund_source** | **str** | Fund source(spot/earn) | +**fund_flow** | **str** | Fund flow direction (auto_invest/earn) | + +[[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/AutoInvestPlanListInfoResp.md b/docs/AutoInvestPlanListInfoResp.md new file mode 100644 index 00000000..81d3b0e0 --- /dev/null +++ b/docs/AutoInvestPlanListInfoResp.md @@ -0,0 +1,15 @@ +# AutoInvestPlanListInfoResp + +Auto invest planListPaginatedResponse +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | page number | +**page_size** | **int** | Items per page | +**page_count** | **int** | Total pages | +**total_count** | **int** | Total entries | +**list** | [**list[AutoInvestPlanDetail]**](AutoInvestPlanDetail.md) | PlanList | + +[[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/AutoInvestPlanRecordItem.md b/docs/AutoInvestPlanRecordItem.md new file mode 100644 index 00000000..5844321d --- /dev/null +++ b/docs/AutoInvestPlanRecordItem.md @@ -0,0 +1,25 @@ +# AutoInvestPlanRecordItem + +Plan execution record item +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Record ID | +**type** | **str** | type | +**money** | **str** | SourceCurrency | +**user_id** | **int** | User ID | +**plan_id** | **int** | Plan ID | +**plan_version** | **int** | PlanVersion | +**amount** | **str** | Investment amount | +**create_time** | **int** | Investment time | +**update_time** | **int** | Update time | +**status** | **str** | Status | +**status_type** | **int** | Status enum | +**side** | **int** | 2 = Buy, Other = Sell | +**status_message** | **str** | Status description | +**detail** | **str** | Details | [optional] +**asset** | **str** | 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/AutoInvestPlanRecordsResp.md b/docs/AutoInvestPlanRecordsResp.md new file mode 100644 index 00000000..2be4b64d --- /dev/null +++ b/docs/AutoInvestPlanRecordsResp.md @@ -0,0 +1,15 @@ +# AutoInvestPlanRecordsResp + +PlanExecutionRecordPaginatedResponse +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | page number | +**page_size** | **int** | Items per page | +**total_page** | **int** | TotalPage number | +**total** | **int** | Total entries | +**list** | [**list[AutoInvestPlanRecordItem]**](AutoInvestPlanRecordItem.md) | | + +[[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/AutoInvestPlanStop.md b/docs/AutoInvestPlanStop.md new file mode 100644 index 00000000..283a566e --- /dev/null +++ b/docs/AutoInvestPlanStop.md @@ -0,0 +1,11 @@ +# AutoInvestPlanStop + +StopAuto invest planRequest +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **int** | Plan ID | + +[[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/AutoInvestPlanUpdate.md b/docs/AutoInvestPlanUpdate.md new file mode 100644 index 00000000..d4bbadb7 --- /dev/null +++ b/docs/AutoInvestPlanUpdate.md @@ -0,0 +1,13 @@ +# AutoInvestPlanUpdate + +Update auto invest plan request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **int** | Plan ID | +**fund_source** | **str** | Fund source Spotspot or Flexible Savingsearn,Default spot | [optional] +**fund_flow** | **str** | Fund Flow Direction Spotauto_invest or Flexible Savingsearn,Default auto_invest | [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/AutoInvestPortfolioItem.md b/docs/AutoInvestPortfolioItem.md new file mode 100644 index 00000000..8ea3cacf --- /dev/null +++ b/docs/AutoInvestPortfolioItem.md @@ -0,0 +1,18 @@ +# AutoInvestPortfolioItem + +Auto invest plan portfolio item +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | Currency | +**ratio** | **str** | Ratio | +**cum_invest** | **str** | Accumulated investment | +**cum_hold** | **str** | AccumulatedPosition | +**cum_redeem** | **str** | Accumulated redemption | +**avg_price** | **str** | Average Cost Price | +**redeem_status** | **int** | Redemption status | +**lend_amount** | **str** | LendingQuantity | + +[[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/AwardListStructList.md b/docs/AwardListStructList.md index 5c978adb..0faea434 100644 --- a/docs/AwardListStructList.md +++ b/docs/AwardListStructList.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **reward_coin** | **str** | Reward currency | **interest** | **str** | Interest amount | **fee** | **str** | fee | -**status** | **int** | Status | +**status** | **int** | Status. 4 - success | **bonus_date** | **str** | Date | **should_bonus_stamp** | **int** | Scheduled distribution timestamp | diff --git a/docs/BaseResponse.md b/docs/BaseResponse.md new file mode 100644 index 00000000..f21c03a2 --- /dev/null +++ b/docs/BaseResponse.md @@ -0,0 +1,13 @@ +# BaseResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error Code, 0 Indicates Success | +**message** | **str** | Error message description | +**data** | [**object**](.md) | Response data | +**timestamp** | **int** | Unix timestamp | + +[[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 index 62bc971e..124bbfd8 100644 --- a/docs/BatchAmendItem.md +++ b/docs/BatchAmendItem.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **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] +**stop_profit** | [**SpotOrderStopProfit**](SpotOrderStopProfit.md) | | [optional] +**stop_loss** | [**SpotOrderStopLoss**](SpotOrderStopLoss.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/BatchAmendOrderReq.md b/docs/BatchAmendOrderReq.md index 26c064e3..bda63a6a 100644 --- a/docs/BatchAmendOrderReq.md +++ b/docs/BatchAmendOrderReq.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **size** | **str** | 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] +**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] [[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 9be9820e..7d0eb646 100644 --- a/docs/BatchOrder.md +++ b/docs/BatchOrder.md @@ -40,8 +40,10 @@ Name | Type | Description | Notes **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, new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**finish_as** | **str** | 订单结束方式,包括: - open: 等待处理 - filled: 完全成交 - cancelled: 用户撤销 - liquidate_cancelled: 爆仓撤销 - small: 订单数量太小 - depth_not_enough: 深度不足导致撤单 - trader_not_enough: 对手方不足导致撤单 - ioc: 未立即成交,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - poc: 未满足挂单策略,因为 tif 设置为 poc - fok: 未立即完全成交,因为 tif 设置为 fok - stp: 订单发生自成交限制而被撤销 - price_protect_cancelled: 价格保护导致撤单 - unknown: 未知 | [optional] [readonly] +**finish_as** | **str** | How the order finished: - open: Pending processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled by liquidation - small: Order size too small - depth_not_enough: Cancelled due to insufficient order book depth - trader_not_enough: Cancelled due to insufficient counterparty liquidity - ioc: Not filled immediately because time-in-force is IOC - poc: Post-only requirement not met because time-in-force is set to poc (maker-only); rejected after being detected as taker - fok: Not fully filled immediately because time-in-force is FOK - stp: Cancelled due to self-trade prevention - price_protect_cancelled: Cancelled due to price protection - unknown: Unknown | [optional] [readonly] **slippage** | **str** | Maximum supported slippage ratio for Spot Market Order Placement, calculated based on the latest market price at the time of order placement as the benchmark (Example: 0.03 means 3%) | [optional] +**stop_profit** | [**SpotOrderStopProfit**](SpotOrderStopProfit.md) | | [optional] +**stop_loss** | [**SpotOrderStopLoss**](SpotOrderStopLoss.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/BotApi.md b/docs/BotApi.md new file mode 100644 index 00000000..0516efbf --- /dev/null +++ b/docs/BotApi.md @@ -0,0 +1,812 @@ +# gate_api.BotApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_ai_hub_strategy_recommend**](BotApi.md#get_ai_hub_strategy_recommend) | **GET** /bot/strategy/recommend | Get AIHub strategy recommendations +[**post_ai_hub_spot_grid_create**](BotApi.md#post_ai_hub_spot_grid_create) | **POST** /bot/spot-grid/create | Create spot grid +[**post_ai_hub_margin_grid_create**](BotApi.md#post_ai_hub_margin_grid_create) | **POST** /bot/margin-grid/create | Create a lever grid +[**post_ai_hub_infinite_grid_create**](BotApi.md#post_ai_hub_infinite_grid_create) | **POST** /bot/infinite-grid/create | Create infinite grid +[**post_ai_hub_futures_grid_create**](BotApi.md#post_ai_hub_futures_grid_create) | **POST** /bot/futures-grid/create | Create a contract grid +[**post_ai_hub_spot_martingale_create**](BotApi.md#post_ai_hub_spot_martingale_create) | **POST** /bot/spot-martingale/create | Create Spot Martin +[**post_ai_hub_contract_martingale_create**](BotApi.md#post_ai_hub_contract_martingale_create) | **POST** /bot/contract-martingale/create | Create contract martin +[**get_ai_hub_portfolio_running**](BotApi.md#get_ai_hub_portfolio_running) | **GET** /bot/portfolio/running | Query the list of running policies +[**get_ai_hub_portfolio_detail**](BotApi.md#get_ai_hub_portfolio_detail) | **GET** /bot/portfolio/detail | Query order policy details +[**post_ai_hub_portfolio_stop**](BotApi.md#post_ai_hub_portfolio_stop) | **POST** /bot/portfolio/stop | Terminate a single running policy + + +# **get_ai_hub_strategy_recommend** +> AIHubDiscoverSuccessResponse get_ai_hub_strategy_recommend(market=market, strategy_type=strategy_type, direction=direction, invest_amount=invest_amount, scene=scene, refresh_recommendation_id=refresh_recommendation_id, limit=limit, max_drawdown_lte=max_drawdown_lte, backtest_apr_gte=backtest_apr_gte, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Get AIHub strategy recommendations + +The only formal interface for the discover domain. Support scenarios: - `top1` - `bundle` - `filter` - `refresh` Constraints: - The active recommendation pool only contains `spot_grid`, `futures_grid`, `spot_martingale` - Can return but do not actively recommend `infinite_grid`, `margin_grid` - `contract_martingale`, `smart-position`, `spot-future-arbitrage` must not be returned - When `scene=filter` is used, only filtering by `market`, `backtest_apr_gte`, `max_drawdown_lte` is allowed - `scene=refresh` inherits the refresh context through `refresh_recommendation_id`; the official minimum format only requires `strategy_type|market` - If the upstream directly transmits the previous recommendation `recommendation_id`, the third paragraph `backtest_id` will currently be ignored. + +### 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.BotApi(api_client) +market = 'market_example' # str | Trading pair, such as `BTC_USDT` (optional) +strategy_type = 'strategy_type_example' # str | Recommended target policy type; `contract_martingale` not allowed (optional) +direction = 'direction_example' # str | Market direction (optional) +invest_amount = 'invest_amount_example' # str | Investment amount, string transparent transmission (optional) +scene = 'scene_example' # str | Recommended scenario; when empty, bot-service can automatically infer according to the implementation logic. (optional) +refresh_recommendation_id = 'refresh_recommendation_id_example' # str | It is recommended to refresh the context. Used when `scene=refresh` is used; when `scene` is empty but the field exists, bot-service will also automatically determine as `refresh`. The official minimum format is `strategy_type|market`; if the `recommendation_id` of the previous recommendation is directly passed through, the third paragraph `backtest_id` will be ignored. (optional) +limit = 56 # int | Return quantity; when `scene=filter` is used, the actual results are up to 10 (optional) +max_drawdown_lte = 'max_drawdown_lte_example' # str | Maximum drawdown limit (optional) +backtest_apr_gte = 'backtest_apr_gte_example' # str | Backtest annualized lower limit (optional) +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Get AIHub strategy recommendations + api_response = api_instance.get_ai_hub_strategy_recommend(market=market, strategy_type=strategy_type, direction=direction, invest_amount=invest_amount, scene=scene, refresh_recommendation_id=refresh_recommendation_id, limit=limit, max_drawdown_lte=max_drawdown_lte, backtest_apr_gte=backtest_apr_gte, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->get_ai_hub_strategy_recommend: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **market** | **str**| Trading pair, such as `BTC_USDT` | [optional] + **strategy_type** | **str**| Recommended target policy type; `contract_martingale` not allowed | [optional] + **direction** | **str**| Market direction | [optional] + **invest_amount** | **str**| Investment amount, string transparent transmission | [optional] + **scene** | **str**| Recommended scenario; when empty, bot-service can automatically infer according to the implementation logic. | [optional] + **refresh_recommendation_id** | **str**| It is recommended to refresh the context. Used when `scene=refresh` is used; when `scene` is empty but the field exists, bot-service will also automatically determine as `refresh`. The official minimum format is `strategy_type|market`; if the `recommendation_id` of the previous recommendation is directly passed through, the third paragraph `backtest_id` will be ignored. | [optional] + **limit** | **int**| Return quantity; when `scene=filter` is used, the actual results are up to 10 | [optional] + **max_drawdown_lte** | **str**| Maximum drawdown limit | [optional] + **backtest_apr_gte** | **str**| Backtest annualized lower limit | [optional] + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubDiscoverSuccessResponse**](AIHubDiscoverSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_ai_hub_spot_grid_create** +> AIHubCreateSuccessResponse post_ai_hub_spot_grid_create(spot_grid_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Create spot grid + +Create a spot grid strategy based on the incoming parameters. + +### 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.BotApi(api_client) +spot_grid_create_request = gate_api.SpotGridCreateRequest() # SpotGridCreateRequest | +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Create spot grid + api_response = api_instance.post_ai_hub_spot_grid_create(spot_grid_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->post_ai_hub_spot_grid_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **spot_grid_create_request** | [**SpotGridCreateRequest**](SpotGridCreateRequest.md)| | + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubCreateSuccessResponse**](AIHubCreateSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_ai_hub_margin_grid_create** +> AIHubCreateSuccessResponse post_ai_hub_margin_grid_create(margin_grid_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Create a lever grid + +Create a leverage grid strategy based on the passed parameters. + +### 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.BotApi(api_client) +margin_grid_create_request = gate_api.MarginGridCreateRequest() # MarginGridCreateRequest | +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Create a lever grid + api_response = api_instance.post_ai_hub_margin_grid_create(margin_grid_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->post_ai_hub_margin_grid_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **margin_grid_create_request** | [**MarginGridCreateRequest**](MarginGridCreateRequest.md)| | + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubCreateSuccessResponse**](AIHubCreateSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_ai_hub_infinite_grid_create** +> AIHubCreateSuccessResponse post_ai_hub_infinite_grid_create(infinite_grid_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Create infinite grid + +Create an infinite grid strategy based on passed parameters. + +### 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.BotApi(api_client) +infinite_grid_create_request = gate_api.InfiniteGridCreateRequest() # InfiniteGridCreateRequest | +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Create infinite grid + api_response = api_instance.post_ai_hub_infinite_grid_create(infinite_grid_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->post_ai_hub_infinite_grid_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **infinite_grid_create_request** | [**InfiniteGridCreateRequest**](InfiniteGridCreateRequest.md)| | + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubCreateSuccessResponse**](AIHubCreateSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_ai_hub_futures_grid_create** +> AIHubCreateSuccessResponse post_ai_hub_futures_grid_create(futures_grid_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Create a contract grid + +Create a contract grid strategy based on the incoming parameters. + +### 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.BotApi(api_client) +futures_grid_create_request = gate_api.FuturesGridCreateRequest() # FuturesGridCreateRequest | +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Create a contract grid + api_response = api_instance.post_ai_hub_futures_grid_create(futures_grid_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->post_ai_hub_futures_grid_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **futures_grid_create_request** | [**FuturesGridCreateRequest**](FuturesGridCreateRequest.md)| | + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubCreateSuccessResponse**](AIHubCreateSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_ai_hub_spot_martingale_create** +> AIHubCreateSuccessResponse post_ai_hub_spot_martingale_create(spot_martingale_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Create Spot Martin + +Create a spot martingale strategy from the given parameters. Stop-loss semantics match the app / `MartingaleBot`: - Use **`create_params.stop_loss_per_cycle`** (ratio per round as a decimal string) for creation-side stop-loss; **do not** use `stop_loss_price` for creation logic. - Stop-loss prices shown on detail pages are computed per round by the engine; creation accepts optional **`create_params.trigger_price`** (trigger price). + +### 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.BotApi(api_client) +spot_martingale_create_request = gate_api.SpotMartingaleCreateRequest() # SpotMartingaleCreateRequest | +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Create Spot Martin + api_response = api_instance.post_ai_hub_spot_martingale_create(spot_martingale_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->post_ai_hub_spot_martingale_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **spot_martingale_create_request** | [**SpotMartingaleCreateRequest**](SpotMartingaleCreateRequest.md)| | + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubCreateSuccessResponse**](AIHubCreateSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_ai_hub_contract_martingale_create** +> AIHubCreateSuccessResponse post_ai_hub_contract_martingale_create(contract_martingale_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Create contract martin + +Create a contract Martin strategy based on the input parameters. + +### 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.BotApi(api_client) +contract_martingale_create_request = gate_api.ContractMartingaleCreateRequest() # ContractMartingaleCreateRequest | +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Create contract martin + api_response = api_instance.post_ai_hub_contract_martingale_create(contract_martingale_create_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->post_ai_hub_contract_martingale_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract_martingale_create_request** | [**ContractMartingaleCreateRequest**](ContractMartingaleCreateRequest.md)| | + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubCreateSuccessResponse**](AIHubCreateSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[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_ai_hub_portfolio_running** +> AIHubPortfolioRunningSuccessResponse get_ai_hub_portfolio_running(strategy_type=strategy_type, market=market, page=page, page_size=page_size, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Query the list of running policies + +Query the list of AIHub strategies currently running by the user, and support filtering by strategy type, trading pair and paging conditions. + +### 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.BotApi(api_client) +strategy_type = 'strategy_type_example' # str | Filter by policy type (optional) +market = 'market_example' # str | Filter by trading pair (optional) +page = 1 # int | Page number, default 1 (optional) (default to 1) +page_size = 20 # int | Paging size, default 20, maximum 50 (optional) (default to 20) +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Query the list of running policies + api_response = api_instance.get_ai_hub_portfolio_running(strategy_type=strategy_type, market=market, page=page, page_size=page_size, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->get_ai_hub_portfolio_running: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **strategy_type** | **str**| Filter by policy type | [optional] + **market** | **str**| Filter by trading pair | [optional] + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **page_size** | **int**| Paging size, default 20, maximum 50 | [optional] [default to 20] + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubPortfolioRunningSuccessResponse**](AIHubPortfolioRunningSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[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_ai_hub_portfolio_detail** +> AIHubPortfolioDetailSuccessResponse get_ai_hub_portfolio_detail(strategy_id, strategy_type, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Query order policy details + +Both `strategy_id` and `strategy_type` must be passed in the request, where `strategy_type` is used to distribute to the underlying detailed implementation by strategy type. + +### 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.BotApi(api_client) +strategy_id = 'strategy_id_example' # str | Policy ID +strategy_type = 'strategy_type_example' # str | Policy type; used for underlying detail distribution +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Query order policy details + api_response = api_instance.get_ai_hub_portfolio_detail(strategy_id, strategy_type, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->get_ai_hub_portfolio_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **strategy_id** | **str**| Policy ID | + **strategy_type** | **str**| Policy type; used for underlying detail distribution | + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubPortfolioDetailSuccessResponse**](AIHubPortfolioDetailSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_ai_hub_portfolio_stop** +> AIHubPortfolioStopSuccessResponse post_ai_hub_portfolio_stop(ai_hub_portfolio_stop_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_id) + +Terminate a single running policy + +Only one policy is allowed to be terminated per request. Risk warning and secondary confirmation are borne by the upper layer of OpenClaw; this interface is only responsible for executing stop. + +### 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.BotApi(api_client) +ai_hub_portfolio_stop_request = gate_api.AIHubPortfolioStopRequest() # AIHubPortfolioStopRequest | +x_gate_service_id = 'x_gate_service_id_example' # str | Call source identifier; injected by APIv4 if necessary (optional) +x_gate_app_lang = 'x_gate_app_lang_example' # str | Language context, such as `zh-CN` / `en-US` (optional) +x_request_id = 'x_request_id_example' # str | Request link ID; caller can transmit transparently (optional) +x_trace_id = 'x_trace_id_example' # str | trace header; can be generated uniformly by APIv4 (optional) + +try: + # Terminate a single running policy + api_response = api_instance.post_ai_hub_portfolio_stop(ai_hub_portfolio_stop_request, x_gate_service_id=x_gate_service_id, x_gate_app_lang=x_gate_app_lang, x_request_id=x_request_id, x_trace_id=x_trace_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 BotApi->post_ai_hub_portfolio_stop: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ai_hub_portfolio_stop_request** | [**AIHubPortfolioStopRequest**](AIHubPortfolioStopRequest.md)| | + **x_gate_service_id** | **str**| Call source identifier; injected by APIv4 if necessary | [optional] + **x_gate_app_lang** | **str**| Language context, such as `zh-CN` / `en-US` | [optional] + **x_request_id** | **str**| Request link ID; caller can transmit transparently | [optional] + **x_trace_id** | **str**| trace header; can be generated uniformly by APIv4 | [optional] + +### Return type + +[**AIHubPortfolioStopSuccessResponse**](AIHubPortfolioStopSuccessResponse.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** | Unified business response | - | + +[[Back to top]](#) [[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/BrokerCommission.md b/docs/BrokerCommission.md index 0cbfd463..3002ac6c 100644 --- a/docs/BrokerCommission.md +++ b/docs/BrokerCommission.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total** | **int** | Total | [optional] -**list** | [**list[BrokerCommission1]**](BrokerCommission1.md) | List of commission history | [optional] +**list** | [**list[BrokerCommissionItem]**](BrokerCommissionItem.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/BrokerCommissionItem.md similarity index 97% rename from docs/BrokerCommission1.md rename to docs/BrokerCommissionItem.md index a5ec5459..d666b1d8 100644 --- a/docs/BrokerCommission1.md +++ b/docs/BrokerCommissionItem.md @@ -1,4 +1,4 @@ -# BrokerCommission1 +# BrokerCommissionItem ## Properties Name | Type | Description | Notes diff --git a/docs/BrokerTransaction.md b/docs/BrokerTransaction.md index c4508946..2e56b7b7 100644 --- a/docs/BrokerTransaction.md +++ b/docs/BrokerTransaction.md @@ -3,8 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[BrokerTransaction1]**](BrokerTransaction1.md) | List of transaction history | [optional] +**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、TradFi | [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/BrokerTransaction1.md b/docs/BrokerTransaction1.md deleted file mode 100644 index cf13fea7..00000000 --- a/docs/BrokerTransaction1.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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、TradFi | [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/BrokerTransactionHistory.md b/docs/BrokerTransactionHistory.md new file mode 100644 index 00000000..1dab53f0 --- /dev/null +++ b/docs/BrokerTransactionHistory.md @@ -0,0 +1,11 @@ +# BrokerTransactionHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total | [optional] +**list** | [**list[BrokerTransaction]**](BrokerTransaction.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/CancelOrder.md b/docs/CancelOrder.md index 6565c2a8..b6d39cf7 100644 --- a/docs/CancelOrder.md +++ b/docs/CancelOrder.md @@ -4,9 +4,9 @@ Cancel order request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trade_id** | **str** | | -**reason_id** | **str** | | [optional] -**reason_memo** | **str** | | [optional] +**txid** | **str** | Order ID | +**reason_id** | **str** | Cancel reason ID. `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller account not real; `5` payout account issue; `6` price mismatch; `7` mutually agreed cancel; `8` poor communication; `9` other; `10` seller cannot release with refund; `11` terms not met; `12` seller payout risk-controlled. | [optional] +**reason_memo** | **str** | Extra cancel notes when `reason_id` is `9` or explanation is required. | [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/CandyDropV4ActivityCd01.md b/docs/CandyDropV4ActivityCd01.md new file mode 100644 index 00000000..7b70ef51 --- /dev/null +++ b/docs/CandyDropV4ActivityCd01.md @@ -0,0 +1,17 @@ +# CandyDropV4ActivityCd01 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Activity ID | [optional] +**currency** | **str** | Project/currency name | [optional] +**total_rewards** | **str** | total prize pool | [optional] +**start_time** | **str** | Event start time (UTC formatted) | [optional] +**end_time** | **str** | Event end time (UTC format) | [optional] +**rule_name** | **list[str]** | Task type list | [optional] +**participants** | **int** | Number of participants | [optional] +**user_max_rewards** | **str** | Maximum reward available | [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/CandyDropV4ActivityRulesCd03.md b/docs/CandyDropV4ActivityRulesCd03.md new file mode 100644 index 00000000..58319db4 --- /dev/null +++ b/docs/CandyDropV4ActivityRulesCd03.md @@ -0,0 +1,14 @@ +# CandyDropV4ActivityRulesCd03 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Project/currency name | [optional] +**total_rewards** | **str** | total prize pool | [optional] +**start_time** | **str** | Event start time (UTC formatted) | [optional] +**end_time** | **str** | Event end time (UTC format) | [optional] +**prize_pools** | [**list[CandyDropV4PrizePoolCd03]**](CandyDropV4PrizePoolCd03.md) | Prize pool 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/CandyDropV4AirdropRecordCd06.md b/docs/CandyDropV4AirdropRecordCd06.md new file mode 100644 index 00000000..44a3d844 --- /dev/null +++ b/docs/CandyDropV4AirdropRecordCd06.md @@ -0,0 +1,13 @@ +# CandyDropV4AirdropRecordCd06 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Product Name | [optional] +**airdrop_time** | **str** | Airdrop time (UTC format) | [optional] +**rewards** | **str** | Airdrop rewards | [optional] +**convert_amount** | **str** | Automatic exchange 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/CandyDropV4ErrorCd01.md b/docs/CandyDropV4ErrorCd01.md new file mode 100644 index 00000000..53063f1c --- /dev/null +++ b/docs/CandyDropV4ErrorCd01.md @@ -0,0 +1,11 @@ +# CandyDropV4ErrorCd01 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Error label | [optional] +**message** | **str** | Error message | [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/CandyDropV4ParticipationRecordCd05.md b/docs/CandyDropV4ParticipationRecordCd05.md new file mode 100644 index 00000000..6823e171 --- /dev/null +++ b/docs/CandyDropV4ParticipationRecordCd05.md @@ -0,0 +1,13 @@ +# CandyDropV4ParticipationRecordCd05 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Activity ID | [optional] +**currency** | **str** | Product Name | [optional] +**status** | **str** | Project status: ongoing/awaiting_draw/won/not_win | [optional] +**register_time** | **str** | Participation time (UTC formatted) | [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/CandyDropV4PrizePoolCd03.md b/docs/CandyDropV4PrizePoolCd03.md new file mode 100644 index 00000000..738f5587 --- /dev/null +++ b/docs/CandyDropV4PrizePoolCd03.md @@ -0,0 +1,13 @@ +# CandyDropV4PrizePoolCd03 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prize_pool_type** | **int** | Prize pool type | [optional] +**prize_all** | **str** | Total prize pool amount | [optional] +**prize_limit** | **str** | Maximum share per person | [optional] +**tasks** | [**list[CandyDropV4TaskCd03]**](CandyDropV4TaskCd03.md) | task 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/CandyDropV4RegisterReqCd02.md b/docs/CandyDropV4RegisterReqCd02.md new file mode 100644 index 00000000..7e180ff6 --- /dev/null +++ b/docs/CandyDropV4RegisterReqCd02.md @@ -0,0 +1,11 @@ +# CandyDropV4RegisterReqCd02 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**activity_id** | **int** | Activity ID (optional, used with currency) | [optional] +**currency** | **str** | Project/currency name (required) | + +[[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/CandyDropV4RegisterRespCd02.md b/docs/CandyDropV4RegisterRespCd02.md new file mode 100644 index 00000000..4291de85 --- /dev/null +++ b/docs/CandyDropV4RegisterRespCd02.md @@ -0,0 +1,10 @@ +# CandyDropV4RegisterRespCd02 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Whether the registration is 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/CandyDropV4TaskCd03.md b/docs/CandyDropV4TaskCd03.md new file mode 100644 index 00000000..529d8a37 --- /dev/null +++ b/docs/CandyDropV4TaskCd03.md @@ -0,0 +1,12 @@ +# CandyDropV4TaskCd03 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_name** | **str** | Task main title | [optional] +**task_desc** | **str** | Task subtitle, if none is returned - | [optional] +**exclusive_label** | **str** | Exclusive task label copywriting, if not configured, it will return - | [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/CandyDropV4TaskProgressCd04.md b/docs/CandyDropV4TaskProgressCd04.md new file mode 100644 index 00000000..f381c3ef --- /dev/null +++ b/docs/CandyDropV4TaskProgressCd04.md @@ -0,0 +1,14 @@ +# CandyDropV4TaskProgressCd04 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Project/currency name | [optional] +**total_rewards** | **str** | total prize pool | [optional] +**start_time** | **str** | Event start time (UTC formatted) | [optional] +**end_time** | **str** | Event end time (UTC format) | [optional] +**tasks** | [**list[CandyDropV4TaskProgressItemCd04]**](CandyDropV4TaskProgressItemCd04.md) | Progress list of tasks received | [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/CandyDropV4TaskProgressItemCd04.md b/docs/CandyDropV4TaskProgressItemCd04.md new file mode 100644 index 00000000..6751280a --- /dev/null +++ b/docs/CandyDropV4TaskProgressItemCd04.md @@ -0,0 +1,12 @@ +# CandyDropV4TaskProgressItemCd04 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_name** | **str** | Task main title | [optional] +**task_desc** | **str** | Task subtitle | [optional] +**value** | **str** | Task progress data (transaction volume/recharge volume, etc.) | [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/ChaseOrder.md b/docs/ChaseOrder.md new file mode 100644 index 00000000..d52f2f20 --- /dev/null +++ b/docs/ChaseOrder.md @@ -0,0 +1,45 @@ +# ChaseOrder + +Chase order detail or list item +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**user** | **str** | | [optional] +**contract** | **str** | | [optional] +**settle** | **str** | | [optional] +**amount** | **str** | Total size in contracts; positive for buy, negative for sell | [optional] +**price_limit** | **str** | | [optional] +**reduce_only** | **bool** | | [optional] +**text** | **str** | | [optional] +**create_time** | **int** | | [optional] +**finish_time** | **int** | | [optional] +**original_status** | **int** | Raw status enum | [optional] +**status** | **str** | Simplified status, e.g. open / finished | [optional] +**reason** | **str** | | [optional] +**fill_amount** | **str** | | [optional] +**average_fill_price** | **str** | | [optional] +**suborder_id** | **str** | | [optional] +**is_dual_mode** | **bool** | | [optional] +**side_label** | **str** | | [optional] +**position_side_output** | **str** | | [optional] +**chase_price** | **str** | | [optional] +**interval_sec** | **int** | | [optional] +**updated_at** | **int** | | [optional] +**suborder_price** | **str** | | [optional] +**suborder_ongoing** | **bool** | | [optional] +**suborder_finish_as** | **str** | | [optional] +**price_type** | **int** | PriceType enum: 1 latest, 2 index, 3 mark | [optional] +**price_gap_type** | **str** | | [optional] +**price_gap_value** | **str** | | [optional] +**status_code** | **str** | | [optional] +**create_time_precise** | **str** | Creation time (seconds.microseconds) | [optional] +**finish_time_precise** | **str** | | [optional] +**pos_margin_mode** | **str** | | [optional] +**position_mode** | **str** | | [optional] +**leverage** | **str** | | [optional] +**error_label** | **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/ClaimRewardError.md b/docs/ClaimRewardError.md new file mode 100644 index 00000000..06bc522a --- /dev/null +++ b/docs/ClaimRewardError.md @@ -0,0 +1,11 @@ +# ClaimRewardError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Error identifier code | [optional] +**message** | **str** | Error details | [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/ClaimTaskError.md b/docs/ClaimTaskError.md new file mode 100644 index 00000000..8fddd94c --- /dev/null +++ b/docs/ClaimTaskError.md @@ -0,0 +1,11 @@ +# ClaimTaskError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Error identifier code | [optional] +**message** | **str** | Error details | [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/ConfirmPayment.md b/docs/ConfirmPayment.md index dde3a9d2..810549be 100644 --- a/docs/ConfirmPayment.md +++ b/docs/ConfirmPayment.md @@ -4,8 +4,8 @@ Confirm payment request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trade_id** | **str** | | -**payment_method** | **str** | | +**txid** | **str** | Order ID | +**payment_method** | **str** | Payment type used for this payment; optional but must be among order-supported types. Use `supported_pay_types` on the order or `pay_type` list, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. | [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/ConfirmReceipt.md b/docs/ConfirmReceipt.md index 3d4622ba..ec60e5b8 100644 --- a/docs/ConfirmReceipt.md +++ b/docs/ConfirmReceipt.md @@ -4,7 +4,7 @@ Confirm receipt request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trade_id** | **str** | | +**txid** | **str** | Order ID | [[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 18b5cd12..a61975b8 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **funding_interval** | **int** | Funding application interval, unit in seconds | [optional] **funding_next_apply** | **float** | Next funding time | [optional] **risk_limit_base** | **str** | Base risk limit (deprecated) | [optional] +**interest_rate** | **str** | Interest rate parameter used in funding rate and premium-related calculations for perpetual contracts. Returned as a string decimal ratio (e.g. `0.0003`), same convention as `funding_rate` (ratio, not percent). | [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** | **str** | Minimum order size allowed by the contract | [optional] @@ -48,7 +49,9 @@ Name | Type | Description | Notes **market_order_slip_ratio** | **str** | The maximum slippage allowed for market orders, with the slippage rate calculated based on the latest market price | [optional] **market_order_size_max** | **str** | The maximum number of contracts supported for market orders, with a default value of 0. When the default value is used, the maximum number of contracts is limited by the `order_size_max` field | [optional] **funding_rate_limit** | **str** | Upper and lower limits of funding rate | [optional] +**contract_type** | **str** | Contract classification type, e.g. stocks, metals, indices, forex, commodities, etc. | [optional] **funding_impact_value** | **str** | Funding rate depth impact value | [optional] +**enable_circuit_breaker** | **bool** | Whether the newly launched contract activates mark price circuit breaker (If the platform intends to activate this mechanism for a newly launched contract market to prevent significant price fluctuations and excessive liquidations after launch, an advance announcement will be made). | [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/ContractMartingaleCreateParams.md b/docs/ContractMartingaleCreateParams.md new file mode 100644 index 00000000..60957272 --- /dev/null +++ b/docs/ContractMartingaleCreateParams.md @@ -0,0 +1,18 @@ +# ContractMartingaleCreateParams + +The creation parameters of the contract Martin strategy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invest_amount** | **str** | Margin allocated; the server converts it to initial contract size using live contract price, contract multiplier, and minimum lot size. | +**price_deviation** | **str** | | +**max_orders** | **int** | | +**take_profit_ratio** | **str** | | +**direction** | [**ContractMartingaleDirection**](ContractMartingaleDirection.md) | | +**leverage** | **str** | | +**stop_loss_price** | **str** | Legacy field name. The AIHub `contract_martingale` creation path does not map this field today; follow contract martingale rules from the underlying API. MCP tooling must match bot-service behavior. | [optional] +**profit_sharing_ratio** | **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/ContractMartingaleCreateRequest.md b/docs/ContractMartingaleCreateRequest.md new file mode 100644 index 00000000..c1051e6f --- /dev/null +++ b/docs/ContractMartingaleCreateRequest.md @@ -0,0 +1,13 @@ +# ContractMartingaleCreateRequest + +Create the request body of the contract Martin strategy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_type** | **str** | | +**market** | **str** | | +**create_params** | [**ContractMartingaleCreateParams**](ContractMartingaleCreateParams.md) | | + +[[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/ContractMartingaleDirection.md similarity index 64% rename from docs/Eth2Swap.md rename to docs/ContractMartingaleDirection.md index 9ce975e6..385014d2 100644 --- a/docs/Eth2Swap.md +++ b/docs/ContractMartingaleDirection.md @@ -1,11 +1,9 @@ -# Eth2Swap +# ContractMartingaleDirection -ETH Mining +The direction enumeration supported by the contract Martin strategy is consistent with the original interface of the App. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**side** | **str** | 1-Forward Swap (ETH -> GTETH), 2-Reverse Swap (GTETH -> 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/ContractStat.md b/docs/ContractStat.md index 86c1de92..f79f8e07 100644 --- a/docs/ContractStat.md +++ b/docs/ContractStat.md @@ -9,14 +9,24 @@ Name | Type | Description | Notes **long_liq_size** | **str** | 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] +**long_liq_usd_new** | **float** | Long liquidations in quote currency; USDT settlement: long_liq_size × multiplier × mark price | [optional] **short_liq_size** | **str** | 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] +**short_liq_usd_new** | **float** | Short liquidations in quote currency; USDT settlement: short_liq_size × multiplier × mark price | [optional] **open_interest** | **str** | 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** | **str** | Top trader long/short position ratio | [optional] **mark_price** | **float** | Mark price | [optional] +**top_long_size** | **str** | Top long open interest (contracts) | [optional] +**top_short_size** | **str** | Top short open interest (contracts) | [optional] +**long_taker_size** | **str** | Long taker trade volume (contracts) | [optional] +**short_taker_size** | **str** | Short taker trade volume (contracts) | [optional] +**top_long_account** | **int** | Number of top long accounts (large holders) | [optional] +**top_short_account** | **int** | Number of top short accounts (large holders) | [optional] +**long_users** | **str** | Number of users holding long positions | [optional] +**short_users** | **str** | Number of users holding short positions | [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/ConvertCurrenciesV2Item.md b/docs/ConvertCurrenciesV2Item.md new file mode 100644 index 00000000..652276a2 --- /dev/null +++ b/docs/ConvertCurrenciesV2Item.md @@ -0,0 +1,12 @@ +# ConvertCurrenciesV2Item + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**icon_url** | **str** | | [optional] +**name** | **str** | | +**priority** | **int** | | + +[[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/CouponApi.md b/docs/CouponApi.md new file mode 100644 index 00000000..0ad95f98 --- /dev/null +++ b/docs/CouponApi.md @@ -0,0 +1,164 @@ +# gate_api.CouponApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_user_coupons**](CouponApi.md#list_user_coupons) | **GET** /coupon/user-coupon-list | Coupon Center list +[**get_user_coupon_detail**](CouponApi.md#get_user_coupon_detail) | **GET** /coupon/user-coupon-detail | Coupon Center details + + +# **list_user_coupons** +> ListUserCouponsResponse list_user_coupons(expired=expired, limit=limit, last_id=last_id, expire_time=expire_time, order_by=order_by, type=type, is_task_coupon=is_task_coupon) + +Coupon Center list + +## Interface description The general list interface of the card and coupon center returns all the cards and coupons of the currently logged in user (supports paging, filtering type, and valid/invalid switching). --- ## Query Parameters | Parameter name | Type | Required | Default value | Constraints | Description | |--------|------|------|--------|------|------| | `expired` | integer | No | `0` | `0` or `1` | `0` = Query valid cards and coupons; `1` = Check expired/used cards | | `limit` | integer | No | `10` | 1 ~ 20 | The number of cards returned per page | | `last_id` | integer | No | `0` | 1 ~ 1000000000 | Cursor paging: the last record of the previous page `id`, the home page does not transmit | | `expire_time` | integer | no | `0` | 1 ~ 2147483647 | Cursor pagination: with `last_id` Union usage expiration time (Unix timestamp) | | `order_by` | string | no | `latest` | `latest` / `expired` | Sorting method: `latest` = sort by latest receipt; `expired` = sort by expiration time in ascending order | | `type` | string | No | Empty (return all) | See the card type table below | Only return cards of the specified type | | `is_task_coupon` | integer | No | Do not pass (return all) | `0` or `1` | `0` = Only ordinary cards and coupons are returned; `1` = Only mission cards and coupons are returned; both are returned without passing | ### Supported coupon types (`type` parameter enumeration value) The main site (gate.io default site) supports the following types, and different sub-sites (Türkiye, United States, Malta, Australia) have their own whitelist restrictions. | `type` value | Coupon name | Version limit (below this version will not be returned/cannot be transferred) | |-----------|---------|-------------------------------| | `position_voucher` | Position experience coupon | Unlimited | | `tradfi_position_voucher` | TradFi position experience coupon | Android < 7320000 / iOS < 202507320000 does not return | | `contract_bonus` | Contract trial bonus | Unlimited | | `contract_bonus_new` | Contract experience coupon | Unlimited | | `commission_rebate` | Fee rebate coupons | Unlimited | | `hold_bonus` | Financial management trial bonus | Unlimited | | `point` | Point card | Unlimited (main site/Türkiye site only) | | `financial_rate` | Interest rate coupons | Unlimited | | `robot_bonus` | Robot trial bonus | Unlimited | | `loss_protection_copier` | Worry-free money for copying orders | Unlimited | | `vip_card` | VIP experience card | Unlimited | | `interest_voucher` | Leveraged coupons | Unlimited | | `p2p` | P2P transaction coupons | Unlimited | | `cash` | Cash Vouchers | Unlimited | | `crypto_loan_interest` | Mortgage currency interest reduction coupons | Android < 7290000 / iOS < 202507290000 does not return | | `copy_trading` | Trading experience bonus | Android < 7320000 / iOS < 202507320000 No return | | `alpha_voucher` | Alpha Cash Voucher | Android < 7320000 / iOS < 202507320000 Do not return | | `etf_voucher` | ETF trial fund | Android < 7320000 / iOS < 202507320000 No return | --- ##Response ### Outer structure ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": true, \"list\": [ ...array of coupon objects... ] } } ``` | Field | Type | Description | |------|------|------| | `code` | integer | `0` = success | | `message` | string | response message | | `data.next_page` | boolean | Whether there is a next page. `true` = There is more data, the `id` of the last item on this page needs to be `last_id` is passed in for the next request | | `data.list` | array | Array of coupon objects, see below for details | --- ### Public fields of card and coupon objects (included in all types) | Field name | Type | Description | |--------|------|------| | `id` | integer | Card and coupon issuance record ID (`coupon_send_issuing_log.id`), used for paging cursor `last_id` | | `details_id` | integer | The primary key ID of the user card details table (independent tables for each type) | | `coupon_type` | string | Coupon type, see the enumeration table above | | `name` | string | Card display name (i18n translated) | | `amount` | string | Coupon denomination (formatted string, including thousandth sign). Different types have different meanings, see explanation below | | `currency` | string | The denomination unit. Different types have different values, see explanation below | | `rule_new` | string | Use rule text (this field in the list interface always returns the empty string `\"\"`, and only in the detail interface) | | `status` | string | Card status, see status enumeration below | | `jump_url` | object | jump link | | `jump_url.web` | string | Web jump link | | `jump_url.app` | string | App jump link | | `jump_url.mini_app` | string | Mini program jump link (most types are empty strings) | | `help_url` | object | Help center link | | `help_url.web` | string | Web help link | | `help_url.app` | string | App help link | | `expire_time` | integer | Expiration time (Unix timestamp). Note: Some types will be adjusted to the actual expiration time after they have been activated or used | | `expire_time_order_by` | integer | Expiration time for sorting (taken from the original expiration time of the issuance record, not affected by activation) | | `expire_second` | integer | The number of seconds remaining before expiration (expired or point card type returns `0`) | | `has_usage_history` | boolean | Whether there is a usage record (the point card type is fixed to `true`, and the rest are judged based on the type) | | `has_progress` | boolean | Whether to display the progress bar (only `commission_rebate`, `interest_voucher` and task coupons that meet the conditions are `true`) | | `progress_config` | object | Progress bar configuration, when `has_progress` is `false`, each field is an empty string | | `progress_config.total_balance` | string | The total amount to be completed | | `progress_config.current_used` | string | Amount used | | `progress_config.current_achived` | string | Amount achieved | | `progress_config.currency` | string | Progress unit | | `activation_info` | object | Activation information exclusive to each type, see each type description below (types without exclusive information return empty objects `{}`) | | `is_task_coupon` | integer | `0` = ordinary coupon; `1` = task coupon | | `upgrade_toast` | boolean | Whether the user needs to be prompted to upgrade the App (`true` when the version is too old and cannot support the coupon) | | `task_title` | string | Task title (only task coupons have value, ordinary coupons are `\"\"`) | | `task_desc` | string | Task description (only task coupons have value, ordinary coupons are `\"\"`) | | `task_start_at` | integer | Task start timestamp (only `TASK_EXPIRED` status task coupons have value, the rest are `0`) | | `task_expire_at` | integer | Task expiration timestamp (currently fixed to `0`, reserved field) | | `task_completed_at` | integer | Task completion timestamp (currently fixed at `0`, reserved field) | | `extra` | array | Extended field, fixed return empty array `[]` | --- ### `status` status enumeration | Value | Applicable objects | Description | |----|---------|------| | `NOT_ACTIVE` | Ordinary coupons | Pending activation (not yet activated) | | `ACTIVATED` | Ordinary coupons | Activated (activating or after activation) | | `TO_BE_USED` | Ordinary coupons | To be used (valid and not used) | | `EXPIRED` | Ordinary coupons | Expired (expired without being used) | | `RECYCLED` | Ordinary cards and coupons | Recycled (such as contract recharge experience coupons are recycled) | | `INVALID` | Ordinary coupons | Expired | | `USED` | Ordinary coupons | Used/consumed | | `UNKNOWN` | Ordinary coupons | Unknown status | | `LOCKED` | Ordinary cards and coupons (`p2p`) | Locked (P2P transaction in progress, waiting for write-off) | | `TASK_START` | Task coupons | The task has not started (the coupon has been issued and the task is to be started) | | `TASK_WAIT` | Task coupons | Task in progress (to be completed) | | `TASK_DONE` | Task coupons | The task has been completed (receiving is being processed) | | `TASK_EXPIRED` | Task coupon | The task is not completed and has expired | | `TASK_NOT_STARTED_EXPIRED` | Task coupon | The task has expired before it started | | `TASK_RECEIVE_SUCCESS` | Task coupons | Task rewards received successfully | | `TASK_RECEIVE_FAIL` | Task coupons | Failed to receive task rewards | --- ### `amount` / `currency` Description of each type | `coupon_type` | `amount` description | `currency` value | |---------------|--------------|---------------| | `point` | Point card balance (including thousandths) | `\"POINT\"` | | `position_voucher` | `Coupon face amount × leverage multiple` (including thousandths) | Such as `\"USDT\"` | | `tradfi_position_voucher` | `Coupon face amount × leverage multiple` (including thousandths) | `\"USDx\"` | | `financial_rate` | Interest rate increase value + `%`, such as `\"5%\"` | `\"APR\"` | | `vip_card` | VIP level number, such as `\"4\"` | `\"VIP\"` | | `interest_voucher` | Interest rate discount percentage + `%` | Discount logo (Chinese site is `\"discount\"`, other sites are empty) | | `crypto_loan_interest` | Interest rate discount percentage + `%` | `\"\"` | | `alpha_voucher` | Coupon face amount (including thousandths) | Alpha base currency (such as `\"USDT\"` or `\"ETH\"`) | | Other types | Coupon face amount (including thousandths) | Capital currency symbol, such as `\"USDT\"` / `\"GT\"` / `\"BTC\"` | > **Note**: The `point` type additionally returns the `origin_amount` field (the original balance string with the trailing zeros removed), other types do not have this field. --- ### `activation_info` Exclusive fields for each type #### `interest_voucher` (leverage coupon) ```json { \"supported_pairs\": \"BTC/USDT\", \"transaction_type\": \"borrow\" } ``` | Field | Type | Description | |------|------|------| | `supported_pairs` | string | Applicable trading pairs, separated by `/`, such as `\"BTC/USDT\"` | | `transaction_type` | string | Transaction type (such as `borrow`) | #### `contract_bonus_new` (contract experience coupon) ```json { \"received_expired_hour\": 48 } ``` | Field | Type | Description | |------|------|------| | `received_expired_hour` | integer | The number of hours valid after activation (automatic recycling after timeout) | #### `contract_bonus` (Contract experience bonus) ```json { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false } ``` | Field | Type | Description | |------|------|------| | `check_unified_account_mode` | boolean | Whether to check the unified account mode (fixed `true`) | | `received_expired_days` | integer | Number of days valid after activation | | `abtest` | boolean | AB test flag (currently fixed to `false`) | #### `commission_rebate` (handling fee cashback coupon) ```json { \"market\": \"futures\", \"market_name\": \"Futures\" } ``` | Field | Type | Description | |------|------|------| | `market` | string | Applicable market, enumeration value: `spot` / `margin` / `futures` / `alpha` / `etf` / `tradfi` | | `market_name` | string | Market display name (i18n translated) | #### `robot_bonus` (robot experience bonus) ```json { \"designated_bots\": \"DISABLED\" } ``` | Field | Type | Description | |------|------|------| | `designated_bots` | string | `\"ENABLED\"` = can only be used by specified policies; `\"DISABLED\"` = Unlimited strategy | #### `position_voucher` (position experience coupon) ```json { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"100\", \"position_bonus\": \"500\" } ``` | Field | Type | Description | |------|------|------| | `symbols` | string | Applicable trading pairs (such as `\"BTC_USDT\"`), empty means no limit | | `leverage` | string | Leverage multiple | | `need_user_funds` | integer | `0` = No user-owned funds are required; `1` = Fund allocation is required | | `user_funds_amount` | string | The amount of funds required by the user (meaningful when `need_user_funds=1`) | | `position_bonus` | string | The original amount of the coupon (remove the trailing zero) | #### `tradfi_position_voucher` (TradFi position experience coupon) ```json { \"symbols\": \"AAPL\", \"leverage\": \"5\", \"position_bonus\": \"200\" } ``` | Field | Type | Description | |------|------|------| | `symbols` | string | Applicable to TradFi varieties (such as `\"AAPL\"`), empty means no limit | | `leverage` | string | Leverage multiple | | `position_bonus` | string | The original amount of the coupon (remove the trailing zero) | #### `etf_voucher` (ETF trial bonus) ```json { \"currency_markets\": \"BTC3L_USDT,ETH3L_USDT\", \"amount\": \"50\" } ``` | Field | Type | Description | |------|------|------| | `currency_markets` | string | List of applicable ETF markets (comma separated) | | `amount` | string | The original amount of the coupon (remove the trailing zero) | #### Other types `point` (point card), `hold_bonus` (financial experience fund), `loss_protection_copier` (worry-free money for following orders), `vip_card` (VIP experience card), `p2p` (P2P transaction coupon), `cash` (cash coupon) , `crypto_loan_interest` (interest-reduced coupon for mortgage loan), `copy_trading` (trading experience fee), `alpha_voucher` (Alpha cash coupon), `financial_rate` (interest-increasing coupon) and other types return empty objects: ```json {} ``` --- ## Complete response example ### Ordinary cards and coupons (contract experience money) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 1234567, \"details_id\": 890, \"coupon_type\": \"contract_bonus\", \"name\": \"Futures Bonus\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"\", \"status\": \"NOT_ACTIVE\", \"jump_url\": { \"web\": \"/futures/USDT\", \"app\": \"/futures/USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 86400, \"has_usage_history\": false, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false }, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` ### Task coupons (handling fee cashback coupons) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"commission_rebate\", \"name\": \"10% Futures Commission Rebate\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"\", \"status\": \"TASK_WAIT\", \"jump_url\": { \"web\": \"https://www.gate.io/futures\", \"app\": \"gateio://futures\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 172800, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"1000\", \"current_used\": \"350\", \"current_achived\": \"350\", \"currency\": \"USDT\" }, \"activation_info\": { \"market\": \"futures\", \"market_name\": \"Futures\" }, \"is_task_coupon\": 1, \"upgrade_toast\": false, \"task_title\": \"Trade 1000 USDT to earn commission rebate\", \"task_desc\": \"Complete futures trading volume task to get 100 USDT commission rebate\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` ### Point card (point) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 0, \"details_id\": 0, \"coupon_type\": \"point\", \"name\": \"Points\", \"amount\": \"1,234.56\", \"origin_amount\": \"1234.56\", \"currency\": \"POINT\", \"rule_new\": \"...\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/trade/BTC_USDT\", \"app\": \"/trade/BTC_USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 0, \"expire_time_order_by\": 0, \"expire_second\": 0, \"has_usage_history\": true, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": {}, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` + +### 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.CouponApi(api_client) +expired = 0 # int | Coupon status filter. `0` = query valid coupons (default); `1` = query expired/used coupons (optional) (default to 0) +limit = 10 # int | Number of coupons returned per page, range 1-20, default 10 (optional) (default to 10) +last_id = 56 # int | Cursor-based pagination: the `id` value of the last record from the previous page, omit (or pass 0) for the first page (optional) +expire_time = 56 # int | Cursor-based pagination: used together with `last_id`, pass the `expire_time_order_by` value of the last record from the previous page (Unix timestamp), omit for the first page (optional) +order_by = 'latest' # str | Sort order. `latest` = by latest claim time descending (default); `expired` = by expiration time ascending (optional) (default to 'latest') +type = 'type_example' # str | Coupon type filter. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) (optional) +is_task_coupon = 56 # int | Task Coupon Filter. `0` = Return only regular coupons; `1` = Return only task coupons; Omit to return both (optional) + +try: + # Coupon Center list + api_response = api_instance.list_user_coupons(expired=expired, limit=limit, last_id=last_id, expire_time=expire_time, order_by=order_by, type=type, is_task_coupon=is_task_coupon) + 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 CouponApi->list_user_coupons: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **expired** | **int**| Coupon status filter. `0` = query valid coupons (default); `1` = query expired/used coupons | [optional] [default to 0] + **limit** | **int**| Number of coupons returned per page, range 1-20, default 10 | [optional] [default to 10] + **last_id** | **int**| Cursor-based pagination: the `id` value of the last record from the previous page, omit (or pass 0) for the first page | [optional] + **expire_time** | **int**| Cursor-based pagination: used together with `last_id`, pass the `expire_time_order_by` value of the last record from the previous page (Unix timestamp), omit for the first page | [optional] + **order_by** | **str**| Sort order. `latest` = by latest claim time descending (default); `expired` = by expiration time ascending | [optional] [default to 'latest'] + **type** | **str**| Coupon type filter. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) | [optional] + **is_task_coupon** | **int**| Task Coupon Filter. `0` = Return only regular coupons; `1` = Return only task coupons; Omit to return both | [optional] + +### Return type + +[**ListUserCouponsResponse**](ListUserCouponsResponse.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** | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - | + +[[Back to top]](#) [[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_coupon_detail** +> GetUserCouponDetailResponse get_user_coupon_detail(coupon_type, detail_id, is_task_coupon=is_task_coupon) + +Coupon Center details + +## Interface description The general details interface of the card and coupon center returns the complete detailed information of a single card and coupon. Compared with the list interface, it additionally includes: usage rule text, block-based card and coupon detailed attributes (`extra`), and source completion task information (`from_task`). ## Query Parameters | Parameter name | Type | Required | Constraints | Description | | ---------------- | ------- | --- | --------------------- | ------------------------------------------------- | | `coupon_type` | string | Yes | See coupon type enumeration | Coupon type, the value is the same as `coupon-list` has the same interface | | `detail_id` | integer | Yes | min:1, max:2147483647 | Ordinary card and coupon transfer `details_id`; the `id` of the task card and coupon transfer record (i.e. the `id` field in the list) | | `is_task_coupon` | integer | no | `0` or `1`, default `0` | `0` = Ordinary coupons; `1` = mission coupons | > **Note**: The `detail_id` semantics of ordinary coupons and mission coupons are different. > > - Ordinary cards and coupons: `detail_id` = the primary key of each type of user card and coupon table (`details_id` in the list) > - Task coupon: `detail_id` = primary key of issuance record table (`id` in the list) --- ##Response ### Outer structure ```json { \"code\": 0, \"message\": \"\", \"data\": { ...card details object... } } ``` ### Details object fields The details interface returns the same basic fields as the list interface, with differences in the following fields: rule_new | Field name | Type | Difference from list | Description | | ------------------- | ------- | ----------------- | -------------------------------------------- | | `rule_new` | string | **Value** (the list returns an empty string) | Card and coupon usage rule text (i18n translation) | | `extra` | array | **Value** (list returns `[]`) | For the detailed attributes of the cards and coupons in the partitions, please see the description below | | `from_task` | boolean | **New field** | Ordinary coupons redeemed by completing tasks (sub-coupons automatically issued after the task is completed) | | `task_start_at` | integer | **May have value** | Task coupon: task start timestamp; ordinary coupon (`from_task=true`): start time of the source task | | `task_expire_at` | integer | **May have value** | Task coupons: receive the validity expiration timestamp (`0` means no limit); ordinary cards and coupons are fixed `0` | | `task_completed_at` | integer | **May have value** | Task coupon: task completion timestamp; ordinary coupon (`from_task=true`): completion time of the source task | The remaining basic fields (`id`, `details_id`, `coupon_type`, `name`, `amount`, `currency`, `status`, `jump_url`, `help_url`, `expire_time`, `expire_second`, `has_ progress`, `progress_config`, `activation_info`, `is_task_coupon`, `upgrade_toast`, `task_title`, `task_desc`) are exactly the same as the list interface (`listUserCoupons`). --- ## `extra` field description `extra` is a **two-dimensional array**, composed of several \"blocks\", and the front end displays them separately by blocks. ``` extra = [ [block1_item1, block1_item2, ...], // Block 1: Card name/source/status [block2_item1, block2_item2, ...], // Block 2: Core attributes of cards and coupons [block3_item1, block3_item2, ...], // Block 3: time information ] ``` ### The structure of each item in `extra` | Field | Type | Description | | ------- | ---------------- | --------------- | | `type` | string | Display type, enumeration values ​​are shown in the table below | | `key` | string | Label text (i18n translated) | | `value` | string / integer | Value, type changes with `type` | ### `type` enumeration | `type` value | `value` type | description | | ----------- | ---------- | ------------------------ | | `string` | string | Normal text display | | `timestamp` | integer | Unix timestamp, the front end is responsible for formatting into date and time | | `day` | integer | Number of days (integer) | | `hour` | integer | Number of hours (integer) | | `status` | string | Status enum value (same meaning as `status` field) | | `btn` | string | With jump button, `value` is the button copy | --- ## Block 1 (fixed): Coupon name/source/status All types (except `point`) contain this block, the fixed fields are as follows: | Serial number | `type` | `key` (translation key) | `value` | Remarks | | --- | -------- | ----------------------------- | ------- | --------- | | 1 | `string` | `COUPON_VOUCHER_NAME` (coupon name) | Coupon name text | Required | | 2 | `string` | `COUPON_VOUCHER_SOURCE` (coupon source) | Source activity name | Return this item only if there is a source | | 3 | `status` | `COUPON_STATUS` (coupon status) | Status enumeration value | Required | > `extra` of type `point` (point card) is fixed to an empty array `[]`. --- ## Block 2 + Block 3: Exclusive fields for each type ### `contract_bonus` (contract experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | --------------------------------- | ---------- | ----- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `day` | `COUPON_USAGE_DURATION` (duration of use) | Number of days valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | activation timestamp | only if activated | --- ### `contract_bonus_new` (contract experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ------------------ | ------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_MAXIMUM_LEVERAGE` (maximum leverage) | `NX` or `Unlimited` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair list | When there are limited trading pairs | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | --------------------------------- | ---------- | ---- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `hour` | `COUPON_USAGE_DURATION` (duration of use) | Number of hours valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When activated | --- ### `commission_rebate` (handling fee cashback coupon) **Block 2: Core Attributes** | `type` | `key` | `value` description | condition | | -------- | -------------------------------- | -------------- | --- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_REBATE_PERCENTAGE` (cashback ratio) | `N%` | Required | | `string` | `COUPON_BALANCE` (remaining balance) | `amount + space + currency` | Required | | `string` | `COUPON_USED_AMOUNT` (used amount) | `Amount + space + currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (applicable market) | Market name | Required | **Block 3: Time Information** | `type` | `key` | `value` Description | Conditions | | ----------- | --------------------------------- | ---------- | --------------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Vouchers that require activation are displayed | | `day` | `COUPON_USAGE_DURATION` (duration of use) | Number of days valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When the status is activated/used/expired | --- ### `hold_bonus` (Financial Management Experience Bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `financial_rate` (interest rate coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------------ | ----------------------- | --- | | `string` | `COUPON_RATE_UP_CAP` (rate increase cap) | `amount + currency` or `Unlimited` | Required | | `string` | `COUPON_RATE_UP_APR` (rate increase ratio) | `N%APR` | Required | | `string` | `COUPON_RATE_UP_TERM_DAYS` (number of days to increase interest rate) | `N days` or `Unlimited` | Required | | `string` | `COUPON_AVAILABLE_INVESTMENT_TYPE` (available financial management type) | Such as `Lend & Earn` | required | | `string` | `COUPON_AVAILABLE_PRODUCTS` (available products) | List of product names (comma separated) | Required | | `string` | `COUPON_MINIMUM_INVESTMENT_UP` (minimum purchase amount) | `≥ Amount Currency` or interval | required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `robot_bonus` (robot experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `amount + space + Currency` | Required | | `string` | `COUPON_APPLICABLE_BOTS` (for robots) | such as `Future Grids` | Unlimited robot time | | `string` | `COUPON_MAXIMUM_LEVERAGE` (maximum leverage multiple) | Multiples | Unlimited and with leverage restrictions | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair or `All` | When not limited to robots | | `string` | `COUPON_STOP_LOSS_AMOUNT` (stop loss amount) | `Amount + Currency` | When there is a stop loss amount | | `btn` | `COUPON_DESIGNATED_BOTS` (limited to bots) | `ViewMyaccountLeft` Button copy | When limited to robots | | `day` | `COUPON_RUNTIME_DURATION` (running duration) | Number of days | required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `loss_protection_copier` (worry-free money for following orders) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ----------------------------------- | ------------------- | ------------ | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (where applicable) | `Contract` or `Spot` | Required | | `string` | `COUPON_MINIMUM_INVESTMENT` (minimum order amount) | `amount + currency` | When there is a minimum amount limit | | `string` | `COUPON_AVAILABLE_TRADERS` (available traders) | Nickname list | When Partially Available (Designated Trader) | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | use timestamp | when there is use time | --- ### `position_voucher` (position experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ----------------- | ------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `Amount × Leverage + Space + Currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (applicable market) | `USDT Perpetual Contract` | Required | | `hour` | `COUPON_POSITION_DURATION` (position duration) | Number of hours | Required | | `string` | `COUPON_LEVERAGE` (leverage multiple) | `NX` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair, empty means no limit | Required | | `string` | `COUPON_USER_INVESTMENT_QUOTA` (capital quota) | `amount + currency` | When user allocation is required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `tradfi_position_voucher` (TradFi position experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------------ | ----------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `Amount × Leverage + Space + Currency` | | `string` | `COUPON_POSITION_DURATION` (position duration) | `N trading days` | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | TradFi varieties | | `string` | `COUPON_LEVERAGE` (leverage multiple) | `Nx` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `vip_card` (VIP experience card) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------- | ---------- | | `string` | `COUPON_VIP_TIER` (VIP level) | `VIPN` | | `day` | `COUPON_BENEFIT_DURATION` (benefits duration) | Number of days | **Block 3: Time information** | `type` | `key` | `value` Description | Conditions | | ----------- | --------------------------------- | ---------- | ----------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Create timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When the status is used or expired | | `timestamp` | `COUPON_EXPIRY_TIME` (expiration time) | Expiration timestamp | When the status is used or expired | --- ### `p2p` (P2P transaction discount coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------- | -------------- | | `string` | `COUPON_DEDUCTION_LIMIT` (deduction limit) | `amount + currency` | | `string` | `COUPON_DEDUCTION_RATIO` (discount ratio) | `N%` | | `string` | `COUPON_USAGE_CONDITIONS` (conditions of use) | `No less than N currencies per transaction` | | `string` | `COUPON_SUPPORTED_FIAT` (for fiat currencies) | Fiat currency list or `all` | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `interest_voucher` (leverage coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | --------------------------------------- | ----------------- | -------- | | `string` | `max_discount_amount` (maximum discount amount) | `amount + currency` | Required | | `string` | `COUPON_APPLICABLE_TRADES` (applicable transactions) | `Isolated Margin` | Required | | `string` | `COUPON_INTEREST_DISCOUNT` (reduction ratio) | `N%` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair, empty means no limit | Required | | `string` | `COUPON_BALANCE` (remaining balance) | `amount + currency` | Required | | `string` | `COUPON_BORROWING_AMOUNT_LIMIT` (borrowing amount limit) | Borrowing amount range | When there is a limit on the borrowing amount | | `hour` | `COUPON_VALIDITY_PERIOD` (reduction time) | Number of hours | When set | **Block 3: Time Information** | `type` | `key` | `value` Description | Conditions | | ----------- | ------------------------------------- | ---------- | -------------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | When the status is pending or expired | | `timestamp` | `COUPON_EFFECTIVE_TIME` (reduction start time) | Start using timestamp | When the status is invalid/in use/used | | `timestamp` | `COUPON_DISCOUNT_EXPIRY_TIME` (reduction expiry time) | Reduction expiration timestamp | When the status is invalid/in use/used | --- ### `cash` (cash coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When there is a redemption time | --- ### `crypto_loan_interest` (Mortgage loan interest coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ---------------------------------------------- | ---------- | -------- | | `string` | `coupon_center_discount_max_amount` (maximum discount amount) | `amount + currency` | Required | | `string` | `COUPON_INTEREST_DISCOUNT` (reduction ratio) | `N%` | Required | | `string` | `coupon_center_loan_min_amount` (minimum loan amount) | `amount + currency` | When there is a minimum amount requirement | | `hour` | `coupon_center_interest_discount_period` (discount duration) | Number of hours | Required | | `string` | `coupon_center_trade_applicable` (applicable transactions) | `demand deposit` | Required | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `copy_trading` (Following experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ---------------------------------- | ------------------- | ---- | | `string` | `COUPON_VOUCHER_AMOUNT` (face value) | `amount + currency` | Required | | `string` | `coupon_applicable_traders` (applicable traders) | `all` or `specified traders` | Required | | `string` | `coupon_trade_category` (applicable transaction type) | `Spot` or `Contract` | Required | | `day` | `coupon_usage_days` (the number of days the experience is valid) | Number of days | Required | | `string` | `COUPON_STOP_LOSS_AMOUNT` (stop loss amount) | `amount + currency` | Required | | `string` | `coupon_ineligible_mkts` (cannot experience the market) | Market list | When there are restrictions | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `alpha_voucher` (Alpha cash coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When there is a collection time | --- ### `etf_voucher` (ETF trial bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | | `hour` | `coupon_trial_duration` (trial duration) | Number of hours | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | ETF market list | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | use timestamp | when there is use time | --- ### `point` (point card) `extra` always returns `[]` without any blocks. --- ## Complete response example ### Ordinary cards and coupons (handling fee cashback coupons) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 1234567, \"details_id\": 890, \"coupon_type\": \"commission_rebate\", \"name\": \"10% Futures Commission Rebate\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"Rebate up to 100% of futures trading fee within 30 days.\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/futures/USDT\", \"app\": \"/futures/USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 86400, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"100\", \"current_used\": \"30\", \"current_achived\": \"30\", \"currency\": \"USDT\" }, \"activation_info\": { \"market\": \"futures\", \"market_name\": \"Futures\" }, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Coupon name\", \"value\": \"10% Futures Commission Rebate\" }, { \"type\": \"string\", \"key\": \"Card and coupon source\", \"value\": \"New user registration activity\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"Card coupon amount\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Cashback ratio\", \"value\": \"10%\" }, { \"type\": \"string\", \"key\": \"Remaining Amount\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Used quota\", \"value\": \"0 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable markets\", \"value\": \"Futures\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 }, { \"type\": \"day\", \"key\": \"duration\", \"value\": 30 } ] ] } } ``` ### Task coupons (position experience coupons) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"position_voucher\", \"name\": \"position experience coupon\", \"amount\": \"5,000\", \"currency\": \"USDT\", \"rule_new\": \"Experience the position coupon rules...\", \"status\": \"TASK_WAIT\", \"jump_url\": { \"web\": \"https://www.gate.io/futures\", \"app\": \"gateio://futures\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 172800, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"10000\", \"current_used\": \"3000\", \"current_achived\": \"3000\", \"currency\": \"USDT\" }, \"activation_info\": { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"\", \"position_bonus\": \"500\" }, \"is_task_coupon\": 1, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"Complete 10,000 USDT contract trading volume and obtain position experience coupon\", \"task_desc\": \"Complete the specified trading volume task in the perpetual contract\", \"task_start_at\": 1757000000, \"task_expire_at\": 1760000000, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Card name\", \"value\": \"position experience coupon\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TASK_WAIT\" } ], [ { \"type\": \"string\", \"key\": \"Coupon amount\", \"value\": \"5,000 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable market\", \"value\": \"USDT perpetual contract\" }, { \"type\": \"hour\", \"key\": \"position duration\", \"value\": 24 }, { \"type\": \"string\", \"key\": \"Leverage multiple\", \"value\": \"10X\" }, { \"type\": \"string\", \"key\": \"Limited trading pairs\", \"value\": \"BTCUSDT\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 } ] ] } } ``` ### P2P transaction coupon (p2p) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 5678901, \"details_id\": 234, \"coupon_type\": \"p2p\", \"name\": \"5.5% P2P transaction discount coupon\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"Each P2P transaction can deduct up to 100 USDT in handling fees, with a discount rate of 5.5%, and each transaction is not less than 200 USDT.\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/p2p\", \"app\": \"gateio://p2p\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 2592000, \"has_usage_history\": false, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": {}, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Coupon name\", \"value\": \"5.5% P2P transaction discount coupon\" }, { \"type\": \"string\", \"key\": \"Card and coupon source\", \"value\": \"New user registration activity\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"deduction limit\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Discount ratio\", \"value\": \"5.5%\" }, { \"type\": \"string\", \"key\": \"Usage conditions\", \"value\": \"Each transaction must not be less than 200 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable legal currency\", \"value\": \"CNY, USD\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 }, { \"type\": \"timestamp\", \"key\": \"expiration time\", \"value\": 1760000000 } ] ] } } ``` --- ## Error code | `code` | Description | | -------------------------------------------- | ------------------------- | | `0` | Success | | `10001`(`COUPON_SEND_ISSUING_LOG_NOT_FOUND`) | The card and coupon record does not exist or does not belong to the current user | | `10000` (`PARAMS_INVALID`) | The parameter is invalid (such as the task card is missing coupon_info) | | `50105` (`INVALID_PARAMETERS`) | Input parameter verification failed (such as coupon_type illegal) | + +### 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.CouponApi(api_client) +coupon_type = 'coupon_type_example' # str | Coupon type enum. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) +detail_id = 56 # int | Coupon ID. **Regular coupon**: pass `details_id` from the list (primary key of each type's user coupon table); **Task coupon**: pass `id` from the list (primary key of the distribution record table) +is_task_coupon = 0 # int | Coupon source type. `0` = regular coupon (default); `1` = task coupon. This parameter determines the query logic for `detail_id` (optional) (default to 0) + +try: + # Coupon Center details + api_response = api_instance.get_user_coupon_detail(coupon_type, detail_id, is_task_coupon=is_task_coupon) + 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 CouponApi->get_user_coupon_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **coupon_type** | **str**| Coupon type enum. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) | + **detail_id** | **int**| Coupon ID. **Regular coupon**: pass `details_id` from the list (primary key of each type's user coupon table); **Task coupon**: pass `id` from the list (primary key of the distribution record table) | + **is_task_coupon** | **int**| Coupon source type. `0` = regular coupon (default); `1` = task coupon. This parameter determines the query logic for `detail_id` | [optional] [default to 0] + +### Return type + +[**GetUserCouponDetailResponse**](GetUserCouponDetailResponse.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** | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - | + +[[Back to top]](#) [[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/CreateChaseOrderReq.md b/docs/CreateChaseOrderReq.md new file mode 100644 index 00000000..ff6e44ec --- /dev/null +++ b/docs/CreateChaseOrderReq.md @@ -0,0 +1,23 @@ +# CreateChaseOrderReq + +Request body for creating a chase order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contract** | **str** | Contract name; server-side converted to uppercase | +**settle** | **str** | Settle currency, overridden by the path parameter and converted to lowercase | [optional] +**amount** | **str** | Total order size in contracts, decimal string. Positive for buy, negative for sell. Cannot be 0 | +**price_limit** | **str** | 最高追逐价,合法十进制字符串;未设置限价时请传 \"0\" | +**offset_limit** | **str** | Maximum chasing distance from the best price, mutually exclusive with price_limit | [optional] +**reduce_only** | **bool** | Whether reduce only | [optional] +**text** | **str** | Optional custom tag | [optional] +**is_dual_mode** | **bool** | Whether dual-position mode is enabled | [optional] +**price_type** | **int** | Price type: 1 best bid/ask, 2 distance from best bid/ask | [optional] +**price_gap_type** | **int** | Used when price_type == 2: 1 absolute price gap, 2 percentage | [optional] +**price_gap_value** | **str** | Price gap value paired with price_gap_type | [optional] +**pos_margin_mode** | **str** | Position margin mode, e.g. isolated or cross | [optional] +**position_mode** | **str** | Position mode (e.g. single, dual, dual_plus) | [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/CreateChaseOrderResp.md b/docs/CreateChaseOrderResp.md new file mode 100644 index 00000000..fde72249 --- /dev/null +++ b/docs/CreateChaseOrderResp.md @@ -0,0 +1,10 @@ +# CreateChaseOrderResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the newly created order | [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/CreateEarnFixedTermLendResponse.md b/docs/CreateEarnFixedTermLendResponse.md new file mode 100644 index 00000000..b7219f8e --- /dev/null +++ b/docs/CreateEarnFixedTermLendResponse.md @@ -0,0 +1,13 @@ +# CreateEarnFixedTermLendResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Return code, 0 means success | [optional] +**message** | **str** | Response message | [optional] +**data** | [**CreateEarnFixedTermLendResponseData**](CreateEarnFixedTermLendResponseData.md) | | [optional] +**timestamp** | **int** | Response 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/CreateEarnFixedTermLendResponseData.md b/docs/CreateEarnFixedTermLendResponseData.md new file mode 100644 index 00000000..2d7f3d8c --- /dev/null +++ b/docs/CreateEarnFixedTermLendResponseData.md @@ -0,0 +1,11 @@ +# CreateEarnFixedTermLendResponseData + +Subscription result +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Subscription 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/CreateEarnFixedTermPreRedeemResponse.md b/docs/CreateEarnFixedTermPreRedeemResponse.md new file mode 100644 index 00000000..84a50ab1 --- /dev/null +++ b/docs/CreateEarnFixedTermPreRedeemResponse.md @@ -0,0 +1,13 @@ +# CreateEarnFixedTermPreRedeemResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Return code, 0 means success | [optional] +**message** | **str** | Response message | [optional] +**data** | [**object**](.md) | Redemption result (empty object on success) | [optional] +**timestamp** | **int** | Response 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/CreateOrder.md b/docs/CreateOrder.md index 0f5ef782..07c6462f 100644 --- a/docs/CreateOrder.md +++ b/docs/CreateOrder.md @@ -3,8 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timestamp** | **int** | Server timestamp (milliseconds) | [optional] -**data** | [**CreateOrderData**](CreateOrderData.md) | | [optional] +**id** | **int** | | +**user_id** | **int** | | +**_from** | [**list[CreateOrderDetail]**](CreateOrderDetail.md) | | +**to** | [**list[CreateOrderDetail]**](CreateOrderDetail.md) | | +**source** | **str** | | +**app_id** | **str** | | +**client_req_id** | **str** | | +**status** | **int** | | +**create_time** | **int** | | [[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/CreateOrder2.md b/docs/CreateOrder2.md new file mode 100644 index 00000000..d426809c --- /dev/null +++ b/docs/CreateOrder2.md @@ -0,0 +1,11 @@ +# CreateOrder2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Server timestamp (milliseconds) | [optional] +**data** | [**CreateOrder2Data**](CreateOrder2Data.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/CreateOrderData.md b/docs/CreateOrder2Data.md similarity index 94% rename from docs/CreateOrderData.md rename to docs/CreateOrder2Data.md index 5dda503e..c1e3b73b 100644 --- a/docs/CreateOrderData.md +++ b/docs/CreateOrder2Data.md @@ -1,4 +1,4 @@ -# CreateOrderData +# CreateOrder2Data Order result ## Properties diff --git a/docs/CreateOrderDetail.md b/docs/CreateOrderDetail.md new file mode 100644 index 00000000..801df970 --- /dev/null +++ b/docs/CreateOrderDetail.md @@ -0,0 +1,13 @@ +# CreateOrderDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**icon_url** | **str** | | +**amount** | **str** | | +**amount_show** | **str** | | + +[[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/CreateOrderV4.md b/docs/CreateOrderV4.md new file mode 100644 index 00000000..01a7da66 --- /dev/null +++ b/docs/CreateOrderV4.md @@ -0,0 +1,12 @@ +# CreateOrderV4 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pid** | **int** | Product ID | +**rid** | **int** | Reward pool ID | +**amount** | **str** | Pledge amount (string format to preserve precision) | + +[[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/CreateParam.md b/docs/CreateParam.md new file mode 100644 index 00000000..15397fe2 --- /dev/null +++ b/docs/CreateParam.md @@ -0,0 +1,12 @@ +# CreateParam + +**For order only**. Represents a currency and its **amount** on a certain side (`from` or `to`). Used with `OrderCreateV1Req`; **Don't** be used with `to` of the preview interface (preview `to` uses `PreviewToParam.ratio`). +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | Currency symbol, consistent with `GET /asset-swap/asset/list` and business support scope. | +**amount** | **str** | The quantity of this currency on this side, **decimal string** (non-scientific notation). `from` represents the selling quantity, and `to` represents the target side quantity. Different from preview interface `to[].ratio`. | + +[[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/InlineResponse201.md b/docs/CreateTrailOrderResponse.md similarity index 80% rename from docs/InlineResponse201.md rename to docs/CreateTrailOrderResponse.md index bb0aead9..6b5aff3c 100644 --- a/docs/InlineResponse201.md +++ b/docs/CreateTrailOrderResponse.md @@ -1,11 +1,11 @@ -# InlineResponse201 +# CreateTrailOrderResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | Status code, 0 means success | [optional] **message** | **str** | Response message | [optional] -**data** | [**InlineResponse201Data**](InlineResponse201Data.md) | | [optional] +**data** | [**CreateTrailOrderResult**](CreateTrailOrderResult.md) | | [optional] **timestamp** | **int** | Response 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/InlineResponse201Data.md b/docs/CreateTrailOrderResult.md similarity index 92% rename from docs/InlineResponse201Data.md rename to docs/CreateTrailOrderResult.md index 25b56c0d..d8d811da 100644 --- a/docs/InlineResponse201Data.md +++ b/docs/CreateTrailOrderResult.md @@ -1,4 +1,4 @@ -# InlineResponse201Data +# CreateTrailOrderResult ## Properties Name | Type | Description | Notes diff --git a/docs/CrossExApi.md b/docs/CrossExApi.md index f85da7fe..ab7b235b 100644 --- a/docs/CrossExApi.md +++ b/docs/CrossExApi.md @@ -4,9 +4,9 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_crossex_rule_symbols**](CrossExApi.md#list_crossex_rule_symbols) | **GET** /crossex/rule/symbols | [Public Interface] Query Trading Pair Information -[**list_crossex_rule_risk_limits**](CrossExApi.md#list_crossex_rule_risk_limits) | **GET** /crossex/rule/risk_limits | [Public Interface] Query Risk Limit Information -[**list_crossex_transfer_coins**](CrossExApi.md#list_crossex_transfer_coins) | **GET** /crossex/transfers/coin | [Public Interface] Query Supported Transfer Currencies +[**list_crossex_rule_symbols**](CrossExApi.md#list_crossex_rule_symbols) | **GET** /crossex/rule/symbols | Query symbol information +[**list_crossex_rule_risk_limits**](CrossExApi.md#list_crossex_rule_risk_limits) | **GET** /crossex/rule/risk_limits | Query risk limit information +[**list_crossex_transfer_coins**](CrossExApi.md#list_crossex_transfer_coins) | **GET** /crossex/transfers/coin | Query supported transfer currencies [**list_crossex_transfers**](CrossExApi.md#list_crossex_transfers) | **GET** /crossex/transfers | Query Fund Transfer History [**create_crossex_transfer**](CrossExApi.md#create_crossex_transfer) | **POST** /crossex/transfers | Fund Transfer [**create_crossex_order**](CrossExApi.md#create_crossex_order) | **POST** /crossex/orders | Create an order @@ -34,13 +34,13 @@ Method | HTTP request | Description [**list_crossex_history_margin_interests**](CrossExApi.md#list_crossex_history_margin_interests) | **GET** /crossex/history_margin_interests | Query Leveraged Interest Deduction History [**list_crossex_history_trades**](CrossExApi.md#list_crossex_history_trades) | **GET** /crossex/history_trades | queryfilledhistory [**list_crossex_account_book**](CrossExApi.md#list_crossex_account_book) | **GET** /crossex/account_book | Query Account Asset Change History -[**list_crossex_coin_discount_rate**](CrossExApi.md#list_crossex_coin_discount_rate) | **GET** /crossex/coin_discount_rate | Query currency discount rate (discount rate of margin currency in isolated exchange mode) +[**list_crossex_coin_discount_rate**](CrossExApi.md#list_crossex_coin_discount_rate) | **GET** /crossex/coin_discount_rate | Query Currency Discount Rate # **list_crossex_rule_symbols** > list[Symbol] list_crossex_rule_symbols(symbols=symbols) -[Public Interface] Query Trading Pair Information +Query symbol information Query Trading Pair Information @@ -59,10 +59,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) -symbols = 'symbols_example' # str | 币对列表,多个以逗号分隔 示例值: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT (optional) +symbols = 'symbols_example' # str | List of trading pairs, comma-separated. Example: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT (optional) try: - # [Public Interface] Query Trading Pair Information + # Query symbol information api_response = api_instance.list_crossex_rule_symbols(symbols=symbols) print(api_response) except GateApiException as ex: @@ -75,7 +75,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbols** | **str**| 币对列表,多个以逗号分隔 示例值: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT | [optional] + **symbols** | **str**| List of trading pairs, comma-separated. Example: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT | [optional] ### Return type @@ -98,9 +98,9 @@ No authorization required [[Back to top]](#) [[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_crossex_rule_risk_limits** -> list[InlineResponse20027] list_crossex_rule_risk_limits(symbols) +> list[CrossexRiskLimit] list_crossex_rule_risk_limits(symbols) -[Public Interface] Query Risk Limit Information +Query risk limit information Query risk limit information for futures/margin trading pairs @@ -122,7 +122,7 @@ api_instance = gate_api.CrossExApi(api_client) symbols = 'BINANCE_FUTURE_AAVE_USDT' # str | Trading Pair List, multiple separated by commas Example values: BINANCE_FUTURE_ADA_USDT,GATE_MARGIN_ADA_USDT try: - # [Public Interface] Query Risk Limit Information + # Query risk limit information api_response = api_instance.list_crossex_rule_risk_limits(symbols) print(api_response) except GateApiException as ex: @@ -139,7 +139,7 @@ Name | Type | Description | Notes ### Return type -[**list[InlineResponse20027]**](InlineResponse20027.md) +[**list[CrossexRiskLimit]**](CrossexRiskLimit.md) ### Authorization @@ -158,9 +158,9 @@ No authorization required [[Back to top]](#) [[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_crossex_transfer_coins** -> list[InlineResponse20028] list_crossex_transfer_coins(coin=coin) +> list[CrossexTransferCoin] list_crossex_transfer_coins(coin=coin) -[Public Interface] Query Supported Transfer Currencies +Query supported transfer currencies Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 @@ -179,10 +179,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) -coin = 'BTC' # str | Currency (optional) +coin = 'BTC' # str | Query by specified currency name (optional) try: - # [Public Interface] Query Supported Transfer Currencies + # Query supported transfer currencies api_response = api_instance.list_crossex_transfer_coins(coin=coin) print(api_response) except GateApiException as ex: @@ -195,11 +195,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **coin** | **str**| Currency | [optional] + **coin** | **str**| Query by specified currency name | [optional] ### Return type -[**list[InlineResponse20028]**](InlineResponse20028.md) +[**list[CrossexTransferCoin]**](CrossexTransferCoin.md) ### Authorization @@ -218,7 +218,7 @@ No authorization required [[Back to top]](#) [[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_crossex_transfers** -> list[InlineResponse20029] list_crossex_transfers(coin=coin, order_id=order_id, _from=_from, to=to, page=page, limit=limit) +> list[CrossexTransferRecord] list_crossex_transfers(coin=coin, order_id=order_id, _from=_from, to=to, page=page, limit=limit) Query Fund Transfer History @@ -253,7 +253,7 @@ order_id = '38083797492939266' # str | Supports querying by the order ID returne _from = 1750681141933 # int | Start timestamp for the query (optional) to = 1750681141933 # int | End timestamp for the query, defaults to current time if not specified (optional) page = 1 # int | Page number (optional) -limit = 10,20,30 # int | Maximum number returned by list, max 1000 (optional) +limit = 100 # int | Maximum number returned by list, max 1000 (optional) try: # Query Fund Transfer History @@ -278,7 +278,7 @@ Name | Type | Description | Notes ### Return type -[**list[InlineResponse20029]**](InlineResponse20029.md) +[**list[CrossexTransferRecord]**](CrossexTransferRecord.md) ### Authorization @@ -297,11 +297,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) # **create_crossex_transfer** -> InlineResponse20030 create_crossex_transfer(crossex_transfer_request=crossex_transfer_request) +> CrossexTransferResponse create_crossex_transfer(crossex_transfer_request=crossex_transfer_request) Fund Transfer -Rate limit: 10 requests per 10 seconds - In cross-exchange mode, when transferring USDT, either `from` or `to` must be `SPOT`, and the other side must be `CROSSEX`. If `CROSSEX_${exchange_type}` (e.g. `CROSSEX_GATE`) is provided, it will be automatically treated as `CROSSEX`. - In isolated exchange mode, when transferring USDT, either `from` or `to` must be `CROSSEX_${exchange_type}`, and the other side must be `SPOT` or `CROSSEX_${exchange_type}`. If `CROSSEX` is provided, it will be automatically treated as `CROSSEX_GATE`. - When transferring non-USDT assets to or from CrossEx, neither `from` nor `to` can be `CROSSEX`; `CROSSEX_${exchange_type}` must be explicitly specified. - When transferring non-USDT assets, transfers between `CROSSEX_{exchange_type}` accounts are supported, for example: from = `CROSSEX_BINANCE`, to = `CROSSEX_GATE` +Rate limit: 10 requests per 10 seconds - In cross-exchange mode, when transferring USDT, either `from` or `to` must be `SPOT`, and the other side must be `CROSSEX`. If `CROSSEX_${exchange_type}` (e.g. `CROSSEX_GATE`) is provided, it will be automatically treated as `CROSSEX`. - In isolated exchange mode, when transferring USDT, either `from` or `to` must be `CROSSEX_${exchange_type}`, and the other side must be `SPOT` or `CROSSEX_${exchange_type}`. If `CROSSEX` is provided, it will be automatically treated as `CROSSEX_GATE`. - When transferring non-USDT assets to or from CrossEx, neither `from` nor `to` can be `CROSSEX`; `CROSSEX_${exchange_type}` must be explicitly specified. - When transferring non-USDT assets, transfers between `CROSSEX_{exchange_type}` accounts are supported, for example: from = `CROSSEX_BINANCE`, to = `CROSSEX_GATE` - When either side of the transfer is `CROSSEX_KRAKEN`, only USDT is supported for now. - When either side of the transfer is `CROSSEX_HYPERLIQUID`, the other side must be `SPOT`, and only USDC is supported. ### Example @@ -347,7 +347,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20030**](InlineResponse20030.md) +[**CrossexTransferResponse**](CrossexTransferResponse.md) ### Authorization @@ -366,7 +366,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) # **create_crossex_order** -> InlineResponse20031 create_crossex_order(crossex_order_request=crossex_order_request) +> CrossexOrderActionResponse create_crossex_order(crossex_order_request=crossex_order_request) Create an order @@ -416,7 +416,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20031**](InlineResponse20031.md) +[**CrossexOrderActionResponse**](CrossexOrderActionResponse.md) ### Authorization @@ -435,7 +435,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) # **get_crossex_order** -> InlineResponse20032 get_crossex_order(order_id) +> CrossexOrder get_crossex_order(order_id) Query order details @@ -485,7 +485,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20032**](InlineResponse20032.md) +[**CrossexOrder**](CrossexOrder.md) ### Authorization @@ -504,7 +504,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_crossex_order** -> InlineResponse20033 update_crossex_order(order_id, crossex_order_update_request=crossex_order_update_request) +> CrossexOrderActionResponse update_crossex_order(order_id, crossex_order_update_request=crossex_order_update_request) Modify Order @@ -556,7 +556,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20033**](InlineResponse20033.md) +[**CrossexOrderActionResponse**](CrossexOrderActionResponse.md) ### Authorization @@ -575,7 +575,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) # **cancel_crossex_order** -> object cancel_crossex_order(order_id) +> CrossexOrderActionResponse cancel_crossex_order(order_id) Cancel Order @@ -625,7 +625,7 @@ Name | Type | Description | Notes ### Return type -**object** +[**CrossexOrderActionResponse**](CrossexOrderActionResponse.md) ### Authorization @@ -644,7 +644,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) # **create_crossex_convert_quote** -> InlineResponse20034 create_crossex_convert_quote(crossex_convert_quote_request=crossex_convert_quote_request) +> CrossexConvertQuoteResponse create_crossex_convert_quote(crossex_convert_quote_request=crossex_convert_quote_request) Flash Swap Inquiry @@ -694,7 +694,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20034**](InlineResponse20034.md) +[**CrossexConvertQuoteResponse**](CrossexConvertQuoteResponse.md) ### Authorization @@ -713,7 +713,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) # **create_crossex_convert_order** -> object create_crossex_convert_order(crossex_convert_order_request=crossex_convert_order_request) +> CrossexConvertOrderResponse create_crossex_convert_order(crossex_convert_order_request=crossex_convert_order_request) Flash Swap Transaction @@ -763,7 +763,7 @@ Name | Type | Description | Notes ### Return type -**object** +[**CrossexConvertOrderResponse**](CrossexConvertOrderResponse.md) ### Authorization @@ -782,7 +782,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) # **get_crossex_account** -> InlineResponse20035 get_crossex_account(exchange_type=exchange_type) +> CrossexAccount get_crossex_account(exchange_type=exchange_type) Query Account Assets @@ -812,7 +812,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) -exchange_type = 'BINANCE,OKX,GATE,BYBIT' # str | Exchange. Not required in cross-exchange mode; required in single-exchange mode (BINANCE/OKX/GATE/BYBIT) (optional) +exchange_type = 'BINANCE,OKX,GATE,BYBIT,KRAKEN,HYPERLIQUID' # str | Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). (optional) try: # Query Account Assets @@ -828,11 +828,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **exchange_type** | **str**| Exchange. Not required in cross-exchange mode; required in single-exchange mode (BINANCE/OKX/GATE/BYBIT) | [optional] + **exchange_type** | **str**| Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). | [optional] ### Return type -[**InlineResponse20035**](InlineResponse20035.md) +[**CrossexAccount**](CrossexAccount.md) ### Authorization @@ -851,7 +851,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_crossex_account** -> InlineResponse202 update_crossex_account(crossex_account_update_request=crossex_account_update_request) +> CrossexAccountUpdateResponse update_crossex_account(crossex_account_update_request=crossex_account_update_request) Modify Account Contract Position Mode and Account Mode @@ -901,7 +901,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse202**](InlineResponse202.md) +[**CrossexAccountUpdateResponse**](CrossexAccountUpdateResponse.md) ### Authorization @@ -989,7 +989,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_crossex_positions_leverage** -> InlineResponse2021 update_crossex_positions_leverage(crossex_leverage_request=crossex_leverage_request) +> CrossexLeverageResponse update_crossex_positions_leverage(crossex_leverage_request=crossex_leverage_request) Modify Contract Trading Pair Leverage Multiplier @@ -1039,7 +1039,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2021**](InlineResponse2021.md) +[**CrossexLeverageResponse**](CrossexLeverageResponse.md) ### Authorization @@ -1127,7 +1127,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_crossex_margin_positions_leverage** -> InlineResponse2021 update_crossex_margin_positions_leverage(crossex_leverage_request=crossex_leverage_request) +> CrossexLeverageResponse update_crossex_margin_positions_leverage(crossex_leverage_request=crossex_leverage_request) Modify Leveraged Trading Pair Leverage Multiplier @@ -1177,7 +1177,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2021**](InlineResponse2021.md) +[**CrossexLeverageResponse**](CrossexLeverageResponse.md) ### Authorization @@ -1196,7 +1196,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) # **close_crossex_position** -> InlineResponse20031 close_crossex_position(crossex_close_position_request=crossex_close_position_request) +> CrossexOrderActionResponse close_crossex_position(crossex_close_position_request=crossex_close_position_request) Full Close Position @@ -1246,7 +1246,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20031**](InlineResponse20031.md) +[**CrossexOrderActionResponse**](CrossexOrderActionResponse.md) ### Authorization @@ -1265,7 +1265,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) # **get_crossex_interest_rate** -> list[InlineResponse20036] get_crossex_interest_rate(coin=coin, exchange_type=exchange_type) +> list[CrossexInterestRate] get_crossex_interest_rate(coin=coin, exchange_type=exchange_type) Query margin asset interest rates @@ -1295,8 +1295,8 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) -coin = 'SOL' # str | Currency (optional) -exchange_type = 'BINANCE,OKX,GATE,BYBIT' # str | Exchange (optional) +coin = 'SOL' # str | Query by specified currency name (optional) +exchange_type = 'BINANCE,OKX,GATE,BYBIT,KRAKEN,HYPERLIQUID' # str | Exchange (optional) try: # Query margin asset interest rates @@ -1312,12 +1312,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **coin** | **str**| Currency | [optional] + **coin** | **str**| Query by specified currency name | [optional] **exchange_type** | **str**| Exchange | [optional] ### Return type -[**list[InlineResponse20036]**](InlineResponse20036.md) +[**list[CrossexInterestRate]**](CrossexInterestRate.md) ### Authorization @@ -1336,7 +1336,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) # **get_crossex_fee** -> InlineResponse20037 get_crossex_fee() +> list[InlineResponse200] get_crossex_fee() Query User Fee Rates @@ -1382,7 +1382,7 @@ This endpoint does not need any parameter. ### Return type -[**InlineResponse20037**](InlineResponse20037.md) +[**list[InlineResponse200]**](InlineResponse200.md) ### Authorization @@ -1401,7 +1401,7 @@ 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) # **list_crossex_positions** -> list[InlineResponse20038] list_crossex_positions(symbol=symbol, exchange_type=exchange_type) +> list[CrossexPosition] list_crossex_positions(symbol=symbol, exchange_type=exchange_type) Query Contract Positions @@ -1432,7 +1432,7 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) symbol = 'BINANCE_FUTURE_ADA_USDT' # str | Trading Pair (optional) -exchange_type = 'BINANCE,OKX,GATE,BYBIT' # str | Exchange (optional) +exchange_type = 'BINANCE,OKX,GATE,BYBIT,KRAKEN,HYPERLIQUID' # str | Exchange (optional) try: # Query Contract Positions @@ -1453,7 +1453,7 @@ Name | Type | Description | Notes ### Return type -[**list[InlineResponse20038]**](InlineResponse20038.md) +[**list[CrossexPosition]**](CrossexPosition.md) ### Authorization @@ -1472,7 +1472,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) # **list_crossex_margin_positions** -> list[InlineResponse20039] list_crossex_margin_positions(symbol=symbol, exchange_type=exchange_type) +> list[CrossexMarginPosition] list_crossex_margin_positions(symbol=symbol, exchange_type=exchange_type) Query Leveraged Positions @@ -1524,7 +1524,7 @@ Name | Type | Description | Notes ### Return type -[**list[InlineResponse20039]**](InlineResponse20039.md) +[**list[CrossexMarginPosition]**](CrossexMarginPosition.md) ### Authorization @@ -1543,7 +1543,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) # **list_crossex_adl_rank** -> list[InlineResponse20040] list_crossex_adl_rank(symbol) +> list[CrossexAdlRank] list_crossex_adl_rank(symbol) Query ADL Position Reduction Ranking @@ -1593,7 +1593,7 @@ Name | Type | Description | Notes ### Return type -[**list[InlineResponse20040]**](InlineResponse20040.md) +[**list[CrossexAdlRank]**](CrossexAdlRank.md) ### Authorization @@ -1612,7 +1612,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) # **list_crossex_open_orders** -> list[InlineResponse20032] list_crossex_open_orders(symbol=symbol, exchange_type=exchange_type, business_type=business_type) +> list[CrossexOrder] list_crossex_open_orders(symbol=symbol, exchange_type=exchange_type, business_type=business_type) Query All Current Open Orders @@ -1644,7 +1644,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.CrossExApi(api_client) symbol = 'BINANCE_FUTURE_ADA_USDT' # str | Trading Pair (optional) exchange_type = 'BINANCE' # str | Exchange (optional) -business_type = 'FUTURE、MARGIN' # str | Business Type (optional) +business_type = 'FUTURE' # str | Business Type (optional) try: # Query All Current Open Orders @@ -1666,7 +1666,7 @@ Name | Type | Description | Notes ### Return type -[**list[InlineResponse20032]**](InlineResponse20032.md) +[**list[CrossexOrder]**](CrossexOrder.md) ### Authorization @@ -1685,7 +1685,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) # **list_crossex_history_orders** -> list[InlineResponse20041] list_crossex_history_orders(page=page, limit=limit, symbol=symbol, _from=_from, to=to) +> list[CrossexOrder] list_crossex_history_orders(page=page, limit=limit, symbol=symbol, _from=_from, to=to, attributes=attributes) queryorderhistory @@ -1717,13 +1717,14 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.CrossExApi(api_client) page = 56 # int | Page number (optional) limit = 56 # int | Maximum number of records returned in a single list (optional) -symbol = 'symbol_example' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +symbol = 'symbol_example' # str | Currency pair (optional) _from = 56 # int | Start Millisecond Timestamp (optional) to = 56 # int | End Millisecond Timestamp (optional) +attributes = 'attributes_example' # str | Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage / `SETTLEMENT` delisting settlement). Multiple values, comma-separated. (optional) try: # queryorderhistory - api_response = api_instance.list_crossex_history_orders(page=page, limit=limit, symbol=symbol, _from=_from, to=to) + api_response = api_instance.list_crossex_history_orders(page=page, limit=limit, symbol=symbol, _from=_from, to=to, attributes=attributes) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1737,13 +1738,14 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **int**| Page number | [optional] **limit** | **int**| Maximum number of records returned in a single list | [optional] - **symbol** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **symbol** | **str**| Currency pair | [optional] **_from** | **int**| Start Millisecond Timestamp | [optional] **to** | **int**| End Millisecond Timestamp | [optional] + **attributes** | **str**| Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage / `SETTLEMENT` delisting settlement). Multiple values, comma-separated. | [optional] ### Return type -[**list[InlineResponse20041]**](InlineResponse20041.md) +[**list[CrossexOrder]**](CrossexOrder.md) ### Authorization @@ -1762,7 +1764,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) # **list_crossex_history_positions** -> list[InlineResponse20042] list_crossex_history_positions(page=page, limit=limit, symbol=symbol, _from=_from, to=to) +> list[CrossexHistoricalPosition] list_crossex_history_positions(page=page, limit=limit, symbol=symbol, _from=_from, to=to) Query Contract Position History @@ -1794,7 +1796,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.CrossExApi(api_client) page = 56 # int | Page number (optional) limit = 56 # int | Maximum number returned by list, max 1000 (optional) -symbol = 'symbol_example' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +symbol = 'symbol_example' # str | Currency pair (optional) _from = 56 # int | Start Millisecond Timestamp (optional) to = 56 # int | End Millisecond Timestamp (optional) @@ -1814,13 +1816,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **int**| Page number | [optional] **limit** | **int**| Maximum number returned by list, max 1000 | [optional] - **symbol** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **symbol** | **str**| Currency pair | [optional] **_from** | **int**| Start Millisecond Timestamp | [optional] **to** | **int**| End Millisecond Timestamp | [optional] ### Return type -[**list[InlineResponse20042]**](InlineResponse20042.md) +[**list[CrossexHistoricalPosition]**](CrossexHistoricalPosition.md) ### Authorization @@ -1839,7 +1841,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) # **list_crossex_history_margin_positions** -> list[InlineResponse20043] list_crossex_history_margin_positions(page=page, limit=limit, symbol=symbol, _from=_from, to=to) +> list[CrossexHistoricalMarginPosition] list_crossex_history_margin_positions(page=page, limit=limit, symbol=symbol, _from=_from, to=to) Query Leveraged Position History @@ -1871,7 +1873,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.CrossExApi(api_client) page = 56 # int | Page number (optional) limit = 56 # int | Maximum number returned by list, max 1000 (optional) -symbol = 'symbol_example' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +symbol = 'symbol_example' # str | Currency pair (optional) _from = 56 # int | Start Millisecond Timestamp (optional) to = 56 # int | End Millisecond Timestamp (optional) @@ -1891,13 +1893,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **int**| Page number | [optional] **limit** | **int**| Maximum number returned by list, max 1000 | [optional] - **symbol** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **symbol** | **str**| Currency pair | [optional] **_from** | **int**| Start Millisecond Timestamp | [optional] **to** | **int**| End Millisecond Timestamp | [optional] ### Return type -[**list[InlineResponse20043]**](InlineResponse20043.md) +[**list[CrossexHistoricalMarginPosition]**](CrossexHistoricalMarginPosition.md) ### Authorization @@ -1916,7 +1918,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) # **list_crossex_history_margin_interests** -> list[InlineResponse20044] list_crossex_history_margin_interests(symbol=symbol, _from=_from, to=to, page=page, limit=limit, exchange_type=exchange_type) +> list[CrossexMarginInterestRecord] list_crossex_history_margin_interests(symbol=symbol, _from=_from, to=to, page=page, limit=limit, exchange_type=exchange_type) Query Leveraged Interest Deduction History @@ -1946,7 +1948,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) -symbol = 'symbol_example' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +symbol = 'symbol_example' # str | Currency pair (optional) _from = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) to = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) page = 56 # int | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) @@ -1967,7 +1969,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **symbol** | **str**| Currency pair | [optional] **_from** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] **to** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] **page** | **int**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] @@ -1976,7 +1978,7 @@ Name | Type | Description | Notes ### Return type -[**list[InlineResponse20044]**](InlineResponse20044.md) +[**list[CrossexMarginInterestRecord]**](CrossexMarginInterestRecord.md) ### Authorization @@ -1995,7 +1997,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) # **list_crossex_history_trades** -> list[InlineResponse20045] list_crossex_history_trades(page=page, limit=limit, symbol=symbol, _from=_from, to=to) +> list[CrossexTrade] list_crossex_history_trades(page=page, limit=limit, symbol=symbol, _from=_from, to=to) queryfilledhistory @@ -2027,7 +2029,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.CrossExApi(api_client) page = 56 # int | Page number (optional) limit = 56 # int | Maximum number returned by list, max 1000 (optional) -symbol = 'symbol_example' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +symbol = 'symbol_example' # str | Currency pair (optional) _from = 56 # int | Start Millisecond Timestamp (optional) to = 56 # int | End Millisecond Timestamp (optional) @@ -2047,13 +2049,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **int**| Page number | [optional] **limit** | **int**| Maximum number returned by list, max 1000 | [optional] - **symbol** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **symbol** | **str**| Currency pair | [optional] **_from** | **int**| Start Millisecond Timestamp | [optional] **to** | **int**| End Millisecond Timestamp | [optional] ### Return type -[**list[InlineResponse20045]**](InlineResponse20045.md) +[**list[CrossexTrade]**](CrossexTrade.md) ### Authorization @@ -2072,7 +2074,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) # **list_crossex_account_book** -> list[InlineResponse20046] list_crossex_account_book(page=page, limit=limit, coin=coin, _from=_from, to=to) +> list[CrossexAccountBookRecord] list_crossex_account_book(page=page, limit=limit, coin=coin, statement_type=statement_type, _from=_from, to=to) Query Account Asset Change History @@ -2104,13 +2106,14 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.CrossExApi(api_client) page = 56 # int | Page number (optional) limit = 56 # int | Maximum number returned by list, max 1000 (optional) -coin = 'coin_example' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) +coin = 'coin_example' # str | Query by specified currency name (optional) +statement_type = 'statement_type_example' # str | Bill entry type. The filter accepts the same values returned in the response. (optional) _from = 56 # int | Start Millisecond Timestamp (optional) to = 56 # int | End Millisecond Timestamp (optional) try: # Query Account Asset Change History - api_response = api_instance.list_crossex_account_book(page=page, limit=limit, coin=coin, _from=_from, to=to) + api_response = api_instance.list_crossex_account_book(page=page, limit=limit, coin=coin, statement_type=statement_type, _from=_from, to=to) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -2124,13 +2127,14 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **int**| Page number | [optional] **limit** | **int**| Maximum number returned by list, max 1000 | [optional] - **coin** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] + **coin** | **str**| Query by specified currency name | [optional] + **statement_type** | **str**| Bill entry type. The filter accepts the same values returned in the response. | [optional] **_from** | **int**| Start Millisecond Timestamp | [optional] **to** | **int**| End Millisecond Timestamp | [optional] ### Return type -[**list[InlineResponse20046]**](InlineResponse20046.md) +[**list[CrossexAccountBookRecord]**](CrossexAccountBookRecord.md) ### Authorization @@ -2149,9 +2153,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) # **list_crossex_coin_discount_rate** -> list[InlineResponse20047] list_crossex_coin_discount_rate(coin=coin, exchange_type=exchange_type) +> list[CrossexCoinDiscountRate] list_crossex_coin_discount_rate(coin=coin, exchange_type=exchange_type) -Query currency discount rate (discount rate of margin currency in isolated exchange mode) +Query Currency Discount Rate Rate Limit: 200 requests per 10 seconds @@ -2179,11 +2183,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) -coin = 'SOL' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) -exchange_type = 'OKX' # str | OKX/GATE/BINANCE/BYBIT (optional) +coin = 'SOL' # str | Query by specified currency name (optional) +exchange_type = 'OKX' # str | OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID (optional) try: - # Query currency discount rate (discount rate of margin currency in isolated exchange mode) + # Query Currency Discount Rate api_response = api_instance.list_crossex_coin_discount_rate(coin=coin, exchange_type=exchange_type) print(api_response) except GateApiException as ex: @@ -2196,12 +2200,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **coin** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] - **exchange_type** | **str**| OKX/GATE/BINANCE/BYBIT | [optional] + **coin** | **str**| Query by specified currency name | [optional] + **exchange_type** | **str**| OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID | [optional] ### Return type -[**list[InlineResponse20047]**](InlineResponse20047.md) +[**list[CrossexCoinDiscountRate]**](CrossexCoinDiscountRate.md) ### Authorization diff --git a/docs/InlineResponse20035.md b/docs/CrossexAccount.md similarity index 85% rename from docs/InlineResponse20035.md rename to docs/CrossexAccount.md index d44b1ed7..8ca4618a 100644 --- a/docs/InlineResponse20035.md +++ b/docs/CrossexAccount.md @@ -1,4 +1,4 @@ -# InlineResponse20035 +# CrossexAccount ## Properties Name | Type | Description | Notes @@ -16,7 +16,7 @@ Name | Type | Description | Notes **update_time** | **str** | Update time | **account_mode** | **str** | Account Mode. CROSS_EXCHANGE: Cross-Exchange Mode; ISOLATED_EXCHANGE: Split-Exchange Mode | [optional] **exchange_type** | **str** | Exchange Type. When account_mode is CROSS_EXCHANGE, it must be CROSSEX; otherwise, it is another exchange. | [optional] -**assets** | [**list[InlineResponse20035Assets]**](InlineResponse20035Assets.md) | | +**assets** | [**list[CrossexAccountAsset]**](CrossexAccountAsset.md) | Asset list: grouped by exchange and currency, returning per-account balances, margin, and PnL details | [[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/InlineResponse20035Assets.md b/docs/CrossexAccountAsset.md similarity index 97% rename from docs/InlineResponse20035Assets.md rename to docs/CrossexAccountAsset.md index 88345823..24bdba5e 100644 --- a/docs/InlineResponse20035Assets.md +++ b/docs/CrossexAccountAsset.md @@ -1,4 +1,4 @@ -# InlineResponse20035Assets +# CrossexAccountAsset ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20046.md b/docs/CrossexAccountBookRecord.md similarity index 52% rename from docs/InlineResponse20046.md rename to docs/CrossexAccountBookRecord.md index 715ae6a9..6af13000 100644 --- a/docs/InlineResponse20046.md +++ b/docs/CrossexAccountBookRecord.md @@ -1,4 +1,4 @@ -# InlineResponse20046 +# CrossexAccountBookRecord ## Properties Name | Type | Description | Notes @@ -6,7 +6,7 @@ Name | Type | Description | Notes **id** | **str** | Account Change Record ID | **user_id** | **str** | User ID | **business_id** | **str** | Business ID | -**type** | **str** | 变更类型| `TRANSACTION` 成交 `TRADING_FEE` 手续费 `FUNDING_FEE` 合约资金费 `LIQUIDATION_FEE` 强平费 `TRANSFER_IN` 资金转入 `TRANSFER_OUT` 资金转出 `BANKRUPT_COMPENSATION` 穿仓补贴 `AUTO_REPAY` 杠杆仓位自动还负债 | +**statement_type** | **str** | Bill entry type. `TRANSACTION` trade `TRADING_FEE` fee `FUNDING_FEE` funding `LIQUIDATION_FEE` liquidation `TRANSFER_IN` deposit `TRANSFER_OUT` withdrawal `BANKRUPT_COMPENSATION` bankruptcy subsidy `AUTO_REPAY` margin auto-repay `INTEREST_ISOLATED` isolated-venue interest entry `ACCOUNT_MODE_CHANGE` account mode switch entry `KRAKEN_CONVERSION` conversion of other margin coins to cover a negative KRAKEN_USD balance `OTHER` other | **exchange_type** | **str** | Exchange | **coin** | **str** | Currency | **change** | **str** | Change amount (positive indicates transfer in; negative indicates transfer out) | diff --git a/docs/CrossexAccountUpdateRequest.md b/docs/CrossexAccountUpdateRequest.md index e8fa74dd..fd9bc93f 100644 --- a/docs/CrossexAccountUpdateRequest.md +++ b/docs/CrossexAccountUpdateRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **position_mode** | **str** | Futures position mode (SINGLE/DUAL) | [optional] **account_mode** | **str** | Account mode (CROSS_EXCHANGE/ISOLATED_EXCHANGE, default: CROSS_EXCHANGE) | [optional] -**exchange_type** | **str** | Exchange (BINANCE/OKX/GATE/BYBIT/CROSSEX; when account mode is ISOLATED_EXCHANGE, the exchange must be specified to modify futures position mode) | [optional] +**exchange_type** | **str** | Exchange (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to adjust futures position 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/InlineResponse202.md b/docs/CrossexAccountUpdateResponse.md similarity index 57% rename from docs/InlineResponse202.md rename to docs/CrossexAccountUpdateResponse.md index 8cc4d691..c74a87b3 100644 --- a/docs/InlineResponse202.md +++ b/docs/CrossexAccountUpdateResponse.md @@ -1,11 +1,11 @@ -# InlineResponse202 +# CrossexAccountUpdateResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **position_mode** | **str** | Requested futures position mode to modify (SINGLE/DUAL) | [optional] **account_mode** | **str** | Requested account mode to modify (CROSS_EXCHANGE/ISOLATED_EXCHANGE, default: CROSS_EXCHANGE) | [optional] -**exchange_type** | **str** | Requested exchange to modify (BINANCE/OKX/GATE/BYBIT/CROSSEX; when account mode is ISOLATED_EXCHANGE, the exchange must be specified to modify futures position mode) | [optional] +**exchange_type** | **str** | Exchange targeted by the requested change (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to change futures position 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/InlineResponse20040.md b/docs/CrossexAdlRank.md similarity index 96% rename from docs/InlineResponse20040.md rename to docs/CrossexAdlRank.md index 367bdac3..8d4b6b5c 100644 --- a/docs/InlineResponse20040.md +++ b/docs/CrossexAdlRank.md @@ -1,4 +1,4 @@ -# InlineResponse20040 +# CrossexAdlRank ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20047.md b/docs/CrossexCoinDiscountRate.md similarity index 95% rename from docs/InlineResponse20047.md rename to docs/CrossexCoinDiscountRate.md index a938eac4..32d368b3 100644 --- a/docs/InlineResponse20047.md +++ b/docs/CrossexCoinDiscountRate.md @@ -1,4 +1,4 @@ -# InlineResponse20047 +# CrossexCoinDiscountRate ## Properties Name | Type | Description | Notes diff --git a/docs/CrossexConvertOrderResponse.md b/docs/CrossexConvertOrderResponse.md new file mode 100644 index 00000000..3644b414 --- /dev/null +++ b/docs/CrossexConvertOrderResponse.md @@ -0,0 +1,11 @@ +# CrossexConvertOrderResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | +**text** | **str** | Order ID (cannot be customized) | + +[[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/InlineResponse20034.md b/docs/CrossexConvertQuoteResponse.md similarity index 95% rename from docs/InlineResponse20034.md rename to docs/CrossexConvertQuoteResponse.md index afd4f10e..19969af4 100644 --- a/docs/InlineResponse20034.md +++ b/docs/CrossexConvertQuoteResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20034 +# CrossexConvertQuoteResponse ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20043.md b/docs/CrossexHistoricalMarginPosition.md similarity index 97% rename from docs/InlineResponse20043.md rename to docs/CrossexHistoricalMarginPosition.md index ec668f8a..e0d82ea1 100644 --- a/docs/InlineResponse20043.md +++ b/docs/CrossexHistoricalMarginPosition.md @@ -1,4 +1,4 @@ -# InlineResponse20043 +# CrossexHistoricalMarginPosition ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20042.md b/docs/CrossexHistoricalPosition.md similarity index 98% rename from docs/InlineResponse20042.md rename to docs/CrossexHistoricalPosition.md index 54c726a4..ff4b1f9b 100644 --- a/docs/InlineResponse20042.md +++ b/docs/CrossexHistoricalPosition.md @@ -1,4 +1,4 @@ -# InlineResponse20042 +# CrossexHistoricalPosition ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20036.md b/docs/CrossexInterestRate.md similarity index 95% rename from docs/InlineResponse20036.md rename to docs/CrossexInterestRate.md index 2fe199e6..76145ae4 100644 --- a/docs/InlineResponse20036.md +++ b/docs/CrossexInterestRate.md @@ -1,4 +1,4 @@ -# InlineResponse20036 +# CrossexInterestRate ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse2021.md b/docs/CrossexLeverageResponse.md similarity index 93% rename from docs/InlineResponse2021.md rename to docs/CrossexLeverageResponse.md index a721a627..677989ff 100644 --- a/docs/InlineResponse2021.md +++ b/docs/CrossexLeverageResponse.md @@ -1,4 +1,4 @@ -# InlineResponse2021 +# CrossexLeverageResponse ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20044.md b/docs/CrossexMarginInterestRecord.md similarity index 74% rename from docs/InlineResponse20044.md rename to docs/CrossexMarginInterestRecord.md index 6193a3a3..0210dcd0 100644 --- a/docs/InlineResponse20044.md +++ b/docs/CrossexMarginInterestRecord.md @@ -1,4 +1,4 @@ -# InlineResponse20044 +# CrossexMarginInterestRecord ## Properties Name | Type | Description | Notes @@ -11,7 +11,7 @@ Name | Type | Description | Notes **liability_coin** | **str** | Debt Currency | **interest** | **str** | Interest | **interest_rate** | **str** | interest rate | -**interest_type** | **str** | Interest deduction type (`PERIODIC_POSITION`: periodic position interest; `PERIODIC_OPEN_ORDER`: periodic open-order interest; `IMMEDIATE_OPEN_ORDER`: interest charged on order opening) | +**interest_type** | **str** | Interest deduction type (`PERIODIC_POSITION` hourly interest on position, `PERIODIC_OPEN_ORDER` hourly interest on open orders, `IMMEDIATE_OPEN_ORDER` interest charged on order placement, `PERIODIC_ISOLATED` hourly interest on debt) | **create_time** | **str** | Created time | **exchange_type** | **str** | Exchange | diff --git a/docs/InlineResponse20039.md b/docs/CrossexMarginPosition.md similarity index 98% rename from docs/InlineResponse20039.md rename to docs/CrossexMarginPosition.md index 0a241170..9d103c87 100644 --- a/docs/InlineResponse20039.md +++ b/docs/CrossexMarginPosition.md @@ -1,4 +1,4 @@ -# InlineResponse20039 +# CrossexMarginPosition ## Properties Name | Type | Description | Notes diff --git a/docs/CrossexOrder.md b/docs/CrossexOrder.md new file mode 100644 index 00000000..73c77deb --- /dev/null +++ b/docs/CrossexOrder.md @@ -0,0 +1,37 @@ +# CrossexOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | User ID | +**order_id** | **str** | Order ID | +**text** | **str** | Client-defined order ID. | +**state** | **str** | Order status: NEW: Validated and queued to be sent to the exchange. OPEN: Resting on the exchange order book. PARTIALLY_FILLED: Partially filled. FILLED: Fully filled. FAIL: CrossEx internal validation failed; see the `reason` field for details. REJECT: Rejected by the exchange; see the `reason` field for details. | +**symbol** | **str** | Unique trading pair identifiers, e.g. `BINANCE_SPOT_BTC_USDT`, `BINANCE_FUTURE_BTC_USDT`. | +**side** | **str** | Side (`BUY` buy / `SELL` sell). | +**type** | **str** | Order type (`LIMIT` limit / `MARKET` market). | +**attribute** | **str** | Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage / `SETTLEMENT` delisting settlement). | +**exchange_type** | **str** | Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). | +**business_type** | **str** | Business type (`SPOT` Spot / `FUTURE` Futures / `MARGIN` Margin). | +**qty** | **str** | Order quantity in the base currency. | +**quote_qty** | **str** | Order quantity in the quote currency. | +**price** | **str** | Order price. | +**time_in_force** | **str** | Time in force (default `GTC`; enum: `GTC` / `IOC` / `FOK` / `POC`). | +**executed_qty** | **str** | Filled base amount. | +**executed_amount** | **str** | Filled quote amount. | +**executed_avg_price** | **str** | Average Filled Price | +**fee_coin** | **str** | Fee currency | +**fee** | **str** | Fee amount. | +**reduce_only** | **str** | Reduce-only order (`\"true\"` or `\"false\"`). | +**leverage** | **str** | Order leverage multiplier. | +**reason** | **str** | Failure reason description. | +**last_executed_qty** | **str** | Base quantity of the latest fill. | +**last_executed_price** | **str** | Price of the latest fill. | +**last_executed_amount** | **str** | Quote amount of the latest fill. | +**position_side** | **str** | Position side (`NONE` flat / `LONG` long / `SHORT` short). | +**create_time** | **str** | Created time | +**update_time** | **str** | Update time | + +[[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/InlineResponse20031.md b/docs/CrossexOrderActionResponse.md similarity index 92% rename from docs/InlineResponse20031.md rename to docs/CrossexOrderActionResponse.md index fa1d9ed4..f558a3df 100644 --- a/docs/InlineResponse20031.md +++ b/docs/CrossexOrderActionResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20031 +# CrossexOrderActionResponse ## Properties Name | Type | Description | Notes diff --git a/docs/CrossexOrderRequest.md b/docs/CrossexOrderRequest.md index 2fbd7085..163f0b84 100644 --- a/docs/CrossexOrderRequest.md +++ b/docs/CrossexOrderRequest.md @@ -5,7 +5,7 @@ Place Order Request Body Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **str** | Client-defined Order ID, supports letters (a-z), numbers (0-9), symbols (-, _) only | [optional] -**symbol** | **str** | Unique Identifier for Exchange_Business_Base_Counter Examples: If you want to place a spot order for ADA/USDT on BINANCE, use: `BINANCE_SPOT_ADA_USDT`; If you want to place a USDT-M perpetual futures order for ADA/USDT on OKX, use: `OKX_FUTURE_ADA_USDT`; If you want to place a spot margin order for ADA/USDT on GATE, use: `GATE_MARGIN_ADA_USDT`; If you want to place a spot order for ADA/USDT on BYBIT, use: `BYBIT_SPOT_ADA_USDT`; Currently supports three order types: Spot Orders, USDT-M Perpetual Futures Orders, and Spot Margin Orders. BYBIT does not currently support spot margin orders | +**symbol** | **str** | Unique identifier `{Exchange}_{Business}_{Base}_{Counter}` Examples: To send a Binance spot order on `ADA/USDT`, use `BINANCE_SPOT_ADA_USDT`; For an ADA/USDT-margined USDT perpetual futures order on OKX, use `OKX_FUTURE_ADA_USDT`; For ADA/USDT margin trading on Gate, use `GATE_MARGIN_ADA_USDT`; For ADA/USDT spot trading on Bybit, use `BYBIT_SPOT_ADA_USDT`; For an ADA/USD futures order on Kraken, use `KRAKEN_FUTURE_ADA_USD`; For an ADA/USDC futures order on Hyperliquid, use `HYPERLIQUID_FUTURE_ADA_USDC`; Supports spot trades, USDT-margined perpetual futures, and spot margin templates. BYBIT omits spot margin for now; Kraken and Hyperliquid omit dedicated spot/margin legs inside CrossEx. | **side** | **str** | BUY, SELL | **type** | **str** | Order type (default: `LIMIT`; supported types: `LIMIT`, `MARKET`) | [optional] [default to 'LIMIT'] **time_in_force** | **str** | Default GTC, supports enumerated types: GTC, IOC, FOK, POC GTC: GoodTillCancelled IOC: ImmediateOrCancelled FOK: FillOrKill POC: PendingOrCancelled or PostOnly | [optional] [default to 'GTC'] diff --git a/docs/InlineResponse20038.md b/docs/CrossexPosition.md similarity index 98% rename from docs/InlineResponse20038.md rename to docs/CrossexPosition.md index 84313b8d..c1adb64e 100644 --- a/docs/InlineResponse20038.md +++ b/docs/CrossexPosition.md @@ -1,4 +1,4 @@ -# InlineResponse20038 +# CrossexPosition ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20027.md b/docs/CrossexRiskLimit.md similarity index 72% rename from docs/InlineResponse20027.md rename to docs/CrossexRiskLimit.md index f4050a37..2804ab26 100644 --- a/docs/InlineResponse20027.md +++ b/docs/CrossexRiskLimit.md @@ -1,10 +1,10 @@ -# InlineResponse20027 +# CrossexRiskLimit ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **symbol** | **str** | | [optional] -**tiers** | [**list[CrossexRuleRiskLimitsTiers]**](CrossexRuleRiskLimitsTiers.md) | | [optional] +**tiers** | [**list[CrossexRiskLimitTier]**](CrossexRiskLimitTier.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/CrossexRuleRiskLimitsTiers.md b/docs/CrossexRiskLimitTier.md similarity index 86% rename from docs/CrossexRuleRiskLimitsTiers.md rename to docs/CrossexRiskLimitTier.md index 18bf5148..584bbd9a 100644 --- a/docs/CrossexRuleRiskLimitsTiers.md +++ b/docs/CrossexRiskLimitTier.md @@ -1,10 +1,11 @@ -# CrossexRuleRiskLimitsTiers +# CrossexRiskLimitTier ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **min_risk_limit_value** | **str** | Minimum risk limit value | **max_risk_limit_value** | **str** | Maximum risk limit value | +**quick_cal_amount** | **str** | Quick-calculation amount | **leverage_max** | **str** | Maximum leverage | **maintenance_rate** | **str** | Maintenance margin rate | **tier** | **str** | Tier | diff --git a/docs/InlineResponse20037SpecialFeeList.md b/docs/CrossexSpecialFee.md similarity index 91% rename from docs/InlineResponse20037SpecialFeeList.md rename to docs/CrossexSpecialFee.md index d7eb4d07..0c06cc93 100644 --- a/docs/InlineResponse20037SpecialFeeList.md +++ b/docs/CrossexSpecialFee.md @@ -1,4 +1,4 @@ -# InlineResponse20037SpecialFeeList +# CrossexSpecialFee ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20045.md b/docs/CrossexTrade.md similarity index 98% rename from docs/InlineResponse20045.md rename to docs/CrossexTrade.md index dcb04290..bfcc5159 100644 --- a/docs/InlineResponse20045.md +++ b/docs/CrossexTrade.md @@ -1,4 +1,4 @@ -# InlineResponse20045 +# CrossexTrade ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20028.md b/docs/CrossexTransferCoin.md similarity index 96% rename from docs/InlineResponse20028.md rename to docs/CrossexTransferCoin.md index 9f1ee4f1..a7b10ca8 100644 --- a/docs/InlineResponse20028.md +++ b/docs/CrossexTransferCoin.md @@ -1,4 +1,4 @@ -# InlineResponse20028 +# CrossexTransferCoin ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20029.md b/docs/CrossexTransferRecord.md similarity index 60% rename from docs/InlineResponse20029.md rename to docs/CrossexTransferRecord.md index 1776b9aa..ec9c4be9 100644 --- a/docs/InlineResponse20029.md +++ b/docs/CrossexTransferRecord.md @@ -1,12 +1,12 @@ -# InlineResponse20029 +# CrossexTransferRecord ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Order ID | **text** | **str** | Client Custom ID | -**from_account_type** | **str** | Source `from` account (CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT) | -**to_account_type** | **str** | | +**from_account_type** | **str** | `from` credit account touched by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). | +**to_account_type** | **str** | `to` debit account handled by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). | **coin** | **str** | Currency | **amount** | **str** | Transfer amount, the amount requested for the transfer | **actual_receive** | **str** | Actual credited amount (has a value when status = SUCCESS; empty for other statuses) | [optional] diff --git a/docs/CrossexTransferRequest.md b/docs/CrossexTransferRequest.md index 1784369f..020d86fd 100644 --- a/docs/CrossexTransferRequest.md +++ b/docs/CrossexTransferRequest.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **coin** | **str** | Currency | **amount** | **str** | Transfer amount | -**_from** | **str** | Transfer-in account: CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT | -**to** | **str** | Transfer-out account: CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT | +**_from** | **str** | `from` receiving account (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). | +**to** | **str** | `to` debit account (funds withdrawn from): `CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT` | **text** | **str** | User-defined 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/InlineResponse20030.md b/docs/CrossexTransferResponse.md similarity index 93% rename from docs/InlineResponse20030.md rename to docs/CrossexTransferResponse.md index 0e76e801..79d76036 100644 --- a/docs/InlineResponse20030.md +++ b/docs/CrossexTransferResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20030 +# CrossexTransferResponse ## Properties Name | Type | Description | Notes diff --git a/docs/Currency.md b/docs/Currency.md index ae04ec84..2a1d26fe 100644 --- a/docs/Currency.md +++ b/docs/Currency.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **chains** | [**list[SpotCurrencyChain]**](SpotCurrencyChain.md) | All links corresponding to coins | [optional] **total_supply** | **str** | Total supply | [optional] **market_cap** | **str** | Market cap | [optional] +**category** | **list[str]** | Currency categories - stocks: Stocks - metals: Metals - indices: Indices - forex: Forex - commodities: Commodities | [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/DeliveryOrderBook.md b/docs/DeliveryOrderBook.md index cf95b7d7..4d858c78 100644 --- a/docs/DeliveryOrderBook.md +++ b/docs/DeliveryOrderBook.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[FuturesOrderBookItem1]**](FuturesOrderBookItem1.md) | Ask Depth | -**bids** | [**list[FuturesOrderBookItem1]**](FuturesOrderBookItem1.md) | Bid Depth | +**asks** | [**list[DeliveryOrderBookItem]**](DeliveryOrderBookItem.md) | Ask Depth | +**bids** | [**list[DeliveryOrderBookItem]**](DeliveryOrderBookItem.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/FuturesOrderBookItem1.md b/docs/DeliveryOrderBookItem.md similarity index 93% rename from docs/FuturesOrderBookItem1.md rename to docs/DeliveryOrderBookItem.md index d0210bc6..f3eea174 100644 --- a/docs/FuturesOrderBookItem1.md +++ b/docs/DeliveryOrderBookItem.md @@ -1,4 +1,4 @@ -# FuturesOrderBookItem1 +# DeliveryOrderBookItem ## Properties Name | Type | Description | Notes diff --git a/docs/DeltaNeutralEnabled.md b/docs/DeltaNeutralEnabled.md new file mode 100644 index 00000000..35385069 --- /dev/null +++ b/docs/DeltaNeutralEnabled.md @@ -0,0 +1,10 @@ +# DeltaNeutralEnabled + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether to enable the account Delta-neutral strategy mode | + +[[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 index ead8fa65..4ef4a5af 100644 --- a/docs/DepositRecord.md +++ b/docs/DepositRecord.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **address** | **str** | Withdrawal address. Required for withdrawals | [optional] **memo** | **str** | Additional remarks with regards to the withdrawal | [optional] **status** | **str** | Transaction Status - BLOCKED: Deposit Blocked - DEP_CREDITED: Deposit Credited, Withdrawal Pending Unlock - DONE: Funds Credited to Spot Account - INVALID: Invalid Transaction - MANUAL: Manual Review Required - PEND: Processing - REVIEW: Under Compliance Review - TRACK: Tracking Block Confirmations, Pending Spot Account Credit | [optional] [readonly] +**refund_status** | **str** | Blocked deposit refund status. This field is returned only when the deposit record has a blocked deposit refund record with a non-empty refund status. Not returned when there is no refund record or the refund status is empty - REFUNDING: Refund in progress - REFUNDED: Refund completed - REFUND_FAILED: Refund failed - REJECTED: Refund rejected | [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/DiscoverScene.md b/docs/DiscoverScene.md new file mode 100644 index 00000000..a2fc4c8a --- /dev/null +++ b/docs/DiscoverScene.md @@ -0,0 +1,10 @@ +# DiscoverScene + +Enumeration of scenarios supported by the policy recommendation interface. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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 index 91f79deb..c85cde03 100644 --- a/docs/DualGetOrders.md +++ b/docs/DualGetOrders.md @@ -5,7 +5,6 @@ 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] diff --git a/docs/DualGetPlans.md b/docs/DualGetPlans.md index 272fd774..bb6545f1 100644 --- a/docs/DualGetPlans.md +++ b/docs/DualGetPlans.md @@ -9,13 +9,11 @@ Name | Type | Description | Notes **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 (deprecated) | [optional] **apy_display** | **str** | Annual Yield | [optional] +**min_amount** | **str** | Minimum investment amount | [optional] **start_time** | **int** | Start Time | [optional] **end_time** | **int** | End time | [optional] -**status** | **str** | 状态: `NOTSTARTED`-未开始 `ONGOING`-进行中 `ENDED`-已结束 | [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/DualModifyOrderReinvestParams.md b/docs/DualModifyOrderReinvestParams.md new file mode 100644 index 00000000..998279a7 --- /dev/null +++ b/docs/DualModifyOrderReinvestParams.md @@ -0,0 +1,13 @@ +# DualModifyOrderReinvestParams + +Dual-currency order reinvest modification request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**status** | **int** | `0` — off; `1` — on | [optional] +**effective_time_duration** | **int** | Effective duration in seconds; default 1 day (86400) | [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/DualOrderRefundParams.md b/docs/DualOrderRefundParams.md new file mode 100644 index 00000000..c6521616 --- /dev/null +++ b/docs/DualOrderRefundParams.md @@ -0,0 +1,12 @@ +# DualOrderRefundParams + +Dual-currency order early redemption request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | +**req_id** | **str** | Request ID returned by order-refund-preview | + +[[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/DualOrderRefundPreview.md b/docs/DualOrderRefundPreview.md new file mode 100644 index 00000000..80e795a2 --- /dev/null +++ b/docs/DualOrderRefundPreview.md @@ -0,0 +1,25 @@ +# DualOrderRefundPreview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**create_timest** | **int** | Order creation timestamp | [optional] +**delivery_timest** | **int** | Order delivery timestamp | [optional] +**exercise_price** | **str** | Strike price | [optional] +**invest_amount** | **str** | Investment amount | [optional] +**invest_currency** | **str** | Investment Token | [optional] +**name** | **str** | Order name identifier | [optional] +**order_id** | **int** | Order ID | [optional] +**req_id** | **str** | Request ID used for actual redemption | [optional] +**refund_service_charge** | **int** | Refund fee | [optional] +**settle_price** | **str** | Settlement price | [optional] +**settlement_amount** | **str** | Settlement amount | [optional] +**settlement_currency** | **str** | Settlement currency | [optional] +**settlement_interest** | **str** | Settlement interest | [optional] +**settlement_principle** | **str** | Settlement principal | [optional] +**type** | **str** | `call`: sell high; `put`: buy low | [optional] +**money_back_timest** | **int** | Redemption 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/DualProjectRecommend.md b/docs/DualProjectRecommend.md new file mode 100644 index 00000000..55a83247 --- /dev/null +++ b/docs/DualProjectRecommend.md @@ -0,0 +1,23 @@ +# DualProjectRecommend + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Product ID | [optional] +**category** | **int** | Strategy category | [optional] +**type** | **str** | `call`: sell high; `put`: buy low | [optional] +**invest_currency** | **str** | Investment Token | [optional] +**exercise_currency** | **str** | Strike Token | [optional] +**apy_display** | **str** | Annual Yield | [optional] +**exercise_price** | **str** | Strike price | [optional] +**delivery_timest** | **int** | Settlement time | [optional] +**min_amount** | **str** | Minimum investment amount | [optional] +**max_amount** | **str** | Maximum investment amount | [optional] +**min_copies** | **int** | Minimum Units | [optional] +**max_copies** | **int** | Maximum Units | [optional] +**invest_days** | **int** | Lock-up days | [optional] +**invest_hours** | **str** | Lock-up hours | [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/EarnApi.md b/docs/EarnApi.md index 278b9e06..d2ea17fc 100644 --- a/docs/EarnApi.md +++ b/docs/EarnApi.md @@ -4,155 +4,40 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**swap_eth2**](EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH swap -[**rate_list_eth2**](EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | GTETH 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_dual_balance**](EarnApi.md#list_dual_balance) | **GET** /earn/dual/balance | Dual-Currency Earning Assets -[**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 +[**get_dual_order_refund_preview**](EarnApi.md#get_dual_order_refund_preview) | **GET** /earn/dual/order-refund-preview | Dual-currency early redemption preview +[**place_dual_order_refund**](EarnApi.md#place_dual_order_refund) | **POST** /earn/dual/order-refund | Dual-currency order early redemption +[**modify_dual_order_reinvest**](EarnApi.md#modify_dual_order_reinvest) | **POST** /earn/dual/modify-order-reinvest | Modify dual-currency order reinvest +[**get_dual_project_recommend**](EarnApi.md#get_dual_project_recommend) | **GET** /earn/dual/project-recommend | Dual-currency recommended projects [**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 [**order_list**](EarnApi.md#order_list) | **GET** /earn/staking/order_list | List of on-chain coin-earning orders [**award_list**](EarnApi.md#award_list) | **GET** /earn/staking/award_list | On-chain coin-earning dividend records [**asset_list**](EarnApi.md#asset_list) | **GET** /earn/staking/assets | On-chain coin-earning assets +[**create_auto_invest_plan**](EarnApi.md#create_auto_invest_plan) | **POST** /earn/autoinvest/plans/create | Create auto invest plan +[**update_auto_invest_plan**](EarnApi.md#update_auto_invest_plan) | **POST** /earn/autoinvest/plans/update | UpdateAuto invest plan +[**stop_auto_invest_plan**](EarnApi.md#stop_auto_invest_plan) | **POST** /earn/autoinvest/plans/stop | StopAuto invest plan +[**add_position_auto_invest_plan**](EarnApi.md#add_position_auto_invest_plan) | **POST** /earn/autoinvest/plans/add_position | Add position immediately +[**list_auto_invest_coins**](EarnApi.md#list_auto_invest_coins) | **GET** /earn/autoinvest/coins | QueryCurrencies supporting auto invest +[**get_auto_invest_min_amount**](EarnApi.md#get_auto_invest_min_amount) | **POST** /earn/autoinvest/min_invest_amount | Get minimum investment amount +[**list_auto_invest_plan_records**](EarnApi.md#list_auto_invest_plan_records) | **GET** /earn/autoinvest/plans/records | List plan execution records +[**list_auto_invest_orders**](EarnApi.md#list_auto_invest_orders) | **GET** /earn/autoinvest/orders | List plan execution recordsDetails(OrderDetails) +[**list_auto_invest_config**](EarnApi.md#list_auto_invest_config) | **GET** /earn/autoinvest/config | List investment currency configuration +[**get_auto_invest_plan_detail**](EarnApi.md#get_auto_invest_plan_detail) | **GET** /earn/autoinvest/plans/detail | QueryAuto invest planDetails +[**list_auto_invest_plans**](EarnApi.md#list_auto_invest_plans) | **GET** /earn/autoinvest/plans/list_info | QueryAuto invest planList +[**list_earn_fixed_term_products**](EarnApi.md#list_earn_fixed_term_products) | **GET** /earn/fixed-term/product | Get product list +[**list_earn_fixed_term_products_by_asset**](EarnApi.md#list_earn_fixed_term_products_by_asset) | **GET** /earn/fixed-term/product/{asset}/list | Get product list by single currency +[**list_earn_fixed_term_lends**](EarnApi.md#list_earn_fixed_term_lends) | **GET** /earn/fixed-term/user/lend | Subscription list +[**create_earn_fixed_term_lend**](EarnApi.md#create_earn_fixed_term_lend) | **POST** /earn/fixed-term/user/lend | Subscription +[**create_earn_fixed_term_pre_redeem**](EarnApi.md#create_earn_fixed_term_pre_redeem) | **POST** /earn/fixed-term/user/pre-redeem | Redeem +[**list_earn_fixed_term_history**](EarnApi.md#list_earn_fixed_term_history) | **GET** /earn/fixed-term/user/history | Subscription history -# **swap_eth2** -> swap_eth2(eth2_swap) - -ETH swap - -### 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.EarnApi(api_client) -eth2_swap = gate_api.Eth2Swap() # Eth2Swap | - -try: - # ETH 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 EarnApi->swap_eth2: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eth2_swap** | [**Eth2Swap**](Eth2Swap.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** | 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) - -# **rate_list_eth2** -> list[Eth2RateList] rate_list_eth2() - -GTETH historical return rate query - -Query ETH earnings rate records for the last 31 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.EarnApi(api_client) - -try: - # GTETH 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 EarnApi->rate_list_eth2: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[Eth2RateList]**](Eth2RateList.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_dual_investment_plans** -> list[DualGetPlans] list_dual_investment_plans(plan_id=plan_id) +> list[DualGetPlans] list_dual_investment_plans(plan_id=plan_id, coin=coin, type=type, quote_currency=quote_currency, sort=sort, page=page, page_size=page_size) Dual Investment product list @@ -172,10 +57,16 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) plan_id = 1 # int | Financial project ID (optional) +coin = 'BTC' # str | Investment Token (optional) +type = 'call' # str | Type enum: `put` — buy low; `call` — sell high (optional) +quote_currency = 'quote_currency_example' # str | Settlement currency enum: defaults to USDT; GUSD optional (optional) +sort = 'sort_example' # str | Sort field enum: `apy` — highest APY first `short-period` — shortest tenor first `multiple` — highest premium first (optional) +page = 1 # int | page number (optional) +page_size = 3 # int | Items per page (optional) try: # Dual Investment product list - api_response = api_instance.list_dual_investment_plans(plan_id=plan_id) + api_response = api_instance.list_dual_investment_plans(plan_id=plan_id, coin=coin, type=type, quote_currency=quote_currency, sort=sort, page=page, page_size=page_size) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -188,6 +79,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **plan_id** | **int**| Financial project ID | [optional] + **coin** | **str**| Investment Token | [optional] + **type** | **str**| Type enum: `put` — buy low; `call` — sell high | [optional] + **quote_currency** | **str**| Settlement currency enum: defaults to USDT; GUSD optional | [optional] + **sort** | **str**| Sort field enum: `apy` — highest APY first `short-period` — shortest tenor first `multiple` — highest premium first | [optional] + **page** | **int**| page number | [optional] + **page_size** | **int**| Items per page | [optional] ### Return type @@ -210,7 +107,7 @@ No authorization required [[Back to top]](#) [[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_dual_orders** -> list[DualGetOrders] list_dual_orders(_from=_from, to=to, page=page, limit=limit) +> list[DualGetOrders] list_dual_orders(_from=_from, to=to, type=type, status=status, coin=coin, page=page, limit=limit) Dual Investment order list @@ -240,12 +137,15 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnApi(api_client) _from = 1740727000 # int | Start settlement time (optional) to = 1740729000 # int | End settlement time (optional) +type = 'put' # str | Type enum: `put` — buy low; `call` — sell high (optional) +status = 'HOLD' # str | Order status enum: `HOLD` — open position `REPAY` — historical position `PROCESSING` — position active `SETTLEMENT_PROCESSING` — settlement in progress `ALL` — all (optional) +coin = 'BTC' # str | Investment Token (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: # Dual Investment order list - api_response = api_instance.list_dual_orders(_from=_from, to=to, page=page, limit=limit) + api_response = api_instance.list_dual_orders(_from=_from, to=to, type=type, status=status, coin=coin, page=page, limit=limit) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -259,6 +159,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_from** | **int**| Start settlement time | [optional] **to** | **int**| End settlement time | [optional] + **type** | **str**| Type enum: `put` — buy low; `call` — sell high | [optional] + **status** | **str**| Order status enum: `HOLD` — open position `REPAY` — historical position `PROCESSING` — position active `SETTLEMENT_PROCESSING` — settlement in progress `ALL` — all | [optional] + **coin** | **str**| Investment Token | [optional] **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] @@ -412,57 +315,60 @@ 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) -# **list_structured_products** -> list[StructuredGetProjectList] list_structured_products(status, type=type, page=page, limit=limit) +# **get_dual_order_refund_preview** +> DualOrderRefundPreview get_dual_order_refund_preview(order_id) -Structured Product List +Dual-currency early redemption preview ### 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" + 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.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) +order_id = '9497' # str | Order ID try: - # Structured Product List - api_response = api_instance.list_structured_products(status, type=type, page=page, limit=limit) + # Dual-currency early redemption preview + api_response = api_instance.get_dual_order_refund_preview(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 EarnApi->list_structured_products: %s\n" % e) + print("Exception when calling EarnApi->get_dual_order_refund_preview: %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] + **order_id** | **str**| Order ID | ### Return type -[**list[StructuredGetProjectList]**](StructuredGetProjectList.md) +[**DualOrderRefundPreview**](DualOrderRefundPreview.md) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers @@ -476,10 +382,10 @@ No authorization required [[Back to top]](#) [[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_orders** -> list[StructuredOrderList] list_structured_orders(_from=_from, to=to, page=page, limit=limit) +# **place_dual_order_refund** +> place_dual_order_refund(dual_order_refund_params) -Structured Product Order List +Dual-currency order early redemption ### Example @@ -505,33 +411,26 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class 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 number of records returned in a single list (optional) (default to 100) +dual_order_refund_params = gate_api.DualOrderRefundParams() # DualOrderRefundParams | try: - # Structured Product Order List - api_response = api_instance.list_structured_orders(_from=_from, to=to, page=page, limit=limit) - print(api_response) + # Dual-currency order early redemption + api_instance.place_dual_order_refund(dual_order_refund_params) 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_orders: %s\n" % e) + print("Exception when calling EarnApi->place_dual_order_refund: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_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 number of records returned in a single list | [optional] [default to 100] + **dual_order_refund_params** | [**DualOrderRefundParams**](DualOrderRefundParams.md)| | ### Return type -[**list[StructuredOrderList]**](StructuredOrderList.md) +void (empty response body) ### Authorization @@ -539,20 +438,20 @@ 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** | Successfully retrieved | - | +**200** | Redemption 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) -# **place_structured_order** -> place_structured_order(structured_buy) +# **modify_dual_order_reinvest** +> modify_dual_order_reinvest(dual_modify_order_reinvest_params) -Place Structured Product Order +Modify dual-currency order reinvest ### Example @@ -578,22 +477,22 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) -structured_buy = gate_api.StructuredBuy() # StructuredBuy | +dual_modify_order_reinvest_params = gate_api.DualModifyOrderReinvestParams() # DualModifyOrderReinvestParams | try: - # Place Structured Product Order - api_instance.place_structured_order(structured_buy) + # Modify dual-currency order reinvest + api_instance.modify_dual_order_reinvest(dual_modify_order_reinvest_params) 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->place_structured_order: %s\n" % e) + print("Exception when calling EarnApi->modify_dual_order_reinvest: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **structured_buy** | [**StructuredBuy**](StructuredBuy.md)| | + **dual_modify_order_reinvest_params** | [**DualModifyOrderReinvestParams**](DualModifyOrderReinvestParams.md)| | ### Return type @@ -611,12 +510,85 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order placed successfully | - | +**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_project_recommend** +> list[DualProjectRecommend] get_dual_project_recommend(mode=mode, coin=coin, type=type, history_pids=history_pids) + +Dual-currency recommended projects + +### 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.EarnApi(api_client) +mode = 'normal' # str | Sort mode; default `normal`: `senior` — curated picks (APR/tenor) `apy_up` — APY ascending `ep_down` — target price descending `ep_up` — target price ascending `dt_down` — maturity time descending `dt_up` — maturity time ascending (optional) +coin = 'ETH' # str | Investment Token (optional) +type = 'call' # str | `call`: sell high; `put`: buy low (optional) +history_pids = '110656,110652' # str | Comma-separated project IDs to exclude already recommended items (optional) + +try: + # Dual-currency recommended projects + api_response = api_instance.get_dual_project_recommend(mode=mode, coin=coin, type=type, history_pids=history_pids) + 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->get_dual_project_recommend: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mode** | **str**| Sort mode; default `normal`: `senior` — curated picks (APR/tenor) `apy_up` — APY ascending `ep_down` — target price descending `ep_up` — target price ascending `dt_down` — maturity time descending `dt_up` — maturity time ascending | [optional] + **coin** | **str**| Investment Token | [optional] + **type** | **str**| `call`: sell high; `put`: buy low | [optional] + **history_pids** | **str**| Comma-separated project IDs to exclude already recommended items | [optional] + +### Return type + +[**list[DualProjectRecommend]**](DualProjectRecommend.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) # **find_coin** -> list[object] find_coin(find_coin) +> list[object] find_coin(cointype=cointype) Staking coins @@ -644,11 +616,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) -find_coin = gate_api.FindCoin() # FindCoin | +cointype = 'cointype_example' # str | Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. (optional) try: # Staking coins - api_response = api_instance.find_coin(find_coin) + api_response = api_instance.find_coin(cointype=cointype) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -660,7 +632,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **find_coin** | [**FindCoin**](FindCoin.md)| | + **cointype** | **str**| Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. | [optional] ### Return type @@ -672,7 +644,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -960,3 +932,1179 @@ 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_auto_invest_plan** +> AutoInvestPlanCreateResp create_auto_invest_plan(auto_invest_plan_create) + +Create auto invest plan + +### 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.EarnApi(api_client) +auto_invest_plan_create = gate_api.AutoInvestPlanCreate() # AutoInvestPlanCreate | + +try: + # Create auto invest plan + api_response = api_instance.create_auto_invest_plan(auto_invest_plan_create) + 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->create_auto_invest_plan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auto_invest_plan_create** | [**AutoInvestPlanCreate**](AutoInvestPlanCreate.md)| | + +### Return type + +[**AutoInvestPlanCreateResp**](AutoInvestPlanCreateResp.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** | 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) + +# **update_auto_invest_plan** +> update_auto_invest_plan(auto_invest_plan_update) + +UpdateAuto invest plan + +### 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.EarnApi(api_client) +auto_invest_plan_update = gate_api.AutoInvestPlanUpdate() # AutoInvestPlanUpdate | + +try: + # UpdateAuto invest plan + api_instance.update_auto_invest_plan(auto_invest_plan_update) +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->update_auto_invest_plan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auto_invest_plan_update** | [**AutoInvestPlanUpdate**](AutoInvestPlanUpdate.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** | 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) + +# **stop_auto_invest_plan** +> stop_auto_invest_plan(auto_invest_plan_stop) + +StopAuto invest plan + +### 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.EarnApi(api_client) +auto_invest_plan_stop = gate_api.AutoInvestPlanStop() # AutoInvestPlanStop | + +try: + # StopAuto invest plan + api_instance.stop_auto_invest_plan(auto_invest_plan_stop) +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->stop_auto_invest_plan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auto_invest_plan_stop** | [**AutoInvestPlanStop**](AutoInvestPlanStop.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** | Stopped 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_position_auto_invest_plan** +> add_position_auto_invest_plan(auto_invest_plan_add_position) + +Add position immediately + +### 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.EarnApi(api_client) +auto_invest_plan_add_position = gate_api.AutoInvestPlanAddPosition() # AutoInvestPlanAddPosition | + +try: + # Add position immediately + api_instance.add_position_auto_invest_plan(auto_invest_plan_add_position) +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->add_position_auto_invest_plan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auto_invest_plan_add_position** | [**AutoInvestPlanAddPosition**](AutoInvestPlanAddPosition.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** | Add PositionSuccess | - | + +[[Back to top]](#) [[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_invest_coins** +> list[AutoInvestCoinsItem] list_auto_invest_coins(plan_money=plan_money) + +QueryCurrencies supporting auto invest + +### 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.EarnApi(api_client) +plan_money = 'USDT' # str | Pricing currency,Optional: USDT or BTC,Default: USDT (optional) + +try: + # QueryCurrencies supporting auto invest + api_response = api_instance.list_auto_invest_coins(plan_money=plan_money) + 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_auto_invest_coins: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_money** | **str**| Pricing currency,Optional: USDT or BTC,Default: USDT | [optional] + +### Return type + +[**list[AutoInvestCoinsItem]**](AutoInvestCoinsItem.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) + +# **get_auto_invest_min_amount** +> AutoInvestMinInvestAmountResp get_auto_invest_min_amount(auto_invest_min_invest_amount) + +Get minimum investment 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.EarnApi(api_client) +auto_invest_min_invest_amount = gate_api.AutoInvestMinInvestAmount() # AutoInvestMinInvestAmount | + +try: + # Get minimum investment amount + api_response = api_instance.get_auto_invest_min_amount(auto_invest_min_invest_amount) + 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->get_auto_invest_min_amount: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auto_invest_min_invest_amount** | [**AutoInvestMinInvestAmount**](AutoInvestMinInvestAmount.md)| | + +### Return type + +[**AutoInvestMinInvestAmountResp**](AutoInvestMinInvestAmountResp.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 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_auto_invest_plan_records** +> AutoInvestPlanRecordsResp list_auto_invest_plan_records(plan_id, page=page, page_size=page_size) + +List plan execution 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.EarnApi(api_client) +plan_id = 141378 # int | Plan ID +page = 1 # int | page number (optional) +page_size = 10 # int | Items per page,Maximum 100 (optional) + +try: + # List plan execution records + api_response = api_instance.list_auto_invest_plan_records(plan_id, page=page, page_size=page_size) + 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_auto_invest_plan_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **int**| Plan ID | + **page** | **int**| page number | [optional] + **page_size** | **int**| Items per page,Maximum 100 | [optional] + +### Return type + +[**AutoInvestPlanRecordsResp**](AutoInvestPlanRecordsResp.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_auto_invest_orders** +> list[AutoInvestOrderItem] list_auto_invest_orders(plan_id, record_id) + +List plan execution recordsDetails(OrderDetails) + +### 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.EarnApi(api_client) +plan_id = 142583 # int | Plan ID +record_id = 1770805384904919 # int | Record ID + +try: + # List plan execution recordsDetails(OrderDetails) + api_response = api_instance.list_auto_invest_orders(plan_id, record_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 EarnApi->list_auto_invest_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **int**| Plan ID | + **record_id** | **int**| Record ID | + +### Return type + +[**list[AutoInvestOrderItem]**](AutoInvestOrderItem.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_auto_invest_config** +> list[AutoInvestConfigItem] list_auto_invest_config() + +List investment currency configuration + +### 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.EarnApi(api_client) + +try: + # List investment currency configuration + api_response = api_instance.list_auto_invest_config() + 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_auto_invest_config: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[AutoInvestConfigItem]**](AutoInvestConfigItem.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) + +# **get_auto_invest_plan_detail** +> AutoInvestPlanDetail get_auto_invest_plan_detail(plan_id) + +QueryAuto invest planDetails + +### 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.EarnApi(api_client) +plan_id = 142609 # int | Plan ID + +try: + # QueryAuto invest planDetails + api_response = api_instance.get_auto_invest_plan_detail(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 EarnApi->get_auto_invest_plan_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **int**| Plan ID | + +### Return type + +[**AutoInvestPlanDetail**](AutoInvestPlanDetail.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_auto_invest_plans** +> AutoInvestPlanListInfoResp list_auto_invest_plans(status, page=page, page_size=page_size) + +QueryAuto invest planList + +### 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.EarnApi(api_client) +status = 'active' # str | Plan status,History history,Active active +page = 56 # int | page number (optional) +page_size = 56 # int | Items per page,Maximum 100 (optional) + +try: + # QueryAuto invest planList + api_response = api_instance.list_auto_invest_plans(status, page=page, page_size=page_size) + 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_auto_invest_plans: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| Plan status,History history,Active active | + **page** | **int**| page number | [optional] + **page_size** | **int**| Items per page,Maximum 100 | [optional] + +### Return type + +[**AutoInvestPlanListInfoResp**](AutoInvestPlanListInfoResp.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_earn_fixed_term_products** +> ListEarnFixedTermProductsResponse list_earn_fixed_term_products(page, limit, asset=asset, type=type) + +Get product list + +Query fixed-term earn product list. Supports filtering by currency, product type, status, etc. Returns product interest rate, lock-up period, quota, and reward campaign information + +### 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) +page = 1 # int | Page number +limit = 100 # int | Page size +asset = 'USDT' # str | Currency (optional) +type = 1 # int | Product type: 1 for regular, 2 for VIP (optional) + +try: + # Get product list + api_response = api_instance.list_earn_fixed_term_products(page, limit, asset=asset, 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 EarnApi->list_earn_fixed_term_products: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number | + **limit** | **int**| Page size | + **asset** | **str**| Currency | [optional] + **type** | **int**| Product type: 1 for regular, 2 for VIP | [optional] + +### Return type + +[**ListEarnFixedTermProductsResponse**](ListEarnFixedTermProductsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Product 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_earn_fixed_term_products_by_asset** +> ListEarnFixedTermProductsByAssetResponse list_earn_fixed_term_products_by_asset(asset, type=type) + +Get product list by single currency + +Sort by product term in ascending order + +### 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) +asset = 'USDT' # str | Currency name, e.g., USDT, BTC +type = '1' # str | Product type: \"\" or 1 for regular product list, 2 for VIP product list, 0 for all products (optional) + +try: + # Get product list by single currency + api_response = api_instance.list_earn_fixed_term_products_by_asset(asset, 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 EarnApi->list_earn_fixed_term_products_by_asset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| Currency name, e.g., USDT, BTC | + **type** | **str**| Product type: \"\" or 1 for regular product list, 2 for VIP product list, 0 for all products | [optional] + +### Return type + +[**ListEarnFixedTermProductsByAssetResponse**](ListEarnFixedTermProductsByAssetResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single currency product 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_earn_fixed_term_lends** +> ListEarnFixedTermLendsResponse list_earn_fixed_term_lends(order_type, page, limit, product_id=product_id, order_id=order_id, asset=asset, sub_business=sub_business, business_filter=business_filter) + +Subscription list + +Query the user's fixed-term earn subscription order list. Supports filtering by product, currency, order type, etc. Returns order details, earnings, rewards, and interest rate boost coupon 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.EarnApi(api_client) +order_type = '1' # str | Order type: 1 for current orders, 2 for historical orders +page = 1 # int | Page number +limit = 10 # int | Page size +product_id = 56 # int | Product ID (optional) +order_id = 56 # int | Order ID (optional) +asset = 'asset_example' # str | Currency (optional) +sub_business = 56 # int | Sub-business (optional) +business_filter = '[{\"business\":1, \"sub_business\": 0},{\"business\":2, \"sub_business\": 0}]' # str | Business filter conditions, JSON array format, e.g., [{\"business\":1, \"sub_business\": 0}]. business: 1 for regular, 2 for VIP (optional) + +try: + # Subscription list + api_response = api_instance.list_earn_fixed_term_lends(order_type, page, limit, product_id=product_id, order_id=order_id, asset=asset, sub_business=sub_business, business_filter=business_filter) + 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_earn_fixed_term_lends: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_type** | **str**| Order type: 1 for current orders, 2 for historical orders | + **page** | **int**| Page number | + **limit** | **int**| Page size | + **product_id** | **int**| Product ID | [optional] + **order_id** | **int**| Order ID | [optional] + **asset** | **str**| Currency | [optional] + **sub_business** | **int**| Sub-business | [optional] + **business_filter** | **str**| Business filter conditions, JSON array format, e.g., [{\"business\":1, \"sub_business\": 0}]. business: 1 for regular, 2 for VIP | [optional] + +### Return type + +[**ListEarnFixedTermLendsResponse**](ListEarnFixedTermLendsResponse.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** | Subscription order 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_earn_fixed_term_lend** +> CreateEarnFixedTermLendResponse create_earn_fixed_term_lend(fixed_term_lend_request=fixed_term_lend_request) + +Subscription + +Subscribe to a fixed-term earn product by specifying the product ID and subscription amount. Optionally enable auto-renewal and apply an interest rate boost coupon + +### 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.EarnApi(api_client) +fixed_term_lend_request = gate_api.FixedTermLendRequest() # FixedTermLendRequest | (optional) + +try: + # Subscription + api_response = api_instance.create_earn_fixed_term_lend(fixed_term_lend_request=fixed_term_lend_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 EarnApi->create_earn_fixed_term_lend: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fixed_term_lend_request** | [**FixedTermLendRequest**](FixedTermLendRequest.md)| | [optional] + +### Return type + +[**CreateEarnFixedTermLendResponse**](CreateEarnFixedTermLendResponse.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** | Subscription 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_earn_fixed_term_pre_redeem** +> CreateEarnFixedTermPreRedeemResponse create_earn_fixed_term_pre_redeem(earn_fixed_term_pre_redeem_request=earn_fixed_term_pre_redeem_request) + +Redeem + +Early redemption of a fixed-term earn order, order ID is required + +### 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.EarnApi(api_client) +earn_fixed_term_pre_redeem_request = gate_api.EarnFixedTermPreRedeemRequest() # EarnFixedTermPreRedeemRequest | (optional) + +try: + # Redeem + api_response = api_instance.create_earn_fixed_term_pre_redeem(earn_fixed_term_pre_redeem_request=earn_fixed_term_pre_redeem_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 EarnApi->create_earn_fixed_term_pre_redeem: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **earn_fixed_term_pre_redeem_request** | [**EarnFixedTermPreRedeemRequest**](EarnFixedTermPreRedeemRequest.md)| | [optional] + +### Return type + +[**CreateEarnFixedTermPreRedeemResponse**](CreateEarnFixedTermPreRedeemResponse.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** | Redemption 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_earn_fixed_term_history** +> ListEarnFixedTermHistoryResponse list_earn_fixed_term_history(type, page, limit, product_id=product_id, order_id=order_id, asset=asset, start_at=start_at, end_at=end_at, sub_business=sub_business, business_filter=business_filter) + +Subscription history + +Query the user's fixed-term earn history records. Supports filtering by type (subscription, redemption, interest, bonus rewards) and time range + +### 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.EarnApi(api_client) +type = '1' # str | 1 for subscription, 2 for redemption, 3 for interest, 4 for bonus reward +page = 1 # int | Page number +limit = 10 # int | Page size +product_id = 56 # int | Product ID (optional) +order_id = 'order_id_example' # str | Order ID (optional) +asset = 'asset_example' # str | Currency (optional) +start_at = 56 # int | Start timestamp (optional) +end_at = 56 # int | End Timestamp (optional) +sub_business = 56 # int | Sub-business (optional) +business_filter = '[{\"business\":1, \"sub_business\": 0},{\"business\":2, \"sub_business\": 0}]' # str | Business filter conditions, JSON array format, e.g., [{\"business\":1, \"sub_business\": 0}]. business: 1 for regular, 2 for VIP (optional) + +try: + # Subscription history + api_response = api_instance.list_earn_fixed_term_history(type, page, limit, product_id=product_id, order_id=order_id, asset=asset, start_at=start_at, end_at=end_at, sub_business=sub_business, business_filter=business_filter) + 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_earn_fixed_term_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| 1 for subscription, 2 for redemption, 3 for interest, 4 for bonus reward | + **page** | **int**| Page number | + **limit** | **int**| Page size | + **product_id** | **int**| Product ID | [optional] + **order_id** | **str**| Order ID | [optional] + **asset** | **str**| Currency | [optional] + **start_at** | **int**| Start timestamp | [optional] + **end_at** | **int**| End Timestamp | [optional] + **sub_business** | **int**| Sub-business | [optional] + **business_filter** | **str**| Business filter conditions, JSON array format, e.g., [{\"business\":1, \"sub_business\": 0}]. business: 1 for regular, 2 for VIP | [optional] + +### Return type + +[**ListEarnFixedTermHistoryResponse**](ListEarnFixedTermHistoryResponse.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** | History records 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/EarnFixedTermPreRedeemRequest.md b/docs/EarnFixedTermPreRedeemRequest.md new file mode 100644 index 00000000..785811c3 --- /dev/null +++ b/docs/EarnFixedTermPreRedeemRequest.md @@ -0,0 +1,10 @@ +# EarnFixedTermPreRedeemRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | + +[[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/EarnUniApi.md b/docs/EarnUniApi.md index dc7a8ca7..0ff17ef5 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -623,7 +623,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) # **list_uni_chart** -> list[InlineResponse2004] list_uni_chart(_from, to, asset) +> list[UniChartPoint] list_uni_chart(_from, to, asset) UniLoan currency annualized trend chart @@ -675,7 +675,7 @@ Name | Type | Description | Notes ### Return type -[**list[InlineResponse2004]**](InlineResponse2004.md) +[**list[UniChartPoint]**](UniChartPoint.md) ### Authorization @@ -694,7 +694,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) # **list_uni_rate** -> list[InlineResponse2005] list_uni_rate() +> list[UniEstimatedRate] list_uni_rate() Currency estimated annualized interest rate @@ -738,7 +738,7 @@ This endpoint does not need any parameter. ### Return type -[**list[InlineResponse2005]**](InlineResponse2005.md) +[**list[UniEstimatedRate]**](UniEstimatedRate.md) ### Authorization diff --git a/docs/Eligibility.md b/docs/Eligibility.md new file mode 100644 index 00000000..ce63d165 --- /dev/null +++ b/docs/Eligibility.md @@ -0,0 +1,12 @@ +# Eligibility + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eligible** | **bool** | Whether eligible for application | +**block_reasons** | **list[str]** | List of ineligibility reason descriptions | +**block_reason_codes** | **list[str]** | List of ineligibility reason codes | + +[[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/EligibilityResponse.md b/docs/EligibilityResponse.md new file mode 100644 index 00000000..03ff7c99 --- /dev/null +++ b/docs/EligibilityResponse.md @@ -0,0 +1,13 @@ +# EligibilityResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error Code, 0 Indicates Success | +**message** | **str** | Error message description | +**data** | [**Eligibility**](Eligibility.md) | | +**timestamp** | **int** | Unix timestamp | + +[[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/EligibilityResponseAllOf.md b/docs/EligibilityResponseAllOf.md new file mode 100644 index 00000000..94946659 --- /dev/null +++ b/docs/EligibilityResponseAllOf.md @@ -0,0 +1,10 @@ +# EligibilityResponseAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Eligibility**](Eligibility.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/ErrCodeMsg.md b/docs/ErrCodeMsg.md new file mode 100644 index 00000000..6b5f2ffc --- /dev/null +++ b/docs/ErrCodeMsg.md @@ -0,0 +1,12 @@ +# ErrCodeMsg + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error code | +**message** | **str** | Error message | +**extra** | [**object**](.md) | Additional information | + +[[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/ErrorResponse.md b/docs/ErrorResponse.md new file mode 100644 index 00000000..50df3d0b --- /dev/null +++ b/docs/ErrorResponse.md @@ -0,0 +1,13 @@ +# ErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error code | +**message** | **str** | Error message | +**data** | [**object**](.md) | Empty object | +**timestamp** | **int** | Unix timestamp | + +[[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/EvaluateItem.md b/docs/EvaluateItem.md new file mode 100644 index 00000000..f89ff081 --- /dev/null +++ b/docs/EvaluateItem.md @@ -0,0 +1,16 @@ +# EvaluateItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**asset_full_name** | **str** | | +**asset_icon_url** | **str** | | +**available** | **str** | | +**available_show** | **str** | | +**evaluate_usdt** | **str** | | +**evaluate_usdt_show** | **str** | | + +[[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/EvaluateResp.md b/docs/EvaluateResp.md new file mode 100644 index 00000000..9164b642 --- /dev/null +++ b/docs/EvaluateResp.md @@ -0,0 +1,14 @@ +# EvaluateResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[EvaluateItem]**](EvaluateItem.md) | | +**total** | **int** | | +**cursor** | **str** | | +**total_available** | **str** | | +**total_available_show** | **str** | | + +[[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/ExSkillClaimRewardReq.md b/docs/ExSkillClaimRewardReq.md new file mode 100644 index 00000000..3a8be4b1 --- /dev/null +++ b/docs/ExSkillClaimRewardReq.md @@ -0,0 +1,10 @@ +# ExSkillClaimRewardReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**welfare_task_id** | **int** | Rewards Center task ID | + +[[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/InlineResponse20033.md b/docs/ExSkillClaimTaskReq.md similarity index 77% rename from docs/InlineResponse20033.md rename to docs/ExSkillClaimTaskReq.md index 1656b4f8..b7db0c82 100644 --- a/docs/InlineResponse20033.md +++ b/docs/ExSkillClaimTaskReq.md @@ -1,10 +1,9 @@ -# InlineResponse20033 +# ExSkillClaimTaskReq ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **float** | | -**text** | **str** | | +**welfare_task_id** | **int** | Rewards Center task ID | [[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/FixedTermBonusInfo.md b/docs/FixedTermBonusInfo.md new file mode 100644 index 00000000..dd32dea8 --- /dev/null +++ b/docs/FixedTermBonusInfo.md @@ -0,0 +1,29 @@ +# FixedTermBonusInfo + +Bonus reward campaign information +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Activity ID | [optional] +**product_id** | **int** | Associated product ID | [optional] +**asset** | **str** | Product currency | [optional] +**bonus_asset** | **str** | Reward currency | [optional] +**kyc_limit** | **str** | KYC level restrictions, comma-separated | [optional] +**ladder_apr** | [**list[LadderApr]**](LadderApr.md) | Tiered annual interest rate | [optional] +**total_bonus_amount** | **str** | Total reward amount | [optional] +**user_total_bonus_amount** | **str** | Maximum reward per user | [optional] +**status** | **int** | Activity status: 1 for unlisted, 2 for listed, 3 for delisted | [optional] +**start_time** | **str** | Activity start time | [optional] +**end_time** | **str** | Activity end time | [optional] +**create_time** | **str** | Created time | [optional] +**start_at** | **int** | Activity start timestamp (in seconds) | [optional] +**end_at** | **int** | Activity end timestamp (in seconds) | [optional] +**total_issued_amount** | **str** | Total rewards distributed | [optional] +**user_total_issued_amount** | **str** | Total rewards distributed to the user | [optional] +**bonus_asset_price** | **str** | Reward currency price (denominated in USDT) | [optional] +**product_asset_price** | **str** | Product currency price (denominated in USDT) | [optional] +**product_year_rate** | **str** | Product base annual 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/FixedTermCouponInfo.md b/docs/FixedTermCouponInfo.md new file mode 100644 index 00000000..5948afcd --- /dev/null +++ b/docs/FixedTermCouponInfo.md @@ -0,0 +1,27 @@ +# FixedTermCouponInfo + +Interest rate boost coupon information +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Interest rate boost coupon record ID | +**business** | **int** | Business Type | +**user_id** | **int** | User ID | +**asset** | **str** | Currency | +**order_id** | **int** | Associated order ID | +**financial_rate_id** | **int** | Interest rate boost coupon ID | +**buy_limit_low** | **str** | Minimum subscription amount for interest rate boost coupon | +**buy_limit_high** | **str** | Maximum subscription amount for interest rate boost coupon | +**rate_day** | **int** | Interest rate boost days | +**rate_ratio** | **str** | Interest rate boost percentage | +**coupon_days** | **int** | Actual interest rate boost days | +**coupon_principal** | **str** | Principal for interest rate boost calculation | +**coupon_year_rate** | **str** | Interest rate boost APR | +**coupon_interest** | **str** | Interest generated from rate boost | +**status** | **int** | Status: 1 for active, 2 for settled | +**finish_time** | **str** | Settlement time | +**create_time** | **str** | Created time | + +[[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/FixedTermHistoryRecord.md b/docs/FixedTermHistoryRecord.md new file mode 100644 index 00000000..abc08e82 --- /dev/null +++ b/docs/FixedTermHistoryRecord.md @@ -0,0 +1,26 @@ +# FixedTermHistoryRecord + +Fixed-term earn history records +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Record ID | +**order_id** | **int** | Order ID | [optional] +**user_id** | **int** | User ID | +**asset** | **str** | Currency | +**uniq_time** | **str** | Unique time identifier (date) | [optional] +**bonus_id** | **int** | Reward campaign ID | [optional] +**product_id** | **int** | Product ID | +**bonus_asset** | **str** | Reward currency | [optional] +**total_principal** | **str** | Total principal | [optional] +**amount** | **str** | Amount | [optional] +**asset_price** | **str** | Currency price | [optional] +**status** | **int** | Status | +**detail** | **str** | Detail description | [optional] +**create_time** | **str** | Created time | +**create_at** | **int** | Creation timestamp (in seconds) | +**lock_up_period** | **int** | Term | [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/FixedTermLendOrder.md b/docs/FixedTermLendOrder.md new file mode 100644 index 00000000..a45a012d --- /dev/null +++ b/docs/FixedTermLendOrder.md @@ -0,0 +1,39 @@ +# FixedTermLendOrder + +Fixed-term earn subscription order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Subscription record ID | [optional] +**business** | **int** | Business type: 1 for regular, 2 for VIP | [optional] +**order_id** | **int** | Order ID | [optional] +**user_id** | **int** | User ID | [optional] +**asset** | **str** | Currency | [optional] +**product_id** | **int** | Product ID | [optional] +**lock_up_period** | **int** | Lock-up period (in days) | [optional] +**principal** | **str** | Subscription principal | [optional] +**year_rate** | **str** | Annual interest rate | [optional] +**product_type** | **int** | Product type: 1 for regular, 2 for VIP | [optional] +**interest** | **str** | Accrued interest | [optional] +**status** | **int** | Order status: 1 for holding, 2 for redeemed, 3 for matured, 4 for settled | [optional] +**reinvest_status** | **int** | Auto-renewal status: 0 for disabled, 1 for enabled | [optional] +**redeem_account_type** | **int** | Redemption payout account type: 1 for spot account | [optional] +**origin_order** | **str** | Original order ID, linked to previous order IDs in auto-renewal scenarios | [optional] +**redeem_type** | **int** | Redemption type: 1 for early redemption, 2 for maturity redemption | [optional] +**redeem_time** | **str** | Redemption time | [optional] +**finish_time** | **str** | Expiration time | [optional] +**create_time** | **str** | Created time | [optional] +**year_rate_perent** | **str** | Annual interest rate percentage display value | [optional] +**total_year_rate_percent** | **str** | Comprehensive annualized yield percentage (including interest rate boost, rewards, etc.) | [optional] +**total_interest** | **str** | Total earnings (including interest and bonus rewards) | [optional] +**product_info** | [**FixedTermProductInfo**](FixedTermProductInfo.md) | | [optional] +**bonus_info** | [**FixedTermBonusInfo**](FixedTermBonusInfo.md) | | [optional] +**coupon_info** | [**FixedTermCouponInfo**](FixedTermCouponInfo.md) | | [optional] +**redeem_at** | **int** | Redemption timestamp (in seconds) | [optional] +**finish_at** | **int** | Expiration timestamp (in seconds) | [optional] +**create_at** | **int** | Creation timestamp (in seconds) | [optional] +**icon** | **str** | Currency icon URL | [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/FixedTermLendRequest.md b/docs/FixedTermLendRequest.md new file mode 100644 index 00000000..e1f11c65 --- /dev/null +++ b/docs/FixedTermLendRequest.md @@ -0,0 +1,17 @@ +# FixedTermLendRequest + +Subscription request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_id** | **int** | Product ID | +**amount** | **str** | Subscription amount | +**year_rate** | **str** | Annual interest rate | [optional] +**reinvest_status** | **int** | Auto-renewal status: 0 for disabled, 1 for enabled | [optional] +**redeem_account_type** | **int** | Redemption payout account type: 1 for spot account | [optional] +**financial_rate_id** | **int** | Interest rate boost coupon ID, 0 means not used | [optional] +**sub_business** | **int** | Sub-business 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/FixedTermProduct.md b/docs/FixedTermProduct.md new file mode 100644 index 00000000..c0e9446c --- /dev/null +++ b/docs/FixedTermProduct.md @@ -0,0 +1,29 @@ +# FixedTermProduct + +Fixed-term earn product +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Product ID | [optional] +**name** | **str** | Product name | [optional] +**asset** | **str** | Currency | [optional] +**lock_up_period** | **int** | Lock-up period (in days) | [optional] +**min_lend_amount** | **str** | Minimum earn amount | [optional] +**user_max_lend_amount** | **str** | User maximum earn limit | [optional] +**total_lend_amount** | **str** | Platform earn limit | [optional] +**year_rate** | **str** | Annual interest rate | [optional] +**type** | **int** | Product type: 1 for regular, 2 for VIP | [optional] +**pre_redeem** | **int** | Whether early redemption is supported: 0 for not supported, 1 for supported | [optional] +**reinvest** | **int** | Whether auto-renewal is supported: 0 for not supported, 1 for supported | [optional] +**redeem_account** | **int** | Whether fixed-to-flexible conversion is supported: 0 for not supported, 1 for supported | [optional] +**min_vip** | **int** | Minimum VIP level requirement, 0-16, 0 means no restriction | [optional] +**max_vip** | **int** | Maximum VIP level requirement (0-16), 0 means no restriction | [optional] +**status** | **int** | Product status: 1 for unlisted, 2 for listed, 3 for delisted | [optional] +**create_time** | **str** | Created time | [optional] +**user_max_lend_volume** | **str** | User maximum earn amount | [optional] +**user_total_amount** | **str** | Total amount the user has invested in earn products | [optional] +**sale_status** | **int** | Sale status: 1 for on sale, 2 for sold 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/FixedTermProductInfo.md b/docs/FixedTermProductInfo.md new file mode 100644 index 00000000..1f27b8c1 --- /dev/null +++ b/docs/FixedTermProductInfo.md @@ -0,0 +1,15 @@ +# FixedTermProductInfo + +Product configuration +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pre_redeem** | **int** | Whether early redemption is supported: 0 for not supported, 1 for supported | +**reinvest** | **int** | Whether auto-renewal is supported: 0 for not supported, 1 for supported | +**redeem_account** | **int** | Redemption payout account type | +**min_vip** | **int** | Minimum VIP level requirement, 0 means no restriction | +**max_vip** | **int** | Maximum VIP level requirement, 0 means no restriction | + +[[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/FixedTermProductSimple.md b/docs/FixedTermProductSimple.md new file mode 100644 index 00000000..48152d00 --- /dev/null +++ b/docs/FixedTermProductSimple.md @@ -0,0 +1,21 @@ +# FixedTermProductSimple + +Fixed-term earn product (compact) +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Product ID | [optional] +**asset** | **str** | Currency | [optional] +**lock_up_period** | **int** | Lock-up period (in days) | [optional] +**year_rate** | **str** | Annual interest rate | [optional] +**type** | **int** | Product type: 1 for regular, 2 for VIP | [optional] +**pre_redeem** | **int** | Whether early redemption is supported: 0 for not supported, 1 for supported | [optional] +**reinvest** | **int** | Whether auto-renewal is supported: 0 for not supported, 1 for supported | [optional] +**simple_earn** | **int** | Whether fixed-to-flexible conversion is supported: 0 for not supported, 1 for supported | [optional] +**min_vip** | **int** | Minimum VIP level requirement, 0 means no restriction | [optional] +**max_vip** | **int** | Maximum VIP level requirement, 0 means no restriction | [optional] +**sale_status** | **int** | Sale status: 1 for on sale, 2 for sold 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/FlashSwapApi.md b/docs/FlashSwapApi.md index 39fd84a9..d95159f6 100644 --- a/docs/FlashSwapApi.md +++ b/docs/FlashSwapApi.md @@ -9,6 +9,12 @@ Method | HTTP request | Description [**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} | Query single flash swap order [**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Flash swap order preview +[**create_flash_swap_multi_currency_many_to_one_order**](FlashSwapApi.md#create_flash_swap_multi_currency_many_to_one_order) | **POST** /flash_swap/multi-currency/many-to-one/order/create | Flash Swap - Multi-currency exchange - Place order (many-to-one) +[**preview_flash_swap_multi_currency_many_to_one_order**](FlashSwapApi.md#preview_flash_swap_multi_currency_many_to_one_order) | **POST** /flash_swap/multi-currency/many-to-one/order/preview | Flash Swap - Multi-currency exchange - Preview (many-to-one) +[**create_flash_swap_order_v1**](FlashSwapApi.md#create_flash_swap_order_v1) | **POST** /flash_swap/order/create | Flash Swap - Place order (one-to-one) +[**create_flash_swap_multi_currency_one_to_many_order**](FlashSwapApi.md#create_flash_swap_multi_currency_one_to_many_order) | **POST** /flash_swap/multi-currency/one-to-many/order/create | Flash Swap - Multi-currency exchange - Place order (one-to-many) +[**preview_flash_swap_multi_currency_one_to_many_order**](FlashSwapApi.md#preview_flash_swap_multi_currency_one_to_many_order) | **POST** /flash_swap/multi-currency/one-to-many/order/preview | Flash Swap - Multi-currency exchange - Preview (one-to-many) +[**preview_flash_swap_order_v1**](FlashSwapApi.md#preview_flash_swap_order_v1) | **GET** /flash_swap/order/preview | Flash Swap - Preview (one-to-one) # **list_flash_swap_currency_pair** @@ -355,3 +361,435 @@ 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_flash_swap_multi_currency_many_to_one_order** +> FlashSwapMultiCurrencyManyToOneOrderCreateResp create_flash_swap_multi_currency_many_to_one_order(flash_swap_multi_currency_many_to_one_order_create_req) + +Flash Swap - Multi-currency exchange - Place order (many-to-one) + +Create a multi-currency to single target currency exchange 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.FlashSwapApi(api_client) +flash_swap_multi_currency_many_to_one_order_create_req = gate_api.FlashSwapMultiCurrencyManyToOneOrderCreateReq() # FlashSwapMultiCurrencyManyToOneOrderCreateReq | + +try: + # Flash Swap - Multi-currency exchange - Place order (many-to-one) + api_response = api_instance.create_flash_swap_multi_currency_many_to_one_order(flash_swap_multi_currency_many_to_one_order_create_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 FlashSwapApi->create_flash_swap_multi_currency_many_to_one_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flash_swap_multi_currency_many_to_one_order_create_req** | [**FlashSwapMultiCurrencyManyToOneOrderCreateReq**](FlashSwapMultiCurrencyManyToOneOrderCreateReq.md)| | + +### Return type + +[**FlashSwapMultiCurrencyManyToOneOrderCreateResp**](FlashSwapMultiCurrencyManyToOneOrderCreateResp.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** | Successful response | - | +**400** | Invalid parameters | - | +**404** | Record does not exist | - | + +[[Back to top]](#) [[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_multi_currency_many_to_one_order** +> FlashSwapMultiCurrencyManyToOneOrderPreviewResp preview_flash_swap_multi_currency_many_to_one_order(flash_swap_multi_currency_many_to_one_order_preview_req) + +Flash Swap - Multi-currency exchange - Preview (many-to-one) + +Preview quote for multi-currency to single target currency exchange + +### 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.FlashSwapApi(api_client) +flash_swap_multi_currency_many_to_one_order_preview_req = gate_api.FlashSwapMultiCurrencyManyToOneOrderPreviewReq() # FlashSwapMultiCurrencyManyToOneOrderPreviewReq | + +try: + # Flash Swap - Multi-currency exchange - Preview (many-to-one) + api_response = api_instance.preview_flash_swap_multi_currency_many_to_one_order(flash_swap_multi_currency_many_to_one_order_preview_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 FlashSwapApi->preview_flash_swap_multi_currency_many_to_one_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flash_swap_multi_currency_many_to_one_order_preview_req** | [**FlashSwapMultiCurrencyManyToOneOrderPreviewReq**](FlashSwapMultiCurrencyManyToOneOrderPreviewReq.md)| | + +### Return type + +[**FlashSwapMultiCurrencyManyToOneOrderPreviewResp**](FlashSwapMultiCurrencyManyToOneOrderPreviewResp.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** | Successful response | - | +**400** | Invalid parameters | - | +**404** | Record does not exist | - | + +[[Back to top]](#) [[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_flash_swap_order_v1** +> FlashSwapOrderCreateResp create_flash_swap_order_v1(flash_swap_order_create_req) + +Flash Swap - Place order (one-to-one) + +Submit a one-to-one flash swap order. A quote_id must be obtained from the preview endpoint first + +### 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.FlashSwapApi(api_client) +flash_swap_order_create_req = gate_api.FlashSwapOrderCreateReq() # FlashSwapOrderCreateReq | + +try: + # Flash Swap - Place order (one-to-one) + api_response = api_instance.create_flash_swap_order_v1(flash_swap_order_create_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 FlashSwapApi->create_flash_swap_order_v1: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flash_swap_order_create_req** | [**FlashSwapOrderCreateReq**](FlashSwapOrderCreateReq.md)| | + +### Return type + +[**FlashSwapOrderCreateResp**](FlashSwapOrderCreateResp.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** | Successful response | - | +**400** | Invalid parameters | - | +**404** | Record does not exist | - | + +[[Back to top]](#) [[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_flash_swap_multi_currency_one_to_many_order** +> FlashSwapMultiCurrencyOneToManyOrderCreateResp create_flash_swap_multi_currency_one_to_many_order(flash_swap_multi_currency_one_to_many_order_create_req) + +Flash Swap - Multi-currency exchange - Place order (one-to-many) + +Create a single currency to multiple target currencies exchange 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.FlashSwapApi(api_client) +flash_swap_multi_currency_one_to_many_order_create_req = gate_api.FlashSwapMultiCurrencyOneToManyOrderCreateReq() # FlashSwapMultiCurrencyOneToManyOrderCreateReq | + +try: + # Flash Swap - Multi-currency exchange - Place order (one-to-many) + api_response = api_instance.create_flash_swap_multi_currency_one_to_many_order(flash_swap_multi_currency_one_to_many_order_create_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 FlashSwapApi->create_flash_swap_multi_currency_one_to_many_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flash_swap_multi_currency_one_to_many_order_create_req** | [**FlashSwapMultiCurrencyOneToManyOrderCreateReq**](FlashSwapMultiCurrencyOneToManyOrderCreateReq.md)| | + +### Return type + +[**FlashSwapMultiCurrencyOneToManyOrderCreateResp**](FlashSwapMultiCurrencyOneToManyOrderCreateResp.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** | Successful response | - | +**400** | Invalid parameters | - | +**404** | Record does not exist | - | + +[[Back to top]](#) [[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_multi_currency_one_to_many_order** +> FlashSwapMultiCurrencyOneToManyOrderPreviewResp preview_flash_swap_multi_currency_one_to_many_order(flash_swap_multi_currency_one_to_many_order_preview_req) + +Flash Swap - Multi-currency exchange - Preview (one-to-many) + +Preview quote for single currency to multiple target currencies exchange + +### 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.FlashSwapApi(api_client) +flash_swap_multi_currency_one_to_many_order_preview_req = gate_api.FlashSwapMultiCurrencyOneToManyOrderPreviewReq() # FlashSwapMultiCurrencyOneToManyOrderPreviewReq | + +try: + # Flash Swap - Multi-currency exchange - Preview (one-to-many) + api_response = api_instance.preview_flash_swap_multi_currency_one_to_many_order(flash_swap_multi_currency_one_to_many_order_preview_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 FlashSwapApi->preview_flash_swap_multi_currency_one_to_many_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flash_swap_multi_currency_one_to_many_order_preview_req** | [**FlashSwapMultiCurrencyOneToManyOrderPreviewReq**](FlashSwapMultiCurrencyOneToManyOrderPreviewReq.md)| | + +### Return type + +[**FlashSwapMultiCurrencyOneToManyOrderPreviewResp**](FlashSwapMultiCurrencyOneToManyOrderPreviewResp.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** | Successful response | - | +**400** | Invalid parameters | - | +**404** | Record does not exist | - | + +[[Back to top]](#) [[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_v1** +> FlashSwapOrderPreviewResp preview_flash_swap_order_v1(sell_asset, buy_asset, sell_amount=sell_amount, buy_amount=buy_amount) + +Flash Swap - Preview (one-to-one) + +Get one-to-one flash swap quote. Either sell_amount or buy_amount must be specified + +### 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.FlashSwapApi(api_client) +sell_asset = 'sell_asset_example' # str | Currency to sell +buy_asset = 'buy_asset_example' # str | Currency to buy +sell_amount = 'sell_amount_example' # str | Sell amount, either this or buy_amount must be specified (optional) +buy_amount = 'buy_amount_example' # str | Buy amount, either this or sell_amount must be specified (optional) + +try: + # Flash Swap - Preview (one-to-one) + api_response = api_instance.preview_flash_swap_order_v1(sell_asset, buy_asset, sell_amount=sell_amount, buy_amount=buy_amount) + 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->preview_flash_swap_order_v1: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sell_asset** | **str**| Currency to sell | + **buy_asset** | **str**| Currency to buy | + **sell_amount** | **str**| Sell amount, either this or buy_amount must be specified | [optional] + **buy_amount** | **str**| Buy amount, either this or sell_amount must be specified | [optional] + +### Return type + +[**FlashSwapOrderPreviewResp**](FlashSwapOrderPreviewResp.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** | Successful response | - | +**400** | Invalid parameters | - | +**404** | Record does not exist | - | + +[[Back to top]](#) [[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/FlashSwapErrorResponse.md b/docs/FlashSwapErrorResponse.md new file mode 100644 index 00000000..9e1f09bd --- /dev/null +++ b/docs/FlashSwapErrorResponse.md @@ -0,0 +1,11 @@ +# FlashSwapErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error code | +**message** | **str** | Error message | + +[[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/FlashSwapMultiCurrencyCreateParam.md b/docs/FlashSwapMultiCurrencyCreateParam.md new file mode 100644 index 00000000..03caf24a --- /dev/null +++ b/docs/FlashSwapMultiCurrencyCreateParam.md @@ -0,0 +1,13 @@ +# FlashSwapMultiCurrencyCreateParam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sell_asset** | **str** | Currency to sell | +**sell_amount** | **str** | Sell amount | +**buy_asset** | **str** | Currency to buy | +**buy_amount** | **str** | Buy 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/FlashSwapMultiCurrencyManyToOneOrderCreateReq.md b/docs/FlashSwapMultiCurrencyManyToOneOrderCreateReq.md new file mode 100644 index 00000000..b4dc2c68 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyManyToOneOrderCreateReq.md @@ -0,0 +1,10 @@ +# FlashSwapMultiCurrencyManyToOneOrderCreateReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**params** | [**list[FlashSwapMultiCurrencyCreateParam]**](FlashSwapMultiCurrencyCreateParam.md) | Multi-currency exchange parameter list | + +[[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/FlashSwapMultiCurrencyManyToOneOrderCreateResp.md b/docs/FlashSwapMultiCurrencyManyToOneOrderCreateResp.md new file mode 100644 index 00000000..3dda1c80 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyManyToOneOrderCreateResp.md @@ -0,0 +1,13 @@ +# FlashSwapMultiCurrencyManyToOneOrderCreateResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code, 0 means success | +**message** | **str** | Response message | +**data** | [**FlashSwapMultiCurrencyManyToOneOrderCreateRespData**](FlashSwapMultiCurrencyManyToOneOrderCreateRespData.md) | | +**timestamp** | **int** | Response 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/FlashSwapMultiCurrencyManyToOneOrderCreateRespData.md b/docs/FlashSwapMultiCurrencyManyToOneOrderCreateRespData.md new file mode 100644 index 00000000..fc599553 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyManyToOneOrderCreateRespData.md @@ -0,0 +1,14 @@ +# FlashSwapMultiCurrencyManyToOneOrderCreateRespData + +Business data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | [**list[FlashSwapMultiCurrencyOrder]**](FlashSwapMultiCurrencyOrder.md) | Order list | +**account_mode** | **int** | Account Mode | +**exchange_time_ms** | **int** | Exchange timestamp (in milliseconds) | +**total_acquire_amount** | **str** | Total amount received | + +[[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/FlashSwapMultiCurrencyManyToOneOrderPreviewReq.md b/docs/FlashSwapMultiCurrencyManyToOneOrderPreviewReq.md new file mode 100644 index 00000000..4b4776ba --- /dev/null +++ b/docs/FlashSwapMultiCurrencyManyToOneOrderPreviewReq.md @@ -0,0 +1,10 @@ +# FlashSwapMultiCurrencyManyToOneOrderPreviewReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**params** | [**list[FlashSwapMultiCurrencyPreviewParam]**](FlashSwapMultiCurrencyPreviewParam.md) | Multi-currency exchange preview parameter list | + +[[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/FlashSwapMultiCurrencyManyToOneOrderPreviewResp.md b/docs/FlashSwapMultiCurrencyManyToOneOrderPreviewResp.md new file mode 100644 index 00000000..89ecd055 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyManyToOneOrderPreviewResp.md @@ -0,0 +1,13 @@ +# FlashSwapMultiCurrencyManyToOneOrderPreviewResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code, 0 means success | +**message** | **str** | Response message | +**data** | [**FlashSwapMultiCurrencyManyToOneOrderPreviewRespData**](FlashSwapMultiCurrencyManyToOneOrderPreviewRespData.md) | | +**timestamp** | **int** | Response 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/FlashSwapMultiCurrencyManyToOneOrderPreviewRespData.md b/docs/FlashSwapMultiCurrencyManyToOneOrderPreviewRespData.md new file mode 100644 index 00000000..b0c43522 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyManyToOneOrderPreviewRespData.md @@ -0,0 +1,12 @@ +# FlashSwapMultiCurrencyManyToOneOrderPreviewRespData + +Business data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | [**list[FlashSwapMultiCurrencyPreviewOrder]**](FlashSwapMultiCurrencyPreviewOrder.md) | Preview order list | +**total_acquire_amount** | **str** | Total amount received | + +[[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/FlashSwapMultiCurrencyOneToManyOrderCreateReq.md b/docs/FlashSwapMultiCurrencyOneToManyOrderCreateReq.md new file mode 100644 index 00000000..24299779 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyOneToManyOrderCreateReq.md @@ -0,0 +1,10 @@ +# FlashSwapMultiCurrencyOneToManyOrderCreateReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**params** | [**list[FlashSwapMultiCurrencyCreateParam]**](FlashSwapMultiCurrencyCreateParam.md) | Multi-currency exchange parameter list | + +[[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/FlashSwapMultiCurrencyOneToManyOrderCreateResp.md b/docs/FlashSwapMultiCurrencyOneToManyOrderCreateResp.md new file mode 100644 index 00000000..3f50ddf5 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyOneToManyOrderCreateResp.md @@ -0,0 +1,13 @@ +# FlashSwapMultiCurrencyOneToManyOrderCreateResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code, 0 means success | +**message** | **str** | Response message | +**data** | [**FlashSwapMultiCurrencyOneToManyOrderCreateRespData**](FlashSwapMultiCurrencyOneToManyOrderCreateRespData.md) | | +**timestamp** | **int** | Response 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/FlashSwapMultiCurrencyOneToManyOrderCreateRespData.md b/docs/FlashSwapMultiCurrencyOneToManyOrderCreateRespData.md new file mode 100644 index 00000000..a6f1d44c --- /dev/null +++ b/docs/FlashSwapMultiCurrencyOneToManyOrderCreateRespData.md @@ -0,0 +1,15 @@ +# FlashSwapMultiCurrencyOneToManyOrderCreateRespData + +Business data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | [**list[FlashSwapMultiCurrencyOrder]**](FlashSwapMultiCurrencyOrder.md) | Order list | +**account_mode** | **int** | Account Mode | +**exchange_time_ms** | **int** | Exchange timestamp (in milliseconds) | +**total_consume_amount** | **str** | Total consumed amount | +**total_acquire_amount** | **str** | Total amount received | + +[[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/FlashSwapMultiCurrencyOneToManyOrderPreviewReq.md b/docs/FlashSwapMultiCurrencyOneToManyOrderPreviewReq.md new file mode 100644 index 00000000..c277582d --- /dev/null +++ b/docs/FlashSwapMultiCurrencyOneToManyOrderPreviewReq.md @@ -0,0 +1,10 @@ +# FlashSwapMultiCurrencyOneToManyOrderPreviewReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**params** | [**list[FlashSwapMultiCurrencyPreviewParam]**](FlashSwapMultiCurrencyPreviewParam.md) | Multi-currency exchange preview parameter list | + +[[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/FlashSwapMultiCurrencyOneToManyOrderPreviewResp.md b/docs/FlashSwapMultiCurrencyOneToManyOrderPreviewResp.md new file mode 100644 index 00000000..80f6f7a6 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyOneToManyOrderPreviewResp.md @@ -0,0 +1,13 @@ +# FlashSwapMultiCurrencyOneToManyOrderPreviewResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code, 0 means success | +**message** | **str** | Response message | +**data** | [**FlashSwapMultiCurrencyOneToManyOrderPreviewRespData**](FlashSwapMultiCurrencyOneToManyOrderPreviewRespData.md) | | +**timestamp** | **int** | Response 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/FlashSwapMultiCurrencyOneToManyOrderPreviewRespData.md b/docs/FlashSwapMultiCurrencyOneToManyOrderPreviewRespData.md new file mode 100644 index 00000000..c08a0eb8 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyOneToManyOrderPreviewRespData.md @@ -0,0 +1,13 @@ +# FlashSwapMultiCurrencyOneToManyOrderPreviewRespData + +Business data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | [**list[FlashSwapMultiCurrencyPreviewOrder]**](FlashSwapMultiCurrencyPreviewOrder.md) | Preview order list | +**total_consume_amount** | **str** | Total consumed amount | +**total_acquire_amount** | **str** | Total amount received | + +[[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/FlashSwapMultiCurrencyOrder.md b/docs/FlashSwapMultiCurrencyOrder.md new file mode 100644 index 00000000..af421133 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyOrder.md @@ -0,0 +1,28 @@ +# FlashSwapMultiCurrencyOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | [optional] +**user_id** | **int** | User ID | [optional] +**source** | **str** | Request source | [optional] +**app_id** | **str** | Application ID | [optional] +**client_req_id** | **str** | Client request ID | [optional] +**sell_asset** | **str** | Currency to sell | [optional] +**sell_amount** | **str** | Sell amount | [optional] +**sell_amount_show** | **str** | Sell amount display value | [optional] +**buy_asset** | **str** | Currency to buy | [optional] +**buy_amount** | **str** | Buy amount | [optional] +**buy_amount_show** | **str** | Buy amount display value | [optional] +**price** | **str** | Exchange price | [optional] +**status** | **int** | Order Status | [optional] +**quote_id** | **str** | Quote ID | [optional] +**failed_code** | **int** | Failure error code, 0 means success | [optional] +**failed_reason** | **str** | Failure Reason | [optional] +**create_time** | **str** | Created time | [optional] +**create_time_ms** | **int** | Creation timestamp (in milliseconds) | [optional] +**error** | [**ErrCodeMsg**](ErrCodeMsg.md) | | + +[[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/FlashSwapMultiCurrencyPreviewOrder.md b/docs/FlashSwapMultiCurrencyPreviewOrder.md new file mode 100644 index 00000000..9e06b8c4 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyPreviewOrder.md @@ -0,0 +1,22 @@ +# FlashSwapMultiCurrencyPreviewOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quote_id** | **str** | Quote ID | [optional] +**hedge_type** | **int** | Hedge type | [optional] +**sell_asset** | **str** | Currency to sell | [optional] +**sell_amount** | **str** | Sell amount | [optional] +**sell_amount_show** | **str** | Sell amount display value | [optional] +**buy_asset** | **str** | Currency to buy | [optional] +**buy_amount** | **str** | Buy amount | [optional] +**buy_amount_show** | **str** | Buy amount display value | [optional] +**price** | **str** | Exchange price | [optional] +**price_diff** | **str** | Spread percentage | [optional] +**reverse_price** | **str** | Reverse price | [optional] +**valid_timestamp** | **int** | Quote expiration timestamp (in seconds) | [optional] +**error** | [**ErrCodeMsg**](ErrCodeMsg.md) | | + +[[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/FlashSwapMultiCurrencyPreviewParam.md b/docs/FlashSwapMultiCurrencyPreviewParam.md new file mode 100644 index 00000000..a167d712 --- /dev/null +++ b/docs/FlashSwapMultiCurrencyPreviewParam.md @@ -0,0 +1,13 @@ +# FlashSwapMultiCurrencyPreviewParam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sell_asset** | **str** | Currency to sell | +**sell_amount** | **str** | Sell amount | [optional] +**buy_asset** | **str** | Currency to buy | +**buy_amount** | **str** | 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/FlashSwapOrderCreateReq.md b/docs/FlashSwapOrderCreateReq.md new file mode 100644 index 00000000..355779d0 --- /dev/null +++ b/docs/FlashSwapOrderCreateReq.md @@ -0,0 +1,17 @@ +# FlashSwapOrderCreateReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quote_id** | **str** | Quote ID returned by the preview endpoint | [optional] +**hedge_type** | **int** | Hedge type | [optional] +**sell_asset** | **str** | Currency to sell | +**sell_amount** | **str** | Sell amount | +**buy_asset** | **str** | Currency to buy | +**buy_amount** | **str** | Buy amount | +**client_req_id** | **str** | Client request ID for idempotency check | [optional] +**request_time_ms** | **int** | Request timestamp (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/FlashSwapOrderCreateResp.md b/docs/FlashSwapOrderCreateResp.md new file mode 100644 index 00000000..ebfa40d5 --- /dev/null +++ b/docs/FlashSwapOrderCreateResp.md @@ -0,0 +1,13 @@ +# FlashSwapOrderCreateResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code, 0 means success | +**message** | **str** | Response message | +**data** | [**FlashSwapOrderCreateRespData**](FlashSwapOrderCreateRespData.md) | | +**timestamp** | **int** | Response 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/FlashSwapOrderCreateRespData.md b/docs/FlashSwapOrderCreateRespData.md new file mode 100644 index 00000000..9e6c9f63 --- /dev/null +++ b/docs/FlashSwapOrderCreateRespData.md @@ -0,0 +1,29 @@ +# FlashSwapOrderCreateRespData + +Business data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | [optional] +**user_id** | **int** | User ID | [optional] +**source** | **str** | Request source | [optional] +**app_id** | **str** | Application ID | [optional] +**client_req_id** | **str** | Client request ID | [optional] +**sell_asset** | **str** | Currency to sell | [optional] +**sell_amount** | **str** | Sell amount | [optional] +**sell_amount_show** | **str** | Sell amount display value | [optional] +**buy_asset** | **str** | Currency to buy | [optional] +**buy_amount** | **str** | Buy amount | [optional] +**buy_amount_show** | **str** | Buy amount display value | [optional] +**price** | **str** | Exchange price | [optional] +**status** | **int** | Order Status | [optional] +**quote_id** | **str** | Quote ID | [optional] +**failed_code** | **int** | Failure error code, 0 means success | [optional] +**failed_reason** | **str** | Failure Reason | [optional] +**create_time** | **str** | Created time | [optional] +**create_time_ms** | **int** | Creation timestamp (in milliseconds) | [optional] +**account_mode** | **int** | Account Mode | + +[[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/FlashSwapOrderPreviewResp.md b/docs/FlashSwapOrderPreviewResp.md new file mode 100644 index 00000000..07e9e798 --- /dev/null +++ b/docs/FlashSwapOrderPreviewResp.md @@ -0,0 +1,13 @@ +# FlashSwapOrderPreviewResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code, 0 means success | +**message** | **str** | Response message | +**data** | [**FlashSwapOrderPreviewRespData**](FlashSwapOrderPreviewRespData.md) | | +**timestamp** | **int** | Response 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/FlashSwapOrderPreviewRespData.md b/docs/FlashSwapOrderPreviewRespData.md new file mode 100644 index 00000000..e248780b --- /dev/null +++ b/docs/FlashSwapOrderPreviewRespData.md @@ -0,0 +1,22 @@ +# FlashSwapOrderPreviewRespData + +Business data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quote_id** | **str** | Quote ID, valid for one minute | [optional] +**hedge_type** | **int** | Hedge type | [optional] +**sell_asset** | **str** | Currency to sell | [optional] +**sell_amount** | **str** | Sell amount | [optional] +**sell_amount_show** | **str** | Sell amount display value | [optional] +**buy_asset** | **str** | Currency to buy | [optional] +**buy_amount** | **str** | Buy amount | [optional] +**buy_amount_show** | **str** | Buy amount display value | [optional] +**price** | **str** | Exchange price | [optional] +**price_diff** | **str** | Spread percentage | [optional] +**reverse_price** | **str** | Reverse price | [optional] +**valid_timestamp** | **int** | Quote expiration 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/FuturesApi.md b/docs/FuturesApi.md index fcd8ac91..1a4bb281 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -5,6 +5,7 @@ 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 | Query all futures contracts +[**list_futures_contracts_all**](FuturesApi.md#list_futures_contracts_all) | **GET** /futures/{settle}/contracts_all | Query all contract information (including delisted) [**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 @@ -62,12 +63,17 @@ Method | HTTP request | Description [**get_trail_order_detail**](FuturesApi.md#get_trail_order_detail) | **GET** /futures/{settle}/autoorder/v1/trail/detail | Get trail order details [**update_trail_order**](FuturesApi.md#update_trail_order) | **POST** /futures/{settle}/autoorder/v1/trail/update | Update trail order [**get_trail_order_change_log**](FuturesApi.md#get_trail_order_change_log) | **GET** /futures/{settle}/autoorder/v1/trail/change_log | Get trail order user modification records +[**create_chase_order**](FuturesApi.md#create_chase_order) | **POST** /futures/{settle}/autoorder/v1/chase/create | Create a chase order +[**stop_chase_order**](FuturesApi.md#stop_chase_order) | **POST** /futures/{settle}/autoorder/v1/chase/stop | Stop a chase order +[**stop_all_chase_orders**](FuturesApi.md#stop_all_chase_orders) | **POST** /futures/{settle}/autoorder/v1/chase/stop_all | Stop chase orders in batch +[**get_chase_orders**](FuturesApi.md#get_chase_orders) | **GET** /futures/{settle}/autoorder/v1/chase/list | List chase orders +[**get_chase_order_detail**](FuturesApi.md#get_chase_order_detail) | **GET** /futures/{settle}/autoorder/v1/chase/detail | Get chase order detail [**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 -[**update_price_triggered_order**](FuturesApi.md#update_price_triggered_order) | **PUT** /futures/{settle}/price_orders/amend/{order_id} | Modify a Single Auto Order +[**update_price_triggered_order**](FuturesApi.md#update_price_triggered_order) | **PUT** /futures/{settle}/price_orders/amend | Modify a Single Auto Order # **list_futures_contracts** @@ -132,6 +138,68 @@ No authorization required [[Back to top]](#) [[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_contracts_all** +> list[Contract] list_futures_contracts_all(settle, limit=limit, offset=offset) + +Query all contract information (including delisted) + +### 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 +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 all contract information (including delisted) + api_response = api_instance.list_futures_contracts_all(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)) +except ApiException as e: + print("Exception when calling FuturesApi->list_futures_contracts_all: %s\n" % e) +``` + +### Parameters + +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 + +[**list[Contract]**](Contract.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_futures_contract** > Contract get_futures_contract(settle, contract) @@ -1350,7 +1418,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) # **get_leverage** -> FuturesLeverage get_leverage(settle, contract, pos_margin_mode=pos_margin_mode, dual_side=dual_side) +> FuturesLeverage get_leverage(settle, contract, pos_margin_mode, dual_side) Get Leverage Information for Specified Mode @@ -1382,12 +1450,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 -pos_margin_mode = 'isolated' # str | Position Margin Mode, required for split position mode, values: isolated/cross. (optional) -dual_side = 'dual_long' # str | dual_long - Long, dual_short - Short (optional) +pos_margin_mode = 'isolated' # str | Position Margin Mode, required for split position mode, values: isolated/cross. +dual_side = 'dual_long' # str | dual_long - Long, dual_short - Short try: # Get Leverage Information for Specified Mode - api_response = api_instance.get_leverage(settle, contract, pos_margin_mode=pos_margin_mode, dual_side=dual_side) + api_response = api_instance.get_leverage(settle, contract, pos_margin_mode, dual_side) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1401,8 +1469,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | - **pos_margin_mode** | **str**| Position Margin Mode, required for split position mode, values: isolated/cross. | [optional] - **dual_side** | **str**| dual_long - Long, dual_short - Short | [optional] + **pos_margin_mode** | **str**| Position Margin Mode, required for split position mode, values: isolated/cross. | + **dual_side** | **str**| dual_long - Long, dual_short - Short | ### Return type @@ -1721,7 +1789,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_dual_comp_position_cross_mode** -> list[Position] update_dual_comp_position_cross_mode(settle, inline_object) +> list[Position] update_dual_comp_position_cross_mode(settle, update_dual_comp_position_cross_mode_request) Switch Between Cross and Isolated Margin Modes Under Hedge Mode @@ -1750,11 +1818,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 -inline_object = gate_api.InlineObject() # InlineObject | +update_dual_comp_position_cross_mode_request = gate_api.UpdateDualCompPositionCrossModeRequest() # UpdateDualCompPositionCrossModeRequest | try: # Switch Between Cross and Isolated Margin Modes Under Hedge Mode - api_response = api_instance.update_dual_comp_position_cross_mode(settle, inline_object) + api_response = api_instance.update_dual_comp_position_cross_mode(settle, update_dual_comp_position_cross_mode_request) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1767,7 +1835,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | - **inline_object** | [**InlineObject**](InlineObject.md)| | + **update_dual_comp_position_cross_mode_request** | [**UpdateDualCompPositionCrossModeRequest**](UpdateDualCompPositionCrossModeRequest.md)| | ### Return type @@ -2445,7 +2513,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) # **cancel_futures_orders** -> list[FuturesOrder] cancel_futures_orders(settle, x_gate_exptime=x_gate_exptime, contract=contract, side=side, exclude_reduce_only=exclude_reduce_only, text=text) +> list[FuturesOrder] cancel_futures_orders(settle, x_gate_exptime=x_gate_exptime, contract=contract, action_mode=action_mode, side=side, exclude_reduce_only=exclude_reduce_only, text=text) Cancel all orders with 'open' status @@ -2478,13 +2546,14 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency 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) contract = 'BTC_USDT' # str | Contract Identifier; if specified, only cancel pending orders related to this contract (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) 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 orders with 'open' status - api_response = api_instance.cancel_futures_orders(settle, x_gate_exptime=x_gate_exptime, contract=contract, side=side, exclude_reduce_only=exclude_reduce_only, text=text) + api_response = api_instance.cancel_futures_orders(settle, x_gate_exptime=x_gate_exptime, contract=contract, action_mode=action_mode, 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)) @@ -2499,6 +2568,7 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **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] **contract** | **str**| Contract Identifier; if specified, only cancel pending orders related to this contract | [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] **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] @@ -2524,7 +2594,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) # **get_orders_with_time_range** -> list[FuturesOrder] get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) +> list[FuturesOrderTimerange] get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) Query futures order list by time range @@ -2582,7 +2652,7 @@ Name | Type | Description | Notes ### Return type -[**list[FuturesOrder]**](FuturesOrder.md) +[**list[FuturesOrderTimerange]**](FuturesOrderTimerange.md) ### Authorization @@ -2705,7 +2775,7 @@ 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. 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 | The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. try: # Query single order details @@ -2722,7 +2792,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. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + **order_id** | **str**| The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. | ### Return type @@ -2774,7 +2844,7 @@ 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. 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 | The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. 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) @@ -2793,7 +2863,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. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + **order_id** | **str**| The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. | **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] @@ -2818,7 +2888,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) # **cancel_futures_order** -> FuturesOrder cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) +> FuturesOrder cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime, action_mode=action_mode) Cancel single order @@ -2847,12 +2917,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. 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 | The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. 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) +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) try: # Cancel single order - api_response = api_instance.cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) + api_response = api_instance.cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime, action_mode=action_mode) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -2865,8 +2936,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. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + **order_id** | **str**| The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. | **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] + **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] ### Return type @@ -3457,7 +3529,7 @@ 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] | +request_body = ['[\"1\",\"2\",\"3\"]'] # 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: @@ -3707,7 +3779,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) # **create_trail_order** -> InlineResponse201 create_trail_order(settle, create_trail_order) +> CreateTrailOrderResponse create_trail_order(settle, create_trail_order) Create trail order @@ -3757,7 +3829,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse201**](InlineResponse201.md) +[**CreateTrailOrderResponse**](CreateTrailOrderResponse.md) ### Authorization @@ -3776,7 +3848,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) # **stop_trail_order** -> InlineResponse200 stop_trail_order(settle, stop_trail_order) +> TrailOrderResponse stop_trail_order(settle, stop_trail_order) Terminate trail order @@ -3826,7 +3898,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**TrailOrderResponse**](TrailOrderResponse.md) ### Authorization @@ -3845,7 +3917,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) # **stop_all_trail_orders** -> InlineResponse2001 stop_all_trail_orders(settle, stop_all_trail_orders) +> TrailOrderListResponse stop_all_trail_orders(settle, stop_all_trail_orders) Batch terminate trail orders @@ -3895,7 +3967,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2001**](InlineResponse2001.md) +[**TrailOrderListResponse**](TrailOrderListResponse.md) ### Authorization @@ -3914,7 +3986,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) # **get_trail_orders** -> InlineResponse2001 get_trail_orders(settle, contract=contract, is_finished=is_finished, start_at=start_at, end_at=end_at, page_num=page_num, page_size=page_size, sort_by=sort_by, hide_cancel=hide_cancel, related_position=related_position, sort_by_trigger=sort_by_trigger, reduce_only=reduce_only, side=side) +> TrailOrderListResponse get_trail_orders(settle, contract=contract, is_finished=is_finished, start_at=start_at, end_at=end_at, page_num=page_num, page_size=page_size, sort_by=sort_by, hide_cancel=hide_cancel, related_position=related_position, sort_by_trigger=sort_by_trigger, reduce_only=reduce_only, side=side) Get trail order list @@ -3986,7 +4058,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2001**](InlineResponse2001.md) +[**TrailOrderListResponse**](TrailOrderListResponse.md) ### Authorization @@ -4005,7 +4077,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) # **get_trail_order_detail** -> InlineResponse2002 get_trail_order_detail(settle, id) +> TrailOrderDetailResponse get_trail_order_detail(settle, id) Get trail order details @@ -4055,7 +4127,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2002**](InlineResponse2002.md) +[**TrailOrderDetailResponse**](TrailOrderDetailResponse.md) ### Authorization @@ -4074,7 +4146,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_trail_order** -> InlineResponse200 update_trail_order(settle, update_trail_order) +> TrailOrderResponse update_trail_order(settle, update_trail_order) Update trail order @@ -4124,7 +4196,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**TrailOrderResponse**](TrailOrderResponse.md) ### Authorization @@ -4143,7 +4215,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) # **get_trail_order_change_log** -> InlineResponse2003 get_trail_order_change_log(settle, id, page_num=page_num, page_size=page_size) +> TrailOrderChangeLogResponse get_trail_order_change_log(settle, id, page_num=page_num, page_size=page_size) Get trail order user modification records @@ -4197,7 +4269,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2003**](InlineResponse2003.md) +[**TrailOrderChangeLogResponse**](TrailOrderChangeLogResponse.md) ### Authorization @@ -4215,6 +4287,369 @@ 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_chase_order** +> CreateChaseOrderResp create_chase_order(settle, create_chase_order_req) + +Create a chase 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.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +create_chase_order_req = gate_api.CreateChaseOrderReq() # CreateChaseOrderReq | + +try: + # Create a chase order + api_response = api_instance.create_chase_order(settle, create_chase_order_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 FuturesApi->create_chase_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **create_chase_order_req** | [**CreateChaseOrderReq**](CreateChaseOrderReq.md)| | + +### Return type + +[**CreateChaseOrderResp**](CreateChaseOrderResp.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** | 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) + +# **stop_chase_order** +> StopChaseOrderResp stop_chase_order(settle, stop_chase_order_req) + +Stop a chase 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.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +stop_chase_order_req = gate_api.StopChaseOrderReq() # StopChaseOrderReq | + +try: + # Stop a chase order + api_response = api_instance.stop_chase_order(settle, stop_chase_order_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 FuturesApi->stop_chase_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **stop_chase_order_req** | [**StopChaseOrderReq**](StopChaseOrderReq.md)| | + +### Return type + +[**StopChaseOrderResp**](StopChaseOrderResp.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** | 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) + +# **stop_all_chase_orders** +> StopAllChaseOrdersResp stop_all_chase_orders(settle, stop_all_chase_orders_req) + +Stop chase orders in batch + +### 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 +stop_all_chase_orders_req = gate_api.StopAllChaseOrdersReq() # StopAllChaseOrdersReq | + +try: + # Stop chase orders in batch + api_response = api_instance.stop_all_chase_orders(settle, stop_all_chase_orders_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 FuturesApi->stop_all_chase_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **stop_all_chase_orders_req** | [**StopAllChaseOrdersReq**](StopAllChaseOrdersReq.md)| | + +### Return type + +[**StopAllChaseOrdersResp**](StopAllChaseOrdersResp.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** | 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) + +# **get_chase_orders** +> GetChaseOrdersResp get_chase_orders(settle, sort_by, contract=contract, is_finished=is_finished, start_at=start_at, end_at=end_at, page_num=page_num, page_size=page_size, hide_cancel=hide_cancel, reduce_only=reduce_only, side=side) + +List chase orders + +### 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 +sort_by = 56 # int | Sort field: 1 ORDER_SORT_CREATED_AT, 2 ORDER_SORT_FINISHED_AT; cannot be 0 +contract = 'contract_example' # str | Optional. When non-empty, must be a valid contract (validated against the market cache for the path settle); server-side converted to uppercase (optional) +is_finished = True # bool | true to query finished orders, false to query in-progress orders (optional) +start_at = 56 # int | Lower time bound for the history list, paired with end_at. Required when is_finished is true (optional) +end_at = 56 # int | Upper time bound for the history list, paired with start_at. Required when is_finished is true (optional) +page_num = 56 # int | Page number, starting from 1 (optional) +page_size = 56 # int | Page size; must be between 1 and 100 (optional) +hide_cancel = True # bool | When true, cancelled orders are hidden in the list (optional) +reduce_only = 56 # int | OptionalBool: 0 unknown, 1 true, 2 false; used to filter by reduce-only flag (optional) +side = 56 # int | Filter by long/short side: 1 long, 2 short (optional) + +try: + # List chase orders + api_response = api_instance.get_chase_orders(settle, sort_by, contract=contract, is_finished=is_finished, start_at=start_at, end_at=end_at, page_num=page_num, page_size=page_size, hide_cancel=hide_cancel, reduce_only=reduce_only, side=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 FuturesApi->get_chase_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **sort_by** | **int**| Sort field: 1 ORDER_SORT_CREATED_AT, 2 ORDER_SORT_FINISHED_AT; cannot be 0 | + **contract** | **str**| Optional. When non-empty, must be a valid contract (validated against the market cache for the path settle); server-side converted to uppercase | [optional] + **is_finished** | **bool**| true to query finished orders, false to query in-progress orders | [optional] + **start_at** | **int**| Lower time bound for the history list, paired with end_at. Required when is_finished is true | [optional] + **end_at** | **int**| Upper time bound for the history list, paired with start_at. Required when is_finished is true | [optional] + **page_num** | **int**| Page number, starting from 1 | [optional] + **page_size** | **int**| Page size; must be between 1 and 100 | [optional] + **hide_cancel** | **bool**| When true, cancelled orders are hidden in the list | [optional] + **reduce_only** | **int**| OptionalBool: 0 unknown, 1 true, 2 false; used to filter by reduce-only flag | [optional] + **side** | **int**| Filter by long/short side: 1 long, 2 short | [optional] + +### Return type + +[**GetChaseOrdersResp**](GetChaseOrdersResp.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) + +# **get_chase_order_detail** +> GetChaseOrderDetailResp get_chase_order_detail(settle, id) + +Get chase order detail + +### 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 +id = 'id_example' # str | Order ID, must be a non-zero positive integer + +try: + # Get chase order detail + api_response = api_instance.get_chase_order_detail(settle, 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_chase_order_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **id** | **str**| Order ID, must be a non-zero positive integer | + +### Return type + +[**GetChaseOrderDetailResp**](GetChaseOrderDetailResp.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_price_triggered_orders** > list[FuturesPriceTriggeredOrder] list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) @@ -4567,7 +5002,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_price_triggered_order** -> TriggerOrderResponse update_price_triggered_order(settle, order_id, futures_update_price_triggered_order) +> TriggerOrderResponse update_price_triggered_order(settle, futures_update_price_triggered_order) Modify a Single Auto Order @@ -4596,12 +5031,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 -order_id = 56 # int | ID returned when order is successfully created futures_update_price_triggered_order = gate_api.FuturesUpdatePriceTriggeredOrder() # FuturesUpdatePriceTriggeredOrder | try: # Modify a Single Auto Order - api_response = api_instance.update_price_triggered_order(settle, order_id, futures_update_price_triggered_order) + api_response = api_instance.update_price_triggered_order(settle, futures_update_price_triggered_order) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -4614,7 +5048,6 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | - **order_id** | **int**| ID returned when order is successfully created | **futures_update_price_triggered_order** | [**FuturesUpdatePriceTriggeredOrder**](FuturesUpdatePriceTriggeredOrder.md)| | ### Return type diff --git a/docs/FuturesBatchAmendOrderRequest.md b/docs/FuturesBatchAmendOrderRequest.md index 278f3b6e..e67873f7 100644 --- a/docs/FuturesBatchAmendOrderRequest.md +++ b/docs/FuturesBatchAmendOrderRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **size** | **str** | 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] +**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] [[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/FuturesDirection.md b/docs/FuturesDirection.md new file mode 100644 index 00000000..ff8eb863 --- /dev/null +++ b/docs/FuturesDirection.md @@ -0,0 +1,10 @@ +# FuturesDirection + +Direction enumeration supported by contract-based strategies. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/FuturesGridCreateParams.md b/docs/FuturesGridCreateParams.md new file mode 100644 index 00000000..9cf9e000 --- /dev/null +++ b/docs/FuturesGridCreateParams.md @@ -0,0 +1,22 @@ +# FuturesGridCreateParams + +Creation parameters for the contract grid strategy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**money** | **str** | | +**low_price** | **str** | | +**high_price** | **str** | | +**grid_num** | **int** | | +**price_type** | **int** | | +**leverage** | **str** | | +**direction** | [**FuturesDirection**](FuturesDirection.md) | | [optional] +**trigger_price** | **str** | | [optional] +**stop_profit** | **str** | | [optional] +**stop_loss** | **str** | | [optional] +**profit_sharing_ratio** | **str** | | [optional] +**is_use_base** | **bool** | | [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/FuturesGridCreateRequest.md b/docs/FuturesGridCreateRequest.md new file mode 100644 index 00000000..e7349519 --- /dev/null +++ b/docs/FuturesGridCreateRequest.md @@ -0,0 +1,13 @@ +# FuturesGridCreateRequest + +Create the request body of the contract grid strategy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_type** | **str** | | +**market** | **str** | | +**create_params** | [**FuturesGridCreateParams**](FuturesGridCreateParams.md) | | + +[[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/FuturesInitialOrder.md b/docs/FuturesInitialOrder.md index e625d9a4..ecb4d673 100644 --- a/docs/FuturesInitialOrder.md +++ b/docs/FuturesInitialOrder.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **contract** | **str** | Futures contract | **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] +**amount** | **str** | Same as `size`; used for decimal contract size. When both `size` and `amount` are provided, `amount` takes precedence. | [optional] **price** | **str** | Order price. Set to 0 to use market price | **close** | **bool** | When fully closing a position in single-position mode, close must be set to true to execute the close operation. When partially closing a position in single-position mode or in dual-position mode, close can be left unset or set to 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'] diff --git a/docs/FuturesOrder.md b/docs/FuturesOrder.md index c0ff625f..9c610dfd 100644 --- a/docs/FuturesOrder.md +++ b/docs/FuturesOrder.md @@ -32,10 +32,13 @@ Name | Type | Description | Notes **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] **pid** | **int** | Position ID | [optional] -**order_value** | **str** | order's value | [optional] -**trade_value** | **str** | trade value | [optional] **market_order_slip_ratio** | **str** | Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used | [optional] **pos_margin_mode** | **str** | Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode | [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] +**tpsl_tp_trigger_price** | **str** | Take profit price | [optional] +**tpsl_sl_trigger_price** | **str** | Stop loss price | [optional] +**tpsl_tp_bbo_type** | **str** | Take profit BBO type | [optional] +**tpsl_sl_bbo_type** | **str** | Stop loss BBO 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/FuturesOrderAmendment.md b/docs/FuturesOrderAmendment.md index 90535a3c..9bbf3eb2 100644 --- a/docs/FuturesOrderAmendment.md +++ b/docs/FuturesOrderAmendment.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **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] +**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] [[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/FuturesOrderTimerange.md b/docs/FuturesOrderTimerange.md new file mode 100644 index 00000000..565294ce --- /dev/null +++ b/docs/FuturesOrderTimerange.md @@ -0,0 +1,42 @@ +# FuturesOrderTimerange + +Futures order details +## Properties +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** | **str** | OrderUpdateTime | [optional] [readonly] +**finish_time** | **str** | 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 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** | **str** | Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. | +**iceberg** | **str** | Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. | [optional] +**price** | **str** | Required. Order Price; a price of 0 with `tif` as `ioc` represents a market order. | +**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** | **str** | 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 - clear: Contract delisting withdrawal | [optional] +**tkfr** | **str** | Taker fee | [optional] [readonly] +**mkfr** | **str** | Maker fee | [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 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] +**pid** | **int** | Position ID | [optional] +**market_order_slip_ratio** | **str** | Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used | [optional] +**pos_margin_mode** | **str** | Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode | [optional] +**tpsl_tp_trigger_price** | **str** | Take profit price | [optional] +**tpsl_sl_trigger_price** | **str** | Stop loss 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/FuturesPriceTriggeredOrder.md b/docs/FuturesPriceTriggeredOrder.md index d28e9803..be14fe88 100644 --- a/docs/FuturesPriceTriggeredOrder.md +++ b/docs/FuturesPriceTriggeredOrder.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **initial** | [**FuturesInitialOrder**](FuturesInitialOrder.md) | | **trigger** | [**FuturesPriceTrigger**](FuturesPriceTrigger.md) | | **id** | **int** | Auto order ID | [optional] [readonly] +**id_string** | **str** | String form of the auto order ID; the same order as numeric `id`, as the decimal string of `id` to avoid int64 precision loss in JavaScript and similar environments. Prefer this field to display the order ID or when a string unique identifier is needed; one-to-one with `id`. Same meaning as the field of the same name in futures price-trigger REST APIs and in `futures.orders` / `futures.autoorders` WebSocket pushes. | [optional] [readonly] **user** | **int** | User ID | [optional] [readonly] **create_time** | **float** | Created time | [optional] [readonly] **finish_time** | **float** | End time | [optional] [readonly] @@ -16,6 +17,7 @@ Name | Type | Description | Notes **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] +**pos_margin_mode** | **str** | Position margin mode: `isolated` (isolated margin) or `cross` (cross margin). Returned by the server in simple split-position mode; when writing, use only the values below. | [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/FuturesUpdatePriceTriggeredOrder.md b/docs/FuturesUpdatePriceTriggeredOrder.md index f315ed25..197e84e9 100644 --- a/docs/FuturesUpdatePriceTriggeredOrder.md +++ b/docs/FuturesUpdatePriceTriggeredOrder.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **settle** | **str** | Settlement Currency (e.g., USDT, BTC) | [optional] **order_id** | **int** | ID of the Pending Take-Profit/Stop-Loss Trigger Order | **size** | **int** | Modified Contract Quantity. Full Close: 0; Partial Close: Positive/Negative values indicate direction (consistent with the creation interface logic). | [optional] +**amount** | **str** | Same as `size`; used for decimal contract size. When both `size` and `amount` are provided, `amount` takes precedence. | [optional] **price** | **str** | Represents the modified trading price. A value of 0 indicates a market order. | [optional] **trigger_price** | **str** | Modified Trigger Price | [optional] **price_type** | **int** | Reference price type. 0 - Latest trade price, 1 - Mark price, 2 - Index price | [optional] diff --git a/docs/GateErrorResponse.md b/docs/GateErrorResponse.md new file mode 100644 index 00000000..1fc4dbed --- /dev/null +++ b/docs/GateErrorResponse.md @@ -0,0 +1,12 @@ +# GateErrorResponse + +error response body format when status code is non-2xx +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Error label | [optional] +**message** | **str** | Detailed error message | [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/GetBeginnerTaskListError.md b/docs/GetBeginnerTaskListError.md new file mode 100644 index 00000000..f6f2048b --- /dev/null +++ b/docs/GetBeginnerTaskListError.md @@ -0,0 +1,11 @@ +# GetBeginnerTaskListError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Error identifier code | [optional] +**message** | **str** | Error details | [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/GetChaseOrderDetailResp.md b/docs/GetChaseOrderDetailResp.md new file mode 100644 index 00000000..296e128a --- /dev/null +++ b/docs/GetChaseOrderDetailResp.md @@ -0,0 +1,10 @@ +# GetChaseOrderDetailResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order** | [**ChaseOrder**](ChaseOrder.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/GetChaseOrdersResp.md b/docs/GetChaseOrdersResp.md new file mode 100644 index 00000000..f7bad4f8 --- /dev/null +++ b/docs/GetChaseOrdersResp.md @@ -0,0 +1,10 @@ +# GetChaseOrdersResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | [**list[ChaseOrder]**](ChaseOrder.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/GetChatsListRequest.md b/docs/GetChatsListRequest.md index 634be3eb..a4f7049f 100644 --- a/docs/GetChatsListRequest.md +++ b/docs/GetChatsListRequest.md @@ -4,9 +4,9 @@ Get chat history request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**txid** | **int** | Order ID | -**lastreceived** | **int** | Pagination timestamp (forward) | [optional] -**firstreceived** | **int** | Pagination timestamp (backward) | [optional] +**txid** | **int** | Order ID; omit or `0` to return the latest order with chat for the user. | [optional] +**lastreceived** | **int** | Timestamp of the last received message for backward incremental fetch; omit on first load. | [optional] +**firstreceived** | **int** | Timestamp of first received message for paging backward; omit on first load. | [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/GetCompletedTransactionListRequest.md b/docs/GetCompletedTransactionListRequest.md index 9422454f..717c2f05 100644 --- a/docs/GetCompletedTransactionListRequest.md +++ b/docs/GetCompletedTransactionListRequest.md @@ -4,16 +4,16 @@ Get completed/historical transaction list request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**crypto_currency** | **str** | Cryptocurrency | +**crypto_currency** | **str** | Cryptocurrency symbol. | **fiat_currency** | **str** | Fiat currency | -**select_type** | **str** | Buy/Sell (sell=Sell, buy=Buy, others=All) | [optional] -**status** | **str** | Order Status (dispute: Disputed Order; closed: ACCEPT, BCLOSED; cancel: CANCEL, BECANCEL, SCLOSED, SCANCEL; locked: LOCKED; open: OPEN; paid: PAID; completed: CANCEL, BECANCEL, SCLOSED, SCANCEL, ACCEPT, BCLOSED) | [optional] +**select_type** | **str** | Order side filter: `buy` buy orders; `sell` sell orders; empty: all. | [optional] +**status** | **str** | Order status filter. `closed`: filled (`ACCEPT`, `BCLOSED`); `cancel`: canceled (`CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`); `locked`: locked (`LOCKED`); `open`: unpaid (`OPEN`); `paid`: paid (`PAID`); `completed`: finished or canceled (`CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`, `ACCEPT`, `BCLOSED`); Empty or omitted uses the endpoint default range. | [optional] **txid** | **int** | Order ID | [optional] **start_time** | **int** | Start timestamp, default is 00:00 89 days ago | [optional] **end_time** | **int** | End timestamp, default is 23:59:59 today | [optional] -**query_dispute** | **int** | 1: Include appeal status, 0: None | [optional] -**page** | **int** | page number | [optional] -**per_page** | **int** | Number of orders per page | [optional] +**query_dispute** | **int** | Whether to flag dispute status in the response. `1`: yes; `0`: no. | [optional] +**page** | **int** | Page number starting at 1; values below 1 are treated as 1. | [optional] +**per_page** | **int** | Orders per page; default 10, max 200. | [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/GetCounterpartyUserInfoRequest.md b/docs/GetCounterpartyUserInfoRequest.md index d5722275..b5be266e 100644 --- a/docs/GetCounterpartyUserInfoRequest.md +++ b/docs/GetCounterpartyUserInfoRequest.md @@ -4,7 +4,7 @@ Get counterparty user info request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**biz_uid** | **str** | Counterparty UID (encrypted) | +**biz_uid** | **str** | Counterparty crypto UID from order list or detail field `its_uid`. | [[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/GetMyActivityEntryResponse.md b/docs/GetMyActivityEntryResponse.md new file mode 100644 index 00000000..4ac58281 --- /dev/null +++ b/docs/GetMyActivityEntryResponse.md @@ -0,0 +1,13 @@ +# GetMyActivityEntryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response status code, 0 means success | +**message** | **str** | 响应消息,成功时为 \"success\" | +**data** | [**GetMyActivityEntryResponseData**](GetMyActivityEntryResponseData.md) | | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/GetMyActivityEntryResponseData.md b/docs/GetMyActivityEntryResponseData.md new file mode 100644 index 00000000..ea452a19 --- /dev/null +++ b/docs/GetMyActivityEntryResponseData.md @@ -0,0 +1,16 @@ +# GetMyActivityEntryResponseData + +Activity entry data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**icon_url** | **str** | Activity entry icon URL (light mode) | +**icon_url_dark** | **str** | Activity entry icon URL (dark mode) | +**source_type** | **str** | Source type, e.g., activity for campaign | +**title** | **str** | Activity entry title | +**url_type** | **str** | Redirect link type, e.g., h5 for H5 page | +**url** | **str** | Activity entry redirect URL | + +[[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/GetMyselfPaymentRequest.md b/docs/GetMyselfPaymentRequest.md index 1073dbd5..1c27a5b7 100644 --- a/docs/GetMyselfPaymentRequest.md +++ b/docs/GetMyselfPaymentRequest.md @@ -4,7 +4,7 @@ Get payment method list request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fiat** | **str** | Fiat currency | [optional] +**fiat** | **str** | Fiat currency; omit to return all available payment methods. | [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/GetPendingTransactionListRequest.md b/docs/GetPendingTransactionListRequest.md index 6c1f14dc..3aeff58d 100644 --- a/docs/GetPendingTransactionListRequest.md +++ b/docs/GetPendingTransactionListRequest.md @@ -4,11 +4,11 @@ Get pending transaction list request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**crypto_currency** | **str** | Cryptocurrency | +**crypto_currency** | **str** | Cryptocurrency symbol. | **fiat_currency** | **str** | Fiat currency | -**order_tab** | **str** | Order tab, default: pending (pending: In Progress (pending: AND status in ('OPEN','PAID', 'LOCKED', 'TEMP')); dispute: In Dispute (status in ('ACCEPT','BCLOSED', 'CANCEL', 'BECANCEL', 'SCLOSED', 'SCANCEL'))) | [optional] -**select_type** | **str** | Buy/Sell (sell=Sell, buy=Buy, others=All) | [optional] -**status** | **str** | Order Status (dispute: Disputed Order; closed: ACCEPT, BCLOSED; cancel: CANCEL, BECANCEL, SCLOSED, SCANCEL; locked: LOCKED; open: OPEN; paid: PAID; completed: CANCEL, BECANCEL, SCLOSED, SCANCEL, ACCEPT, BCLOSED) | [optional] +**order_tab** | **str** | Order tab: `pending` in progress (`OPEN`, `PAID`, `LOCKED`, `TEMP`); `dispute` in dispute; default `pending`. | [optional] +**select_type** | **str** | Order side filter: `buy` buy orders; `sell` sell orders; empty: all. | [optional] +**status** | **str** | Order status filter. `open` unpaid (`OPEN`); `paid` paid (`PAID`); `locked` locked (`LOCKED`); `dispute` in dispute; empty or omitted uses the default range for `order_tab`. | [optional] **txid** | **int** | Order ID | [optional] **start_time** | **int** | Start timestamp, default is 00:00 89 days ago | [optional] **end_time** | **int** | End timestamp, default is 23:59:59 today | [optional] diff --git a/docs/GetTransactionDetailsRequest.md b/docs/GetTransactionDetailsRequest.md index c29c2f7b..494b6179 100644 --- a/docs/GetTransactionDetailsRequest.md +++ b/docs/GetTransactionDetailsRequest.md @@ -5,7 +5,7 @@ Get transaction details request Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **txid** | **int** | Order ID | -**channel** | **str** | Empty or web3 | [optional] +**channel** | **str** | Channel tag: omit or empty for normal P2P; use `web3` for Web3 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/GetUserCouponDetailResponse.md b/docs/GetUserCouponDetailResponse.md new file mode 100644 index 00000000..6f461f9c --- /dev/null +++ b/docs/GetUserCouponDetailResponse.md @@ -0,0 +1,13 @@ +# GetUserCouponDetailResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code. `0` = success; `2002` = user not logged in; `50105` = parameter validation failed; `10001` = coupon record does not exist or does not belong to current user; `10000` = invalid parameter (e.g., task coupon missing coupon_info) | [optional] +**label** | **str** | Error identifier code. Empty string on success, machine-readable error label on error | [optional] +**message** | **str** | | [optional] +**data** | [**GetUserCouponDetailResponseData**](GetUserCouponDetailResponseData.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/GetUserCouponDetailResponseData.md b/docs/GetUserCouponDetailResponseData.md new file mode 100644 index 00000000..304103ff --- /dev/null +++ b/docs/GetUserCouponDetailResponseData.md @@ -0,0 +1,37 @@ +# GetUserCouponDetailResponseData + +Returns coupon detail object when code=0; empty object {} otherwise +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Coupon distribution record ID (coupon_send_issuing_log.id) | [optional] +**details_id** | **int** | User coupon detail table primary key (separate table per type). This field is 0 for task coupons | [optional] +**coupon_type** | **str** | Coupon type, enum values same as the `coupon_type` parameter | [optional] +**name** | **str** | Coupon display name (i18n translated) | [optional] +**amount** | **str** | Coupon denomination (formatted string with thousand separators). Meaning by type: point card = balance, interest rate boost coupon = rate percentage (e.g., '5%'), VIP trial card = VIP level number, position voucher = face value x leverage, others = face value | [optional] +**origin_amount** | **str** | Original denomination (string with trailing zeros removed). Only returned for point card type, other types do not have this field | [optional] +**currency** | **str** | Denomination unit. Point card = 'POINT', interest rate boost coupon = 'APR', VIP trial card = 'VIP', Alpha cash coupon = base currency, others = uppercase currency symbol (e.g., 'USDT'/'GT') | [optional] +**rule_new** | **str** | Coupon usage rule text (i18n translated). Only has value in the detail endpoint, fixed as empty string in the list endpoint | [optional] +**status** | **str** | Coupon status. Regular coupon: NOT_ACTIVE (pending activation), ACTIVATED (activated), TO_BE_USED (to be used), EXPIRED (expired), RECYCLED (recycled), INVALID (invalidated), USED (used), UNKNOWN (unknown), LOCKED (locked, P2P only). Task coupon: TASK_START (task not started), TASK_WAIT (task in progress), TASK_DONE (task completed, processing), TASK_EXPIRED (task not completed, expired), TASK_NOT_STARTED_EXPIRED (not started, expired), TASK_RECEIVE_SUCCESS (reward claimed successfully), TASK_RECEIVE_FAIL (reward claim failed) | [optional] +**jump_url** | [**ListUserCouponsResponseDataJumpUrl**](ListUserCouponsResponseDataJumpUrl.md) | | [optional] +**help_url** | [**ListUserCouponsResponseDataHelpUrl**](ListUserCouponsResponseDataHelpUrl.md) | | [optional] +**expire_time** | **int** | Expiration time (Unix timestamp). Some types replace this with actual expiration time after activation/use. Point card type returns 0. Rules by type: cash=not_received_expired_timest; contract_bonus=uses expired_timest after activation/use; contract_bonus_new=always uses expired_timest; position_voucher/tradfi_position_voucher=uses expire_time after use; robot_bonus=not_received_expired_timest; commission_rebate=uses use_deadline after use; crypto_loan_interest=not_using_expired_timest; copy_trading=not_using_expired_timest; alpha_voucher=not_received_expired_timest; etf_voucher=not_using_expired_timest | [optional] +**expire_time_order_by** | **int** | Sorting expiration time (from the original expiration time of the distribution record, unaffected by activation) | [optional] +**expire_second** | **int** | Seconds remaining until expiration, returns 0 if expired or point card type | [optional] +**has_usage_history** | **bool** | Whether there is a usage history. Fixed as true for point card type, determined by type for others | [optional] +**has_progress** | **bool** | Whether to display a progress bar. Only true for commission_rebate, interest_voucher, and qualifying task coupons | [optional] +**progress_config** | [**ListUserCouponsResponseDataProgressConfig**](ListUserCouponsResponseDataProgressConfig.md) | | [optional] +**activation_info** | [**object**](.md) | Type-specific activation information. Types without specific fields return empty object {}. Fields by type: interest_voucher={supported_pairs (applicable trading pairs), transaction_type}; contract_bonus_new={received_expired_hour (valid hours after activation)}; contract_bonus={check_unified_account_mode, received_expired_days (valid days after activation), abtest}; commission_rebate={market (spot/margin/futures/alpha/etf/tradfi), market_name (market display name)}; robot_bonus={designated_bots (ENABLED = designated strategies only / DISABLED = unrestricted)}; position_voucher={symbols (applicable trading pairs, empty = unrestricted), leverage, need_user_funds (0 = no user funds required / 1 = user funds required), user_funds_amount, position_bonus (original face value)}; tradfi_position_voucher={symbols, leverage, position_bonus}; etf_voucher={currency_markets (ETF market list, comma-separated), amount (original face value)} | [optional] +**is_task_coupon** | **int** | Whether it is a task coupon. `0` = regular coupon; `1` = task coupon | [optional] +**upgrade_toast** | **bool** | Whether to prompt the user to upgrade the App (true when the app version is too old to support the coupon) | [optional] +**from_task** | **bool** | [Detail endpoint only] Whether this regular coupon was obtained by completing a task (a sub-coupon automatically issued after task completion). Regular coupons may be true, task coupons are always false | [optional] +**task_title** | **str** | Task title. Task coupons have value; regular coupons return empty string (but task_title is not assigned when from_task=true) | [optional] +**task_desc** | **str** | Task description. Task coupons have value; regular coupons return empty string | [optional] +**task_start_at** | **int** | Task start timestamp (Unix). Task coupon: has value when in TASK_EXPIRED status, otherwise 0; regular coupon (from_task=true): start time of the source task | [optional] +**task_expire_at** | **int** | Task validity expiration timestamp (Unix). Task coupon: claim validity deadline (0 means unlimited); regular coupon: fixed at 0 | [optional] +**task_completed_at** | **int** | Task completion timestamp (Unix). Task coupon: task completion time (0 means not completed); regular coupon (from_task=true): completion time of the source task | [optional] +**extra** | **list[list[object]]** | [Detail endpoint only] Coupon detail attributes organized by display blocks. The frontend renders them as separate sections. Point card type always returns empty array []. Other types return a 2D array composed of blocks: block 1 = coupon name/source/status, block 2 = coupon core attributes, block 3 = time information. Each item contains: type (display type: string/timestamp/day/hour/status/btn), key (label text, i18n translated), value (string or integer, timestamp type is Unix timestamp) | [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/GetUserIdentityError.md b/docs/GetUserIdentityError.md new file mode 100644 index 00000000..5bae91e4 --- /dev/null +++ b/docs/GetUserIdentityError.md @@ -0,0 +1,11 @@ +# GetUserIdentityError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Error identifier code | [optional] +**message** | **str** | Error details | [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/Eth2RateList.md b/docs/HodlerAirdropV4ErrorResponse.md similarity index 63% rename from docs/Eth2RateList.md rename to docs/HodlerAirdropV4ErrorResponse.md index 574d27a4..0802d15e 100644 --- a/docs/Eth2RateList.md +++ b/docs/HodlerAirdropV4ErrorResponse.md @@ -1,11 +1,11 @@ -# Eth2RateList +# HodlerAirdropV4ErrorResponse +v4 interface unified error response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date_time** | **int** | Date Timestamp | [optional] -**date** | **str** | Date | [optional] -**rate** | **str** | Percentage Rate | [optional] +**label** | **str** | Error label | +**message** | **str** | Error messages (multilingual) | [[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/HodlerAirdropV4OrderRequest.md b/docs/HodlerAirdropV4OrderRequest.md new file mode 100644 index 00000000..867bbdc0 --- /dev/null +++ b/docs/HodlerAirdropV4OrderRequest.md @@ -0,0 +1,11 @@ +# HodlerAirdropV4OrderRequest + +Participation activity request body +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hodler_id** | **int** | Activity ID, required | + +[[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/HodlerAirdropV4OrderResponse.md b/docs/HodlerAirdropV4OrderResponse.md new file mode 100644 index 00000000..ecb5f3c3 --- /dev/null +++ b/docs/HodlerAirdropV4OrderResponse.md @@ -0,0 +1,11 @@ +# HodlerAirdropV4OrderResponse + +Participate in event response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interest_coin** | **list[str]** | Get the list of airdropped currencies | + +[[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/HodlerAirdropV4ProjectItem.md b/docs/HodlerAirdropV4ProjectItem.md new file mode 100644 index 00000000..ef405346 --- /dev/null +++ b/docs/HodlerAirdropV4ProjectItem.md @@ -0,0 +1,20 @@ +# HodlerAirdropV4ProjectItem + +HODLer Airdrop activity list item +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hodler_id** | **str** | Product ID | +**name** | **str** | Product Name | +**asset** | **str** | Airdrop currency | +**status** | **str** | Project status | +**total_amount** | **str** | Total airdrop amount | +**open_timest** | **str** | Event start time, format Y-m-d H:i:s, UTC | +**close_timest** | **str** | Event end time, format Y-m-d H:i:s, UTC | +**per_gt_reward_token** | **str** | The number of airdrop coins that can be obtained for each GT. When the calculation is in progress, an empty string is returned. | [optional] +**user_count** | **str** | Number of participants | [optional] +**max_queue_amount** | **str** | Personal GT limit | [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/HodlerAirdropV4UserAirdropRecord.md b/docs/HodlerAirdropV4UserAirdropRecord.md new file mode 100644 index 00000000..b1d7310d --- /dev/null +++ b/docs/HodlerAirdropV4UserAirdropRecord.md @@ -0,0 +1,16 @@ +# HodlerAirdropV4UserAirdropRecord + +User airdrop distribution record single item +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hodler_id** | **str** | Product ID | +**asset** | **str** | Airdrop currency | +**receive_amount_base** | **str** | Basic airdrop amount | [optional] +**receive_amount_ext** | **str** | Additional airdrop amount (Yubibao bonus) | [optional] +**delivery_timest** | **str** | Airdrop distribution time, format Y-m-d H:i:s, UTC; may be an empty string when not distributed | +**exchange** | **str** | Automatic exchange status, 0 has not been exchanged, 1 has been exchanged for 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/HodlerAirdropV4UserOrderRecord.md b/docs/HodlerAirdropV4UserOrderRecord.md new file mode 100644 index 00000000..3ed95081 --- /dev/null +++ b/docs/HodlerAirdropV4UserOrderRecord.md @@ -0,0 +1,16 @@ +# HodlerAirdropV4UserOrderRecord + +User participation record single item +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hodler_id** | **str** | Product ID | +**asset** | **str** | Airdrop currency | +**user_gt_avg_amount** | **str** | Effective number of GT positions (average number of GT held when participating in the event) | [optional] +**receive_amount_base** | **str** | Basic airdrop amount, it will be an empty string before the end of the activity | [optional] +**receive_amount_ext** | **str** | Additional airdrop amount (Yubibao bonus), it will be an empty string before the end of the event | [optional] +**close_timest** | **str** | Event end time, format Y-m-d H:i:s, UTC | + +[[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/InfiniteGridCreateParams.md b/docs/InfiniteGridCreateParams.md new file mode 100644 index 00000000..a1471fc9 --- /dev/null +++ b/docs/InfiniteGridCreateParams.md @@ -0,0 +1,20 @@ +# InfiniteGridCreateParams + +Infinite grid creation parameters. Aligned with the app: **`money`**, **`price_floor`**, and **`profit_per_grid`** are required; `grid_num` and `price_type` are optional (defaults applied server-side when omitted). +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**money** | **str** | | +**price_floor** | **str** | price floor | +**profit_per_grid** | **str** | Profit per square | +**grid_num** | **int** | Optional; may be omitted like in the app. | [optional] +**price_type** | **int** | Optional. `0` arithmetic grid; `1` geometric; omit for server defaults. | [optional] +**trigger_price** | **str** | | [optional] +**stop_profit** | **str** | | [optional] +**stop_loss** | **str** | | [optional] +**profit_sharing_ratio** | **str** | | [optional] +**is_use_base** | **bool** | | [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/InfiniteGridCreateRequest.md b/docs/InfiniteGridCreateRequest.md new file mode 100644 index 00000000..6da191d2 --- /dev/null +++ b/docs/InfiniteGridCreateRequest.md @@ -0,0 +1,13 @@ +# InfiniteGridCreateRequest + +Create the request body for the infinite grid policy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_type** | **str** | | +**market** | **str** | | +**create_params** | [**InfiniteGridCreateParams**](InfiniteGridCreateParams.md) | | + +[[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 index 4346a1c7..190ed649 100644 --- a/docs/InlineResponse200.md +++ b/docs/InlineResponse200.md @@ -3,7 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order** | [**TrailOrder**](TrailOrder.md) | | [optional] +**exchange_type** | **str** | Exchange | [optional] +**spot_maker_fee** | **str** | spotMakerfee rate | +**spot_taker_fee** | **str** | spotTakerfee rate | +**future_maker_fee** | **str** | contractMakerfee rate | +**future_taker_fee** | **str** | contractTakerfee rate | +**special_fee_list** | [**list[CrossexSpecialFee]**](CrossexSpecialFee.md) | | [[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/InlineResponse20010Data.md b/docs/InlineResponse20010Data.md deleted file mode 100644 index e04c6470..00000000 --- a/docs/InlineResponse20010Data.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse20010Data - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lists** | [**list[InlineResponse20010DataLists]**](InlineResponse20010DataLists.md) | Bank card list | - -[[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/InlineResponse20017DataList.md b/docs/InlineResponse20017DataList.md deleted file mode 100644 index 3022deb1..00000000 --- a/docs/InlineResponse20017DataList.md +++ /dev/null @@ -1,70 +0,0 @@ -# InlineResponse20017DataList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type_buy** | **int** | 1=Buy, 0=Sell | [optional] -**timest** | **str** | Creation time of order | [optional] -**timest_expire** | **str** | Order expiration time | [optional] -**type** | **str** | Buy/Sell order | [optional] -**trade_type** | **str** | Buy/Sell order | [optional] -**timestamp** | **int** | Order creation timestamp | [optional] -**rate** | **str** | Exchange rate | [optional] -**amount** | **str** | Size | [optional] -**total** | **str** | Total amount | [optional] -**txid** | **int** | Order ID | [optional] -**status** | **str** | Order Status | [optional] -**order_status** | **str** | Order status (database value) | [optional] -**its_realname** | **str** | Counterparty username | [optional] -**its_uid** | **str** | Counterparty UID | [optional] -**its_nick** | **str** | Counterparty nickname | [optional] -**user_note** | **str** | User note | [optional] -**show_bank** | **str** | Whether to display bank | [optional] -**bankname** | **str** | Bank name | [optional] -**bankbranch** | **str** | Bank branch name | [optional] -**seller_realname** | **str** | Seller name | [optional] -**buyer_realname** | **str** | Buyer name | [optional] -**bankid** | **str** | Bank ID | [optional] -**bank_holder_realname** | **str** | Bank cardholder name | [optional] -**show_ali** | **int** | Whether to display Alipay | [optional] -**aliname** | **str** | Alipay account name | [optional] -**show_wechat** | **int** | Whether to display WeChat | [optional] -**wename** | **str** | WeChat account name | [optional] -**is_alicode** | **int** | Whether Alipay QR code exists | [optional] -**dispute_time** | **int** | Appeal time | [optional] -**cancelable** | **int** | Whether cancellable | [optional] -**black_uid** | **str** | Blacklist UID | [optional] -**black_name** | **str** | Blacklist username | [optional] -**memo** | **str** | Blacklist note | [optional] -**is_follow** | **int** | Whether following | [optional] -**is_black** | **bool** | Whether blocked | [optional] -**currency_type** | **str** | Virtual currency | [optional] -**want_type** | **str** | Fiat currency | [optional] -**is_hedge** | **int** | Whether auto delegation | [optional] -**hide_payment** | **int** | Whether to hide payment method | [optional] -**sel_paytype** | **str** | Payment type | [optional] -**show_others** | **int** | Whether to display other payment methods | [optional] -**pay_others** | **list[str]** | Other payment methods | [optional] -**trade_tips** | **str** | Trading tip | [optional] -**appeal_unread** | **int** | Unread appeals | [optional] -**im_unread** | **int** | IM unread | [optional] -**in_dispute** | **bool** | Whether in dispute | [optional] -**reason_id** | **str** | Cancellation reason ID | [optional] -**reason_memo** | **str** | Cancellation reason note | [optional] -**cancel_time** | **str** | Cancellation time | [optional] -**seller_confirm** | **int** | Whether seller confirmed the reason | [optional] -**toast_id** | **int** | Popup ID | [optional] -**dispute_reback** | **int** | Customer service has new reply to appeal | [optional] -**score** | **str** | Rating | [optional] -**message** | **str** | Review content | [optional] -**release_coin_switch** | **int** | Coin release switch configuration | [optional] -**tier** | **int** | VIP level | [optional] -**blue_vip** | **int** | Blue V Crown Shield | [optional] -**od_time** | **int** | Countdown time | [optional] -**order_type** | **int** | Order Type | [optional] -**order_tag** | **list[str]** | Order tags | [optional] -**convert_info** | [**InlineResponse20017DataConvertInfo**](InlineResponse20017DataConvertInfo.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/InlineResponse20018Data.md b/docs/InlineResponse20018Data.md deleted file mode 100644 index 900c84a2..00000000 --- a/docs/InlineResponse20018Data.md +++ /dev/null @@ -1,81 +0,0 @@ -# InlineResponse20018Data - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**is_sell** | **int** | Whether sell order | [optional] -**txid** | **int** | Order ID | [optional] -**orderid** | **int** | Order ID | [optional] -**timest** | **int** | Order creation timestamp | [optional] -**last_pay_time** | **int** | Payment deadline | [optional] -**remain_pay_time** | **int** | Remaining payment time | [optional] -**currency_type** | **str** | Cryptocurrency type | [optional] -**want_type** | **str** | Fiat currency type | [optional] -**rate** | **str** | Price | [optional] -**amount** | **str** | Size | [optional] -**total** | **str** | Fiat amount | [optional] -**status** | **str** | Order Status | [optional] -**reason_id** | **str** | Cancellation reason ID | [optional] -**reason_desc** | **str** | Cancellation reason | [optional] -**toast_id** | **int** | Popup ID | [optional] -**cancel_time** | **str** | Cancellation time | [optional] -**seller_confirm** | **int** | Whether seller confirmed the reason | [optional] -**in_appeal** | **int** | Whether in dispute | [optional] -**dispute_time** | **int** | Appeal time limit | [optional] -**cancelable** | **int** | Whether order cancellation is allowed | [optional] -**hide_payment** | **int** | Whether to hide payment method | [optional] -**trade_tips** | **str** | Trading terms | [optional] -**show_bank** | **str** | Whether to display bank | [optional] -**bankname** | **str** | Bank name | [optional] -**bankbranch** | **str** | Bank branch name | [optional] -**bankid** | **str** | Bank ID | [optional] -**bank_holder_realname** | **str** | Bank cardholder name | [optional] -**show_ali** | **str** | Whether to display Alipay | [optional] -**aliname** | **str** | Alipay account name | [optional] -**is_alicode** | **int** | Whether Alipay QR code exists | [optional] -**show_wechat** | **str** | Whether to display WeChat | [optional] -**wename** | **str** | WeChat account name | [optional] -**show_others** | **str** | Whether to display other payment methods | [optional] -**pay_others** | **list[str]** | Other payment methods | [optional] -**sel_paytype** | **str** | Payment type | [optional] -**its_uid** | **str** | Counterparty UID | [optional] -**its_is_blue_vip** | **int** | Whether counterparty is Blue V | [optional] -**its_tier** | **int** | Counterparty VIP tier | [optional] -**its_avatar** | **str** | Counterparty avatar | [optional] -**its_nickname** | **str** | Counterparty nickname | [optional] -**its_realname** | **str** | Counterparty username | [optional] -**is_follow** | **int** | Whether following | [optional] -**is_black** | **int** | Whether blocked | [optional] -**have_traded** | **int** | Whether traded before | [optional] -**appeal_unread** | **int** | Unread appeals | [optional] -**appeal_allow_cancel** | **int** | Whether appeal cancellation is allowed | [optional] -**appeal_verdict_has_open** | **str** | Appeal result (including pending appeals) | [optional] -**im_unread** | **int** | IM unread | [optional] -**message** | **str** | Review content | [optional] -**score** | **str** | Rating | [optional] -**payment_voucher_url** | **list[str]** | Payment voucher | [optional] -**complete_number** | **int** | Counterparty transaction volume | [optional] -**complete_rate_month** | **str** | Counterparty completion rate | [optional] -**check_journal_account** | **bool** | Whether transaction record is verified | [optional] -**show_journal_account** | **bool** | Whether to display transaction records | [optional] -**is_freeze_guarantee** | **int** | Whether margin is frozen | [optional] -**usdt_left_guarantee** | **str** | Remaining USDT margin | [optional] -**guarantee_curr_type** | **str** | Margin currency type | [optional] -**timest_paid** | **int** | Payment time | [optional] -**state** | **str** | Order Status | [optional] -**release_coin_switch** | **int** | Coin release switch configuration | [optional] -**own_realname** | **str** | Username | [optional] -**confirmation_use_time_month** | **int** | Average confirmation time in last 30 days | [optional] -**is_risk_user** | **int** | Whether risk user | [optional] -**is_xt** | **int** | Whether XT order | [optional] -**order_type** | **int** | Order Type | [optional] -**symbol** | **str** | Fiat currency symbol | [optional] -**is_show_receive** | **int** | Whether to show confirm receipt during appeal | [optional] -**is_taker** | **int** | Whether regular user | [optional] -**is_online** | **int** | Merchant online status | [optional] -**show_seller_contact_info** | **bool** | Whether to display seller contact information | [optional] -**supported_pay_types** | **list[str]** | Payment methods supported by current order | [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/InlineResponse20019.md b/docs/InlineResponse20019.md deleted file mode 100644 index decec253..00000000 --- a/docs/InlineResponse20019.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse20019 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **int** | | [optional] -**message** | **str** | | [optional] -**timestamp** | **int** | | [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/InlineResponse20020.md b/docs/InlineResponse20020.md deleted file mode 100644 index abde44d4..00000000 --- a/docs/InlineResponse20020.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineResponse20020 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **float** | | [optional] -**method** | **str** | | [optional] -**code** | **int** | | [optional] -**message** | **str** | | [optional] -**data** | [**InlineResponse20020Data**](InlineResponse20020Data.md) | | [optional] -**version** | **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/InlineResponse20021.md b/docs/InlineResponse20021.md deleted file mode 100644 index 65ad441f..00000000 --- a/docs/InlineResponse20021.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineResponse20021 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **float** | | [optional] -**method** | **str** | | [optional] -**code** | **int** | | [optional] -**message** | **str** | | [optional] -**data** | [**InlineResponse20021Data**](InlineResponse20021Data.md) | | [optional] -**version** | **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/InlineResponse20021Data.md b/docs/InlineResponse20021Data.md deleted file mode 100644 index 93626060..00000000 --- a/docs/InlineResponse20021Data.md +++ /dev/null @@ -1,50 +0,0 @@ -# InlineResponse20021Data - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rate** | **str** | Price | [optional] -**type** | **str** | Buy/Sell order | [optional] -**amount** | **str** | Cryptocurrency amount | [optional] -**min_amount** | **str** | Minimum limit | [optional] -**max_amount** | **str** | Maximum limit | [optional] -**total** | **str** | Fiat amount | [optional] -**pay_ali** | **int** | Whether Alipay payment is supported | [optional] -**pay_bank** | **int** | Whether bank payment is supported | [optional] -**pay_paypal** | **int** | Whether PayPal payment is supported | [optional] -**pay_wechat** | **int** | Whether WeChat payment is supported | [optional] -**pay_type_num** | **str** | Payment method ID list | [optional] -**pay_type_json** | **str** | Payment method list | [optional] -**locked_amount** | **str** | Locked amount | [optional] -**orderid** | **int** | Order ID | [optional] -**timestamp** | **int** | Created time | [optional] -**currency_type** | **str** | Cryptocurrency type | [optional] -**want_type** | **str** | Fiat type | [optional] -**hide_rate** | **str** | Hidden price | [optional] -**trade_tips** | **str** | Trading terms | [optional] -**auto_reply** | **str** | Auto reply | [optional] -**new_hand** | **str** | Merchant-friendly order | [optional] -**rate_ref_id** | **int** | Floating price reference ID: 1=Platform reference price, 3=Spot reference price (≤0 means fixed price, >0 means floating price) | [optional] -**rate_offset** | **float** | Floating ratio (absolute value) | [optional] -**status** | **str** | Status | [optional] -**rate_fixed** | **int** | 0=Floating, 1=Fixed | [optional] -**float_trend** | **int** | 0=Upward float, 1=Downward float | [optional] -**expire_min** | **int** | Timeout (minutes) | [optional] -**tier_limit** | **int** | Tier limit | [optional] -**reg_time_limit** | **int** | Registration time limit | [optional] -**advertisers_limit** | **int** | Do not trade with advertisers, advertiser limit: 0=No limit, 1=Limit | [optional] -**verified_limit** | **int** | kyclimit | [optional] -**min_completed_limit** | **int** | Minimum limit of completed orders | [optional] -**max_completed_limit** | **int** | Maximum limit of completed orders | [optional] -**user_orders_limit** | **int** | Order count limit | [optional] -**completed_rate_limit** | **float** | 30-day completion rate limit | [optional] -**user_country_limit** | **int** | KYC nationality restriction | [optional] -**limit_country_cn** | **str** | Restricted nationality (Chinese) | [optional] -**limit_country_en** | **str** | Restricted nationality (English) | [optional] -**is_hedge** | **int** | Whether auto delegation | [optional] -**hide_payment** | **int** | Whether to hide payment method | [optional] -**fee** | **int** | 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/InlineResponse20022Data.md b/docs/InlineResponse20022Data.md deleted file mode 100644 index 2493f0ed..00000000 --- a/docs/InlineResponse20022Data.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse20022Data - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lists** | [**list[InlineResponse20022DataLists]**](InlineResponse20022DataLists.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/InlineResponse20023.md b/docs/InlineResponse20023.md deleted file mode 100644 index e4248ac2..00000000 --- a/docs/InlineResponse20023.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineResponse20023 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **float** | | [optional] -**method** | **str** | | [optional] -**code** | **int** | | [optional] -**message** | **str** | | [optional] -**data** | [**list[InlineResponse20023Data]**](InlineResponse20023Data.md) | | [optional] -**version** | **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/InlineResponse20024.md b/docs/InlineResponse20024.md deleted file mode 100644 index 436b231b..00000000 --- a/docs/InlineResponse20024.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineResponse20024 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **float** | | [optional] -**method** | **str** | | [optional] -**code** | **int** | | [optional] -**message** | **str** | | [optional] -**data** | [**InlineResponse20024Data**](InlineResponse20024Data.md) | | [optional] -**version** | **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/InlineResponse20024DataMessages.md b/docs/InlineResponse20024DataMessages.md deleted file mode 100644 index 4b7f6e5d..00000000 --- a/docs/InlineResponse20024DataMessages.md +++ /dev/null @@ -1,22 +0,0 @@ -# InlineResponse20024DataMessages - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**is_sell** | **int** | Whether seller | [optional] -**msg_type** | **int** | Message type | [optional] -**msg** | **str** | Message content | [optional] -**username** | **str** | Message sender username | [optional] -**timest** | **int** | Message timestamp | [optional] -**msg_obj** | [**InlineResponse20024DataMsgObj**](InlineResponse20024DataMsgObj.md) | | [optional] -**uid** | **str** | Message sender UID | [optional] -**type** | **int** | Message type | [optional] -**pic** | **str** | File link | [optional] -**file_key** | **str** | File key | [optional] -**file_type** | **str** | File type | [optional] -**width** | **str** | Image width | [optional] -**height** | **str** | Image height | [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/InlineResponse20024DataMsgObj.md b/docs/InlineResponse20024DataMsgObj.md deleted file mode 100644 index 8a248dd9..00000000 --- a/docs/InlineResponse20024DataMsgObj.md +++ /dev/null @@ -1,30 +0,0 @@ -# InlineResponse20024DataMsgObj - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **str** | Order status when message was sent | [optional] -**text** | **str** | Message content | [optional] -**payment_voucher** | **list[str]** | Payment voucher | [optional] -**reason_id** | **int** | Cancellation reason ID | [optional] -**toast_id** | **int** | Cancellation reason popup | [optional] -**reason_memo** | **str** | Cancellation reason title | [optional] -**cancel_time** | **int** | Cancellation time | [optional] -**seller_confirm** | **int** | Whether seller confirmed the reason | [optional] -**id** | **str** | Payment method information ID | [optional] -**account_des** | **str** | Payment method description | [optional] -**pay_type** | **str** | Payment method type | [optional] -**file** | **str** | Payment method file link | [optional] -**file_key** | **str** | Payment method file key | [optional] -**account** | **str** | Payment method name | [optional] -**memo** | **str** | Payment method note | [optional] -**code** | **str** | Payment method code | [optional] -**memo_ext** | **str** | Payment method additional note | [optional] -**trade_tips** | **str** | Payment method tip | [optional] -**real_name** | **str** | Payment method username | [optional] -**is_delete** | **int** | Whether deleted | [optional] -**pay_name** | **str** | Payment method full name | [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/InlineResponse20025.md b/docs/InlineResponse20025.md deleted file mode 100644 index 4a57186b..00000000 --- a/docs/InlineResponse20025.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineResponse20025 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **float** | | [optional] -**method** | **str** | | [optional] -**code** | **int** | | [optional] -**message** | **str** | | [optional] -**data** | [**InlineResponse20025Data**](InlineResponse20025Data.md) | | [optional] -**version** | **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/InlineResponse20025Data.md b/docs/InlineResponse20025Data.md deleted file mode 100644 index be7196a8..00000000 --- a/docs/InlineResponse20025Data.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse20025Data - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**srvtm** | **int** | Timestamp when message was successfully sent (current timestamp) | [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/InlineResponse20026.md b/docs/InlineResponse20026.md deleted file mode 100644 index 535769f8..00000000 --- a/docs/InlineResponse20026.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineResponse20026 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **float** | | [optional] -**method** | **str** | | [optional] -**code** | **int** | | [optional] -**message** | **str** | | [optional] -**data** | [**InlineResponse20026Data**](InlineResponse20026Data.md) | | [optional] -**version** | **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/InlineResponse20032.md b/docs/InlineResponse20032.md deleted file mode 100644 index 52a663b5..00000000 --- a/docs/InlineResponse20032.md +++ /dev/null @@ -1,37 +0,0 @@ -# InlineResponse20032 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **str** | User ID | -**order_id** | **str** | Order ID | -**text** | **str** | Client Order ID | -**state** | **str** | Order Status | -**symbol** | **str** | Currency pair | -**side** | **str** | direction | -**type** | **str** | type | -**attribute** | **str** | Attribute COMMON: Normal Order, LIQ: Liquidation Takeover Order, REDUCE: Liquidation Reduce Order, ADL: Auto-Reduce | -**exchange_type** | **str** | Exchange | -**business_type** | **str** | Business Type | -**qty** | **str** | Base Currency Quantity | -**quote_qty** | **str** | Quote Currency Quantity | -**price** | **str** | Price | -**time_in_force** | **str** | Time in Force Strategy | -**executed_qty** | **str** | Filled Quantity | -**executed_amount** | **str** | Filled Amount | -**executed_avg_price** | **str** | Average Filled Price | -**fee_coin** | **str** | Fee currency | -**fee** | **str** | fee | -**reduce_only** | **str** | Reduce Position Only | -**leverage** | **str** | leverage | -**reason** | **str** | Reason | -**last_executed_qty** | **str** | Latest Filled Quantity | -**last_executed_price** | **str** | Latest Filled Price | -**last_executed_amount** | **str** | Latest Filled Amount | -**position_side** | **str** | Position Direction | -**create_time** | **str** | Created time | -**update_time** | **str** | Update time | - -[[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/InlineResponse20037.md b/docs/InlineResponse20037.md deleted file mode 100644 index 68583ed4..00000000 --- a/docs/InlineResponse20037.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineResponse20037 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spot_maker_fee** | **str** | spotMakerfee rate | -**spot_taker_fee** | **str** | spotTakerfee rate | -**future_maker_fee** | **str** | contractMakerfee rate | -**future_taker_fee** | **str** | contractTakerfee rate | -**special_fee_list** | [**list[InlineResponse20037SpecialFeeList]**](InlineResponse20037SpecialFeeList.md) | | - -[[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/InlineResponse20041.md b/docs/InlineResponse20041.md deleted file mode 100644 index 051a438b..00000000 --- a/docs/InlineResponse20041.md +++ /dev/null @@ -1,35 +0,0 @@ -# InlineResponse20041 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **str** | User ID | -**order_id** | **str** | Order ID | -**text** | **str** | Client Order ID | -**state** | **str** | Order Status | -**symbol** | **str** | Currency pair | -**attribute** | **str** | Attribute COMMON: Normal Order, LIQ: Liquidation Takeover Order, REDUCE: Liquidation Reduce Order, ADL: Auto-Reduce | -**exchange_type** | **str** | Exchange | -**business_type** | **str** | Business Type | -**qty** | **str** | Base Currency Quantity | -**quote_qty** | **str** | Quote Currency Quantity | -**price** | **str** | Price | -**time_in_force** | **str** | Time in Force Strategy | -**executed_qty** | **str** | Filled Quantity | -**executed_amount** | **str** | Filled Amount | -**executed_avg_price** | **str** | Average Filled Price | -**fee_coin** | **str** | Fee currency | -**fee** | **str** | fee | -**reduce_only** | **str** | Reduce Position Only | -**leverage** | **str** | leverage | -**reason** | **str** | Reason | -**last_executed_qty** | **str** | Latest Filled Quantity | -**last_executed_price** | **str** | Latest Filled Price | -**last_executed_amount** | **str** | Latest Filled Amount | -**position_side** | **str** | Position Direction | -**create_time** | **str** | Created time | -**update_time** | **str** | Update time | - -[[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/InlineResponse2009Data.md b/docs/InlineResponse2009Data.md deleted file mode 100644 index 1b463edf..00000000 --- a/docs/InlineResponse2009Data.md +++ /dev/null @@ -1,16 +0,0 @@ -# InlineResponse2009Data - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Bank ID (required for order placement) | -**bank_account_name** | **str** | | -**bank_name** | **str** | | -**bank_country** | **str** | | -**bank_address** | **str** | | -**bank_code** | **str** | | -**branch_code** | **str** | | - -[[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/LadderApr.md b/docs/LadderApr.md new file mode 100644 index 00000000..d80a4a7d --- /dev/null +++ b/docs/LadderApr.md @@ -0,0 +1,12 @@ +# LadderApr + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apr** | **str** | Annualized interest rate | +**left** | **str** | Range lower limit | +**right** | **str** | Range upper limit | + +[[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/LaunchApi.md b/docs/LaunchApi.md new file mode 100644 index 00000000..5803f21e --- /dev/null +++ b/docs/LaunchApi.md @@ -0,0 +1,1134 @@ +# gate_api.LaunchApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_launch_pool_projects**](LaunchApi.md#list_launch_pool_projects) | **GET** /launch/project-list | Query LaunchPool project list +[**create_launch_pool_order**](LaunchApi.md#create_launch_pool_order) | **POST** /launch/create-order | Create LaunchPool staking order +[**redeem_launch_pool**](LaunchApi.md#redeem_launch_pool) | **POST** /launch/redeem | Redeem LaunchPool staked assets +[**list_launch_pool_pledge_records**](LaunchApi.md#list_launch_pool_pledge_records) | **GET** /launch/user-pledge-records | Query user pledge records +[**list_launch_pool_reward_records**](LaunchApi.md#list_launch_pool_reward_records) | **GET** /launch/get-user-reward-records | Query user reward records +[**get_hodler_airdrop_project_list**](LaunchApi.md#get_hodler_airdrop_project_list) | **GET** /launch/hodler-airdrop/project-list | Check the list of HODLer Airdrop activities +[**hodler_airdrop_order**](LaunchApi.md#hodler_airdrop_order) | **POST** /launch/hodler-airdrop/order | Participate in the HODLer Airdrop event +[**get_hodler_airdrop_user_order_records**](LaunchApi.md#get_hodler_airdrop_user_order_records) | **GET** /launch/hodler-airdrop/user-order-records | Check HODLer Airdrop participation records +[**get_hodler_airdrop_user_airdrop_records**](LaunchApi.md#get_hodler_airdrop_user_airdrop_records) | **GET** /launch/hodler-airdrop/user-airdrop-records | Query HODLer Airdrop records +[**get_candy_drop_activity_list_v4**](LaunchApi.md#get_candy_drop_activity_list_v4) | **GET** /launch/candydrop/activity-list | Query activity list +[**register_candy_drop_v4**](LaunchApi.md#register_candy_drop_v4) | **POST** /launch/candydrop/register | Sign up for events +[**get_candy_drop_activity_rules_v4**](LaunchApi.md#get_candy_drop_activity_rules_v4) | **GET** /launch/candydrop/activity-rules | Query activity rules +[**get_candy_drop_task_progress_v4**](LaunchApi.md#get_candy_drop_task_progress_v4) | **GET** /launch/candydrop/task-progress | Query task completion progress +[**get_candy_drop_participation_records_v4**](LaunchApi.md#get_candy_drop_participation_records_v4) | **GET** /launch/candydrop/participation-records | Query participation records +[**get_candy_drop_airdrop_records_v4**](LaunchApi.md#get_candy_drop_airdrop_records_v4) | **GET** /launch/candydrop/airdrop-records | Query airdrop records + + +# **list_launch_pool_projects** +> list[LaunchPoolV4Project] list_launch_pool_projects(status=status, mortgage_coin=mortgage_coin, search_coin=search_coin, limit_rule=limit_rule, sort_type=sort_type, page=page, page_size=page_size) + +Query LaunchPool project list + +Retrieve the list of available LaunchPool projects, including basic project information and reward pool configuration. This endpoint does not require user authentication. + +### 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.LaunchApi(api_client) +status = 56 # int | Filter by project status: 0 for all, 1 for ongoing, 2 for warming up, 3 for ended, 4 for ongoing and warming up (optional) +mortgage_coin = 'mortgage_coin_example' # str | Exact match by staking currency (optional) +search_coin = 'search_coin_example' # str | Fuzzy match by reward currency and name (optional) +limit_rule = 56 # int | Limit rule: 0 for regular pool, 1 for beginner pool (optional) +sort_type = 56 # int | Sort type: 1 for max APR descending, 2 for max APR ascending (optional) +page = 1 # int | Page number, default 1 (optional) (default to 1) +page_size = 10 # int | Number of items per page, default 10, maximum 30 (optional) (default to 10) + +try: + # Query LaunchPool project list + api_response = api_instance.list_launch_pool_projects(status=status, mortgage_coin=mortgage_coin, search_coin=search_coin, limit_rule=limit_rule, sort_type=sort_type, page=page, page_size=page_size) + 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 LaunchApi->list_launch_pool_projects: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **int**| Filter by project status: 0 for all, 1 for ongoing, 2 for warming up, 3 for ended, 4 for ongoing and warming up | [optional] + **mortgage_coin** | **str**| Exact match by staking currency | [optional] + **search_coin** | **str**| Fuzzy match by reward currency and name | [optional] + **limit_rule** | **int**| Limit rule: 0 for regular pool, 1 for beginner pool | [optional] + **sort_type** | **int**| Sort type: 1 for max APR descending, 2 for max APR ascending | [optional] + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **page_size** | **int**| Number of items per page, default 10, maximum 30 | [optional] [default to 10] + +### Return type + +[**list[LaunchPoolV4Project]**](LaunchPoolV4Project.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 returns project list | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[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_launch_pool_order** +> LaunchPoolV4CreateOrderResponse create_launch_pool_order(create_order_v4) + +Create LaunchPool staking order + +Create a new staking order for asset staking mining. This endpoint requires API Key signature authentication. + +### 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.LaunchApi(api_client) +create_order_v4 = gate_api.CreateOrderV4() # CreateOrderV4 | + +try: + # Create LaunchPool staking order + api_response = api_instance.create_launch_pool_order(create_order_v4) + 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 LaunchApi->create_launch_pool_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_order_v4** | [**CreateOrderV4**](CreateOrderV4.md)| | + +### Return type + +[**LaunchPoolV4CreateOrderResponse**](LaunchPoolV4CreateOrderResponse.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 created staking order | - | +**400** | Invalid request parameters | - | +**401** | User not authenticated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **redeem_launch_pool** +> RedeemLaunchPoolResponse redeem_launch_pool(redeem_v4) + +Redeem LaunchPool staked assets + +Redeem staked assets and end staking mining. This endpoint requires API Key signature authentication. + +### 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.LaunchApi(api_client) +redeem_v4 = gate_api.RedeemV4() # RedeemV4 | + +try: + # Redeem LaunchPool staked assets + api_response = api_instance.redeem_launch_pool(redeem_v4) + 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 LaunchApi->redeem_launch_pool: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **redeem_v4** | [**RedeemV4**](RedeemV4.md)| | + +### Return type + +[**RedeemLaunchPoolResponse**](RedeemLaunchPoolResponse.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 redeemed pledged assets | - | +**400** | Invalid request parameters | - | +**401** | User not authenticated | - | + +[[Back to top]](#) [[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_launch_pool_pledge_records** +> list[LaunchPoolV4PledgeRecord] list_launch_pool_pledge_records(page=page, page_size=page_size, type=type, start_time=start_time, end_time=end_time, coin=coin) + +Query user pledge records + +Query user's staking and redemption operation records. This endpoint requires user authentication. + +### 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.LaunchApi(api_client) +page = 1 # int | Page number, default 1 (optional) (default to 1) +page_size = 10 # int | Number of items per page, maximum 30 (optional) (default to 10) +type = 56 # int | Type: 1 for pledge, 2 for redemption (optional) +start_time = '2026-03-17 00:00:00' # str | Start time, format: YYYY-MM-DD HH:MM:SS (optional) +end_time = '2026-03-17 23:59:59' # str | End time, format: YYYY-MM-DD HH:MM:SS (optional) +coin = 'coin_example' # str | Collateral currency (optional) + +try: + # Query user pledge records + api_response = api_instance.list_launch_pool_pledge_records(page=page, page_size=page_size, type=type, start_time=start_time, end_time=end_time, coin=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 LaunchApi->list_launch_pool_pledge_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **page_size** | **int**| Number of items per page, maximum 30 | [optional] [default to 10] + **type** | **int**| Type: 1 for pledge, 2 for redemption | [optional] + **start_time** | **str**| Start time, format: YYYY-MM-DD HH:MM:SS | [optional] + **end_time** | **str**| End time, format: YYYY-MM-DD HH:MM:SS | [optional] + **coin** | **str**| Collateral currency | [optional] + +### Return type + +[**list[LaunchPoolV4PledgeRecord]**](LaunchPoolV4PledgeRecord.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 returns user staking records | - | +**400** | Invalid request parameters | - | +**401** | User not authenticated | - | + +[[Back to top]](#) [[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_launch_pool_reward_records** +> list[LaunchPoolV4RewardRecord] list_launch_pool_reward_records(page=page, page_size=page_size, start_time=start_time, end_time=end_time, coin=coin) + +Query user reward records + +Query the user's staking reward records. This endpoint requires user authentication. + +### 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.LaunchApi(api_client) +page = 1 # int | Page number, default 1 (optional) (default to 1) +page_size = 10 # int | Number of items per page, maximum 30 (optional) (default to 10) +start_time = 56 # int | Start timestamp (optional) +end_time = 56 # int | End Timestamp (optional) +coin = 'coin_example' # str | Reward currency (optional) + +try: + # Query user reward records + api_response = api_instance.list_launch_pool_reward_records(page=page, page_size=page_size, start_time=start_time, end_time=end_time, coin=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 LaunchApi->list_launch_pool_reward_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **page_size** | **int**| Number of items per page, maximum 30 | [optional] [default to 10] + **start_time** | **int**| Start timestamp | [optional] + **end_time** | **int**| End Timestamp | [optional] + **coin** | **str**| Reward currency | [optional] + +### Return type + +[**list[LaunchPoolV4RewardRecord]**](LaunchPoolV4RewardRecord.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 returns user reward records | - | +**400** | Invalid request parameters | - | +**401** | User not authenticated | - | + +[[Back to top]](#) [[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_hodler_airdrop_project_list** +> list[HodlerAirdropV4ProjectItem] get_hodler_airdrop_project_list(status=status, keyword=keyword, join=join, page=page, size=size) + +Check the list of HODLer Airdrop activities + +Get the HODLer Airdrop activity list, which supports filtering by status, currency/project name, and participation status. This interface does not require user login, and logged in users can obtain personal participation information. + +### 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.LaunchApi(api_client) +status = 'status_example' # str | Activity status filtering, optional values: ACTIVE (in progress + preheating), UNDERWAY (in progress), PREHEAT (preheating), FINISH (ended), return all if not passed (optional) +keyword = 'keyword_example' # str | Currency/project name keywords, fuzzy matching (optional) +join = 0 # int | Participation filter: 0 all (default), 1 only participated (optional) (default to 0) +page = 1 # int | Page number, default 1 (optional) (default to 1) +size = 10 # int | Number of items per page, default 10 (optional) (default to 10) + +try: + # Check the list of HODLer Airdrop activities + api_response = api_instance.get_hodler_airdrop_project_list(status=status, keyword=keyword, join=join, page=page, size=size) + 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 LaunchApi->get_hodler_airdrop_project_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| Activity status filtering, optional values: ACTIVE (in progress + preheating), UNDERWAY (in progress), PREHEAT (preheating), FINISH (ended), return all if not passed | [optional] + **keyword** | **str**| Currency/project name keywords, fuzzy matching | [optional] + **join** | **int**| Participation filter: 0 all (default), 1 only participated | [optional] [default to 0] + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **size** | **int**| Number of items per page, default 10 | [optional] [default to 10] + +### Return type + +[**list[HodlerAirdropV4ProjectItem]**](HodlerAirdropV4ProjectItem.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 returns activity list | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **hodler_airdrop_order** +> HodlerAirdropV4OrderResponse hodler_airdrop_order(hodler_airdrop_v4_order_request) + +Participate in the HODLer Airdrop event + +To participate in designated HODLer Airdrop activities, you need to hold GT. This interface requires user login authentication and must meet KYC requirements. It does not support sub-accounts and enterprise/institutional users. + +### 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.LaunchApi(api_client) +hodler_airdrop_v4_order_request = gate_api.HodlerAirdropV4OrderRequest() # HodlerAirdropV4OrderRequest | + +try: + # Participate in the HODLer Airdrop event + api_response = api_instance.hodler_airdrop_order(hodler_airdrop_v4_order_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 LaunchApi->hodler_airdrop_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hodler_airdrop_v4_order_request** | [**HodlerAirdropV4OrderRequest**](HodlerAirdropV4OrderRequest.md)| | + +### Return type + +[**HodlerAirdropV4OrderResponse**](HodlerAirdropV4OrderResponse.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 participated in the event | - | +**400** | Incorrect request parameters or failed business verification (insufficient KYC, sub-account restrictions, enterprise user restrictions, etc.) | - | +**401** | User is not logged in | - | + +[[Back to top]](#) [[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_hodler_airdrop_user_order_records** +> list[HodlerAirdropV4UserOrderRecord] get_hodler_airdrop_user_order_records(keyword=keyword, start_timest=start_timest, end_timest=end_timest, page=page, size=size) + +Check HODLer Airdrop participation records + +Query the user's HODLer Airdrop participation record and return the effective holdings and airdrop amount of each activity. This interface requires user login authentication. + +### 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.LaunchApi(api_client) +keyword = 'keyword_example' # str | Currency name keyword filtering (optional) +start_timest = 56 # int | Start timestamp (seconds) (optional) +end_timest = 56 # int | end timestamp (seconds) (optional) +page = 1 # int | Page number, default 1 (optional) (default to 1) +size = 10 # int | Number of items per page, default 10 (optional) (default to 10) + +try: + # Check HODLer Airdrop participation records + api_response = api_instance.get_hodler_airdrop_user_order_records(keyword=keyword, start_timest=start_timest, end_timest=end_timest, page=page, size=size) + 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 LaunchApi->get_hodler_airdrop_user_order_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **keyword** | **str**| Currency name keyword filtering | [optional] + **start_timest** | **int**| Start timestamp (seconds) | [optional] + **end_timest** | **int**| end timestamp (seconds) | [optional] + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **size** | **int**| Number of items per page, default 10 | [optional] [default to 10] + +### Return type + +[**list[HodlerAirdropV4UserOrderRecord]**](HodlerAirdropV4UserOrderRecord.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 returned the participation record list | - | +**400** | Invalid request parameters | - | +**401** | User is not logged in | - | + +[[Back to top]](#) [[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_hodler_airdrop_user_airdrop_records** +> list[HodlerAirdropV4UserAirdropRecord] get_hodler_airdrop_user_airdrop_records(keyword=keyword, start_timest=start_timest, end_timest=end_timest, page=page, size=size) + +Query HODLer Airdrop records + +Query the HODLer Airdrop airdrop distribution record that the user has obtained, including basic airdrops, additional airdrops and automatic redemption status. This interface requires user login authentication. + +### 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.LaunchApi(api_client) +keyword = 'keyword_example' # str | Currency name keyword filtering (optional) +start_timest = 56 # int | Start timestamp (seconds) (optional) +end_timest = 56 # int | end timestamp (seconds) (optional) +page = 1 # int | Page number, default 1 (optional) (default to 1) +size = 10 # int | Number of items per page, default 10 (optional) (default to 10) + +try: + # Query HODLer Airdrop records + api_response = api_instance.get_hodler_airdrop_user_airdrop_records(keyword=keyword, start_timest=start_timest, end_timest=end_timest, page=page, size=size) + 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 LaunchApi->get_hodler_airdrop_user_airdrop_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **keyword** | **str**| Currency name keyword filtering | [optional] + **start_timest** | **int**| Start timestamp (seconds) | [optional] + **end_timest** | **int**| end timestamp (seconds) | [optional] + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **size** | **int**| Number of items per page, default 10 | [optional] [default to 10] + +### Return type + +[**list[HodlerAirdropV4UserAirdropRecord]**](HodlerAirdropV4UserAirdropRecord.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 returns the airdrop record list | - | +**400** | Invalid request parameters | - | +**401** | User is not logged in | - | + +[[Back to top]](#) [[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_candy_drop_activity_list_v4** +> list[CandyDropV4ActivityCd01] get_candy_drop_activity_list_v4(status=status, rule_name=rule_name, register_status=register_status, currency=currency, limit=limit, offset=offset) + +Query activity list + +Supports multi-dimensional filtering of CandyDrop activities, and each query returns the top ten data sorted by the list. No login required. + +### 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.LaunchApi(api_client) +status = 'status_example' # str | Activity status filtering: ongoing (in progress), upcoming (about to start), ended (ended), if not passed, all will be returned (optional) +rule_name = 'rule_name_example' # str | Task type filtering: spot (spot), futures (contract), deposit (recharge), invite (invitation), trading_bot (trading robot), simple_earn (Yu Bibao), first_deposit (first deposit), alpha (Alpha), flash_swap (flash swap), tradfi (TradFi), etf (ETF) (optional) +register_status = 'register_status_example' # str | Participation status screening: registered (already participated), unregistered (not participated), if not passed, all will be returned (optional) +currency = 'currency_example' # str | Currency name filter (optional) +limit = 10 # int | Number of items returned, default 10, maximum 30 (optional) (default to 10) +offset = 0 # int | Offset, default 0 (optional) (default to 0) + +try: + # Query activity list + api_response = api_instance.get_candy_drop_activity_list_v4(status=status, rule_name=rule_name, register_status=register_status, currency=currency, 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 LaunchApi->get_candy_drop_activity_list_v4: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| Activity status filtering: ongoing (in progress), upcoming (about to start), ended (ended), if not passed, all will be returned | [optional] + **rule_name** | **str**| Task type filtering: spot (spot), futures (contract), deposit (recharge), invite (invitation), trading_bot (trading robot), simple_earn (Yu Bibao), first_deposit (first deposit), alpha (Alpha), flash_swap (flash swap), tradfi (TradFi), etf (ETF) | [optional] + **register_status** | **str**| Participation status screening: registered (already participated), unregistered (not participated), if not passed, all will be returned | [optional] + **currency** | **str**| Currency name filter | [optional] + **limit** | **int**| Number of items returned, default 10, maximum 30 | [optional] [default to 10] + **offset** | **int**| Offset, default 0 | [optional] [default to 0] + +### Return type + +[**list[CandyDropV4ActivityCd01]**](CandyDropV4ActivityCd01.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 returns the activity list array | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **register_candy_drop_v4** +> CandyDropV4RegisterRespCd02 register_candy_drop_v4(candy_drop_v4_register_req_cd02) + +Sign up for events + +Sign up for select CandyDrop events. Login is required and API Key signature authentication is required. + +### 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.LaunchApi(api_client) +candy_drop_v4_register_req_cd02 = gate_api.CandyDropV4RegisterReqCd02() # CandyDropV4RegisterReqCd02 | + +try: + # Sign up for events + api_response = api_instance.register_candy_drop_v4(candy_drop_v4_register_req_cd02) + 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 LaunchApi->register_candy_drop_v4: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **candy_drop_v4_register_req_cd02** | [**CandyDropV4RegisterReqCd02**](CandyDropV4RegisterReqCd02.md)| | + +### Return type + +[**CandyDropV4RegisterRespCd02**](CandyDropV4RegisterRespCd02.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** | Registration successful | - | +**400** | Request failed | - | +**401** | User not authenticated | - | + +[[Back to top]](#) [[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_candy_drop_activity_rules_v4** +> CandyDropV4ActivityRulesCd03 get_candy_drop_activity_rules_v4(activity_id=activity_id, currency=currency) + +Query activity rules + +Query the rules of a specific activity, including prize pool and corresponding task data. No login required. + +### 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.LaunchApi(api_client) +activity_id = 56 # int | Activity ID, choose one from currency, at least one of them must be passed (optional) +currency = 'currency_example' # str | Project/currency name, choose one from activity_id, at least one of them must be passed (optional) + +try: + # Query activity rules + api_response = api_instance.get_candy_drop_activity_rules_v4(activity_id=activity_id, 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 LaunchApi->get_candy_drop_activity_rules_v4: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **activity_id** | **int**| Activity ID, choose one from currency, at least one of them must be passed | [optional] + **currency** | **str**| Project/currency name, choose one from activity_id, at least one of them must be passed | [optional] + +### Return type + +[**CandyDropV4ActivityRulesCd03**](CandyDropV4ActivityRulesCd03.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful return to activity rules | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[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_candy_drop_task_progress_v4** +> CandyDropV4TaskProgressCd04 get_candy_drop_task_progress_v4(activity_id=activity_id, currency=currency) + +Query task completion progress + +Check the completion progress of tasks that are in progress and have been registered/participated. Login required. + +### 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.LaunchApi(api_client) +activity_id = 56 # int | Activity ID, choose one from currency, at least one of them must be passed (optional) +currency = 'currency_example' # str | Project/currency name, choose one from activity_id, at least one of them must be passed (optional) + +try: + # Query task completion progress + api_response = api_instance.get_candy_drop_task_progress_v4(activity_id=activity_id, 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 LaunchApi->get_candy_drop_task_progress_v4: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **activity_id** | **int**| Activity ID, choose one from currency, at least one of them must be passed | [optional] + **currency** | **str**| Project/currency name, choose one from activity_id, at least one of them must be passed | [optional] + +### Return type + +[**CandyDropV4TaskProgressCd04**](CandyDropV4TaskProgressCd04.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 return task progress | - | +**400** | Invalid request parameters | - | +**401** | User not authenticated | - | + +[[Back to top]](#) [[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_candy_drop_participation_records_v4** +> list[CandyDropV4ParticipationRecordCd05] get_candy_drop_participation_records_v4(currency=currency, status=status, start_time=start_time, end_time=end_time, page=page, limit=limit) + +Query participation records + +Query the user's CandyDrop participation details. Login required. + +### 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.LaunchApi(api_client) +currency = 'currency_example' # str | Currency name filter (optional) +status = 'status_example' # str | Status filtering: ongoing (in progress), awaiting_draw (to be drawn), won (already won), not_win (not won) (optional) +start_time = 56 # int | Start time (Unix timestamp seconds) (optional) +end_time = 56 # int | End time (Unix timestamp seconds) (optional) +page = 1 # int | Page number, default 1 (optional) (default to 1) +limit = 10 # int | Number of items per page, default 10, maximum 30 (optional) (default to 10) + +try: + # Query participation records + api_response = api_instance.get_candy_drop_participation_records_v4(currency=currency, status=status, start_time=start_time, end_time=end_time, 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 LaunchApi->get_candy_drop_participation_records_v4: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency name filter | [optional] + **status** | **str**| Status filtering: ongoing (in progress), awaiting_draw (to be drawn), won (already won), not_win (not won) | [optional] + **start_time** | **int**| Start time (Unix timestamp seconds) | [optional] + **end_time** | **int**| End time (Unix timestamp seconds) | [optional] + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **limit** | **int**| Number of items per page, default 10, maximum 30 | [optional] [default to 10] + +### Return type + +[**list[CandyDropV4ParticipationRecordCd05]**](CandyDropV4ParticipationRecordCd05.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 returned the participation record list | - | +**400** | Invalid request parameters | - | +**401** | User not authenticated | - | + +[[Back to top]](#) [[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_candy_drop_airdrop_records_v4** +> list[CandyDropV4AirdropRecordCd06] get_candy_drop_airdrop_records_v4(currency=currency, start_time=start_time, end_time=end_time, page=page, limit=limit) + +Query airdrop records + +Query the user's CandyDrop airdrop details. Login required. + +### 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.LaunchApi(api_client) +currency = 'currency_example' # str | Currency name filter (optional) +start_time = 56 # int | Start time (Unix timestamp seconds) (optional) +end_time = 56 # int | End time (Unix timestamp seconds) (optional) +page = 1 # int | Page number, default 1 (optional) (default to 1) +limit = 10 # int | Number of items per page, default 10, maximum 30 (optional) (default to 10) + +try: + # Query airdrop records + api_response = api_instance.get_candy_drop_airdrop_records_v4(currency=currency, start_time=start_time, end_time=end_time, 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 LaunchApi->get_candy_drop_airdrop_records_v4: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency name filter | [optional] + **start_time** | **int**| Start time (Unix timestamp seconds) | [optional] + **end_time** | **int**| End time (Unix timestamp seconds) | [optional] + **page** | **int**| Page number, default 1 | [optional] [default to 1] + **limit** | **int**| Number of items per page, default 10, maximum 30 | [optional] [default to 10] + +### Return type + +[**list[CandyDropV4AirdropRecordCd06]**](CandyDropV4AirdropRecordCd06.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 returns the airdrop record list | - | +**400** | Invalid request parameters | - | +**401** | User not authenticated | - | + +[[Back to top]](#) [[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/LaunchPoolV4CreateOrderResponse.md b/docs/LaunchPoolV4CreateOrderResponse.md new file mode 100644 index 00000000..3b00b290 --- /dev/null +++ b/docs/LaunchPoolV4CreateOrderResponse.md @@ -0,0 +1,10 @@ +# LaunchPoolV4CreateOrderResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**flow_id** | **int** | Order ID | + +[[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/LaunchPoolV4ErrorResponse.md b/docs/LaunchPoolV4ErrorResponse.md new file mode 100644 index 00000000..50dcaf22 --- /dev/null +++ b/docs/LaunchPoolV4ErrorResponse.md @@ -0,0 +1,11 @@ +# LaunchPoolV4ErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Error label | +**message** | **str** | Error message | + +[[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/LaunchPoolV4PledgeRecord.md b/docs/LaunchPoolV4PledgeRecord.md new file mode 100644 index 00000000..148fe590 --- /dev/null +++ b/docs/LaunchPoolV4PledgeRecord.md @@ -0,0 +1,15 @@ +# LaunchPoolV4PledgeRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**create_timest** | **str** | Creation date | +**reward_coin** | **str** | Reward currency | +**coin** | **str** | Collateral currency | +**type** | **int** | Type: 1 for pledge, 2 for redemption | +**amount** | **str** | Size | +**id** | **int** | Record ID | + +[[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/LaunchPoolV4Project.md b/docs/LaunchPoolV4Project.md new file mode 100644 index 00000000..f7eaf639 --- /dev/null +++ b/docs/LaunchPoolV4Project.md @@ -0,0 +1,17 @@ +# LaunchPoolV4Project + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pid** | **int** | Product ID | +**name** | **str** | Product Name | +**total_amount** | **str** | Total rewards | +**start_timest** | **int** | Project start timestamp | +**end_timest** | **int** | Project end timestamp | +**days** | **int** | Staking period (in days) | +**project_state** | **int** | Project status: 1 for ongoing, 2 for warming up, 3 for ended | +**reward_pools** | [**list[LaunchPoolV4RewardPool]**](LaunchPoolV4RewardPool.md) | Collateral currency list | + +[[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/LaunchPoolV4RewardPool.md b/docs/LaunchPoolV4RewardPool.md new file mode 100644 index 00000000..f7f39bb2 --- /dev/null +++ b/docs/LaunchPoolV4RewardPool.md @@ -0,0 +1,16 @@ +# LaunchPoolV4RewardPool + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rid** | **int** | Reward pool ID | +**coin** | **str** | Collateral currency | +**rate_year** | **str** | Estimated APR | +**already_buy_total_amount** | **str** | Total liquid staking amount | +**personal_max_amount** | **str** | Maximum individual pledge amount | +**personal_min_amount** | **str** | Minimum individual pledge amount | +**transaction_config** | [**list[TransactionConfig]**](TransactionConfig.md) | Participation requirements | [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/LaunchPoolV4RewardRecord.md b/docs/LaunchPoolV4RewardRecord.md new file mode 100644 index 00000000..851238a2 --- /dev/null +++ b/docs/LaunchPoolV4RewardRecord.md @@ -0,0 +1,14 @@ +# LaunchPoolV4RewardRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reward_timest** | **str** | Reward date | +**coin** | **str** | Reward currency | +**valid_mortgage_amount** | **str** | Active pledge count | +**amount_base** | **str** | Base airdrop | +**amount_ext** | **str** | Bonus airdrop | + +[[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/ListActivitiesResponse.md b/docs/ListActivitiesResponse.md new file mode 100644 index 00000000..55d7fb2e --- /dev/null +++ b/docs/ListActivitiesResponse.md @@ -0,0 +1,13 @@ +# ListActivitiesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response status code, 0 means success | +**message** | **str** | 响应消息,成功时为 \"success\" | +**data** | [**ListActivitiesResponseData**](ListActivitiesResponseData.md) | | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ListActivitiesResponseData.md b/docs/ListActivitiesResponseData.md new file mode 100644 index 00000000..ce92bc1a --- /dev/null +++ b/docs/ListActivitiesResponseData.md @@ -0,0 +1,16 @@ +# ListActivitiesResponseData + +Activity list data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[ListActivitiesResponseDataList]**](ListActivitiesResponseDataList.md) | Activity list | +**page** | **int** | Current page number | +**page_size** | **int** | Items per page | +**page_count** | **int** | Total pages | +**total_count** | **int** | Total Records | +**url** | **str** | Activity Center page link | + +[[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/ListActivitiesResponseDataList.md b/docs/ListActivitiesResponseDataList.md new file mode 100644 index 00000000..7df803fe --- /dev/null +++ b/docs/ListActivitiesResponseDataList.md @@ -0,0 +1,29 @@ +# ListActivitiesResponseDataList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Activity ID | +**type_id** | **int** | Activity type ID | +**type_name** | **str** | Activity type name | +**competition_name** | **str** | Activity name | +**start_at** | **int** | Activity start time (Unix timestamp, in seconds) | +**end_at** | **int** | Activity end time (Unix timestamp, in seconds) | +**img** | **str** | Activity image URL (light mode) | +**img_dark** | **str** | Activity image URL (dark mode) | +**url** | **str** | Activity redirect link | +**hot** | **int** | Popularity score | +**master_one_line** | **str** | Main title first line | +**master_two_line** | **str** | Main title second line | +**slave_one_line** | **str** | Subtitle first line | +**slave_two_line** | **str** | Subtitle second line | +**competition_title** | **str** | Activity title | +**top_id** | **int** | Pin ID, 0 means not pinned | +**parent_id** | **int** | Parent activity ID, 0 means no parent activity | +**new_img** | **str** | New activity image URL (light mode) | +**new_img_dark** | **str** | New activity image URL (dark mode) | +**tag** | **list[str]** | Activity tag list | + +[[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/ListActivityTypesResponse.md b/docs/ListActivityTypesResponse.md new file mode 100644 index 00000000..120e904f --- /dev/null +++ b/docs/ListActivityTypesResponse.md @@ -0,0 +1,13 @@ +# ListActivityTypesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response status code, 0 means success | +**message** | **str** | 响应消息,成功时为 \"success\" | +**data** | [**ListActivityTypesResponseData**](ListActivityTypesResponseData.md) | | +**timestamp** | **int** | Server timestamp (milliseconds) | + +[[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/ListActivityTypesResponseData.md b/docs/ListActivityTypesResponseData.md new file mode 100644 index 00000000..5acb5411 --- /dev/null +++ b/docs/ListActivityTypesResponseData.md @@ -0,0 +1,11 @@ +# ListActivityTypesResponseData + +Activity type data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[ListActivityTypesResponseDataList]**](ListActivityTypesResponseDataList.md) | Activity type list | + +[[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/ListActivityTypesResponseDataList.md b/docs/ListActivityTypesResponseDataList.md new file mode 100644 index 00000000..08af8ef9 --- /dev/null +++ b/docs/ListActivityTypesResponseDataList.md @@ -0,0 +1,11 @@ +# ListActivityTypesResponseDataList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Activity type ID | +**name** | **str** | Activity type name | + +[[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/ListEarnFixedTermHistoryResponse.md b/docs/ListEarnFixedTermHistoryResponse.md new file mode 100644 index 00000000..0787cbbf --- /dev/null +++ b/docs/ListEarnFixedTermHistoryResponse.md @@ -0,0 +1,13 @@ +# ListEarnFixedTermHistoryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Return code, 0 means success | [optional] +**message** | **str** | Response message | [optional] +**data** | [**ListEarnFixedTermHistoryResponseData**](ListEarnFixedTermHistoryResponseData.md) | | [optional] +**timestamp** | **int** | Response 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/ListEarnFixedTermHistoryResponseData.md b/docs/ListEarnFixedTermHistoryResponseData.md new file mode 100644 index 00000000..804cc636 --- /dev/null +++ b/docs/ListEarnFixedTermHistoryResponseData.md @@ -0,0 +1,11 @@ +# ListEarnFixedTermHistoryResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[FixedTermHistoryRecord]**](FixedTermHistoryRecord.md) | | [optional] +**total** | **int** | Total Records | [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/ListEarnFixedTermLendsResponse.md b/docs/ListEarnFixedTermLendsResponse.md new file mode 100644 index 00000000..5aaa458c --- /dev/null +++ b/docs/ListEarnFixedTermLendsResponse.md @@ -0,0 +1,13 @@ +# ListEarnFixedTermLendsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Return code, 0 means success | +**message** | **str** | Response message | +**data** | [**ListEarnFixedTermLendsResponseData**](ListEarnFixedTermLendsResponseData.md) | | +**timestamp** | **int** | Response timestamp (in seconds) | + +[[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/ListEarnFixedTermLendsResponseData.md b/docs/ListEarnFixedTermLendsResponseData.md new file mode 100644 index 00000000..af56e0df --- /dev/null +++ b/docs/ListEarnFixedTermLendsResponseData.md @@ -0,0 +1,12 @@ +# ListEarnFixedTermLendsResponseData + +Subscription order list data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[FixedTermLendOrder]**](FixedTermLendOrder.md) | Subscription order list | +**total** | **int** | Total Records | + +[[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/ListEarnFixedTermProductsByAssetResponse.md b/docs/ListEarnFixedTermProductsByAssetResponse.md new file mode 100644 index 00000000..198fe6df --- /dev/null +++ b/docs/ListEarnFixedTermProductsByAssetResponse.md @@ -0,0 +1,13 @@ +# ListEarnFixedTermProductsByAssetResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Return code, 0 means success | +**message** | **str** | Response message | +**data** | [**ListEarnFixedTermProductsByAssetResponseData**](ListEarnFixedTermProductsByAssetResponseData.md) | | +**timestamp** | **int** | Response timestamp (in seconds) | + +[[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/ListEarnFixedTermProductsByAssetResponseData.md b/docs/ListEarnFixedTermProductsByAssetResponseData.md new file mode 100644 index 00000000..006260d9 --- /dev/null +++ b/docs/ListEarnFixedTermProductsByAssetResponseData.md @@ -0,0 +1,11 @@ +# ListEarnFixedTermProductsByAssetResponseData + +Product list data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[FixedTermProductSimple]**](FixedTermProductSimple.md) | Product list | + +[[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/ListEarnFixedTermProductsResponse.md b/docs/ListEarnFixedTermProductsResponse.md new file mode 100644 index 00000000..416c122a --- /dev/null +++ b/docs/ListEarnFixedTermProductsResponse.md @@ -0,0 +1,13 @@ +# ListEarnFixedTermProductsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Return code, 0 means success | +**message** | **str** | Response message | +**data** | [**ListEarnFixedTermProductsResponseData**](ListEarnFixedTermProductsResponseData.md) | | +**timestamp** | **int** | Response timestamp (in seconds) | + +[[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/ListEarnFixedTermProductsResponseData.md b/docs/ListEarnFixedTermProductsResponseData.md new file mode 100644 index 00000000..5beb8d59 --- /dev/null +++ b/docs/ListEarnFixedTermProductsResponseData.md @@ -0,0 +1,12 @@ +# ListEarnFixedTermProductsResponseData + +Product list data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[FixedTermProduct]**](FixedTermProduct.md) | Product list | +**total** | **int** | Total Records | + +[[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/ListLiveReplayError.md similarity index 67% rename from docs/FindCoin.md rename to docs/ListLiveReplayError.md index 784880ab..a40bae40 100644 --- a/docs/FindCoin.md +++ b/docs/ListLiveReplayError.md @@ -1,9 +1,10 @@ -# FindCoin +# ListLiveReplayError ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cointype** | **str** | Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. | [optional] +**label** | **str** | Error identifier code | [optional] +**message** | **str** | Error details | [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/ListLiveReplayResponse.md b/docs/ListLiveReplayResponse.md new file mode 100644 index 00000000..bd6ae04b --- /dev/null +++ b/docs/ListLiveReplayResponse.md @@ -0,0 +1,14 @@ +# ListLiveReplayResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Status code, 200 = success | [optional] +**label** | **str** | Status label | [optional] +**message** | **str** | Status message | [optional] +**request_id** | **str** | Request ID | [optional] +**data** | [**ListLiveReplayResponseData**](ListLiveReplayResponseData.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/ListLiveReplayResponseData.md b/docs/ListLiveReplayResponseData.md new file mode 100644 index 00000000..f782ec57 --- /dev/null +++ b/docs/ListLiveReplayResponseData.md @@ -0,0 +1,10 @@ +# ListLiveReplayResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[ListLiveReplayResponseDataList]**](ListLiveReplayResponseDataList.md) | Live stream/replay 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/ListLiveReplayResponseDataList.md b/docs/ListLiveReplayResponseDataList.md new file mode 100644 index 00000000..630dbe00 --- /dev/null +++ b/docs/ListLiveReplayResponseDataList.md @@ -0,0 +1,12 @@ +# ListLiveReplayResponseDataList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_type** | **str** | Content type: streaming = live broadcast, video = replay video | [optional] +**live** | [**ListLiveReplayResponseDataLive**](ListLiveReplayResponseDataLive.md) | | [optional] +**video** | [**ListLiveReplayResponseDataVideo**](ListLiveReplayResponseDataVideo.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/ListLiveReplayResponseDataLive.md b/docs/ListLiveReplayResponseDataLive.md new file mode 100644 index 00000000..68ebe629 --- /dev/null +++ b/docs/ListLiveReplayResponseDataLive.md @@ -0,0 +1,22 @@ +# ListLiveReplayResponseDataLive + +Live stream information (has value when content_type=streaming) +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Live ID | [optional] +**uid** | **str** | Anchor User ID | [optional] +**chat_group_id** | **str** | Chat group ID | [optional] +**name** | **str** | Live room name | [optional] +**cover** | **str** | Cover image URL | [optional] +**started_at** | **str** | Broadcast start time (Unix timestamp string) | [optional] +**subscription_required** | **bool** | Whether subscription is required | [optional] +**hot_weight** | **int** | Popularity weight | [optional] +**live_type** | **int** | Live stream type | [optional] +**session_id** | **str** | Session ID | [optional] +**host** | [**ListLiveReplayResponseDataLiveHost**](ListLiveReplayResponseDataLiveHost.md) | | [optional] +**status** | **str** | Live stream status (e.g., streaming) | [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/ListLiveReplayResponseDataLiveHost.md b/docs/ListLiveReplayResponseDataLiveHost.md new file mode 100644 index 00000000..e566e501 --- /dev/null +++ b/docs/ListLiveReplayResponseDataLiveHost.md @@ -0,0 +1,15 @@ +# ListLiveReplayResponseDataLiveHost + +Streamer information +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Streamer ID | [optional] +**name** | **str** | Streamer nickname | [optional] +**avatar** | **str** | Streamer avatar URL | [optional] +**fans** | **int** | Follower count | [optional] +**tier** | **int** | Streamer level | [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/ListLiveReplayResponseDataVideo.md b/docs/ListLiveReplayResponseDataVideo.md new file mode 100644 index 00000000..2998222e --- /dev/null +++ b/docs/ListLiveReplayResponseDataVideo.md @@ -0,0 +1,28 @@ +# ListLiveReplayResponseDataVideo + +Replay video information (has value when content_type=video) +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Video ID | [optional] +**stream_id** | **str** | Live stream ID | [optional] +**title** | **str** | Video Title | [optional] +**avatar** | **str** | Author avatar URL | [optional] +**nick** | **str** | Author nickname | [optional] +**nick_en** | **str** | Author English nickname | [optional] +**cover** | **str** | Cover image URL | [optional] +**watched** | **int** | Viewer count | [optional] +**subscription_required** | **bool** | Whether subscription is required | [optional] +**has_subscribed** | **bool** | Whether the current user has subscribed | [optional] +**duration** | **int** | Video duration (in seconds) | [optional] +**weight** | **int** | Sort weight | [optional] +**moments_uid** | **str** | Square user ID | [optional] +**session_id** | **str** | Session ID | [optional] +**ended_at_format** | **str** | End time format | [optional] +**ended_at_type** | **int** | End time type | [optional] +**tier** | **int** | Author level | [optional] +**tag** | **str** | Tag | [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/ListSquareAiSearchError.md b/docs/ListSquareAiSearchError.md new file mode 100644 index 00000000..29e0eec1 --- /dev/null +++ b/docs/ListSquareAiSearchError.md @@ -0,0 +1,11 @@ +# ListSquareAiSearchError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Error identifier code | [optional] +**message** | **str** | Error details | [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/ListSquareAiSearchResponse.md b/docs/ListSquareAiSearchResponse.md new file mode 100644 index 00000000..9d3f4f27 --- /dev/null +++ b/docs/ListSquareAiSearchResponse.md @@ -0,0 +1,13 @@ +# ListSquareAiSearchResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Status code, 0 = success | [optional] +**label** | **str** | Error identifier code. Empty string on success, machine-readable error label on error | [optional] +**msg** | **str** | Status message | [optional] +**data** | [**ListSquareAiSearchResponseData**](ListSquareAiSearchResponseData.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/InlineResponse20020Data.md b/docs/ListSquareAiSearchResponseData.md similarity index 56% rename from docs/InlineResponse20020Data.md rename to docs/ListSquareAiSearchResponseData.md index e7bd99ba..27505c5d 100644 --- a/docs/InlineResponse20020Data.md +++ b/docs/ListSquareAiSearchResponseData.md @@ -1,9 +1,10 @@ -# InlineResponse20020Data +# ListSquareAiSearchResponseData ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **int** | Ad status after successful update | [optional] +**total** | **int** | Total number of results | [optional] +**items** | [**list[ListSquareAiSearchResponseDataItems]**](ListSquareAiSearchResponseDataItems.md) | Search result 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/ListSquareAiSearchResponseDataItems.md b/docs/ListSquareAiSearchResponseDataItems.md new file mode 100644 index 00000000..f7b38201 --- /dev/null +++ b/docs/ListSquareAiSearchResponseDataItems.md @@ -0,0 +1,16 @@ +# ListSquareAiSearchResponseDataItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Post ID | [optional] +**content** | **str** | Post content | [optional] +**image** | **str** | First image URL | [optional] +**avatar** | **str** | Author avatar | [optional] +**nickname** | **str** | Author nickname | [optional] +**like_count** | **int** | Like count | [optional] +**page_view** | **int** | View count | [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/ListUserCouponsResponse.md b/docs/ListUserCouponsResponse.md new file mode 100644 index 00000000..ce0b4529 --- /dev/null +++ b/docs/ListUserCouponsResponse.md @@ -0,0 +1,13 @@ +# ListUserCouponsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response Code. `0` = Success; `2002` = User not logged in; `50105` = Input parameter validation failed | [optional] +**label** | **str** | Error identifier code. Empty string on success, machine-readable error label on error | [optional] +**message** | **str** | | [optional] +**data** | [**ListUserCouponsResponseData**](ListUserCouponsResponseData.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/ListUserCouponsResponseData.md b/docs/ListUserCouponsResponseData.md new file mode 100644 index 00000000..75a9ae89 --- /dev/null +++ b/docs/ListUserCouponsResponseData.md @@ -0,0 +1,12 @@ +# ListUserCouponsResponseData + +Returned when code=0; empty object {} otherwise +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_page** | **bool** | Whether there is a next page. `true` means more data is available. Pass the `id` of the last record as `last_id` and `expire_time_order_by` as `expire_time` in the next request | [optional] +**list** | [**list[ListUserCouponsResponseDataList]**](ListUserCouponsResponseDataList.md) | Coupon object array, see field details below | [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/ListUserCouponsResponseDataHelpUrl.md b/docs/ListUserCouponsResponseDataHelpUrl.md new file mode 100644 index 00000000..bdd7719b --- /dev/null +++ b/docs/ListUserCouponsResponseDataHelpUrl.md @@ -0,0 +1,12 @@ +# ListUserCouponsResponseDataHelpUrl + +Help Center Link +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**web** | **str** | Web Help Link | [optional] +**app** | **str** | App Help Link | [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/ListUserCouponsResponseDataJumpUrl.md b/docs/ListUserCouponsResponseDataJumpUrl.md new file mode 100644 index 00000000..555185e2 --- /dev/null +++ b/docs/ListUserCouponsResponseDataJumpUrl.md @@ -0,0 +1,13 @@ +# ListUserCouponsResponseDataJumpUrl + +Redirect Link +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**web** | **str** | Web Redirect Link | [optional] +**app** | **str** | App Redirect Link | [optional] +**mini_app** | **str** | Mini Program Redirect Link (empty string for most types) | [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/ListUserCouponsResponseDataList.md b/docs/ListUserCouponsResponseDataList.md new file mode 100644 index 00000000..9cb2bc3e --- /dev/null +++ b/docs/ListUserCouponsResponseDataList.md @@ -0,0 +1,35 @@ +# ListUserCouponsResponseDataList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Coupon distribution record ID (coupon_send_issuing_log.id), used as `last_id` for cursor-based pagination | [optional] +**details_id** | **int** | User coupon detail table primary key (separate table per type). This field is 0 for task coupons, has value for regular coupons | [optional] +**coupon_type** | **str** | Coupon type, enum values same as the `type` parameter | [optional] +**name** | **str** | Coupon display name (i18n translated) | [optional] +**amount** | **str** | Coupon denomination (formatted string with thousand separators). Meaning by type: point card = balance, interest rate boost coupon = interest rate percentage (e.g., '5%'), VIP trial card = VIP level number, position voucher = face value × leverage, others = face value | [optional] +**origin_amount** | **str** | Original denomination (string with trailing zeros removed). Only returned for point card type, other types do not have this field | [optional] +**currency** | **str** | Denomination unit. Point card = 'POINT', interest rate boost coupon = 'APR', VIP trial card = 'VIP', Alpha cash coupon = base currency, others = uppercase currency symbol (e.g., 'USDT'/'GT') | [optional] +**rule_new** | **str** | Coupon usage rule text. List endpoint always returns empty string \"\", only detail endpoint returns actual value | [optional] +**status** | **str** | Coupon status. Regular coupon: NOT_ACTIVE (pending activation), ACTIVATED (activated), TO_BE_USED (to be used), EXPIRED (expired), RECYCLED (recycled), INVALID (invalidated), USED (used), UNKNOWN (unknown), LOCKED (locked, P2P only). Task coupon: TASK_START (task not started), TASK_WAIT (task in progress), TASK_DONE (task completed, processing), TASK_EXPIRED (task not completed, expired), TASK_NOT_STARTED_EXPIRED (not started, expired), TASK_RECEIVE_SUCCESS (reward claimed successfully), TASK_RECEIVE_FAIL (reward claim failed) | [optional] +**jump_url** | [**ListUserCouponsResponseDataJumpUrl**](ListUserCouponsResponseDataJumpUrl.md) | | [optional] +**help_url** | [**ListUserCouponsResponseDataHelpUrl**](ListUserCouponsResponseDataHelpUrl.md) | | [optional] +**expire_time** | **int** | Expiration time (Unix timestamp). Some types replace this with actual expiration time after activation or use (e.g., contract_bonus uses expired_timest after activation). Point card type returns 0 | [optional] +**expire_time_order_by** | **int** | Sorting expiration time (from the original expiration time of the distribution record, unaffected by activation). Used as the `expire_time` parameter for the next request in cursor-based pagination | [optional] +**expire_second** | **int** | Seconds remaining until expiration. Returns 0 for expired or Point Card types | [optional] +**has_usage_history** | **bool** | Whether there is a usage history. Fixed as true for point card type, determined by type for others | [optional] +**has_progress** | **bool** | Whether to display a progress bar. Only true for commission_rebate, interest_voucher, and qualifying task coupons | [optional] +**progress_config** | [**ListUserCouponsResponseDataProgressConfig**](ListUserCouponsResponseDataProgressConfig.md) | | [optional] +**activation_info** | [**object**](.md) | Type-specific activation information. Types without specific fields return empty object {}. Fields by type: interest_voucher={supported_pairs,transaction_type}; contract_bonus_new={received_expired_hour}; contract_bonus={check_unified_account_mode,received_expired_days,abtest}; commission_rebate={market,market_name}; robot_bonus={designated_bots}; position_voucher={symbols,leverage,need_user_funds,user_funds_amount,position_bonus}; tradfi_position_voucher={symbols,leverage,position_bonus}; etf_voucher={currency_markets,amount} | [optional] +**is_task_coupon** | **int** | Whether it is a task coupon. `0` = regular coupon; `1` = task coupon | [optional] +**upgrade_toast** | **bool** | Whether to prompt the user to upgrade the App (true when app version is too old to support the coupon). Triggered types: copy_trading/alpha_voucher (Android<7320000/iOS<202507320000), commission_rebate subtype tradfi (Android<8040000/iOS<202608040000), etf_voucher (Android<8090000/iOS<202608090000), tradfi_position_voucher (Android<8100000/iOS<202508240000) | [optional] +**task_title** | **str** | Task title (only task coupons have value, regular coupons return empty string \"\") | [optional] +**task_desc** | **str** | Task description (only task coupons have value, regular coupons return empty string \"\") | [optional] +**task_start_at** | **int** | Task start timestamp (Unix). Only has value for task coupons in TASK_EXPIRED status, otherwise 0 | [optional] +**task_expire_at** | **int** | Task expiration timestamp (Unix). Currently fixed at 0, reserved field | [optional] +**task_completed_at** | **int** | Task completion timestamp (Unix). Currently fixed at 0, reserved field | [optional] +**extra** | **list[object]** | Extension fields. List endpoint always returns empty array [], only the detail endpoint has values | [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/ListUserCouponsResponseDataProgressConfig.md b/docs/ListUserCouponsResponseDataProgressConfig.md new file mode 100644 index 00000000..e4696a60 --- /dev/null +++ b/docs/ListUserCouponsResponseDataProgressConfig.md @@ -0,0 +1,14 @@ +# ListUserCouponsResponseDataProgressConfig + +Progress bar configuration. All fields are empty strings when has_progress is false +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_balance** | **str** | Total Required Amount | [optional] +**current_used** | **str** | Used Amount | [optional] +**current_achived** | **str** | Amount achieved (note: field name is spelled as achived) | [optional] +**currency** | **str** | Progress unit (e.g., '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/MarginGridCreateParams.md b/docs/MarginGridCreateParams.md new file mode 100644 index 00000000..f43ee48f --- /dev/null +++ b/docs/MarginGridCreateParams.md @@ -0,0 +1,22 @@ +# MarginGridCreateParams + +Creation parameters for the Leverage Grid strategy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**money** | **str** | | +**low_price** | **str** | | +**high_price** | **str** | | +**grid_num** | **int** | | +**price_type** | **int** | | +**leverage** | **str** | | +**direction** | [**FuturesDirection**](FuturesDirection.md) | | [optional] +**trigger_price** | **str** | | [optional] +**stop_profit** | **str** | | [optional] +**stop_loss** | **str** | | [optional] +**profit_sharing_ratio** | **str** | | [optional] +**is_use_base** | **bool** | | [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/MarginGridCreateRequest.md b/docs/MarginGridCreateRequest.md new file mode 100644 index 00000000..554e8cfa --- /dev/null +++ b/docs/MarginGridCreateRequest.md @@ -0,0 +1,13 @@ +# MarginGridCreateRequest + +Create the request body for the Leverage Grid strategy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_type** | **str** | | +**market** | **str** | | +**create_params** | [**MarginGridCreateParams**](MarginGridCreateParams.md) | | + +[[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 index 1fe78ef3..e3b4f466 100644 --- a/docs/MultiCollateralLoanApi.md +++ b/docs/MultiCollateralLoanApi.md @@ -766,7 +766,7 @@ configuration = gate_api.Configuration( 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 +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency name query array, separated by commas, maximum 100 vip_level = '0' # str | VIP level, defaults to 0 if not specified (optional) (default to '0') try: @@ -783,7 +783,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| Specify currency name query array, separated by commas, maximum 100 items | + **currencies** | [**list[str]**](str.md)| Specify currency name query array, separated by commas, maximum 100 | **vip_level** | **str**| VIP level, defaults to 0 if not specified | [optional] [default to '0'] ### Return type diff --git a/docs/MyAdsListRequest.md b/docs/MyAdsListRequest.md index b2c13286..039bcbbe 100644 --- a/docs/MyAdsListRequest.md +++ b/docs/MyAdsListRequest.md @@ -4,9 +4,9 @@ Get my ads list request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**asset** | **str** | Cryptocurrency | [optional] -**fiat_unit** | **str** | Fiat currency | [optional] -**trade_type** | **str** | Buy/Sell | [optional] +**asset** | **str** | Crypto asset; omit to skip asset filter. | [optional] +**fiat_unit** | **str** | Fiat currency; omit to skip fiat filter. | [optional] +**trade_type** | **str** | Ad side: `buy` for buy-crypto ads, `sell` for sell-crypto ads; omit for all sides. | [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/OTCApi.md b/docs/OTCApi.md index adeede1d..c71b905d 100644 --- a/docs/OTCApi.md +++ b/docs/OTCApi.md @@ -7,9 +7,14 @@ Method | HTTP request | Description [**create_otc_quote**](OTCApi.md#create_otc_quote) | **POST** /otc/quote | Fiat and stablecoin quote [**create_otc_order**](OTCApi.md#create_otc_order) | **POST** /otc/order/create | Create fiat order [**create_stable_coin_order**](OTCApi.md#create_stable_coin_order) | **POST** /otc/stable_coin/order/create | Create stablecoin order -[**get_user_default_bank**](OTCApi.md#get_user_default_bank) | **GET** /otc/get_user_def_bank | Get user's default bank account information -[**get_bank_list**](OTCApi.md#get_bank_list) | **GET** /otc/bank_list | Get user bank card list -[**mark_otc_order_paid**](OTCApi.md#mark_otc_order_paid) | **POST** /otc/order/paid | Mark fiat order as paid +[**get_bank_list_inner_path**](OTCApi.md#get_bank_list_inner_path) | **GET** /otc/bank/list | Get user bank card list +[**create_otc_bank**](OTCApi.md#create_otc_bank) | **POST** /otc/bank/create | Create bank card +[**delete_otc_bank**](OTCApi.md#delete_otc_bank) | **POST** /otc/bank/delete | Delete bank card +[**set_default_otc_bank**](OTCApi.md#set_default_otc_bank) | **POST** /otc/bank/set_default | Set default bank card +[**get_otc_bank_supplement_checklist**](OTCApi.md#get_otc_bank_supplement_checklist) | **GET** /otc/bank/bank_supplement_checklist | Query the checklist of materials to supplement for a bank card +[**submit_otc_bank_personal_supplement**](OTCApi.md#submit_otc_bank_personal_supplement) | **POST** /otc/bank/personal/bank_supplement | Submit Bank Card Supplement Materials (Personal) +[**submit_otc_bank_enterprise_supplement**](OTCApi.md#submit_otc_bank_enterprise_supplement) | **POST** /otc/bank/enterprise/bank_supplement | Submit Bank Card Supplement Materials (Enterprise) +[**mark_otc_order_paid**](OTCApi.md#mark_otc_order_paid) | **POST** /otc/order/paid | Mark fiat order as paid (deposit confirmation) [**cancel_otc_order**](OTCApi.md#cancel_otc_order) | **POST** /otc/order/cancel | Fiat order cancellation [**list_otc_orders**](OTCApi.md#list_otc_orders) | **GET** /otc/order/list | Fiat order list [**list_stable_coin_orders**](OTCApi.md#list_stable_coin_orders) | **GET** /otc/stable_coin/order/list | Stablecoin order list @@ -17,7 +22,7 @@ Method | HTTP request | Description # **create_otc_quote** -> InlineResponse2006 create_otc_quote(otc_quote_request) +> OtcQuoteResponse create_otc_quote(otc_quote_request) Fiat and stablecoin quote @@ -67,7 +72,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2006**](InlineResponse2006.md) +[**OtcQuoteResponse**](OtcQuoteResponse.md) ### Authorization @@ -86,7 +91,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) # **create_otc_order** -> InlineResponse2007 create_otc_order(otc_order_request) +> OtcActionResponse create_otc_order(otc_order_request) Create fiat order @@ -136,7 +141,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2007**](InlineResponse2007.md) +[**OtcActionResponse**](OtcActionResponse.md) ### Authorization @@ -155,7 +160,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) # **create_stable_coin_order** -> InlineResponse2008 create_stable_coin_order(otc_stable_coin_order_request) +> OtcStableCoinOrderCreateResponse create_stable_coin_order(otc_stable_coin_order_request) Create stablecoin order @@ -205,7 +210,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2008**](InlineResponse2008.md) +[**OtcStableCoinOrderCreateResponse**](OtcStableCoinOrderCreateResponse.md) ### Authorization @@ -223,12 +228,12 @@ 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_user_default_bank** -> InlineResponse2009 get_user_default_bank() +# **get_bank_list_inner_path** +> OtcBankListResponse get_bank_list_inner_path() -Get user's default bank account information +Get user bank card list -Get user's default bank account information for order placement +Retrieve the user's bank card list, used to select a bank card when placing an order. **Default card**: refer to the list item field `is_default` (1=default); there is no need to call the deprecated standalone \"default bank card\" endpoint. Corresponding Inner: `GET /bank_list` or `GET /bank/list`. ### Example @@ -256,13 +261,13 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.OTCApi(api_client) try: - # Get user's default bank account information - api_response = api_instance.get_user_default_bank() + # Get user bank card list + api_response = api_instance.get_bank_list_inner_path() 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 OTCApi->get_user_default_bank: %s\n" % e) + print("Exception when calling OTCApi->get_bank_list_inner_path: %s\n" % e) ``` ### Parameters @@ -270,7 +275,7 @@ This endpoint does not need any parameter. ### Return type -[**InlineResponse2009**](InlineResponse2009.md) +[**OtcBankListResponse**](OtcBankListResponse.md) ### Authorization @@ -288,12 +293,12 @@ 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) -# **get_bank_list** -> InlineResponse20010 get_bank_list() +# **create_otc_bank** +> OtcBankCreateResponse create_otc_bank(bank_account_name, bank_name, bank_country, bank_address, iban, swift, documentation_file, remittance_line_number=remittance_line_number, agent_bank_name=agent_bank_name, agent_bank_swift=agent_bank_swift) -Get user bank card list +Create bank card -Get user bank card list for selecting bank card when placing orders +Bind a bank card. Under the Global entity, an account with a non-matching name may enter manual review (`status` pending) and require subsequent supplementary materials. Corresponding Inner: `POST /bank/create`. Fields and protocol are subject to the production form/gateway; in some environments `bank_account_name` is passed Base64-encoded, see the integration notes for details. ### Example @@ -319,23 +324,252 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OTCApi(api_client) +bank_account_name = 'bank_account_name_example' # str | +bank_name = 'bank_name_example' # str | +bank_country = 'bank_country_example' # str | +bank_address = 'bank_address_example' # str | +iban = 'iban_example' # str | +swift = 'swift_example' # str | +documentation_file = 'documentation_file_example' # str | 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) +remittance_line_number = 'remittance_line_number_example' # str | (optional) +agent_bank_name = 'agent_bank_name_example' # str | (optional) +agent_bank_swift = 'agent_bank_swift_example' # str | (optional) try: - # Get user bank card list - api_response = api_instance.get_bank_list() + # Create bank card + api_response = api_instance.create_otc_bank(bank_account_name, bank_name, bank_country, bank_address, iban, swift, documentation_file, remittance_line_number=remittance_line_number, agent_bank_name=agent_bank_name, agent_bank_swift=agent_bank_swift) 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 OTCApi->get_bank_list: %s\n" % e) + print("Exception when calling OTCApi->create_otc_bank: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bank_account_name** | **str**| | + **bank_name** | **str**| | + **bank_country** | **str**| | + **bank_address** | **str**| | + **iban** | **str**| | + **swift** | **str**| | + **documentation_file** | **str**| 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) | + **remittance_line_number** | **str**| | [optional] + **agent_bank_name** | **str**| | [optional] + **agent_bank_swift** | **str**| | [optional] + +### Return type + +[**OtcBankCreateResponse**](OtcBankCreateResponse.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Accepted 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_otc_bank** +> OtcActionResponse delete_otc_bank(otc_bank_id_request) + +Delete bank card + +Delete the specified bank card. Corresponds to Inner: `POST /bank/delete`. + +### 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.OTCApi(api_client) +otc_bank_id_request = gate_api.OtcBankIdRequest() # OtcBankIdRequest | + +try: + # Delete bank card + api_response = api_instance.delete_otc_bank(otc_bank_id_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 OTCApi->delete_otc_bank: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **otc_bank_id_request** | [**OtcBankIdRequest**](OtcBankIdRequest.md)| | + +### Return type + +[**OtcActionResponse**](OtcActionResponse.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** | 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) + +# **set_default_otc_bank** +> OtcActionResponse set_default_otc_bank(otc_bank_id_request) + +Set default bank card + +Set the specified bank card as default. Corresponds to Inner: `POST /bank/set_default`. + +### 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.OTCApi(api_client) +otc_bank_id_request = gate_api.OtcBankIdRequest() # OtcBankIdRequest | + +try: + # Set default bank card + api_response = api_instance.set_default_otc_bank(otc_bank_id_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 OTCApi->set_default_otc_bank: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **otc_bank_id_request** | [**OtcBankIdRequest**](OtcBankIdRequest.md)| | ### Return type -[**InlineResponse20010**](InlineResponse20010.md) +[**OtcActionResponse**](OtcActionResponse.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** | 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_otc_bank_supplement_checklist** +> OtcBankSupplementChecklistResponse get_otc_bank_supplement_checklist(bank_id) + +Query the checklist of materials to supplement for a bank card + +**①** `bank_id` must be specified: after verifying that the card belongs to the current user and its status allows supplementation, returns the items to be supplemented and whether each sub-item is required, based on the user's **passed professional verification type** (personal/enterprise). Corresponding Inner: `GET /bank/bank_supplement_checklist`. + +### 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.OTCApi(api_client) +bank_id = 'bank_id_example' # str | Bank card ID (otc_rds / the id returned by the list endpoint). + +try: + # Query the checklist of materials to supplement for a bank card + api_response = api_instance.get_otc_bank_supplement_checklist(bank_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 OTCApi->get_otc_bank_supplement_checklist: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bank_id** | **str**| Bank card ID (otc_rds / the id returned by the list endpoint). | + +### Return type + +[**OtcBankSupplementChecklistResponse**](OtcBankSupplementChecklistResponse.md) ### Authorization @@ -353,12 +587,170 @@ 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) +# **submit_otc_bank_personal_supplement** +> OtcActionResponse submit_otc_bank_personal_supplement(bank_id, id_document_front, id_document_back, address_proof) + +Submit Bank Card Supplement Materials (Personal) + +**Personal professional verification (type=1)** users submit non-same-person/supplementary materials. Must match `user_type=personal` returned by `GET /otc/bank/bank_supplement_checklist?bank_id=`, otherwise the request is rejected. **multipart/form-data** is recommended: each material item is a separate file field, with field names matching the checklist `code` (`id_document_front`, `id_document_back`, `address_proof`). + +### 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.OTCApi(api_client) +bank_id = 'bank_id_example' # str | +id_document_front = 'id_document_front_example' # str | ID document front-side file content (multipart file field, binary/Base64) +id_document_back = 'id_document_back_example' # str | ID document back-side file content (multipart file field, binary/Base64) +address_proof = 'address_proof_example' # str | Proof-of-address file content (multipart file field, binary/Base64) + +try: + # Submit Bank Card Supplement Materials (Personal) + api_response = api_instance.submit_otc_bank_personal_supplement(bank_id, id_document_front, id_document_back, address_proof) + 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 OTCApi->submit_otc_bank_personal_supplement: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bank_id** | **str**| | + **id_document_front** | **str**| ID document front-side file content (multipart file field, binary/Base64) | + **id_document_back** | **str**| ID document back-side file content (multipart file field, binary/Base64) | + **address_proof** | **str**| Proof-of-address file content (multipart file field, binary/Base64) | + +### Return type + +[**OtcActionResponse**](OtcActionResponse.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Accepted 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) + +# **submit_otc_bank_enterprise_supplement** +> OtcActionResponse submit_otc_bank_enterprise_supplement(bank_id, certificate, share_holders, passport, share_holding_structure, uid=uid, funds_statement=funds_statement, additional=additional) + +Submit Bank Card Supplement Materials (Enterprise) + +**Enterprise professional verification (type=2)** users submit supplementary materials. Must match `user_type=enterprise` returned by the checklist. **multipart** file field names: `certificate`, `share_holders`, `passport`, `share_holding_structure`. + +### 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.OTCApi(api_client) +bank_id = 'bank_id_example' # str | +certificate = 'certificate_example' # str | Business license / registration certificate file content (multipart file field, binary/Base64) +share_holders = 'share_holders_example' # str | Register of shareholders file content (multipart file field, binary/Base64) +passport = 'passport_example' # str | Legal representative / shareholder passport file content (multipart file field, binary/Base64) +share_holding_structure = 'share_holding_structure_example' # str | Ownership structure chart file content (multipart file field, binary/Base64) +uid = 'uid_example' # str | (optional) +funds_statement = 'funds_statement_example' # str | Proof-of-funds file content (multipart file field, binary/Base64, optional) (optional) +additional = 'additional_example' # str | Other supplementary material file content (multipart file field, binary/Base64, optional) (optional) + +try: + # Submit Bank Card Supplement Materials (Enterprise) + api_response = api_instance.submit_otc_bank_enterprise_supplement(bank_id, certificate, share_holders, passport, share_holding_structure, uid=uid, funds_statement=funds_statement, additional=additional) + 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 OTCApi->submit_otc_bank_enterprise_supplement: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bank_id** | **str**| | + **certificate** | **str**| Business license / registration certificate file content (multipart file field, binary/Base64) | + **share_holders** | **str**| Register of shareholders file content (multipart file field, binary/Base64) | + **passport** | **str**| Legal representative / shareholder passport file content (multipart file field, binary/Base64) | + **share_holding_structure** | **str**| Ownership structure chart file content (multipart file field, binary/Base64) | + **uid** | **str**| | [optional] + **funds_statement** | **str**| Proof-of-funds file content (multipart file field, binary/Base64, optional) | [optional] + **additional** | **str**| Other supplementary material file content (multipart file field, binary/Base64, optional) | [optional] + +### Return type + +[**OtcActionResponse**](OtcActionResponse.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Accepted 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) + # **mark_otc_order_paid** -> InlineResponse2007 mark_otc_order_paid(otc_mark_order_paid_request) +> OtcActionResponse mark_otc_order_paid(otc_mark_order_paid_request) -Mark fiat order as paid +Mark fiat order as paid (deposit confirmation) -Mark fiat order as paid +Mark a fiat buy order as paid (deposit confirmation). **The user's payment receipt must be uploaded**: `payment_receipt_file_key` is required; file format jpg / jpeg / png / pdf, single file no larger than 4MB (jointly validated by the server and gateway). The compatible field name `payment_receipt` is subject to the gateway/production environment. For the persisted field, see `otc_trade_record.payment_receipt_file_key`. The Pay Inner path is `POST .../pay/order_set_paid` (orders are usually associated via `client_order_id`); this OpenAPI path maps to Inner `POST /order/paid` and still uses `order_id` as the primary key—if the gateway unifies it to the merchant order number, the gateway documentation prevails. ### Example @@ -387,7 +779,7 @@ api_instance = gate_api.OTCApi(api_client) otc_mark_order_paid_request = gate_api.OtcMarkOrderPaidRequest() # OtcMarkOrderPaidRequest | try: - # Mark fiat order as paid + # Mark fiat order as paid (deposit confirmation) api_response = api_instance.mark_otc_order_paid(otc_mark_order_paid_request) print(api_response) except GateApiException as ex: @@ -404,7 +796,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2007**](InlineResponse2007.md) +[**OtcActionResponse**](OtcActionResponse.md) ### Authorization @@ -423,7 +815,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) # **cancel_otc_order** -> InlineResponse2007 cancel_otc_order(order_id) +> OtcActionResponse cancel_otc_order(order_id) Fiat order cancellation @@ -473,7 +865,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2007**](InlineResponse2007.md) +[**OtcActionResponse**](OtcActionResponse.md) ### Authorization @@ -492,7 +884,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) # **list_otc_orders** -> InlineResponse20011 list_otc_orders(type=type, fiat_currency=fiat_currency, crypto_currency=crypto_currency, start_time=start_time, end_time=end_time, status=status, pn=pn, ps=ps) +> OtcOrderListResponse list_otc_orders(type=type, fiat_currency=fiat_currency, crypto_currency=crypto_currency, start_time=start_time, end_time=end_time, status=status, pn=pn, ps=ps) Fiat order list @@ -556,7 +948,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20011**](InlineResponse20011.md) +[**OtcOrderListResponse**](OtcOrderListResponse.md) ### Authorization @@ -575,7 +967,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) # **list_stable_coin_orders** -> InlineResponse20012 list_stable_coin_orders(page_size=page_size, page_number=page_number, coin_name=coin_name, start_time=start_time, end_time=end_time, status=status) +> OtcStableCoinOrderListResponse list_stable_coin_orders(page_size=page_size, page_number=page_number, coin_name=coin_name, start_time=start_time, end_time=end_time, status=status) Stablecoin order list @@ -635,7 +1027,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20012**](InlineResponse20012.md) +[**OtcStableCoinOrderListResponse**](OtcStableCoinOrderListResponse.md) ### Authorization @@ -654,7 +1046,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) # **get_otc_order_detail** -> InlineResponse20013 get_otc_order_detail(order_id) +> OtcOrderDetailResponse get_otc_order_detail(order_id) Fiat order details @@ -704,7 +1096,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20013**](InlineResponse20013.md) +[**OtcOrderDetailResponse**](OtcOrderDetailResponse.md) ### Authorization diff --git a/docs/OptionsApi.md b/docs/OptionsApi.md index d6831f25..7b4c94fb 100644 --- a/docs/OptionsApi.md +++ b/docs/OptionsApi.md @@ -1480,7 +1480,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) # **amend_options_order** -> OptionsOrder amend_options_order(order_id, inline_object1) +> OptionsOrder amend_options_order(order_id, amend_options_order_request) Option Order Modification @@ -1511,11 +1511,11 @@ 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 when order is successfully created -inline_object1 = gate_api.InlineObject1() # InlineObject1 | +amend_options_order_request = gate_api.AmendOptionsOrderRequest() # AmendOptionsOrderRequest | try: # Option Order Modification - api_response = api_instance.amend_options_order(order_id, inline_object1) + api_response = api_instance.amend_options_order(order_id, amend_options_order_request) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1528,7 +1528,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **int**| Order ID returned when order is successfully created | - **inline_object1** | [**InlineObject1**](InlineObject1.md)| | + **amend_options_order_request** | [**AmendOptionsOrderRequest**](AmendOptionsOrderRequest.md)| | ### Return type diff --git a/docs/OptionsOrderBook.md b/docs/OptionsOrderBook.md index 7c2b4cf9..d1072e92 100644 --- a/docs/OptionsOrderBook.md +++ b/docs/OptionsOrderBook.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[FuturesOrderBookItem1]**](FuturesOrderBookItem1.md) | Ask Depth | -**bids** | [**list[FuturesOrderBookItem1]**](FuturesOrderBookItem1.md) | Bid Depth | +**asks** | [**list[DeliveryOrderBookItem]**](DeliveryOrderBookItem.md) | Ask Depth | +**bids** | [**list[DeliveryOrderBookItem]**](DeliveryOrderBookItem.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/Order.md b/docs/Order.md index ecee5575..14871869 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **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` | +**amount** | **str** | Trade amount When `type` is `limit`, this is the base currency to trade (the currency being bought or sold), e.g. `BTC` in `BTC_USDT`. When `type` is `market`, the meaning depends on the side: - `side`: `buy` refers to the quote currency, e.g. `USDT` in `BTC_USDT` - `side`: `sell` refers to the base currency, e.g. `BTC` in `BTC_USDT` | **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] @@ -38,9 +38,11 @@ Name | Type | Description | Notes **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 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** | 订单结束方式,包括: - open: 等待处理 - filled: 完全成交 - cancelled: 用户撤销 - liquidate_cancelled: 爆仓撤销 - small: 订单数量太小 - depth_not_enough: 深度不足导致撤单 - trader_not_enough: 对手方不足导致撤单 - ioc: 未立即成交,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - poc: 未满足挂单策略,因为 tif 设置为 poc - fok: 未立即完全成交,因为 tif 设置为 fok - stp: 订单发生自成交限制而被撤销 - price_protect_cancelled: 价格保护导致撤单 - unknown: 未知 | [optional] [readonly] +**finish_as** | **str** | How the order finished: - open: Pending processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled by liquidation - small: Order size too small - depth_not_enough: Cancelled due to insufficient order book depth - trader_not_enough: Cancelled due to insufficient counterparty liquidity - ioc: Not filled immediately because time-in-force is IOC - poc: Post-only requirement not met because time-in-force is set to poc (maker-only); rejected after being detected as taker - fok: Not fully filled immediately because time-in-force is FOK - stp: Cancelled due to self-trade prevention - price_protect_cancelled: Cancelled due to price protection - 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] **slippage** | **str** | Maximum supported slippage ratio for Spot Market Order Placement, calculated based on the latest market price at the time of order placement as the benchmark (Example: 0.03 means 3%) | [optional] +**stop_profit** | [**SpotOrderStopProfit**](SpotOrderStopProfit.md) | | [optional] +**stop_loss** | [**SpotOrderStopLoss**](SpotOrderStopLoss.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/OrderCreateV1Req.md b/docs/OrderCreateV1Req.md new file mode 100644 index 00000000..94f09e3f --- /dev/null +++ b/docs/OrderCreateV1Req.md @@ -0,0 +1,12 @@ +# OrderCreateV1Req + +Asset allocation optimization order request. **The array elements of `from` and `to` are both `CreateParam`, and the fields are `asset` + `amount`. ** There is no `ratio` field; if you copy parameters from the preview interface, you must convert the `to[].ratio` in the preview into the `to[].amount` required for placing an order (according to the product agreement, usually based on the order details returned by the preview, etc.). The `ratio` string cannot be directly reused as `amount`. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | [**list[CreateParam]**](CreateParam.md) | Sell ​​side list, at least one item; each item is the currency and amount `amount` to be swapped out. | +**to** | [**list[CreateParam]**](CreateParam.md) | Target side list, at least one item; each item is the target currency and **amount** `amount` (non-proportional). The structural semantics are different from `OrderPreviewV1Req.to` (`PreviewToParam`, including `ratio`), so do not mix them. | + +[[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/OrderCreateV1Resp.md b/docs/OrderCreateV1Resp.md new file mode 100644 index 00000000..a79795da --- /dev/null +++ b/docs/OrderCreateV1Resp.md @@ -0,0 +1,10 @@ +# OrderCreateV1Resp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order** | [**CreateOrder**](CreateOrder.md) | | + +[[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/OrderListStructList.md b/docs/OrderListStructList.md index 12d379a5..6a8f2587 100644 --- a/docs/OrderListStructList.md +++ b/docs/OrderListStructList.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **coin** | **str** | Staked and redeemed currencies | **amount** | **str** | Amount | **type** | **int** | Type 0-Staking 1-Redemption | -**status** | **int** | Status | +**status** | **int** | Status. 1 - success, 3 - delayed redemption in progress, 6 - redemption cancellation order | **redeem_stamp** | **int** | Redemption credit time | **create_stamp** | **int** | Order time | **exchange_amount** | **str** | Exchange rate | diff --git a/docs/OrderListV1Resp.md b/docs/OrderListV1Resp.md new file mode 100644 index 00000000..e22f6390 --- /dev/null +++ b/docs/OrderListV1Resp.md @@ -0,0 +1,11 @@ +# OrderListV1Resp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | [**list[CreateOrder]**](CreateOrder.md) | | +**total** | **int** | | + +[[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/OrderLog.md b/docs/OrderLog.md new file mode 100644 index 00000000..3aba05de --- /dev/null +++ b/docs/OrderLog.md @@ -0,0 +1,11 @@ +# OrderLog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Server timestamp (milliseconds) | [optional] +**data** | [**OrderLogData**](OrderLogData.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/OrderLogData.md b/docs/OrderLogData.md new file mode 100644 index 00000000..65eb136d --- /dev/null +++ b/docs/OrderLogData.md @@ -0,0 +1,18 @@ +# OrderLogData + +Response data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**log_id** | **int** | logID | [optional] +**symbol** | **str** | Trading pair of the order | [optional] +**price_type** | **str** | Trade type (market=market price, trigger=trigger price) | [optional] +**state** | **int** | Order status code (1=placed, 2=canceled, 3=partially filled, 4=filled, 5=rejected) | [optional] +**side** | **int** | Order side (1=sell, 2=buy) | [optional] +**volume** | **str** | Order volume | [optional] +**price** | **str** | Average fill 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/OrderPatch.md b/docs/OrderPatch.md index f5c838e6..97ef1ea1 100644 --- a/docs/OrderPatch.md +++ b/docs/OrderPatch.md @@ -10,6 +10,8 @@ Name | Type | Description | Notes **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] +**stop_profit** | [**SpotOrderStopProfit**](SpotOrderStopProfit.md) | | [optional] +**stop_loss** | [**SpotOrderStopLoss**](SpotOrderStopLoss.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/OrderPreviewV1Req.md b/docs/OrderPreviewV1Req.md new file mode 100644 index 00000000..599752f2 --- /dev/null +++ b/docs/OrderPreviewV1Req.md @@ -0,0 +1,12 @@ +# OrderPreviewV1Req + +Asset allocation optimization **preview** request. `from` is the selling quantity; `to` is the target currency and **distribution ratio ratio** (not the absolute quantity). Please use `OrderCreateV1Req` to place a formal order, and its `to` is `amount`. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | [**list[PreviewFromParam]**](PreviewFromParam.md) | Sell ​​side; each item is the currency + the swap amount `amount` (string decimal). | +**to** | [**list[PreviewToParam]**](PreviewToParam.md) | Target side; each item is currency + **ratio** `ratio` (string decimal, such as `0.5`). Typical source: `GET /asset-swap/config` → `recommend_v2` `schemes[].name` / `schemes[].ratio` of the strategy under a certain group. | + +[[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/OrderPreviewV1Resp.md b/docs/OrderPreviewV1Resp.md new file mode 100644 index 00000000..64265e6b --- /dev/null +++ b/docs/OrderPreviewV1Resp.md @@ -0,0 +1,11 @@ +# OrderPreviewV1Resp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order** | [**PreviewOrder**](PreviewOrder.md) | | +**transaction_fee** | **str** | | + +[[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/InlineResponse2007.md b/docs/OtcActionResponse.md similarity index 94% rename from docs/InlineResponse2007.md rename to docs/OtcActionResponse.md index 9eb961e6..a98b7d57 100644 --- a/docs/InlineResponse2007.md +++ b/docs/OtcActionResponse.md @@ -1,4 +1,4 @@ -# InlineResponse2007 +# OtcActionResponse ## Properties Name | Type | Description | Notes diff --git a/docs/OtcBankCreateMultipartRequest.md b/docs/OtcBankCreateMultipartRequest.md new file mode 100644 index 00000000..db4194f0 --- /dev/null +++ b/docs/OtcBankCreateMultipartRequest.md @@ -0,0 +1,20 @@ +# OtcBankCreateMultipartRequest + +Inner create-bank-card `multipart/form-data`. Use the form field `documentation_file` to upload the account-opening proof. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bank_account_name** | **str** | | +**bank_name** | **str** | | +**bank_country** | **str** | | +**bank_address** | **str** | | +**iban** | **str** | | +**swift** | **str** | | +**remittance_line_number** | **str** | | [optional] +**agent_bank_name** | **str** | | [optional] +**agent_bank_swift** | **str** | | [optional] +**documentation_file** | **str** | 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) | + +[[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/OtcBankCreateResponse.md b/docs/OtcBankCreateResponse.md new file mode 100644 index 00000000..7c03b843 --- /dev/null +++ b/docs/OtcBankCreateResponse.md @@ -0,0 +1,14 @@ +# OtcBankCreateResponse + +Bank card created successfully (Inner returns bank_id and status). +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**data** | [**OtcBankCreateResponseData**](OtcBankCreateResponseData.md) | | +**timestamp** | **int** | | [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/OtcBankCreateResponseData.md b/docs/OtcBankCreateResponseData.md new file mode 100644 index 00000000..4afaf7e7 --- /dev/null +++ b/docs/OtcBankCreateResponseData.md @@ -0,0 +1,11 @@ +# OtcBankCreateResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bank_id** | **int** | Bank card primary key in otc_rds. | +**status** | **int** | Review status (e.g., pending review). | + +[[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/OtcBankEnterpriseSupplementMultipartRequest.md b/docs/OtcBankEnterpriseSupplementMultipartRequest.md new file mode 100644 index 00000000..cba28a70 --- /dev/null +++ b/docs/OtcBankEnterpriseSupplementMultipartRequest.md @@ -0,0 +1,18 @@ +# OtcBankEnterpriseSupplementMultipartRequest + +Enterprise supplement `multipart/form-data`. File field names: `certificate`, `share_holders`, `passport`, `share_holding_structure`; optional `funds_statement`, `additional`. Optional string field `relationship_proof` (JSON) is merged into the request. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | | [optional] +**bank_id** | **str** | | +**certificate** | **str** | Business license / registration certificate file content (multipart file field, binary/Base64) | +**share_holders** | **str** | Register of shareholders file content (multipart file field, binary/Base64) | +**passport** | **str** | Legal representative / shareholder passport file content (multipart file field, binary/Base64) | +**share_holding_structure** | **str** | Ownership structure chart file content (multipart file field, binary/Base64) | +**funds_statement** | **str** | Proof-of-funds file content (multipart file field, binary/Base64, optional) | [optional] +**additional** | **str** | Other supplementary material file content (multipart file field, binary/Base64, optional) | [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/OtcBankIdRequest.md b/docs/OtcBankIdRequest.md new file mode 100644 index 00000000..def7ea28 --- /dev/null +++ b/docs/OtcBankIdRequest.md @@ -0,0 +1,10 @@ +# OtcBankIdRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bank_id** | **str** | Bank card ID | + +[[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/InlineResponse20010DataLists.md b/docs/OtcBankListItem.md similarity index 97% rename from docs/InlineResponse20010DataLists.md rename to docs/OtcBankListItem.md index 76182cd4..1faf0ed4 100644 --- a/docs/InlineResponse20010DataLists.md +++ b/docs/OtcBankListItem.md @@ -1,4 +1,4 @@ -# InlineResponse20010DataLists +# OtcBankListItem ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse2009.md b/docs/OtcBankListResponse.md similarity index 79% rename from docs/InlineResponse2009.md rename to docs/OtcBankListResponse.md index 1f4ad9f4..df220032 100644 --- a/docs/InlineResponse2009.md +++ b/docs/OtcBankListResponse.md @@ -1,11 +1,11 @@ -# InlineResponse2009 +# OtcBankListResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | | **message** | **str** | | -**data** | [**InlineResponse2009Data**](InlineResponse2009Data.md) | | +**data** | [**OtcBankListResult**](OtcBankListResult.md) | | **timestamp** | **int** | | [[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/OtcBankListResult.md b/docs/OtcBankListResult.md new file mode 100644 index 00000000..5f049981 --- /dev/null +++ b/docs/OtcBankListResult.md @@ -0,0 +1,10 @@ +# OtcBankListResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lists** | [**list[OtcBankListItem]**](OtcBankListItem.md) | Bank card list | + +[[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/OtcBankPersonalSupplementMultipartRequest.md b/docs/OtcBankPersonalSupplementMultipartRequest.md new file mode 100644 index 00000000..f74cdb54 --- /dev/null +++ b/docs/OtcBankPersonalSupplementMultipartRequest.md @@ -0,0 +1,14 @@ +# OtcBankPersonalSupplementMultipartRequest + +Personal supplement `multipart/form-data`. File field names are fixed: `id_document_front`, `id_document_back`, `address_proof` (aligned with the checklist `code`); the optional string field `relationship_proof` (JSON text) is merged with the upload result. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bank_id** | **str** | | +**id_document_front** | **str** | ID document front-side file content (multipart file field, binary/Base64) | +**id_document_back** | **str** | ID document back-side file content (multipart file field, binary/Base64) | +**address_proof** | **str** | Proof-of-address file content (multipart file field, binary/Base64) | + +[[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/OtcBankSupplementChecklistItem.md b/docs/OtcBankSupplementChecklistItem.md new file mode 100644 index 00000000..15aa879a --- /dev/null +++ b/docs/OtcBankSupplementChecklistItem.md @@ -0,0 +1,13 @@ +# OtcBankSupplementChecklistItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | Material item code, corresponding to the top-level key of `relationship_proof` | +**zh** | **str** | | [optional] +**en** | **str** | | [optional] +**required** | **bool** | Whether required | + +[[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/InlineResponse20012.md b/docs/OtcBankSupplementChecklistResponse.md similarity index 64% rename from docs/InlineResponse20012.md rename to docs/OtcBankSupplementChecklistResponse.md index f8e3b66d..05721732 100644 --- a/docs/InlineResponse20012.md +++ b/docs/OtcBankSupplementChecklistResponse.md @@ -1,11 +1,12 @@ -# InlineResponse20012 +# OtcBankSupplementChecklistResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | | **message** | **str** | | -**data** | [**InlineResponse20012Data**](InlineResponse20012Data.md) | | +**data** | [**OtcBankSupplementChecklistResponseData**](OtcBankSupplementChecklistResponseData.md) | | +**timestamp** | **int** | | [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/OtcBankSupplementChecklistResponseData.md b/docs/OtcBankSupplementChecklistResponseData.md new file mode 100644 index 00000000..1771ac3d --- /dev/null +++ b/docs/OtcBankSupplementChecklistResponseData.md @@ -0,0 +1,11 @@ +# OtcBankSupplementChecklistResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_type** | **str** | personal or enterprise | +**items** | [**list[OtcBankSupplementChecklistItem]**](OtcBankSupplementChecklistItem.md) | | + +[[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/OtcMarkOrderPaidRequest.md b/docs/OtcMarkOrderPaidRequest.md index d122849a..9dad1b81 100644 --- a/docs/OtcMarkOrderPaidRequest.md +++ b/docs/OtcMarkOrderPaidRequest.md @@ -1,10 +1,13 @@ # OtcMarkOrderPaidRequest -Fiat Order Set Paid Request Body +Request body for marking a fiat order as paid (deposit confirmation). Must include the user's payment receipt (consistent with §3.2). **`payment_receipt_file_key` is required**; the order primary key for this path is `order_id`. When accessed via the Pay gateway using `client_order_id`, the gateway's rewritten field prevails. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **order_id** | **str** | Order ID | +**client_order_id** | **str** | Client order ID (used by some gateway/Inner Pay paths, optional) | [optional] +**payment_receipt_file_key** | **str** | User payment receipt: **required**. Stored as a file_key. Single file; jpg/jpeg/png/pdf; ≤4MB. | +**payment_receipt** | **str** | Alias compatible with `payment_receipt_file_key` (depends on the gateway's external field name) | [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/InlineResponse20013Data.md b/docs/OtcOrderDetail.md similarity index 72% rename from docs/InlineResponse20013Data.md rename to docs/OtcOrderDetail.md index d7000e3c..660b9c71 100644 --- a/docs/InlineResponse20013Data.md +++ b/docs/OtcOrderDetail.md @@ -1,4 +1,4 @@ -# InlineResponse20013Data +# OtcOrderDetail ## Properties Name | Type | Description | Notes @@ -11,7 +11,8 @@ Name | Type | Description | Notes **crypto_currency** | **str** | Stablecoin | **crypto_amount** | **str** | Stablecoin amount | **rate** | **str** | Exchange rate | -**transfer_remark** | **str** | Remark | +**transfer_remark** | **str** | Transfer remark (mutually exclusive with reference_code; empty string when the deposit buy order has a reference code) | +**reference_code** | **str** | Unique bank transfer reference code for deposit buy orders (SGB deposit scenario; mutually exclusive with transfer_remark) | [optional] **status** | **str** | Status | **db_status** | **str** | | **create_time** | **str** | Created time | diff --git a/docs/InlineResponse2006.md b/docs/OtcOrderDetailResponse.md similarity index 77% rename from docs/InlineResponse2006.md rename to docs/OtcOrderDetailResponse.md index 34a0c45f..25002871 100644 --- a/docs/InlineResponse2006.md +++ b/docs/OtcOrderDetailResponse.md @@ -1,11 +1,11 @@ -# InlineResponse2006 +# OtcOrderDetailResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **int** | | **message** | **str** | | -**data** | [**InlineResponse2006Data**](InlineResponse2006Data.md) | | +**code** | **int** | | +**data** | [**OtcOrderDetail**](OtcOrderDetail.md) | | [[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/InlineResponse20011DataCryptoCurrencyInfo.md b/docs/OtcOrderListCryptoCurrencyInfo.md similarity index 88% rename from docs/InlineResponse20011DataCryptoCurrencyInfo.md rename to docs/OtcOrderListCryptoCurrencyInfo.md index 53cad3be..7a8d7ef0 100644 --- a/docs/InlineResponse20011DataCryptoCurrencyInfo.md +++ b/docs/OtcOrderListCryptoCurrencyInfo.md @@ -1,4 +1,4 @@ -# InlineResponse20011DataCryptoCurrencyInfo +# OtcOrderListCryptoCurrencyInfo ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20011DataFiatCurrencyInfo.md b/docs/OtcOrderListFiatCurrencyInfo.md similarity index 88% rename from docs/InlineResponse20011DataFiatCurrencyInfo.md rename to docs/OtcOrderListFiatCurrencyInfo.md index 5992896d..6f246130 100644 --- a/docs/InlineResponse20011DataFiatCurrencyInfo.md +++ b/docs/OtcOrderListFiatCurrencyInfo.md @@ -1,4 +1,4 @@ -# InlineResponse20011DataFiatCurrencyInfo +# OtcOrderListFiatCurrencyInfo ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20011DataList.md b/docs/OtcOrderListItem.md similarity index 65% rename from docs/InlineResponse20011DataList.md rename to docs/OtcOrderListItem.md index 4008dd08..47abc3f7 100644 --- a/docs/InlineResponse20011DataList.md +++ b/docs/OtcOrderListItem.md @@ -1,4 +1,4 @@ -# InlineResponse20011DataList +# OtcOrderListItem ## Properties Name | Type | Description | Notes @@ -11,13 +11,14 @@ Name | Type | Description | Notes **status** | **str** | Order Status | [optional] **db_status** | **str** | | [optional] **fiat_currency** | **str** | Fiat type | [optional] -**fiat_currency_info** | [**InlineResponse20011DataFiatCurrencyInfo**](InlineResponse20011DataFiatCurrencyInfo.md) | | [optional] +**fiat_currency_info** | [**OtcOrderListFiatCurrencyInfo**](OtcOrderListFiatCurrencyInfo.md) | | [optional] **fiat_amount** | **str** | Fiat amount | [optional] **crypto_currency** | **str** | Stablecoin | [optional] -**crypto_currency_info** | [**InlineResponse20011DataCryptoCurrencyInfo**](InlineResponse20011DataCryptoCurrencyInfo.md) | | [optional] +**crypto_currency_info** | [**OtcOrderListCryptoCurrencyInfo**](OtcOrderListCryptoCurrencyInfo.md) | | [optional] **crypto_amount** | **str** | Stablecoin amount | [optional] **rate** | **str** | Exchange rate | [optional] -**transfer_remark** | **str** | Remark | [optional] +**transfer_remark** | **str** | Transfer remark (mutually exclusive with reference_code; empty string when the deposit buy order has a reference code) | [optional] +**reference_code** | **str** | Unique bank transfer reference code for deposit buy orders (SGB deposit scenario) | [optional] **gate_bank_account_iban** | **str** | Bank account | [optional] **promotion_code** | **str** | Promotion code | [optional] diff --git a/docs/InlineResponse20013.md b/docs/OtcOrderListResponse.md similarity index 77% rename from docs/InlineResponse20013.md rename to docs/OtcOrderListResponse.md index 923fe4f9..6e52c9ce 100644 --- a/docs/InlineResponse20013.md +++ b/docs/OtcOrderListResponse.md @@ -1,11 +1,11 @@ -# InlineResponse20013 +# OtcOrderListResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **str** | | **code** | **int** | | -**data** | [**InlineResponse20013Data**](InlineResponse20013Data.md) | | +**message** | **str** | | +**data** | [**OtcOrderListResult**](OtcOrderListResult.md) | | [[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/InlineResponse20011Data.md b/docs/OtcOrderListResult.md similarity index 76% rename from docs/InlineResponse20011Data.md rename to docs/OtcOrderListResult.md index 10bdd1ab..4af2a0e2 100644 --- a/docs/InlineResponse20011Data.md +++ b/docs/OtcOrderListResult.md @@ -1,4 +1,4 @@ -# InlineResponse20011Data +# OtcOrderListResult ## Properties Name | Type | Description | Notes @@ -7,7 +7,7 @@ Name | Type | Description | Notes **ps** | **int** | | **total_pn** | **int** | | **count** | **int** | | -**list** | [**list[InlineResponse20011DataList]**](InlineResponse20011DataList.md) | | +**list** | [**list[OtcOrderListItem]**](OtcOrderListItem.md) | | [[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/OtcOrderRequest.md b/docs/OtcOrderRequest.md index 56ab8a3a..d8bcd186 100644 --- a/docs/OtcOrderRequest.md +++ b/docs/OtcOrderRequest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **fiat_amount** | **str** | Fiat amount | **promotion_code** | **str** | Promotion code | [optional] **quote_token** | **str** | Parameter returned by the quote API | -**bank_id** | **str** | Bank card ID used for the order (retrieved via the default bank card API) | +**bank_id** | **str** | The bank card ID used for placing the order; select it from the list returned by `GET /otc/bank_list` (or `GET /otc/bank/list`); the default card has `is_default=1` | [[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/OtcQuoteResponse.md b/docs/OtcQuoteResponse.md new file mode 100644 index 00000000..df5d4fe7 --- /dev/null +++ b/docs/OtcQuoteResponse.md @@ -0,0 +1,12 @@ +# OtcQuoteResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**data** | [**OtcQuoteResult**](OtcQuoteResult.md) | | + +[[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/InlineResponse2006Data.md b/docs/OtcQuoteResult.md similarity index 97% rename from docs/InlineResponse2006Data.md rename to docs/OtcQuoteResult.md index 9a97b392..5439ea5d 100644 --- a/docs/InlineResponse2006Data.md +++ b/docs/OtcQuoteResult.md @@ -1,4 +1,4 @@ -# InlineResponse2006Data +# OtcQuoteResult ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse2008.md b/docs/OtcStableCoinOrderCreateResponse.md similarity index 90% rename from docs/InlineResponse2008.md rename to docs/OtcStableCoinOrderCreateResponse.md index e846332b..64496e8d 100644 --- a/docs/InlineResponse2008.md +++ b/docs/OtcStableCoinOrderCreateResponse.md @@ -1,4 +1,4 @@ -# InlineResponse2008 +# OtcStableCoinOrderCreateResponse ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20012DataList.md b/docs/OtcStableCoinOrderListItem.md similarity index 96% rename from docs/InlineResponse20012DataList.md rename to docs/OtcStableCoinOrderListItem.md index 1d56d2b7..636c3438 100644 --- a/docs/InlineResponse20012DataList.md +++ b/docs/OtcStableCoinOrderListItem.md @@ -1,4 +1,4 @@ -# InlineResponse20012DataList +# OtcStableCoinOrderListItem ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20011.md b/docs/OtcStableCoinOrderListResponse.md similarity index 73% rename from docs/InlineResponse20011.md rename to docs/OtcStableCoinOrderListResponse.md index f2115362..019ee605 100644 --- a/docs/InlineResponse20011.md +++ b/docs/OtcStableCoinOrderListResponse.md @@ -1,11 +1,11 @@ -# InlineResponse20011 +# OtcStableCoinOrderListResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | | **message** | **str** | | -**data** | [**InlineResponse20011Data**](InlineResponse20011Data.md) | | +**data** | [**OtcStableCoinOrderListResult**](OtcStableCoinOrderListResult.md) | | [[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/InlineResponse20012Data.md b/docs/OtcStableCoinOrderListResult.md similarity index 76% rename from docs/InlineResponse20012Data.md rename to docs/OtcStableCoinOrderListResult.md index 7c86e415..6e3c7af3 100644 --- a/docs/InlineResponse20012Data.md +++ b/docs/OtcStableCoinOrderListResult.md @@ -1,4 +1,4 @@ -# InlineResponse20012Data +# OtcStableCoinOrderListResult ## Properties Name | Type | Description | Notes @@ -7,7 +7,7 @@ Name | Type | Description | Notes **page_size** | **int** | | **page_number** | **int** | | **total_page** | **int** | | -**list** | [**list[InlineResponse20012DataList]**](InlineResponse20012DataList.md) | | +**list** | [**list[OtcStableCoinOrderListItem]**](OtcStableCoinOrderListItem.md) | | [[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/OtherContact.md b/docs/OtherContact.md new file mode 100644 index 00000000..7c78a68b --- /dev/null +++ b/docs/OtherContact.md @@ -0,0 +1,12 @@ +# OtherContact + +Other contact information +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | Contact type | [optional] +**value** | **str** | Contact value | [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/P2pAdDetail.md b/docs/P2pAdDetail.md new file mode 100644 index 00000000..e6e98c11 --- /dev/null +++ b/docs/P2pAdDetail.md @@ -0,0 +1,46 @@ +# P2pAdDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rate** | **str** | Advertisement price. | [optional] +**type** | **str** | Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. | [optional] +**amount** | **str** | Remaining crypto amount on the ad. | [optional] +**min_amount** | **str** | Minimum trade amount in `want_type`. | [optional] +**max_amount** | **str** | Maximum trade amount priced in `want_type`. | [optional] +**total** | **str** | Fiat amount | [optional] +**pay_ali** | **int** | Whether Alipay is supported. `1`: yes; `0`: no. | [optional] +**pay_bank** | **int** | Whether bank transfer is supported. `1`: yes; `0`: no. | [optional] +**pay_paypal** | **int** | Whether PayPal is supported. `1`: yes; `0`: no. | [optional] +**pay_wechat** | **int** | Whether WeChat Pay is supported. `1`: yes; `0`: no. | [optional] +**pay_type_num** | **str** | Payment method ID list | [optional] +**pay_type_json** | **str** | JSON map of payment type -> payment method ID. | [optional] +**locked_amount** | **str** | Locked amount | [optional] +**orderid** | **int** | Order ID | [optional] +**timestamp** | **int** | Created time | [optional] +**currency_type** | **str** | Cryptocurrency symbol. | [optional] +**want_type** | **str** | Fiat type | [optional] +**hide_rate** | **str** | Hidden price | [optional] +**trade_tips** | **str** | Trading terms | [optional] +**auto_reply** | **str** | Auto reply | [optional] +**rate_ref_id** | **int** | Floating reference: `1` platform; `2` Gate; `3` spot; `<= 0` means fixed price. | [optional] +**rate_offset** | **float** | Floating ratio (absolute value) | [optional] +**status** | **str** | Ad status: `OPEN` listed; `OFFLIN` delisted; `CLOSED` closed; `CANCEL` canceled. | [optional] +**rate_fixed** | **int** | Price type: `0` floating; `1` fixed. | [optional] +**float_trend** | **int** | Floating direction: `0` markup; `1` markdown. | [optional] +**expire_min** | **int** | Timeout (minutes) | [optional] +**tier_limit** | **int** | Tier limit | [optional] +**reg_time_limit** | **int** | Registration time limit | [optional] +**advertisers_limit** | **int** | Whether trading with the advertiser is restricted. `0`: no; `1`: yes. | [optional] +**min_completed_limit** | **int** | Minimum limit of completed orders | [optional] +**max_completed_limit** | **int** | Maximum limit of completed orders | [optional] +**user_orders_limit** | **int** | Order count limit | [optional] +**completed_rate_limit** | **float** | 30-day completion rate limit | [optional] +**limit_country_cn** | **str** | Restricted nationality (Chinese) | [optional] +**limit_country_en** | **str** | Restricted nationality (English) | [optional] +**is_hedge** | **int** | Whether auto-delegation is enabled. `1`: yes; `0`: no. | [optional] +**hide_payment** | **int** | Whether payment methods are hidden. `1`: hidden; `0`: visible. | [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/InlineResponse20018.md b/docs/P2pAdDetailResponse.md similarity index 81% rename from docs/InlineResponse20018.md rename to docs/P2pAdDetailResponse.md index 1d41bbbd..81d3f977 100644 --- a/docs/InlineResponse20018.md +++ b/docs/P2pAdDetailResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20018 +# P2pAdDetailResponse ## Properties Name | Type | Description | Notes @@ -7,7 +7,7 @@ Name | Type | Description | Notes **method** | **str** | | [optional] **code** | **int** | | [optional] **message** | **str** | | [optional] -**data** | [**InlineResponse20018Data**](InlineResponse20018Data.md) | | [optional] +**data** | [**P2pAdDetail**](P2pAdDetail.md) | | [optional] **version** | **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/InlineResponse20023Data.md b/docs/P2pAdsListItem.md similarity index 74% rename from docs/InlineResponse20023Data.md rename to docs/P2pAdsListItem.md index f13d16d7..3598a262 100644 --- a/docs/InlineResponse20023Data.md +++ b/docs/P2pAdsListItem.md @@ -1,4 +1,4 @@ -# InlineResponse20023Data +# P2pAdsListItem ## Properties Name | Type | Description | Notes @@ -8,8 +8,8 @@ Name | Type | Description | Notes **fiat_unit** | **str** | Fiat currency | [optional] **adv_no** | **int** | Ad ID | [optional] **price** | **str** | Price | [optional] -**max_single_trans_amount** | **str** | Maximum Cryptocurrency Amount | [optional] -**min_single_trans_amount** | **str** | Minimum Cryptocurrency Amount | [optional] +**max_single_trans_amount** | **str** | Maximum crypto size per trade. | [optional] +**min_single_trans_amount** | **str** | Minimum crypto size per trade. | [optional] **nick_name** | **str** | Advertiser Nickname | [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/InlineResponse20017.md b/docs/P2pAdsListResponse.md similarity index 81% rename from docs/InlineResponse20017.md rename to docs/P2pAdsListResponse.md index a8127387..bad02063 100644 --- a/docs/InlineResponse20017.md +++ b/docs/P2pAdsListResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20017 +# P2pAdsListResponse ## Properties Name | Type | Description | Notes @@ -7,7 +7,7 @@ Name | Type | Description | Notes **method** | **str** | | [optional] **code** | **int** | | [optional] **message** | **str** | | [optional] -**data** | [**InlineResponse20017Data**](InlineResponse20017Data.md) | | [optional] +**data** | [**list[P2pAdsListItem]**](P2pAdsListItem.md) | | [optional] **version** | **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/P2pAdsUpdateStatusResponse.md b/docs/P2pAdsUpdateStatusResponse.md new file mode 100644 index 00000000..6b796302 --- /dev/null +++ b/docs/P2pAdsUpdateStatusResponse.md @@ -0,0 +1,15 @@ +# P2pAdsUpdateStatusResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | | [optional] +**method** | **str** | | [optional] +**code** | **int** | | [optional] +**message** | **str** | | [optional] +**data** | [**P2pAdsUpdateStatusResult**](P2pAdsUpdateStatusResult.md) | | [optional] +**version** | **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/P2pAdsUpdateStatusResult.md b/docs/P2pAdsUpdateStatusResult.md new file mode 100644 index 00000000..ba67ff40 --- /dev/null +++ b/docs/P2pAdsUpdateStatusResult.md @@ -0,0 +1,10 @@ +# P2pAdsUpdateStatusResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | Ad status after update: `1` listed; `3` delisted; `4` closed. | [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/P2pApi.md b/docs/P2pApi.md index 378de7be..5d63484f 100644 --- a/docs/P2pApi.md +++ b/docs/P2pApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**p2p_merchant_account_get_user_info**](P2pApi.md#p2p_merchant_account_get_user_info) | **POST** /p2p/merchant/account/get_user_info | Get account information [**p2p_merchant_account_get_counterparty_user_info**](P2pApi.md#p2p_merchant_account_get_counterparty_user_info) | **POST** /p2p/merchant/account/get_counterparty_user_info | Get counterparty information [**p2p_merchant_account_get_myself_payment**](P2pApi.md#p2p_merchant_account_get_myself_payment) | **POST** /p2p/merchant/account/get_myself_payment | Get payment method list +[**p2p_merchant_account_set_merchant_work_hours**](P2pApi.md#p2p_merchant_account_set_merchant_work_hours) | **POST** /p2p/merchant/account/set_merchant_work_hours | Set merchant working status and custom working hours [**p2p_merchant_transaction_get_pending_transaction_list**](P2pApi.md#p2p_merchant_transaction_get_pending_transaction_list) | **POST** /p2p/merchant/transaction/get_pending_transaction_list | Get pending orders [**p2p_merchant_transaction_get_completed_transaction_list**](P2pApi.md#p2p_merchant_transaction_get_completed_transaction_list) | **POST** /p2p/merchant/transaction/get_completed_transaction_list | Get all/historical orders [**p2p_merchant_transaction_get_transaction_details**](P2pApi.md#p2p_merchant_transaction_get_transaction_details) | **POST** /p2p/merchant/transaction/get_transaction_details | Query order details @@ -24,7 +25,7 @@ Method | HTTP request | Description # **p2p_merchant_account_get_user_info** -> InlineResponse20014 p2p_merchant_account_get_user_info() +> P2pMerchantUserInfoResponse p2p_merchant_account_get_user_info() Get account information @@ -68,7 +69,7 @@ This endpoint does not need any parameter. ### Return type -[**InlineResponse20014**](InlineResponse20014.md) +[**P2pMerchantUserInfoResponse**](P2pMerchantUserInfoResponse.md) ### Authorization @@ -87,7 +88,7 @@ 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) # **p2p_merchant_account_get_counterparty_user_info** -> InlineResponse20015 p2p_merchant_account_get_counterparty_user_info(get_counterparty_user_info_request) +> P2pCounterpartyUserInfoResponse p2p_merchant_account_get_counterparty_user_info(get_counterparty_user_info_request) Get counterparty information @@ -135,7 +136,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20015**](InlineResponse20015.md) +[**P2pCounterpartyUserInfoResponse**](P2pCounterpartyUserInfoResponse.md) ### Authorization @@ -154,7 +155,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) # **p2p_merchant_account_get_myself_payment** -> InlineResponse20016 p2p_merchant_account_get_myself_payment(get_myself_payment_request=get_myself_payment_request) +> P2pPaymentMethodsResponse p2p_merchant_account_get_myself_payment(get_myself_payment_request=get_myself_payment_request) Get payment method list @@ -202,7 +203,74 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20016**](InlineResponse20016.md) +[**P2pPaymentMethodsResponse**](P2pPaymentMethodsResponse.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** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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) + +# **p2p_merchant_account_set_merchant_work_hours** +> P2pMerchantWorkHoursResponse p2p_merchant_account_set_merchant_work_hours(set_merchant_work_hours_request) + +Set merchant working status and custom working hours + +### 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.P2pApi(api_client) +set_merchant_work_hours_request = gate_api.SetMerchantWorkHoursRequest() # SetMerchantWorkHoursRequest | + +try: + # Set merchant working status and custom working hours + api_response = api_instance.p2p_merchant_account_set_merchant_work_hours(set_merchant_work_hours_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 P2pApi->p2p_merchant_account_set_merchant_work_hours: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_merchant_work_hours_request** | [**SetMerchantWorkHoursRequest**](SetMerchantWorkHoursRequest.md)| | + +### Return type + +[**P2pMerchantWorkHoursResponse**](P2pMerchantWorkHoursResponse.md) ### Authorization @@ -221,7 +289,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) # **p2p_merchant_transaction_get_pending_transaction_list** -> InlineResponse20017 p2p_merchant_transaction_get_pending_transaction_list(get_pending_transaction_list_request) +> P2pTransactionListResponse p2p_merchant_transaction_get_pending_transaction_list(get_pending_transaction_list_request) Get pending orders @@ -269,7 +337,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20017**](InlineResponse20017.md) +[**P2pTransactionListResponse**](P2pTransactionListResponse.md) ### Authorization @@ -288,7 +356,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) # **p2p_merchant_transaction_get_completed_transaction_list** -> InlineResponse20017 p2p_merchant_transaction_get_completed_transaction_list(get_completed_transaction_list_request) +> P2pTransactionListResponse p2p_merchant_transaction_get_completed_transaction_list(get_completed_transaction_list_request) Get all/historical orders @@ -336,7 +404,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20017**](InlineResponse20017.md) +[**P2pTransactionListResponse**](P2pTransactionListResponse.md) ### Authorization @@ -355,7 +423,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) # **p2p_merchant_transaction_get_transaction_details** -> InlineResponse20018 p2p_merchant_transaction_get_transaction_details(get_transaction_details_request) +> P2pTransactionDetailResponse p2p_merchant_transaction_get_transaction_details(get_transaction_details_request) Query order details @@ -403,7 +471,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20018**](InlineResponse20018.md) +[**P2pTransactionDetailResponse**](P2pTransactionDetailResponse.md) ### Authorization @@ -422,7 +490,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) # **p2p_merchant_transaction_confirm_payment** -> InlineResponse20019 p2p_merchant_transaction_confirm_payment(confirm_payment) +> P2pTransactionActionResponse p2p_merchant_transaction_confirm_payment(confirm_payment) Confirm payment @@ -470,7 +538,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20019**](InlineResponse20019.md) +[**P2pTransactionActionResponse**](P2pTransactionActionResponse.md) ### Authorization @@ -489,7 +557,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) # **p2p_merchant_transaction_confirm_receipt** -> InlineResponse20019 p2p_merchant_transaction_confirm_receipt(confirm_receipt) +> P2pTransactionActionResponse p2p_merchant_transaction_confirm_receipt(confirm_receipt) Confirm receipt @@ -537,7 +605,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20019**](InlineResponse20019.md) +[**P2pTransactionActionResponse**](P2pTransactionActionResponse.md) ### Authorization @@ -556,7 +624,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) # **p2p_merchant_transaction_cancel** -> InlineResponse20019 p2p_merchant_transaction_cancel(cancel_order) +> P2pTransactionActionResponse p2p_merchant_transaction_cancel(cancel_order) Cancel order @@ -604,7 +672,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20019**](InlineResponse20019.md) +[**P2pTransactionActionResponse**](P2pTransactionActionResponse.md) ### Authorization @@ -623,10 +691,12 @@ 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) # **p2p_merchant_books_place_biz_push_order** -> object p2p_merchant_books_place_biz_push_order(place_biz_push_order) +> P2pMerchantBooksPlaceBizPushOrderResponse p2p_merchant_books_place_biz_push_order(place_biz_push_order) Publish ad order +When publishing or editing an advertisement, trade_tips and auto_reply go through off-platform traffic diversion risk control; when hit, the advertisement is not saved, and code 70305102 with data.risk_event is returned. + ### Example * Api Key Authentication (apiv4): @@ -671,7 +741,7 @@ Name | Type | Description | Notes ### Return type -**object** +[**P2pMerchantBooksPlaceBizPushOrderResponse**](P2pMerchantBooksPlaceBizPushOrderResponse.md) ### Authorization @@ -690,7 +760,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) # **p2p_merchant_books_ads_update_status** -> InlineResponse20020 p2p_merchant_books_ads_update_status(ads_update_status, trade_type=trade_type) +> P2pAdsUpdateStatusResponse p2p_merchant_books_ads_update_status(ads_update_status) Update ad status @@ -719,11 +789,10 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.P2pApi(api_client) ads_update_status = gate_api.AdsUpdateStatus() # AdsUpdateStatus | -trade_type = 'sell' # str | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (optional) try: # Update ad status - api_response = api_instance.p2p_merchant_books_ads_update_status(ads_update_status, trade_type=trade_type) + api_response = api_instance.p2p_merchant_books_ads_update_status(ads_update_status) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -736,11 +805,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ads_update_status** | [**AdsUpdateStatus**](AdsUpdateStatus.md)| | - **trade_type** | **str**| Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 | [optional] ### Return type -[**InlineResponse20020**](InlineResponse20020.md) +[**P2pAdsUpdateStatusResponse**](P2pAdsUpdateStatusResponse.md) ### Authorization @@ -759,7 +827,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) # **p2p_merchant_books_ads_detail** -> InlineResponse20021 p2p_merchant_books_ads_detail(ads_detail_request) +> P2pAdDetailResponse p2p_merchant_books_ads_detail(ads_detail_request) Query ad details @@ -807,7 +875,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20021**](InlineResponse20021.md) +[**P2pAdDetailResponse**](P2pAdDetailResponse.md) ### Authorization @@ -826,7 +894,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) # **p2p_merchant_books_my_ads_list** -> InlineResponse20022 p2p_merchant_books_my_ads_list(my_ads_list_request=my_ads_list_request) +> P2pMyAdsListResponse p2p_merchant_books_my_ads_list(my_ads_list_request=my_ads_list_request) Get my ad list @@ -874,7 +942,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20022**](InlineResponse20022.md) +[**P2pMyAdsListResponse**](P2pMyAdsListResponse.md) ### Authorization @@ -893,7 +961,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) # **p2p_merchant_books_ads_list** -> InlineResponse20023 p2p_merchant_books_ads_list(ads_list_request) +> P2pAdsListResponse p2p_merchant_books_ads_list(ads_list_request) Get Advertisement List @@ -943,7 +1011,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20023**](InlineResponse20023.md) +[**P2pAdsListResponse**](P2pAdsListResponse.md) ### Authorization @@ -962,7 +1030,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) # **p2p_merchant_chat_get_chats_list** -> InlineResponse20024 p2p_merchant_chat_get_chats_list(get_chats_list_request) +> P2pChatListResponse p2p_merchant_chat_get_chats_list(get_chats_list_request) Get chat history @@ -1010,7 +1078,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20024**](InlineResponse20024.md) +[**P2pChatListResponse**](P2pChatListResponse.md) ### Authorization @@ -1029,10 +1097,12 @@ 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) # **p2p_merchant_chat_send_chat_message** -> InlineResponse20025 p2p_merchant_chat_send_chat_message(send_chat_message_request) +> P2pSendChatMessageResponse p2p_merchant_chat_send_chat_message(send_chat_message_request) Send text message +Text messages go through off-platform traffic diversion risk control. When hit, the API still returns code 0, and data contains risk_type=1 and toast_msg. + ### Example * Api Key Authentication (apiv4): @@ -1077,7 +1147,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20025**](InlineResponse20025.md) +[**P2pSendChatMessageResponse**](P2pSendChatMessageResponse.md) ### Authorization @@ -1096,7 +1166,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) # **p2p_merchant_chat_upload_chat_file** -> InlineResponse20026 p2p_merchant_chat_upload_chat_file(upload_chat_file) +> P2pUploadChatFileResponse p2p_merchant_chat_upload_chat_file(upload_chat_file) Upload chat file @@ -1144,7 +1214,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20026**](InlineResponse20026.md) +[**P2pUploadChatFileResponse**](P2pUploadChatFileResponse.md) ### Authorization diff --git a/docs/P2pChatListResponse.md b/docs/P2pChatListResponse.md new file mode 100644 index 00000000..327890bc --- /dev/null +++ b/docs/P2pChatListResponse.md @@ -0,0 +1,15 @@ +# P2pChatListResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | | [optional] +**method** | **str** | | [optional] +**code** | **int** | | [optional] +**message** | **str** | | [optional] +**data** | [**P2pChatListResult**](P2pChatListResult.md) | | [optional] +**version** | **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/InlineResponse20024Data.md b/docs/P2pChatListResult.md similarity index 51% rename from docs/InlineResponse20024Data.md rename to docs/P2pChatListResult.md index 352dc1a2..7df647f1 100644 --- a/docs/InlineResponse20024Data.md +++ b/docs/P2pChatListResult.md @@ -1,14 +1,14 @@ -# InlineResponse20024Data +# P2pChatListResult ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**messages** | [**list[InlineResponse20024DataMessages]**](InlineResponse20024DataMessages.md) | Message List | [optional] +**messages** | [**list[P2pChatMessage]**](P2pChatMessage.md) | Message List | [optional] **memo** | **str** | Payment tip (displayed on homepage only) | [optional] **has_history** | **bool** | Whether historical records exist | [optional] **txid** | **int** | Order ID | [optional] -**srvtm** | **int** | Timestamp of the latest message | [optional] -**order_status** | **str** | Order Status | [optional] +**srvtm** | **int** | Timestamp of the latest message. | [optional] +**order_status** | **str** | Raw order status in DB; typical values: `OPEN`, `PAID`, `LOCKED`, `ACCEPT`, `BCLOSED`, `CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`. | [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/P2pChatMessage.md b/docs/P2pChatMessage.md new file mode 100644 index 00000000..0493cf76 --- /dev/null +++ b/docs/P2pChatMessage.md @@ -0,0 +1,22 @@ +# P2pChatMessage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_sell** | **int** | Whether the current user is the seller. `1`: yes; `0`: no. | [optional] +**msg_type** | **int** | Message type: `0` text; `1` file; `2` template; `3` order-share; `4` payment-share; `5` status update. | [optional] +**msg** | **str** | Message content; for file messages, usually URL or file key. | [optional] +**username** | **str** | Message sender username | [optional] +**timest** | **int** | Message timestamp | [optional] +**msg_obj** | [**P2pChatMessagePayload**](P2pChatMessagePayload.md) | | [optional] +**uid** | **str** | Sender's crypto UID; system messages may use `System` or an empty string. | [optional] +**type** | **int** | Display type: `1` file message; `2` system message. | [optional] +**pic** | **str** | File link | [optional] +**file_key** | **str** | File key | [optional] +**file_type** | **str** | File type: `image` for images, `video` for videos. | [optional] +**risk_type** | **int** | Risk control display type. 1: off-platform traffic diversion risk; returned when a text message hits risk control | [optional] +**toast_msg** | **str** | Risk control prompt message; returned only when risk_type=1 | [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/P2pChatMessagePayload.md b/docs/P2pChatMessagePayload.md new file mode 100644 index 00000000..f0625e11 --- /dev/null +++ b/docs/P2pChatMessagePayload.md @@ -0,0 +1,30 @@ +# P2pChatMessagePayload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Order status when sending a message. Typical values: `OPEN`, `PAID`, `LOCKED`, `ACCEPT`, `BCLOSED`, `CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`. | [optional] +**text** | **str** | Message content | [optional] +**payment_voucher** | **list[str]** | Payment voucher | [optional] +**reason_id** | **int** | Cancel reason ID. `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller account not real; `5` payout account issue; `6` price mismatch; `7` mutually agreed cancel; `8` poor communication; `9` other; `10` seller cannot release with refund; `11` terms not met; `12` seller payout risk-controlled. | [optional] +**toast_id** | **int** | Cancellation reason popup | [optional] +**reason_memo** | **str** | Cancel reason description. | [optional] +**cancel_time** | **int** | Cancellation time | [optional] +**seller_confirm** | **int** | Seller confirmation of cancel reason: `0` pending; `1` confirmed; `2` rejected. | [optional] +**id** | **str** | Payment method information ID | [optional] +**account_des** | **str** | Payment method description | [optional] +**pay_type** | **str** | Payment method type | [optional] +**file** | **str** | Payment method file link | [optional] +**file_key** | **str** | Payment method file key | [optional] +**account** | **str** | Payment account or masked payment account. | [optional] +**memo** | **str** | Payment method note | [optional] +**code** | **str** | Payment method code | [optional] +**memo_ext** | **str** | Payment method additional note | [optional] +**trade_tips** | **str** | Payment method tip | [optional] +**real_name** | **str** | Payment method username | [optional] +**is_delete** | **int** | Whether the payment method was deleted. `1`: deleted; `0`: not deleted. | [optional] +**pay_name** | **str** | Payment method full name | [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/InlineResponse20015Data.md b/docs/P2pCounterpartyUserInfo.md similarity index 69% rename from docs/InlineResponse20015Data.md rename to docs/P2pCounterpartyUserInfo.md index eb6629f9..dac8d18f 100644 --- a/docs/InlineResponse20015Data.md +++ b/docs/P2pCounterpartyUserInfo.md @@ -1,12 +1,12 @@ -# InlineResponse20015Data +# P2pCounterpartyUserInfo ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user_timest** | **str** | User registration time (formatted string) | [optional] -**email_verified** | **str** | Whether email is verified | [optional] -**verified** | **str** | Whether KYC verification is completed | [optional] -**has_phone** | **str** | Whether phone is bound | [optional] +**email_verified** | **str** | Whether email is verified. `1`: yes; `0`: no. | [optional] +**verified** | **str** | Whether KYC is completed. `1`: yes; `0`: no. | [optional] +**has_phone** | **str** | Whether a phone number is bound. `1`: yes; `0`: no. | [optional] **user_name** | **str** | Username | [optional] **user_note** | **str** | User note information | [optional] **complete_transactions** | **str** | Total completed orders | [optional] @@ -16,8 +16,8 @@ Name | Type | Description | Notes **cancelled_used_time_month** | **str** | Cancellation time in last 30 days | [optional] **complete_transactions_month** | **str** | Number of completed orders in last 30 days | [optional] **complete_rate_month** | **float** | Completion rate in last 30 days | [optional] -**is_follow** | **int** | Whether following | [optional] -**have_traded** | **int** | Whether traded with self | [optional] +**is_follow** | **int** | Whether you follow this user. `1`: yes; `0`: no. | [optional] +**have_traded** | **int** | Whether you have traded with this user before. `1`: yes; `0`: no. | [optional] **biz_uid** | **str** | Encrypted UID | [optional] **registration_days** | **int** | Registration days | [optional] **first_trade_days** | **int** | Days since first trade | [optional] diff --git a/docs/InlineResponse20015.md b/docs/P2pCounterpartyUserInfoResponse.md similarity index 83% rename from docs/InlineResponse20015.md rename to docs/P2pCounterpartyUserInfoResponse.md index fab894d7..bdc57df4 100644 --- a/docs/InlineResponse20015.md +++ b/docs/P2pCounterpartyUserInfoResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20015 +# P2pCounterpartyUserInfoResponse ## Properties Name | Type | Description | Notes @@ -7,7 +7,7 @@ Name | Type | Description | Notes **method** | **str** | | [optional] **code** | **int** | | [optional] **message** | **str** | | [optional] -**data** | [**InlineResponse20015Data**](InlineResponse20015Data.md) | | [optional] +**data** | [**P2pCounterpartyUserInfo**](P2pCounterpartyUserInfo.md) | | [optional] **version** | **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/P2pMerchantBooksPlaceBizPushOrderResponse.md b/docs/P2pMerchantBooksPlaceBizPushOrderResponse.md new file mode 100644 index 00000000..2dfa61b9 --- /dev/null +++ b/docs/P2pMerchantBooksPlaceBizPushOrderResponse.md @@ -0,0 +1,15 @@ +# P2pMerchantBooksPlaceBizPushOrderResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | Response timestamp. | [optional] +**method** | **str** | Placeholder for request method. | [optional] +**code** | **int** | Response code. 0 means success; 70305102 means the advertisement trade terms or auto reply hit off-platform traffic diversion risk control | [optional] +**message** | **str** | Response message | [optional] +**data** | [**P2pMerchantBooksPlaceBizPushOrderResponseData**](P2pMerchantBooksPlaceBizPushOrderResponseData.md) | | [optional] +**version** | **str** | API version. | [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/P2pMerchantBooksPlaceBizPushOrderResponseData.md b/docs/P2pMerchantBooksPlaceBizPushOrderResponseData.md new file mode 100644 index 00000000..3064d147 --- /dev/null +++ b/docs/P2pMerchantBooksPlaceBizPushOrderResponseData.md @@ -0,0 +1,12 @@ +# P2pMerchantBooksPlaceBizPushOrderResponseData + +Empty object when the advertisement is published or edited successfully; returns risk details when the advertisement content hits risk control +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**risk_code** | **int** | Risk control sub-code; 0 for advertisement content traffic diversion risk control | [optional] +**risk_event** | [**P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent**](P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent.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/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent.md b/docs/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent.md new file mode 100644 index 00000000..01f36143 --- /dev/null +++ b/docs/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent.md @@ -0,0 +1,17 @@ +# P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent + +Risk control prompt event for advertisement content +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Prompt display type | [optional] +**title** | **str** | Risk control prompt title | [optional] +**msg** | **str** | Risk control prompt message generated based on the field that hit risk control | [optional] +**action** | [**list[P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction]**](P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction.md) | Available actions; advertisement content risk control only returns the close action | [optional] +**content_risk_type** | **str** | Advertisement content field that hit risk control | [optional] +**trade_tips** | **str** | Prompt message returned when the trade terms hit risk control | [optional] +**auto_reply** | **str** | Prompt message returned when the auto reply hits risk control | [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/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction.md b/docs/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction.md new file mode 100644 index 00000000..e9b60f1a --- /dev/null +++ b/docs/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction.md @@ -0,0 +1,13 @@ +# P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action_type** | **str** | Action type | [optional] +**title** | **str** | Action button text | [optional] +**mainly** | **int** | Whether it is the primary action. 0: no | [optional] +**action_data** | [**object**](.md) | Additional data of the action; empty object for the close action | [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/InlineResponse20014DataMerchantInfo.md b/docs/P2pMerchantMarketInfo.md similarity index 91% rename from docs/InlineResponse20014DataMerchantInfo.md rename to docs/P2pMerchantMarketInfo.md index 6e4ce9f9..8091aa63 100644 --- a/docs/InlineResponse20014DataMerchantInfo.md +++ b/docs/P2pMerchantMarketInfo.md @@ -1,4 +1,4 @@ -# InlineResponse20014DataMerchantInfo +# P2pMerchantMarketInfo Markets where user can place orders ## Properties diff --git a/docs/InlineResponse20014Data.md b/docs/P2pMerchantUserInfo.md similarity index 65% rename from docs/InlineResponse20014Data.md rename to docs/P2pMerchantUserInfo.md index 81c22553..56531471 100644 --- a/docs/InlineResponse20014Data.md +++ b/docs/P2pMerchantUserInfo.md @@ -1,4 +1,4 @@ -# InlineResponse20014Data +# P2pMerchantUserInfo ## Properties Name | Type | Description | Notes @@ -6,9 +6,9 @@ Name | Type | Description | Notes **is_self** | **bool** | Whether self | [optional] **user_timest** | **str** | User registration time (formatted string) | [optional] **counterparties_num** | **int** | Number of counterparties | [optional] -**email_verified** | **str** | Whether email is verified | [optional] -**verified** | **str** | Whether KYC verification is completed | [optional] -**has_phone** | **str** | Whether phone is bound | [optional] +**email_verified** | **str** | Whether email is verified. `1`: yes; `0`: no. | [optional] +**verified** | **str** | Whether KYC is completed. `1`: yes; `0`: no. | [optional] +**has_phone** | **str** | Whether a phone number is bound. `1`: yes; `0`: no. | [optional] **user_name** | **str** | Username | [optional] **user_note** | **str** | User note information | [optional] **complete_transactions** | **str** | Total completed orders | [optional] @@ -19,17 +19,17 @@ Name | Type | Description | Notes **complete_transactions_month** | **str** | Number of completed orders in last 30 days | [optional] **complete_rate_month** | **float** | Completion rate in last 30 days | [optional] **orders_buy_rate_month** | **float** | Buy order ratio in last 30 days | [optional] -**is_black** | **int** | Whether blocked | [optional] -**is_follow** | **int** | Whether following | [optional] -**have_traded** | **int** | Whether traded with self | [optional] +**is_black** | **int** | Whether the user is blocked. `1`: yes; `0`: no. | [optional] +**is_follow** | **int** | Whether you follow this user. `1`: yes; `0`: no. | [optional] +**have_traded** | **int** | Whether you have traded with this user before. `1`: yes; `0`: no. | [optional] **biz_uid** | **str** | Encrypted UID | [optional] **blue_vip** | **int** | Blue V Crown Shield | [optional] **work_status** | **int** | Merchant work status | [optional] **registration_days** | **int** | Registration days | [optional] **first_trade_days** | **int** | Days since first trade | [optional] -**need_replenish** | **int** | Whether margin replenishment is needed | [optional] -**merchant_info** | [**InlineResponse20014DataMerchantInfo**](InlineResponse20014DataMerchantInfo.md) | | [optional] -**online_status** | **int** | Merchant online status | [optional] +**need_replenish** | **int** | Whether additional margin is required. `1`: yes; `0`: no. | [optional] +**merchant_info** | [**P2pMerchantMarketInfo**](P2pMerchantMarketInfo.md) | | [optional] +**online_status** | **int** | Merchant online status: `1` online; `0` offline. | [optional] **work_hours** | [**object**](.md) | Merchant online status details | [optional] **transactions_month** | **float** | 30-day transaction volume | [optional] **transactions_all** | **float** | Total transaction volume | [optional] diff --git a/docs/P2pMerchantUserInfoResponse.md b/docs/P2pMerchantUserInfoResponse.md new file mode 100644 index 00000000..eb547a69 --- /dev/null +++ b/docs/P2pMerchantUserInfoResponse.md @@ -0,0 +1,15 @@ +# P2pMerchantUserInfoResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | | [optional] +**method** | **str** | | [optional] +**code** | **int** | | [optional] +**message** | **str** | | [optional] +**data** | [**P2pMerchantUserInfo**](P2pMerchantUserInfo.md) | | [optional] +**version** | **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/P2pMerchantWorkHours.md b/docs/P2pMerchantWorkHours.md new file mode 100644 index 00000000..869e87d6 --- /dev/null +++ b/docs/P2pMerchantWorkHours.md @@ -0,0 +1,10 @@ +# P2pMerchantWorkHours + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**work_status** | **int** | Merchant's current working status. 0: normal resting, 1: normal working, 2: custom resting, 3: custom working | [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/P2pMerchantWorkHoursResponse.md b/docs/P2pMerchantWorkHoursResponse.md new file mode 100644 index 00000000..94b61c50 --- /dev/null +++ b/docs/P2pMerchantWorkHoursResponse.md @@ -0,0 +1,15 @@ +# P2pMerchantWorkHoursResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | Response timestamp. | [optional] +**method** | **str** | Placeholder for request method. | [optional] +**code** | **int** | Response code, 0 means success | [optional] +**message** | **str** | Response message | [optional] +**data** | [**P2pMerchantWorkHours**](P2pMerchantWorkHours.md) | | [optional] +**version** | **str** | API version. | [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/InlineResponse20022DataLists.md b/docs/P2pMyAd.md similarity index 51% rename from docs/InlineResponse20022DataLists.md rename to docs/P2pMyAd.md index ae00239b..833c143d 100644 --- a/docs/InlineResponse20022DataLists.md +++ b/docs/P2pMyAd.md @@ -1,22 +1,22 @@ -# InlineResponse20022DataLists +# P2pMyAd ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | Ad buy/sell direction | [optional] +**type** | **str** | Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. | [optional] **rate** | **str** | Price | [optional] **original_rate** | **str** | Original price | [optional] -**amount** | **str** | Remaining cryptocurrency amount of ad | [optional] +**amount** | **str** | Remaining crypto amount on the ad. | [optional] **total** | **str** | Remaining fiat amount of ad | [optional] **limit_total** | **str** | Single order limit range (cryptocurrency) | [optional] **limit_fiat** | **str** | Single order limit range (fiat) | [optional] **min_amount** | **str** | Minimum quantity per order | [optional] **max_amount** | **str** | Maximum quantity per order | [optional] **pay_type_num** | **str** | Payment method ID list | [optional] -**pay_type_json** | **str** | Payment method configuration details | [optional] +**pay_type_json** | **str** | JSON map of payment type -> payment method ID. | [optional] **expire_min** | **str** | Ad expiration time (minutes) | [optional] **tier_limit** | **str** | VIP limit | [optional] -**advertisers_limit** | **int** | Whether merchant trading restriction is allowed | [optional] +**advertisers_limit** | **int** | Whether trading with the advertiser is restricted. `0`: no; `1`: yes. | [optional] **reg_time_limit** | **int** | Registration time limit | [optional] **verified_limit** | **int** | KYC level limit | [optional] **min_completed_limit** | **int** | Minimum limit of completed orders by counterparty | [optional] @@ -24,24 +24,24 @@ Name | Type | Description | Notes **user_country_limit** | **int** | KYC nationality restriction | [optional] **completed_rate_limit** | **float** | 30-day completion rate limit | [optional] **user_orders_limit** | **int** | Maximum order limit for counterparty | [optional] -**hide_payment** | **str** | Whether to hide payment method | [optional] -**currency_type** | **str** | Digital currency | [optional] +**hide_payment** | **str** | Whether payment methods are hidden. `1`: hidden; `0`: visible. | [optional] +**currency_type** | **str** | Cryptocurrency symbol. | [optional] **want_type** | **str** | Fiat currency | [optional] **trade_tips** | **str** | Trading terms | [optional] -**new_hand** | **int** | Special ad type | [optional] -**id** | **str** | Ad ID | [optional] -**status** | **str** | Ad status | [optional] +**new_hand** | **int** | Special ad type. `0` normal; `1` newcomer guide; `2` newcomer discount; `3` featured promo; `4` KOL ad; `5` coupon ad. | [optional] +**id** | **str** | Advertisement ID. | [optional] +**status** | **str** | Ad status: `OPEN` listed; `OFFLIN` delisted; `CLOSED` closed; `CANCEL` canceled. | [optional] **locked_amount** | **str** | Ad frozen amount | [optional] **hide_rate** | **str** | Hidden price | [optional] -**is_out_time** | **int** | Whether ad is currently expired | [optional] -**rate_ref_id** | **int** | Floating price reference configuration | [optional] +**is_out_time** | **int** | Whether the ad timed out. `1`: timed out; `0`: not yet. | [optional] +**rate_ref_id** | **int** | Floating reference: `1` platform; `2` Gate; `3` spot; `<= 0` means fixed price. | [optional] **rate_offset** | **str** | Floating ratio | [optional] -**rate_fixed** | **int** | Reference price type: 0=Floating, 1=Fixed | [optional] -**float_trend** | **int** | Floating order direction | [optional] -**in_dispute** | **int** | Whether ad has disputed transactions | [optional] +**rate_fixed** | **int** | Price type: `0` floating; `1` fixed. | [optional] +**float_trend** | **int** | Floating direction: `0` markup; `1` markdown. | [optional] +**in_dispute** | **int** | Whether the ad had a disputed trade. `1`: yes; `0`: no. | [optional] **auto_reply** | **str** | Auto reply data | [optional] **timestamp** | **int** | Ad creation time | [optional] -**is_hedge** | **int** | Auto delegation | [optional] +**is_hedge** | **int** | Whether auto-delegation is enabled. `1`: yes; `0`: 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/InlineResponse20022.md b/docs/P2pMyAdsListResponse.md similarity index 81% rename from docs/InlineResponse20022.md rename to docs/P2pMyAdsListResponse.md index 89ba5c8f..56e5e1a7 100644 --- a/docs/InlineResponse20022.md +++ b/docs/P2pMyAdsListResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20022 +# P2pMyAdsListResponse ## Properties Name | Type | Description | Notes @@ -7,7 +7,7 @@ Name | Type | Description | Notes **method** | **str** | | [optional] **code** | **int** | | [optional] **message** | **str** | | [optional] -**data** | [**InlineResponse20022Data**](InlineResponse20022Data.md) | | [optional] +**data** | [**P2pMyAdsListResult**](P2pMyAdsListResult.md) | | [optional] **version** | **str** | 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/P2pMyAdsListResult.md b/docs/P2pMyAdsListResult.md new file mode 100644 index 00000000..6b0a57f6 --- /dev/null +++ b/docs/P2pMyAdsListResult.md @@ -0,0 +1,10 @@ +# P2pMyAdsListResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lists** | [**list[P2pMyAd]**](P2pMyAd.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/InlineResponse20016List.md b/docs/P2pPaymentMethodAccount.md similarity index 85% rename from docs/InlineResponse20016List.md rename to docs/P2pPaymentMethodAccount.md index 5bc118a5..92154322 100644 --- a/docs/InlineResponse20016List.md +++ b/docs/P2pPaymentMethodAccount.md @@ -1,4 +1,4 @@ -# InlineResponse20016List +# P2pPaymentMethodAccount ## Properties Name | Type | Description | Notes @@ -10,17 +10,17 @@ Name | Type | Description | Notes **bankbranch** | **str** | Bank branch name | [optional] **bankcity** | **str** | Bank city | [optional] **bankprov** | **str** | Bank province | [optional] -**bankaddr** | **str** | Bank card number | [optional] +**bankaddr** | **str** | Bank card number or masked card number. | [optional] **bankdesc** | **str** | Bank note | [optional] **hold_uid** | **int** | Cardholder UID | [optional] **hold_username** | **str** | Cardholder name | [optional] -**real_name** | **str** | userfirst name | [optional] +**real_name** | **str** | User verified display name. | [optional] **id** | **str** | User's currently bound payment method (primary key ID) | [optional] **account_des** | **str** | Payment method description | [optional] **pay_type** | **str** | Payment method type | [optional] **file** | **str** | Payment method file link | [optional] **file_key** | **str** | Payment method file key | [optional] -**account** | **str** | Payment method name | [optional] +**account** | **str** | Payment account or masked payment account. | [optional] **memo** | **str** | Payment method note | [optional] **code** | **str** | Payment method code | [optional] **memo_ext** | **str** | Payment method additional note | [optional] diff --git a/docs/InlineResponse20016Data.md b/docs/P2pPaymentMethodGroup.md similarity index 80% rename from docs/InlineResponse20016Data.md rename to docs/P2pPaymentMethodGroup.md index 56a2face..ec894735 100644 --- a/docs/InlineResponse20016Data.md +++ b/docs/P2pPaymentMethodGroup.md @@ -1,4 +1,4 @@ -# InlineResponse20016Data +# P2pPaymentMethodGroup ## Properties Name | Type | Description | Notes @@ -6,7 +6,7 @@ Name | Type | Description | Notes **pay_type** | **str** | Payment method type | [optional] **pay_name** | **str** | Payment method name | [optional] **ids** | **list[int]** | User's currently bound payment method (primary key ID) | [optional] -**list** | [**list[InlineResponse20016List]**](InlineResponse20016List.md) | | [optional] +**list** | [**list[P2pPaymentMethodAccount]**](P2pPaymentMethodAccount.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/InlineResponse20016.md b/docs/P2pPaymentMethodsResponse.md similarity index 80% rename from docs/InlineResponse20016.md rename to docs/P2pPaymentMethodsResponse.md index e239d6ae..79f2f263 100644 --- a/docs/InlineResponse20016.md +++ b/docs/P2pPaymentMethodsResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20016 +# P2pPaymentMethodsResponse ## Properties Name | Type | Description | Notes @@ -7,7 +7,7 @@ Name | Type | Description | Notes **method** | **str** | | [optional] **code** | **int** | | [optional] **message** | **str** | | [optional] -**data** | [**list[InlineResponse20016Data]**](InlineResponse20016Data.md) | | [optional] +**data** | [**list[P2pPaymentMethodGroup]**](P2pPaymentMethodGroup.md) | | [optional] **version** | **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/P2pSendChatMessageResponse.md b/docs/P2pSendChatMessageResponse.md new file mode 100644 index 00000000..d8322416 --- /dev/null +++ b/docs/P2pSendChatMessageResponse.md @@ -0,0 +1,15 @@ +# P2pSendChatMessageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | | [optional] +**method** | **str** | | [optional] +**code** | **int** | | [optional] +**message** | **str** | | [optional] +**data** | [**P2pSendChatMessageResult**](P2pSendChatMessageResult.md) | | [optional] +**version** | **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/P2pSendChatMessageResult.md b/docs/P2pSendChatMessageResult.md new file mode 100644 index 00000000..9858f29d --- /dev/null +++ b/docs/P2pSendChatMessageResult.md @@ -0,0 +1,15 @@ +# P2pSendChatMessageResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**srvtm** | **int** | Timestamp when message was successfully sent (current timestamp) | [optional] +**txid** | **int** | Order ID | [optional] +**conversation_id** | **str** | Chat ID, formatted as both parties' UIDs concatenated in ascending order | [optional] +**msg_type** | **int** | Message content type when risk control is hit. 0: text | [optional] +**risk_type** | **int** | Risk control display type. 1: off-platform traffic diversion risk; returned only when risk control is hit | [optional] +**toast_msg** | **str** | Risk control prompt message; returned only when risk_type=1 | [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/P2pTransactionActionResponse.md b/docs/P2pTransactionActionResponse.md new file mode 100644 index 00000000..c294d158 --- /dev/null +++ b/docs/P2pTransactionActionResponse.md @@ -0,0 +1,15 @@ +# P2pTransactionActionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | Response timestamp. | [optional] +**method** | **str** | Placeholder for request method. | [optional] +**code** | **int** | Response code, 0 means success | [optional] +**message** | **str** | Response message | [optional] +**data** | [**object**](.md) | Empty object on success. | [optional] +**version** | **str** | API version. | [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/InlineResponse20017DataConvertInfo.md b/docs/P2pTransactionConvertInfo.md similarity index 96% rename from docs/InlineResponse20017DataConvertInfo.md rename to docs/P2pTransactionConvertInfo.md index d91b94a6..23c373c5 100644 --- a/docs/InlineResponse20017DataConvertInfo.md +++ b/docs/P2pTransactionConvertInfo.md @@ -1,4 +1,4 @@ -# InlineResponse20017DataConvertInfo +# P2pTransactionConvertInfo Flash swap order information ## Properties diff --git a/docs/P2pTransactionDetail.md b/docs/P2pTransactionDetail.md new file mode 100644 index 00000000..10c089cf --- /dev/null +++ b/docs/P2pTransactionDetail.md @@ -0,0 +1,57 @@ +# P2pTransactionDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_sell** | **int** | Whether the current user is the seller. `1`: yes; `0`: no. | [optional] +**txid** | **int** | Order ID | [optional] +**orderid** | **int** | Order ID | [optional] +**timest** | **int** | Order creation timestamp | [optional] +**last_pay_time** | **int** | Payment deadline | [optional] +**remain_pay_time** | **int** | Seconds left to pay; `<= 0` means overdue. | [optional] +**currency_type** | **str** | Cryptocurrency symbol. | [optional] +**want_type** | **str** | Fiat currency | [optional] +**symbol** | **str** | Fiat currency symbol | [optional] +**rate** | **str** | Order price in `want_type` units. | [optional] +**amount** | **str** | Order size in cryptocurrency. | [optional] +**total** | **str** | Total fiat amount of the order. | [optional] +**status** | **str** | Display status: `unpay` unpaid; `hide_payment` unpaid with payment info hidden; `paid` buyer paid; `unconfirmed` awaiting seller confirmation; `locked` locked; `finished` done; `cancel` canceled; `expired` expired; `bclosed` arbitration filled; `sclosed` arbitration canceled. | [optional] +**reason_id** | **str** | Cancel reason ID; empty string means none. Examples: `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller did not provide a real account; `6` price/amount mismatch; `9` other; `10` seller cannot release and refund issued; `11` terms not met; `12` seller payout account risk-controlled. | [optional] +**reason_desc** | **str** | Cancel reason description. | [optional] +**cancel_time** | **str** | Cancellation time | [optional] +**in_appeal** | **int** | Whether a dispute is active. `1`: yes; `0`: no. | [optional] +**dispute_time** | **int** | Earliest timestamp when a dispute may be opened. | [optional] +**cancelable** | **int** | Whether cancellation is allowed. `1`: yes; `0`: no. | [optional] +**hide_payment** | **int** | Whether payment methods are hidden. `1`: hidden; `0`: visible. | [optional] +**trade_tips** | **str** | Trading terms | [optional] +**show_bank** | **str** | Whether to show bank transfer details. `1`: show; `0`: hide. | [optional] +**bankname** | **str** | Bank name | [optional] +**bankbranch** | **str** | Bank branch name | [optional] +**bankid** | **str** | Bank account or masked account. | [optional] +**bank_holder_realname** | **str** | Bank cardholder name | [optional] +**show_ali** | **str** | Whether to show Alipay details. `1`: show; `0`: hide. | [optional] +**aliname** | **str** | Alipay account name | [optional] +**is_alicode** | **int** | Whether an Alipay QR exists. `1`: yes; `0`: no. | [optional] +**show_wechat** | **str** | Whether to show WeChat details. `1`: show; `0`: hide. | [optional] +**wename** | **str** | WeChat account name | [optional] +**show_others** | **str** | Whether to show other payment methods. `1`: show; `0`: hide. | [optional] +**pay_others** | [**list[P2pTransactionDetailPayOthers]**](P2pTransactionDetailPayOthers.md) | Other payment methods | [optional] +**sel_paytype** | **str** | Selected payment type for this order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. | [optional] +**its_uid** | **str** | Counterparty crypto UID. | [optional] +**its_nickname** | **str** | Counterparty nickname | [optional] +**its_realname** | **str** | Counterparty real name or verified display name. | [optional] +**have_traded** | **int** | Whether you traded with the counterparty before. `1`: yes; `0`: no. | [optional] +**appeal_allow_cancel** | **int** | Whether the dispute can be withdrawn. `1`: allowed; `0`: not allowed. | [optional] +**appeal_verdict_has_open** | **str** | Dispute outcome or in-dispute notice text. | [optional] +**im_unread** | **int** | Unread chat message count. | [optional] +**payment_voucher_url** | **list[str]** | Payment voucher | [optional] +**timest_paid** | **int** | Timestamp when the buyer confirmed payment. | [optional] +**own_realname** | **str** | Current user's real name or verified display name. | [optional] +**order_type** | **int** | Order type: `1` standard; `2` partner; `3` flash swap; `4` Web3. | [optional] +**is_show_receive** | **int** | Whether to show confirm-receipt during dispute. `1`: show; `0`: hide. | [optional] +**show_seller_contact_info** | **bool** | Whether to display seller contact information | [optional] +**supported_pay_types** | **list[str]** | Supported payment method types for the order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. | [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/P2pTransactionDetailPayOthers.md b/docs/P2pTransactionDetailPayOthers.md new file mode 100644 index 00000000..5b371de5 --- /dev/null +++ b/docs/P2pTransactionDetailPayOthers.md @@ -0,0 +1,16 @@ +# P2pTransactionDetailPayOthers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Payment method record ID. | [optional] +**account_des** | **str** | Payment method description | [optional] +**pay_type** | **str** | Payment method type | [optional] +**account** | **str** | Payment account or masked account. | [optional] +**memo** | **str** | Payment note or memo. | [optional] +**trade_tips** | **str** | Payment instructions or tips. | [optional] +**pay_name** | **str** | Display name of the payment method. | [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/P2pTransactionDetailResponse.md b/docs/P2pTransactionDetailResponse.md new file mode 100644 index 00000000..2c20ec37 --- /dev/null +++ b/docs/P2pTransactionDetailResponse.md @@ -0,0 +1,15 @@ +# P2pTransactionDetailResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | | [optional] +**method** | **str** | | [optional] +**code** | **int** | | [optional] +**message** | **str** | | [optional] +**data** | [**P2pTransactionDetail**](P2pTransactionDetail.md) | | [optional] +**version** | **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/P2pTransactionListItem.md b/docs/P2pTransactionListItem.md new file mode 100644 index 00000000..2f9ae02e --- /dev/null +++ b/docs/P2pTransactionListItem.md @@ -0,0 +1,33 @@ +# P2pTransactionListItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type_buy** | **int** | Order side from current user's view. `1`: buy; `0`: sell. | [optional] +**timest** | **str** | Creation time of order | [optional] +**timest_expire** | **str** | Order expiration time | [optional] +**timestamp** | **int** | Order creation timestamp | [optional] +**rate** | **str** | Order price in fiat currency. | [optional] +**amount** | **str** | Order size in cryptocurrency. | [optional] +**total** | **str** | Total fiat amount of the order. | [optional] +**txid** | **int** | Order ID | [optional] +**status** | **str** | Display status: `unpay` awaiting payment; `paid` buyer paid; `unconfirmed` awaiting seller confirmation; `locked` locked; `finished` completed; `cancel` canceled; `expired` expired; `bclosed` arbitration filled; `sclosed` arbitration canceled. | [optional] +**its_realname** | **str** | Counterparty real name or verified display name. | [optional] +**its_uid** | **str** | Counterparty crypto UID. | [optional] +**its_nick** | **str** | Counterparty nickname | [optional] +**seller_realname** | **str** | Seller real name or verified display name. | [optional] +**buyer_realname** | **str** | Buyer real name or verified display name. | [optional] +**cancelable** | **int** | Whether the order can be canceled. `1`: yes; `0`: no. | [optional] +**currency_type** | **str** | Cryptocurrency symbol. | [optional] +**want_type** | **str** | Fiat currency | [optional] +**hide_payment** | **int** | Whether payment methods are hidden. `1`: hidden; `0`: visible. | [optional] +**sel_paytype** | **str** | Selected payment type for this order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. | [optional] +**pay_others** | [**list[P2pTransactionListResultPayOthers]**](P2pTransactionListResultPayOthers.md) | Other payment method details; may appear on historical orders. | [optional] +**cd_time** | **int** | Countdown seconds for the current order. | [optional] +**order_type** | **int** | Order type: `1` standard; `2` partner; `3` flash swap; `4` Web3. | [optional] +**order_tag** | **list[str]** | Order tags | [optional] +**convert_info** | [**P2pTransactionConvertInfo**](P2pTransactionConvertInfo.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/P2pTransactionListResponse.md b/docs/P2pTransactionListResponse.md new file mode 100644 index 00000000..4b98c9ff --- /dev/null +++ b/docs/P2pTransactionListResponse.md @@ -0,0 +1,15 @@ +# P2pTransactionListResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **float** | | [optional] +**method** | **str** | | [optional] +**code** | **int** | | [optional] +**message** | **str** | | [optional] +**data** | [**P2pTransactionListResult**](P2pTransactionListResult.md) | | [optional] +**version** | **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/InlineResponse20017Data.md b/docs/P2pTransactionListResult.md similarity index 60% rename from docs/InlineResponse20017Data.md rename to docs/P2pTransactionListResult.md index 74f4e3ac..2cdad4ed 100644 --- a/docs/InlineResponse20017Data.md +++ b/docs/P2pTransactionListResult.md @@ -1,10 +1,10 @@ -# InlineResponse20017Data +# P2pTransactionListResult ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**list** | [**list[InlineResponse20017DataList]**](InlineResponse20017DataList.md) | | [optional] -**trans_time** | [**list[InlineResponse20017DataTransTime]**](InlineResponse20017DataTransTime.md) | Countdown time | [optional] +**list** | [**list[P2pTransactionListItem]**](P2pTransactionListItem.md) | | [optional] +**trans_time** | [**list[P2pTransactionTimeMarker]**](P2pTransactionTimeMarker.md) | Countdown time | [optional] **count** | **int** | Number of orders | [optional] **exported_num** | **int** | Export count | [optional] diff --git a/docs/P2pTransactionListResultPayOthers.md b/docs/P2pTransactionListResultPayOthers.md new file mode 100644 index 00000000..8fef83b0 --- /dev/null +++ b/docs/P2pTransactionListResultPayOthers.md @@ -0,0 +1,11 @@ +# P2pTransactionListResultPayOthers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pay_type** | **str** | Payment method type | [optional] +**pay_name** | **str** | Payment method name | [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/InlineResponse20017DataTransTime.md b/docs/P2pTransactionTimeMarker.md similarity index 89% rename from docs/InlineResponse20017DataTransTime.md rename to docs/P2pTransactionTimeMarker.md index 147e1c76..3a7694f2 100644 --- a/docs/InlineResponse20017DataTransTime.md +++ b/docs/P2pTransactionTimeMarker.md @@ -1,4 +1,4 @@ -# InlineResponse20017DataTransTime +# P2pTransactionTimeMarker ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse20014.md b/docs/P2pUploadChatFileResponse.md similarity index 84% rename from docs/InlineResponse20014.md rename to docs/P2pUploadChatFileResponse.md index 4875c6c9..fd7989b1 100644 --- a/docs/InlineResponse20014.md +++ b/docs/P2pUploadChatFileResponse.md @@ -1,4 +1,4 @@ -# InlineResponse20014 +# P2pUploadChatFileResponse ## Properties Name | Type | Description | Notes @@ -7,7 +7,7 @@ Name | Type | Description | Notes **method** | **str** | | [optional] **code** | **int** | | [optional] **message** | **str** | | [optional] -**data** | [**InlineResponse20014Data**](InlineResponse20014Data.md) | | [optional] +**data** | [**P2pUploadChatFileResult**](P2pUploadChatFileResult.md) | | [optional] **version** | **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/InlineResponse20026Data.md b/docs/P2pUploadChatFileResult.md similarity index 92% rename from docs/InlineResponse20026Data.md rename to docs/P2pUploadChatFileResult.md index 33c5c216..923888bf 100644 --- a/docs/InlineResponse20026Data.md +++ b/docs/P2pUploadChatFileResult.md @@ -1,4 +1,4 @@ -# InlineResponse20026Data +# P2pUploadChatFileResult ## Properties Name | Type | Description | Notes diff --git a/docs/PartnerApplication.md b/docs/PartnerApplication.md new file mode 100644 index 00000000..cca8c5d3 --- /dev/null +++ b/docs/PartnerApplication.md @@ -0,0 +1,41 @@ +# PartnerApplication + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Application record ID | [optional] +**uid** | **int** | User ID | [optional] +**language** | **str** | Language code | [optional] +**country_id** | **int** | Country ID | [optional] +**firstname** | **str** | First name | [optional] +**lastname** | **str** | Last name | [optional] +**email** | **str** | Email address | [optional] +**join_uid** | **int** | Joined user ID | [optional] +**join_country_id** | **int** | Joined country ID | [optional] +**identity_comment** | **str** | Identity description | [optional] +**promotion_channels** | **str** | Promotion channels, separated by | | [optional] +**contact_details** | **str** | Contact details (JSON string) | [optional] +**know_details** | **str** | Learn more | [optional] +**question_lang** | **str** | Question language | [optional] +**create_timest** | **datetime** | Created time | [optional] +**update_timest** | **datetime** | Update time | [optional] +**apply_type** | **int** | Application type | [optional] +**audit_status** | **int** | Review status (0 - pending, 1 - approved, 2 - rejected) | [optional] +**edit_counts** | **int** | Edit count | [optional] +**proof_images** | **str** | Proof image path | [optional] +**proof_videos** | **str** | Proof video path | [optional] +**proof_url** | **str** | Proof link | [optional] +**audit_reason** | **int** | Review reason code | [optional] +**channel_type** | **int** | Channel type | [optional] +**region** | **str** | Region | [optional] +**phone** | **str** | Phone number | [optional] +**telegram** | **str** | Telegram account | [optional] +**other_contact** | [**OtherContact**](OtherContact.md) | | [optional] +**proof_images_url_list** | **list[str]** | List of proof image URLs | [optional] +**proof_videos_url_list** | **list[str]** | List of proof video URLs | [optional] +**apply_msg** | **str** | Application message | [optional] +**jump_url** | **str** | Redirect URL | [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/PartnerApplicationResponse.md b/docs/PartnerApplicationResponse.md new file mode 100644 index 00000000..c46acff0 --- /dev/null +++ b/docs/PartnerApplicationResponse.md @@ -0,0 +1,13 @@ +# PartnerApplicationResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error Code, 0 Indicates Success | +**message** | **str** | Error message description | +**data** | [**PartnerApplication**](PartnerApplication.md) | | +**timestamp** | **int** | Unix timestamp | + +[[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/PartnerApplicationResponseAllOf.md b/docs/PartnerApplicationResponseAllOf.md new file mode 100644 index 00000000..fbad9fcc --- /dev/null +++ b/docs/PartnerApplicationResponseAllOf.md @@ -0,0 +1,10 @@ +# PartnerApplicationResponseAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PartnerApplication**](PartnerApplication.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/PartnerDataAggregated.md b/docs/PartnerDataAggregated.md new file mode 100644 index 00000000..4a4963ec --- /dev/null +++ b/docs/PartnerDataAggregated.md @@ -0,0 +1,17 @@ +# PartnerDataAggregated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rebate_amount** | **str** | Rebate amount as a string for precision. Up to 6 decimal places; trailing zeros removed. | +**trade_volume** | **str** | Trading volume as a string for precision. Up to 6 decimal places; trailing zeros removed. | +**net_fee** | **str** | Net fee as a string for precision. Up to 6 decimal places; trailing zeros removed. | +**customer_count** | **int** | Customer count (invited users) | +**trading_user_count** | **str** | Transaction participant count​ (string format, consistent with online JSON serialization) only returns a specific value when business_type=0(all), and returns nullfor other business types. | +**time_range_desc** | **str** | Time range description | +**business_type** | **int** | Business Type | +**business_type_desc** | **str** | Business type description; allowed values: All, Spot, Futures, Alpha, Web3, Perps (DEX), Exchange All, Web3 All, TradFi | + +[[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/PartnerDataAggregatedResponse.md b/docs/PartnerDataAggregatedResponse.md new file mode 100644 index 00000000..e0b4a046 --- /dev/null +++ b/docs/PartnerDataAggregatedResponse.md @@ -0,0 +1,13 @@ +# PartnerDataAggregatedResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error Code, 0 Indicates Success | +**message** | **str** | Error message description | +**data** | [**PartnerDataAggregated**](PartnerDataAggregated.md) | | +**timestamp** | **int** | Unix timestamp | + +[[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/PartnerDataAggregatedResponseAllOf.md b/docs/PartnerDataAggregatedResponseAllOf.md new file mode 100644 index 00000000..4cc18d5b --- /dev/null +++ b/docs/PartnerDataAggregatedResponseAllOf.md @@ -0,0 +1,10 @@ +# PartnerDataAggregatedResponseAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PartnerDataAggregated**](PartnerDataAggregated.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/PlaceBizPushOrder.md b/docs/PlaceBizPushOrder.md index 33728509..f8870e39 100644 --- a/docs/PlaceBizPushOrder.md +++ b/docs/PlaceBizPushOrder.md @@ -4,33 +4,33 @@ Place ad order request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_type** | **str** | Cryptocurrency | +**currency_type** | **str** | Cryptocurrency symbol. | **exchange_type** | **str** | Fiat currency | -**type** | **str** | Ad type: 0=Sell, 1=Buy, 2=Edit sell, 3=Edit buy | -**unit_price** | **str** | Unit price | -**number** | **str** | Size | -**pay_type** | **str** | Payment method | -**pay_type_json** | **str** | Payment method JSON string | [optional] -**rate_fixed** | **str** | Price type: 0-Floating price, 1-Fixed price | [optional] -**oid** | **str** | Ad ID when editing | [optional] -**min_amount** | **str** | Minimum transaction amount per order | -**max_amount** | **str** | Maximum transaction amount per order | -**tier_limit** | **str** | Order tier limit | [optional] -**verified_limit** | **str** | Verification level limit | [optional] -**reg_time_limit** | **str** | Registration time limit | [optional] -**advertisers_limit** | **str** | Advertiser restriction | [optional] -**hide_payment** | **str** | Whether to hide payment method: 1=Yes, 0=No | [optional] -**expire_min** | **str** | Ad expiration time (minutes) | [optional] -**trade_tips** | **str** | Trading terms | [optional] -**auto_reply** | **str** | Auto reply | [optional] -**min_completed_limit** | **str** | Minimum limit of completed orders | [optional] -**max_completed_limit** | **str** | Maximum limit of completed orders | [optional] -**completed_rate_limit** | **str** | 30-day completion rate limit | [optional] -**user_country_limit** | **str** | KYC nationality restriction | [optional] -**user_order_limit** | **str** | Order count limit | [optional] -**rate_reference_id** | **str** | Reference exchange rate ID | [optional] -**rate_offset** | **str** | Reference exchange rate offset | [optional] -**float_trend** | **str** | 444 | [optional] +**type** | **str** | Ad operation type. `0`: publish sell ad; `1`: publish buy ad; `2`: edit sell ad; `3`: edit buy ad. | +**unit_price** | **str** | Per-unit price in fixed-price mode. | +**number** | **str** | Ad amount priced in `currencyType`. | +**pay_type** | **str** | Payment types, comma-separated; from pay type list `pay_type`, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. | +**pay_type_json** | **str** | JSON map of payment type -> user's payment method ID. | [optional] +**rate_fixed** | **str** | Price type: `0` floating; `1` fixed. | [optional] +**oid** | **str** | Pass ad ID when editing; omit or empty when publishing a new ad. | [optional] +**min_amount** | **str** | Minimum trade amount in `exchangeType`. | +**max_amount** | **str** | Maximum amount per trade in `exchangeType` fiat units. | +**tier_limit** | **str** | Minimum counterparty VIP level; `0` means no requirement. | [optional] +**verified_limit** | **str** | Minimum counterparty verification level; `0` means no limit. | [optional] +**reg_time_limit** | **str** | Minimum counterparty account age in days; `0` means no limit. | [optional] +**advertisers_limit** | **str** | Whether trading with the advertiser is restricted. `0`: no; `1`: yes. | [optional] +**expire_min** | **str** | Payment timeout in minutes. | [optional] +**trade_tips** | **str** | Advertisement trade terms displayed to ordering users; goes through off-platform traffic diversion risk control on submission, and when hit, the advertisement is not saved and code 70305102 is returned | [optional] +**auto_reply** | **str** | Auto reply content after order creation; goes through off-platform traffic diversion risk control on submission, and when hit, the advertisement is not saved and code 70305102 is returned | [optional] +**min_completed_limit** | **str** | Minimum completed orders for counterparty; `-1` unlimited. | [optional] +**max_completed_limit** | **str** | Maximum completed orders for counterparty; `-1` unlimited. | [optional] +**completed_rate_limit** | **str** | Counterparty minimum 30-day completion rate; `-1` means no limit. | [optional] +**user_country_limit** | **str** | KYC nationality restriction; `-1` means no restriction. | [optional] +**user_order_limit** | **str** | Maximum concurrent orders allowed for the counterparty. `-1`: unlimited. | [optional] +**rate_reference_id** | **str** | Floating price reference. `1`: platform reference; `2`: Gate reference; `3`: spot reference. | [optional] +**rate_offset** | **str** | Absolute floating offset ratio, e.g. `0.5` means 0.5%. | [optional] +**float_trend** | **str** | Floating direction: `0` markup; `1` markdown. | [optional] +**team_payment_uid** | **str** | Team payee UID; optional for non-team merchants. | [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 index d69b522b..25c4f686 100644 --- a/docs/PlaceDualInvestmentOrder.md +++ b/docs/PlaceDualInvestmentOrder.md @@ -5,7 +5,6 @@ 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] diff --git a/docs/PlaceDualInvestmentOrderParams.md b/docs/PlaceDualInvestmentOrderParams.md index 1d91a0e8..25cd3fd6 100644 --- a/docs/PlaceDualInvestmentOrderParams.md +++ b/docs/PlaceDualInvestmentOrderParams.md @@ -5,7 +5,7 @@ Dual Investment Order Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **plan_id** | **str** | Product ID | -**amount** | **str** | Subscription amount, mutually exclusive with copies field | +**amount** | **str** | Subscription amount | **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/Position.md b/docs/Position.md index 7c700ca8..3af6be2d 100644 --- a/docs/Position.md +++ b/docs/Position.md @@ -7,6 +7,9 @@ Name | Type | Description | Notes **user** | **int** | User ID | [optional] [readonly] **contract** | **str** | Futures contract | [optional] [readonly] **size** | **str** | Position size | [optional] [readonly] +**hedge_status** | **str** | The hedging status of the position under the Delta-neutral strategy. Including: - `partial_hedged`: partially hedged - `full_hedged`: fully hedged | [optional] [readonly] +**hedged_size** | **str** | The hedged position size under the Delta-neutral strategy. | [optional] [readonly] +**unhedged_size** | **str** | The unhedged position size under the Delta-neutral strategy, calculated as `max(abs(size) - abs(hedged_size), 0)`. | [optional] [readonly] **leverage** | **str** | leverage for isolated margin. 0 means cross margin. For leverage of cross margin, please refer to `cross_leverage_limit`. | [optional] **risk_limit** | **str** | Position risk limit | [optional] **leverage_max** | **str** | the maximum permissible leverage given to the current positon value: the higher positon value, the lower maximum permissible leverage | [optional] [readonly] diff --git a/docs/PositionHistoryListData.md b/docs/PositionHistoryListData.md index 9b14964e..69d94096 100644 --- a/docs/PositionHistoryListData.md +++ b/docs/PositionHistoryListData.md @@ -4,6 +4,8 @@ Response data ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**total** | **int** | Total amount | [optional] +**total_page** | **int** | Total pages | [optional] **list** | [**list[PositionHistoryListDataList]**](PositionHistoryListDataList.md) | Query historical position 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/PreviewFromParam.md b/docs/PreviewFromParam.md new file mode 100644 index 00000000..d7b0837a --- /dev/null +++ b/docs/PreviewFromParam.md @@ -0,0 +1,12 @@ +# PreviewFromParam + +Preview the selling side of the request: currency + quantity. The semantics are similar to `CreateParam` on the `from` side (both `asset` + `amount`). +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | The currency symbol to be swapped out. | +**amount** | **str** | The currency swap quantity, decimal string. | + +[[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/PreviewOrder.md b/docs/PreviewOrder.md new file mode 100644 index 00000000..7cbe605a --- /dev/null +++ b/docs/PreviewOrder.md @@ -0,0 +1,13 @@ +# PreviewOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | [**list[PreviewOrderDetail]**](PreviewOrderDetail.md) | | +**to** | [**list[PreviewOrderDetail]**](PreviewOrderDetail.md) | | +**usdt_evaluated_value** | **str** | | +**usdt_evaluated_value_show** | **str** | | + +[[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/PreviewOrderDetail.md b/docs/PreviewOrderDetail.md new file mode 100644 index 00000000..d25e68a9 --- /dev/null +++ b/docs/PreviewOrderDetail.md @@ -0,0 +1,12 @@ +# PreviewOrderDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**amount** | **str** | | +**amount_show** | **str** | | + +[[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/PreviewToParam.md b/docs/PreviewToParam.md new file mode 100644 index 00000000..bcbfcf7b --- /dev/null +++ b/docs/PreviewToParam.md @@ -0,0 +1,12 @@ +# PreviewToParam + +**For preview only** `OrderPreviewV1Req.to`. Target currency + **ratio ratio**. **Forbidden** is confused with the order `CreateParam`: the `to` of the order must be **`amount`**, and there is no `ratio` field. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | Target currency symbol; often corresponds to `recommend_v2.*[].schemes[].name` in config. | +**ratio** | **str** | The weight ratio of the target currency in the portfolio, **decimal string** (such as `0.2`, `0.5`). Often consistent with the `schemes[].ratio` of a strategy under `recommend_v2` of `GET /asset-swap/config`. | + +[[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/QuickEstimatedRepayment.md b/docs/QuickEstimatedRepayment.md new file mode 100644 index 00000000..143a8631 --- /dev/null +++ b/docs/QuickEstimatedRepayment.md @@ -0,0 +1,11 @@ +# QuickEstimatedRepayment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**debt_currencies** | [**list[UnifiedQuickRepayDebtItem]**](UnifiedQuickRepayDebtItem.md) | Liability currencies | [optional] +**available_currencies** | [**list[UnifiedQuickRepayAvailableItem]**](UnifiedQuickRepayAvailableItem.md) | Currencies available for 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/QuickRepaymentRequest.md b/docs/QuickRepaymentRequest.md new file mode 100644 index 00000000..55d38c7e --- /dev/null +++ b/docs/QuickRepaymentRequest.md @@ -0,0 +1,11 @@ +# QuickRepaymentRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**debt_currencies** | **list[str]** | Liability currencies | +**available_currencies** | **list[str]** | Currencies to repay with | + +[[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/QuickRepaymentResponse.md b/docs/QuickRepaymentResponse.md new file mode 100644 index 00000000..e502051b --- /dev/null +++ b/docs/QuickRepaymentResponse.md @@ -0,0 +1,13 @@ +# QuickRepaymentResponse + +Quick repayment result +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | +**repaid_infos** | [**list[UnifiedQuickRepayRepaidInfo]**](UnifiedQuickRepayRepaidInfo.md) | Repaid currency details | +**used_infos** | [**list[UnifiedQuickRepayUsedInfo]**](UnifiedQuickRepayUsedInfo.md) | Currencies used for 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/RebateApi.md b/docs/RebateApi.md index 6b7e9056..42f30a59 100644 --- a/docs/RebateApi.md +++ b/docs/RebateApi.md @@ -13,6 +13,9 @@ Method | HTTP request | Description [**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 +[**get_partner_application_recent**](RebateApi.md#get_partner_application_recent) | **GET** /rebate/partner/applications/recent | Get recent partner application records +[**get_partner_eligibility**](RebateApi.md#get_partner_eligibility) | **GET** /rebate/partner/eligibility | Check partner application eligibility +[**get_partner_agent_data_aggregated**](RebateApi.md#get_partner_agent_data_aggregated) | **GET** /rebate/partner/data/aggregated | Aggregated partner agent statistics # **agency_transaction_history** @@ -484,7 +487,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) # **rebate_broker_transaction_history** -> list[BrokerTransaction] rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) +> list[BrokerTransactionHistory] rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) Broker obtains user's trading history @@ -542,7 +545,7 @@ Name | Type | Description | Notes ### Return type -[**list[BrokerTransaction]**](BrokerTransaction.md) +[**list[BrokerTransactionHistory]**](BrokerTransactionHistory.md) ### Authorization @@ -692,3 +695,209 @@ 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_partner_application_recent** +> PartnerApplicationResponse get_partner_application_recent() + +Get recent partner application records + +Get the current user's recent partner application records. This endpoint returns application records within the last 30 days, including application status, review information, application materials, and other 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.RebateApi(api_client) + +try: + # Get recent partner application records + api_response = api_instance.get_partner_application_recent() + 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->get_partner_application_recent: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PartnerApplicationResponse**](PartnerApplicationResponse.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** | Successful response | - | + +[[Back to top]](#) [[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_partner_eligibility** +> EligibilityResponse get_partner_eligibility() + +Check partner application eligibility + +Check whether the current user is eligible to apply as a partner. This endpoint checks multiple conditions: account status (banned or not), whether it is a sub-account, whether already a partner, KYC verification status, whether under another agent's referral chain, whether on the blacklist, and other business rule restrictions + +### 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: + # Check partner application eligibility + api_response = api_instance.get_partner_eligibility() + 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->get_partner_eligibility: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EligibilityResponse**](EligibilityResponse.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** | Successful response | - | + +[[Back to top]](#) [[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_partner_agent_data_aggregated** +> PartnerDataAggregatedResponse get_partner_agent_data_aggregated(start_date=start_date, end_date=end_date, business_type=business_type) + +Aggregated partner agent statistics + +Query aggregated partner-agent statistics for a time range, including rebate amount, trading volume, net fee, customer count, and trading user count. **Notes:** - `trading_user_count` is only returned when `business_type=0` (All). - Time parameters use UTC+8. - If no time range is passed, the last 7 days are queried by default. - Partner agents only; sub-accounts are not allowed. + +### 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) +start_date = '2024-01-01 00:00:00' # str | Query start time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the start of the last 7 days. (optional) +end_date = '2024-01-07 23:59:59' # str | Query end time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the end of the last 7 days. (optional) +business_type = 0 # int | Business type filter: - 0: All (default) - 1: Spot - 2: Futures - 3: Alpha - 4: Web3 - 5: Perps (DEX) - 6: Exchange All - 7: Web3 All - 8: TradFi (optional) (default to 0) + +try: + # Aggregated partner agent statistics + api_response = api_instance.get_partner_agent_data_aggregated(start_date=start_date, end_date=end_date, business_type=business_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 RebateApi->get_partner_agent_data_aggregated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_date** | **str**| Query start time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the start of the last 7 days. | [optional] + **end_date** | **str**| Query end time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the end of the last 7 days. | [optional] + **business_type** | **int**| Business type filter: - 0: All (default) - 1: Spot - 2: Futures - 3: Alpha - 4: Web3 - 5: Perps (DEX) - 6: Exchange All - 7: Web3 All - 8: TradFi | [optional] [default to 0] + +### Return type + +[**PartnerDataAggregatedResponse**](PartnerDataAggregatedResponse.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 | - | +**400** | Invalid request parameters | - | +**401** | Unauthorized access | - | +**403** | Access denied | - | + +[[Back to top]](#) [[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/Recommend.md b/docs/Recommend.md new file mode 100644 index 00000000..72e490f8 --- /dev/null +++ b/docs/Recommend.md @@ -0,0 +1,13 @@ +# Recommend + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**balance** | **dict(str, str)** | Mapping of string keys to string values, corresponding to Go's map[string]string. | +**btc_faith** | **dict(str, str)** | Mapping of string keys to string values, corresponding to Go's map[string]string. | +**conservative** | **dict(str, str)** | Mapping of string keys to string values, corresponding to Go's map[string]string. | +**gt_faith** | **dict(str, str)** | Mapping of string keys to string values, corresponding to Go's map[string]string. | + +[[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/RecommendV2Scheme.md b/docs/RecommendV2Scheme.md new file mode 100644 index 00000000..df07e700 --- /dev/null +++ b/docs/RecommendV2Scheme.md @@ -0,0 +1,12 @@ +# RecommendV2Scheme + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**priority** | **int** | | +**ratio** | **str** | | + +[[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/RecommendV2Strategy.md b/docs/RecommendV2Strategy.md new file mode 100644 index 00000000..61bda14d --- /dev/null +++ b/docs/RecommendV2Strategy.md @@ -0,0 +1,12 @@ +# RecommendV2Strategy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**priority** | **int** | | +**schemes** | [**list[RecommendV2Scheme]**](RecommendV2Scheme.md) | | + +[[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/RedeemLaunchPoolResponse.md b/docs/RedeemLaunchPoolResponse.md new file mode 100644 index 00000000..a4aa0b6f --- /dev/null +++ b/docs/RedeemLaunchPoolResponse.md @@ -0,0 +1,10 @@ +# RedeemLaunchPoolResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Whether redemption 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/RedeemV4.md b/docs/RedeemV4.md new file mode 100644 index 00000000..b86a5329 --- /dev/null +++ b/docs/RedeemV4.md @@ -0,0 +1,12 @@ +# RedeemV4 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pid** | **int** | Product ID | +**rid** | **int** | Reward pool ID | +**amount** | **str** | Redemption amount (string format to preserve precision) | + +[[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/SendChatMessageRequest.md b/docs/SendChatMessageRequest.md index 6378d5b7..3109c3fb 100644 --- a/docs/SendChatMessageRequest.md +++ b/docs/SendChatMessageRequest.md @@ -5,8 +5,8 @@ Send chat message request Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **txid** | **int** | Order ID | -**type** | **int** | 0=Text, 1=File (video or image), default is 0 if not provided | [optional] -**message** | **str** | Message content | +**type** | **int** | Message type: `0` text; `1` file (image or video); defaults to `0`. | [optional] +**message** | **str** | Message content. When type=0, pass text up to 500 characters, which goes through off-platform traffic diversion risk control; when hit, the response contains risk_type=1 and toast_msg. When type=1, pass the file_key returned by upload_chat_file | [[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/SetMerchantWorkHoursRequest.md b/docs/SetMerchantWorkHoursRequest.md new file mode 100644 index 00000000..69853bcc --- /dev/null +++ b/docs/SetMerchantWorkHoursRequest.md @@ -0,0 +1,16 @@ +# SetMerchantWorkHoursRequest + +Request to set merchant working status or custom working hours +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**work_status** | **int** | Working status. 0: resting, 1: working, 2: using custom working hours | +**cycle_type** | **str** | Custom working cycle; required when work_status is 2 | [optional] +**day_of_week** | **str** | Weekly working days, comma-separated values 1-7 for Monday to Sunday; required when work_status is 2 and cycle_type is Weekly | [optional] +**time_zone** | **str** | UTC timezone offset, ranging from -12 to +14; required when work_status is 2 | [optional] +**start_time** | **str** | Custom working start time in HH:mm format; required when work_status is 2 and must not be later than end_time | [optional] +**end_time** | **str** | Custom working end time in HH:mm format; required when work_status is 2 and must not be earlier than start_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/SpotAccountBook.md b/docs/SpotAccountBook.md index 80d34cb3..39d188e1 100644 --- a/docs/SpotAccountBook.md +++ b/docs/SpotAccountBook.md @@ -8,7 +8,7 @@ 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 change type; deprecated (see `code` for account change type encoding) | [optional] **code** | **str** | Account change code, see [Asset Record Code] (Asset Record Code) | [optional] **text** | **str** | Additional information | [optional] diff --git a/docs/SpotApi.md b/docs/SpotApi.md index 359cfb0b..22c412c8 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -1563,7 +1563,7 @@ Name | Type | Description | Notes Query personal trading records -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. +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,000, that is, limit * (page - 1) <= 100,000. ### Example diff --git a/docs/SpotGridCreateParams.md b/docs/SpotGridCreateParams.md new file mode 100644 index 00000000..b917b1ab --- /dev/null +++ b/docs/SpotGridCreateParams.md @@ -0,0 +1,20 @@ +# SpotGridCreateParams + +Creation parameters for the spot grid strategy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**money** | **str** | Amount of investment | +**low_price** | **str** | Range lower limit | +**high_price** | **str** | Range upper limit | +**grid_num** | **int** | Number of grids | +**price_type** | **int** | | +**trigger_price** | **str** | | [optional] +**stop_profit** | **str** | | [optional] +**stop_loss** | **str** | | [optional] +**profit_sharing_ratio** | **str** | | [optional] +**is_use_base** | **bool** | | [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/SpotGridCreateRequest.md b/docs/SpotGridCreateRequest.md new file mode 100644 index 00000000..32aa2ba0 --- /dev/null +++ b/docs/SpotGridCreateRequest.md @@ -0,0 +1,13 @@ +# SpotGridCreateRequest + +Create the request body for the spot grid policy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_type** | **str** | | +**market** | **str** | | +**create_params** | [**SpotGridCreateParams**](SpotGridCreateParams.md) | | + +[[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/SpotMartingaleCreateParams.md b/docs/SpotMartingaleCreateParams.md new file mode 100644 index 00000000..7e444b18 --- /dev/null +++ b/docs/SpotMartingaleCreateParams.md @@ -0,0 +1,17 @@ +# SpotMartingaleCreateParams + +Spot martingale creation parameters (serialized fields aligned with `MartingaleBot`). - **Stop-loss**: use `stop_loss_per_cycle` (ratio per round), same as the app; **do not** use `stop_loss_price`. - Optional **`trigger_price`**: trigger price. - If `stop_loss_per_cycle` is passed and > 0, the server validates roughly between `0.001` and `0.9999` (same as `check_martingale`). +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invest_amount** | **str** | | +**price_deviation** | **str** | Add-position deviation ratio as a decimal string (e.g. a 2% drop is `0.02`). | +**max_orders** | **int** | | +**take_profit_ratio** | **str** | Take-profit ratio per round as a decimal string. | +**stop_loss_per_cycle** | **str** | Stop-loss ratio per round as a decimal string; optional; aligned with app `stop_loss_per_cycle`. | [optional] +**trigger_price** | **str** | Trigger price; optional. | [optional] +**profit_sharing_ratio** | **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/SpotMartingaleCreateRequest.md b/docs/SpotMartingaleCreateRequest.md new file mode 100644 index 00000000..a1e819b7 --- /dev/null +++ b/docs/SpotMartingaleCreateRequest.md @@ -0,0 +1,13 @@ +# SpotMartingaleCreateRequest + +Create the request body of the Spot Martin strategy. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_type** | **str** | | +**market** | **str** | | +**create_params** | [**SpotMartingaleCreateParams**](SpotMartingaleCreateParams.md) | | + +[[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/SpotOrderStopLoss.md b/docs/SpotOrderStopLoss.md new file mode 100644 index 00000000..ae029e18 --- /dev/null +++ b/docs/SpotOrderStopLoss.md @@ -0,0 +1,12 @@ +# SpotOrderStopLoss + +Stop loss for limit orders. Pass {} to cancel stop loss; pass null to leave stop loss unchanged. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trigger_price** | **str** | Stop loss trigger price When `side == \"buy\"`, `trigger_price` must be less than `price` When `side == \"sell\"`, `trigger_price` must be greater than `price` | [optional] +**order_price** | **str** | Stop-loss order 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/SpotOrderStopProfit.md b/docs/SpotOrderStopProfit.md new file mode 100644 index 00000000..f53135b5 --- /dev/null +++ b/docs/SpotOrderStopProfit.md @@ -0,0 +1,12 @@ +# SpotOrderStopProfit + +Take profit for limit orders. Pass {} to cancel take profit; pass null to leave take profit unchanged. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trigger_price** | **str** | Take profit trigger price When `side == \"buy\"`, `trigger_price` must be greater than `price` When `side == \"sell\"`, `trigger_price` must be less than `price` | [optional] +**order_price** | **str** | Take profit order 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/SpotPricePutOrder.md b/docs/SpotPricePutOrder.md index 535d7beb..511cd11b 100644 --- a/docs/SpotPricePutOrder.md +++ b/docs/SpotPricePutOrder.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **price** | **str** | Order price | **amount** | **str** | Trading quantity, refers to the trading quantity of the trading currency, i.e., the currency that needs to be traded, for example, the quantity of BTC in BTC_USDT. | **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'] +**time_in_force** | **str** | time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only | [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] diff --git a/docs/SquareApi.md b/docs/SquareApi.md new file mode 100644 index 00000000..f68e76bd --- /dev/null +++ b/docs/SquareApi.md @@ -0,0 +1,148 @@ +# gate_api.SquareApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_square_ai_search**](SquareApi.md#list_square_ai_search) | **GET** /social/message/search | AI MCP Dynamic Search +[**list_live_replay**](SquareApi.md#list_live_replay) | **GET** /social/live/tag_coin_live_replay | Gate AI Assistant live stream data retrieval + + +# **list_square_ai_search** +> ListSquareAiSearchResponse list_square_ai_search(keyword=keyword, currency=currency, time_range=time_range, sort=sort, limit=limit, page=page) + +AI MCP Dynamic Search + +Dynamic search endpoint for AI MCP platform. All parameters are passed via query string. Returns simplified fields. Designed for LLM function calling / MCP tool scenarios. + +### 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.SquareApi(api_client) +keyword = 'keyword_example' # str | Search keyword (currency name or content keyword, e.g., BTC, ETH) (optional) +currency = 'currency_example' # str | Filter by currency (exact currency code, e.g., BTC, ETH, SOL) (optional) +time_range = 0 # int | Time range: 0 = unlimited (default), 1 = last day, 2 = last week, 3 = last month (optional) (default to 0) +sort = 0 # int | Sort order: 0 = most popular (default), 1 = latest (optional) (default to 0) +limit = 10 # int | Return count, 1-50, default 10 (optional) (default to 10) +page = 1 # int | Page number (optional) (default to 1) + +try: + # AI MCP Dynamic Search + api_response = api_instance.list_square_ai_search(keyword=keyword, currency=currency, time_range=time_range, sort=sort, limit=limit, page=page) + 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 SquareApi->list_square_ai_search: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **keyword** | **str**| Search keyword (currency name or content keyword, e.g., BTC, ETH) | [optional] + **currency** | **str**| Filter by currency (exact currency code, e.g., BTC, ETH, SOL) | [optional] + **time_range** | **int**| Time range: 0 = unlimited (default), 1 = last day, 2 = last week, 3 = last month | [optional] [default to 0] + **sort** | **int**| Sort order: 0 = most popular (default), 1 = latest | [optional] [default to 0] + **limit** | **int**| Return count, 1-50, default 10 | [optional] [default to 10] + **page** | **int**| Page number | [optional] [default to 1] + +### Return type + +[**ListSquareAiSearchResponse**](ListSquareAiSearchResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The endpoint always returns HTTP 200. Business results are distinguished by the code field (code=0 means success) | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[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_live_replay** +> ListLiveReplayResponse list_live_replay(tag=tag, coin=coin, sort=sort, limit=limit) + +Gate AI Assistant live stream data retrieval + +AI assistant live stream/replay search endpoint. Filters live rooms or replay videos by business tags and currency. Each record in the returned list is distinguished by content_type: streaming = live broadcast (live field has value), video = replay video (video field has value). The number of results is controlled by the limit parameter (max 10), no additional pagination needed. + +### 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.SquareApi(api_client) +tag = 'tag_example' # str | Business type filter. Available values: Market Analysis, Hot Topics, Blockchain, Others (optional) +coin = 'coin_example' # str | Filter by currency name (e.g., BTC, ETH) (optional) +sort = 'hot' # str | Sort order: hot = most popular (default), new = latest (optional) (default to 'hot') +limit = 3 # int | Return count, 1-10, default 3 (optional) (default to 3) + +try: + # Gate AI Assistant live stream data retrieval + api_response = api_instance.list_live_replay(tag=tag, coin=coin, sort=sort, 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 SquareApi->list_live_replay: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tag** | **str**| Business type filter. Available values: Market Analysis, Hot Topics, Blockchain, Others | [optional] + **coin** | **str**| Filter by currency name (e.g., BTC, ETH) | [optional] + **sort** | **str**| Sort order: hot = most popular (default), new = latest | [optional] [default to 'hot'] + **limit** | **int**| Return count, 1-10, default 3 | [optional] [default to 3] + +### Return type + +[**ListLiveReplayResponse**](ListLiveReplayResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The endpoint always returns HTTP 200. Business results are distinguished by the code field (code=200 means success) | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[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/StopAllChaseOrdersReq.md b/docs/StopAllChaseOrdersReq.md new file mode 100644 index 00000000..409e89f5 --- /dev/null +++ b/docs/StopAllChaseOrdersReq.md @@ -0,0 +1,13 @@ +# StopAllChaseOrdersReq + +Request body for stopping chase orders in batch +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contract** | **str** | Optional contract name | [optional] +**settle** | **str** | Overridden by the path parameter | [optional] +**pos_margin_mode** | **str** | Optional 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/StopAllChaseOrdersResp.md b/docs/StopAllChaseOrdersResp.md new file mode 100644 index 00000000..de47c8b9 --- /dev/null +++ b/docs/StopAllChaseOrdersResp.md @@ -0,0 +1,10 @@ +# StopAllChaseOrdersResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | [**list[ChaseOrder]**](ChaseOrder.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/StopChaseOrderReq.md b/docs/StopChaseOrderReq.md new file mode 100644 index 00000000..311546b2 --- /dev/null +++ b/docs/StopChaseOrderReq.md @@ -0,0 +1,13 @@ +# StopChaseOrderReq + +Request body for stopping a chase order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Order ID. Either id or text must be provided | [optional] +**text** | **str** | Custom text. Required only when id is 0 or omitted | [optional] +**settle** | **str** | Overridden by the path parameter | [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/StopChaseOrderResp.md b/docs/StopChaseOrderResp.md new file mode 100644 index 00000000..afa2bfc5 --- /dev/null +++ b/docs/StopChaseOrderResp.md @@ -0,0 +1,10 @@ +# StopChaseOrderResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order** | [**ChaseOrder**](ChaseOrder.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/StrategyType.md b/docs/StrategyType.md new file mode 100644 index 00000000..22cdca45 --- /dev/null +++ b/docs/StrategyType.md @@ -0,0 +1,10 @@ +# StrategyType + +The complete enumeration of policy types supported by AIHub. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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 deleted file mode 100644 index 2c5428f2..00000000 --- a/docs/StructuredBuy.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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 deleted file mode 100644 index ab944fb5..00000000 --- a/docs/StructuredGetProjectList.md +++ /dev/null @@ -1,22 +0,0 @@ -# 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 deleted file mode 100644 index 3f52c758..00000000 --- a/docs/StructuredOrderList.md +++ /dev/null @@ -1,17 +0,0 @@ -# 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/SubAccountBalance.md b/docs/SubAccountBalance.md index 753d3dd6..2bb012aa 100644 --- a/docs/SubAccountBalance.md +++ b/docs/SubAccountBalance.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uid** | **str** | User ID | [optional] **available** | **dict(str, str)** | Available balances of currencies | [optional] +**locking** | **dict(str, str)** | Locked amount by 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/Symbol.md b/docs/Symbol.md index 62c0c5d9..9041524c 100644 --- a/docs/Symbol.md +++ b/docs/Symbol.md @@ -3,20 +3,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**symbol** | **str** | ExchangeType_BusinessType_Base_Counter | -**exchange_type** | **str** | BINANCE,OKX,GATE,BYBIT,CROSSEX | -**business_type** | **str** | SPOT, FUTURE, MARGIN | -**state** | **str** | live/suspend | -**min_size** | **str** | Minimum order quantity | -**min_notional** | **str** | Minimum order value | -**lot_size** | **str** | Quantity step size | -**tick_size** | **str** | Price step size | -**max_num_orders** | **str** | Maximum number of pending orders | -**max_market_size** | **str** | Maximum order quantity at market price | -**max_limit_size** | **str** | Maximum order quantity at limit price | -**contract_size** | **str** | contract multiplier | -**liquidation_fee** | **str** | Liquidation rate | -**delist_time** | **str** | Millisecond timestamp,0 is normal | +**symbol** | **str** | Unique trading pair identifier in the form ExchangeType_BusinessType_Base_Counter. | +**exchange_type** | **str** | Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). | +**business_type** | **str** | Business type (`SPOT` Spot / `FUTURE` Futures / `MARGIN` Margin). | +**state** | **str** | Status (`live` running / `suspend` paused). | +**min_size** | **str** | Minimum order size allowed by the contract | +**min_notional** | **str** | Minimum Order Value | +**lot_size** | **str** | Quantity Step | +**tick_size** | **str** | Price Step | +**max_num_orders** | **str** | maximumopen orderamount | +**max_market_size** | **str** | Maximum Market Order Quantity | +**max_limit_size** | **str** | Maximum order quantity for limit orders. | +**contract_size** | **str** | Contract Multiplier | +**liquidation_fee** | **str** | Liquidation Fee Rate | +**delist_time** | **str** | Millisecond timestamp; `0` means not delisted. | [[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/TradFiApi.md b/docs/TradFiApi.md index 31561ea0..30d22116 100644 --- a/docs/TradFiApi.md +++ b/docs/TradFiApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description [**update_order**](TradFiApi.md#update_order) | **PUT** /tradfi/orders/{order_id} | Modify order [**delete_order**](TradFiApi.md#delete_order) | **DELETE** /tradfi/orders/{order_id} | Cancel order [**query_order_history_list**](TradFiApi.md#query_order_history_list) | **GET** /tradfi/orders/history | Query historical order list +[**query_order_log**](TradFiApi.md#query_order_log) | **GET** /tradfi/orders/log/{log_id} | Get order details by log ID [**query_position_list**](TradFiApi.md#query_position_list) | **GET** /tradfi/positions | Query active position list [**update_position**](TradFiApi.md#update_position) | **PUT** /tradfi/positions/{position_id} | Modify position [**close_position**](TradFiApi.md#close_position) | **POST** /tradfi/positions/{position_id}/close | Close position @@ -206,14 +207,23 @@ Query trading symbol 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" + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" ) api_client = gate_api.ApiClient(configuration) @@ -243,7 +253,7 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers @@ -326,7 +336,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **query_symbol_ticker** -> Ticker2 query_symbol_ticker(symbol) +> TradFiTicker query_symbol_ticker(symbol) Query trading symbol ticker @@ -365,7 +375,7 @@ Name | Type | Description | Notes ### Return type -[**Ticker2**](Ticker2.md) +[**TradFiTicker**](TradFiTicker.md) ### Authorization @@ -723,7 +733,7 @@ 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) # **create_trad_fi_order** -> CreateOrder create_trad_fi_order(trad_fi_order_request) +> CreateOrder2 create_trad_fi_order(trad_fi_order_request) Create an order @@ -771,7 +781,7 @@ Name | Type | Description | Notes ### Return type -[**CreateOrder**](CreateOrder.md) +[**CreateOrder2**](CreateOrder2.md) ### Authorization @@ -1002,6 +1012,74 @@ 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) +# **query_order_log** +> OrderLog query_order_log(log_id) + +Get order details by log ID + +### 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.TradFiApi(api_client) +log_id = 1223 # int | log_id returned from the order placement API + +try: + # Get order details by log ID + api_response = api_instance.query_order_log(log_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 TradFiApi->query_order_log: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **log_id** | **int**| log_id returned from the order placement API | + +### Return type + +[**OrderLog**](OrderLog.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** | Request success | - | +**400** | Request failed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **query_position_list** > PositionList query_position_list() @@ -1207,7 +1285,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) # **query_position_history_list** -> PositionHistoryList query_position_history_list(begin_time=begin_time, end_time=end_time, symbol=symbol, position_dir=position_dir) +> PositionHistoryList query_position_history_list(page=page, page_size=page_size, begin_time=begin_time, end_time=end_time, symbol=symbol, position_dir=position_dir) Query historical position list @@ -1235,6 +1313,8 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.TradFiApi(api_client) +page = 1 # int | Page number; defaults to 1 if omitted. (optional) +page_size = 10 # int | Page size; defaults to 10 if omitted. Maximum 100. (optional) begin_time = 56 # int | Start Time (Unix Timestamp, seconds). The earliest queryable time is one month ago (optional) end_time = 56 # int | End time (timestamp in seconds) (optional) symbol = 'symbol_example' # str | Trading symbol (e.g., EURUSD) (optional) @@ -1242,7 +1322,7 @@ position_dir = 'position_dir_example' # str | Position direction (Long=long posi try: # Query historical position list - api_response = api_instance.query_position_history_list(begin_time=begin_time, end_time=end_time, symbol=symbol, position_dir=position_dir) + api_response = api_instance.query_position_history_list(page=page, page_size=page_size, begin_time=begin_time, end_time=end_time, symbol=symbol, position_dir=position_dir) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1254,6 +1334,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number; defaults to 1 if omitted. | [optional] + **page_size** | **int**| Page size; defaults to 10 if omitted. Maximum 100. | [optional] **begin_time** | **int**| Start Time (Unix Timestamp, seconds). The earliest queryable time is one month ago | [optional] **end_time** | **int**| End time (timestamp in seconds) | [optional] **symbol** | **str**| Trading symbol (e.g., EURUSD) | [optional] diff --git a/docs/TradFiClosePositionRequest.md b/docs/TradFiClosePositionRequest.md index a120e4d5..51e6c7b7 100644 --- a/docs/TradFiClosePositionRequest.md +++ b/docs/TradFiClosePositionRequest.md @@ -4,8 +4,8 @@ Close position request parameters ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**close_type** | **int** | 平仓类型 说明: - 1:部分平仓(必须传 close_volume) - 2:全平(无需传 close_volume) | -**close_volume** | **str** | 平仓数量 说明: - 当 close_type = 1 时必传 - 当 close_type = 2 时忽略该字段 | [optional] +**close_type** | **int** | Close Type Description: - 1: Partial Close (close_volume is required) - 2: Full Close (close_volume is not required) | +**close_volume** | **str** | Close Volume Description: - Required when close_type = 1 - Ignored when close_type = 2 | [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/Error.md b/docs/TradFiError.md similarity index 97% rename from docs/Error.md rename to docs/TradFiError.md index 6a805882..9209126a 100644 --- a/docs/Error.md +++ b/docs/TradFiError.md @@ -1,4 +1,4 @@ -# Error +# TradFiError ## Properties Name | Type | Description | Notes diff --git a/docs/TradFiPositionUpdateRequest.md b/docs/TradFiPositionUpdateRequest.md index 643a3345..d5aeee6b 100644 --- a/docs/TradFiPositionUpdateRequest.md +++ b/docs/TradFiPositionUpdateRequest.md @@ -4,8 +4,8 @@ Modify position take profit/stop loss parameters ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**price_tp** | **str** | 止盈价格 说明: - 不传 或 传 \"0\":将清空原有止盈价 - 如不希望清空,请传接口返回的原止盈价 | [optional] -**price_sl** | **str** | 止损价格 说明: - 不传 或 传 \"0\":将清空原有止损价 - 如不希望清空,请传接口返回的原止损价 | [optional] +**price_tp** | **str** | Take Profit Price Description: - If not provided or set to \"0\": The original take profit price will be cleared - If you do not want to clear it, pass the original take profit price returned by the interface | [optional] +**price_sl** | **str** | Stop Loss Price Description: - If not provided or set to \"0\": The original stop loss price will be cleared - If you do not want to clear it, pass the original stop loss price returned by the interface | [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/Ticker2.md b/docs/TradFiTicker.md similarity index 87% rename from docs/Ticker2.md rename to docs/TradFiTicker.md index 15bbe2ed..6baea695 100644 --- a/docs/Ticker2.md +++ b/docs/TradFiTicker.md @@ -1,4 +1,4 @@ -# Ticker2 +# TradFiTicker Ticker summary information ## Properties @@ -7,7 +7,7 @@ Name | Type | Description | Notes **label** | **str** | Business status code, non-empty indicates request exception, please refer to TradFi error enumeration in documentation | [optional] **message** | **str** | Return message, returned when request error occurs | [optional] **timestamp** | **int** | Server timestamp (milliseconds) | [optional] -**data** | [**Ticker2Data**](Ticker2Data.md) | | [optional] +**data** | [**TradFiTickerData**](TradFiTickerData.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/Ticker2Data.md b/docs/TradFiTickerData.md similarity index 98% rename from docs/Ticker2Data.md rename to docs/TradFiTickerData.md index 20a4e751..2b8a5012 100644 --- a/docs/Ticker2Data.md +++ b/docs/TradFiTickerData.md @@ -1,4 +1,4 @@ -# Ticker2Data +# TradFiTickerData Response data ## Properties diff --git a/docs/InlineResponse2003.md b/docs/TrailOrderChangeLogResponse.md similarity index 92% rename from docs/InlineResponse2003.md rename to docs/TrailOrderChangeLogResponse.md index e48de260..e7aed06c 100644 --- a/docs/InlineResponse2003.md +++ b/docs/TrailOrderChangeLogResponse.md @@ -1,4 +1,4 @@ -# InlineResponse2003 +# TrailOrderChangeLogResponse ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse2002.md b/docs/TrailOrderDetailResponse.md similarity index 81% rename from docs/InlineResponse2002.md rename to docs/TrailOrderDetailResponse.md index 6f5e0222..c135f18f 100644 --- a/docs/InlineResponse2002.md +++ b/docs/TrailOrderDetailResponse.md @@ -1,11 +1,11 @@ -# InlineResponse2002 +# TrailOrderDetailResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | Status code, 0 means success | [optional] **message** | **str** | Response message | [optional] -**data** | [**InlineResponse200**](InlineResponse200.md) | | [optional] +**data** | [**TrailOrderResponse**](TrailOrderResponse.md) | | [optional] **timestamp** | **int** | Response 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/InlineResponse2001.md b/docs/TrailOrderListResponse.md similarity index 93% rename from docs/InlineResponse2001.md rename to docs/TrailOrderListResponse.md index 666efcb5..22a7cfe4 100644 --- a/docs/InlineResponse2001.md +++ b/docs/TrailOrderListResponse.md @@ -1,4 +1,4 @@ -# InlineResponse2001 +# TrailOrderListResponse ## Properties Name | Type | Description | Notes diff --git a/docs/TrailOrderResponse.md b/docs/TrailOrderResponse.md new file mode 100644 index 00000000..ba3c5adc --- /dev/null +++ b/docs/TrailOrderResponse.md @@ -0,0 +1,10 @@ +# TrailOrderResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order** | [**TrailOrder**](TrailOrder.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/TransactionConfig.md b/docs/TransactionConfig.md new file mode 100644 index 00000000..6201e315 --- /dev/null +++ b/docs/TransactionConfig.md @@ -0,0 +1,11 @@ +# TransactionConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_amount** | **float** | Trading amount requirement | [optional] +**mortgage_limit** | **float** | Pledge limit | [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/TriggerOrderResponse.md b/docs/TriggerOrderResponse.md index 6f44aa38..2f3847c0 100644 --- a/docs/TriggerOrderResponse.md +++ b/docs/TriggerOrderResponse.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Auto order ID | [optional] +**id_string** | **str** | String form of the auto order ID; the same order as numeric `id`, as the decimal string of `id` to avoid int64 precision loss in JavaScript and similar environments. Prefer this field to display the order ID or when a string unique identifier is needed; one-to-one with `id`. Same meaning as the field of the same name in futures price-trigger REST APIs and in `futures.orders` / `futures.autoorders` WebSocket pushes. | [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/UidPushWithdrawalResp.md b/docs/UidPushWithdrawalResp.md index 5363c0fb..4b1da8aa 100644 --- a/docs/UidPushWithdrawalResp.md +++ b/docs/UidPushWithdrawalResp.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] +**id** | **str** | 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/InlineResponse2004.md b/docs/UniChartPoint.md similarity index 94% rename from docs/InlineResponse2004.md rename to docs/UniChartPoint.md index 16d3f6be..a08ae594 100644 --- a/docs/InlineResponse2004.md +++ b/docs/UniChartPoint.md @@ -1,4 +1,4 @@ -# InlineResponse2004 +# UniChartPoint ## Properties Name | Type | Description | Notes diff --git a/docs/InlineResponse2005.md b/docs/UniEstimatedRate.md similarity index 95% rename from docs/InlineResponse2005.md rename to docs/UniEstimatedRate.md index f6010675..87a85659 100644 --- a/docs/InlineResponse2005.md +++ b/docs/UniEstimatedRate.md @@ -1,4 +1,4 @@ -# InlineResponse2005 +# UniEstimatedRate ## Properties Name | Type | Description | Notes diff --git a/docs/UnifiedAccount.md b/docs/UnifiedAccount.md index bd5da422..1a8aef3a 100644 --- a/docs/UnifiedAccount.md +++ b/docs/UnifiedAccount.md @@ -3,22 +3,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**mode** | **str** | Unified account mode: - classic: Classic account mode - multi_currency: Multi-currency margin mode - portfolio: Portfolio margin mode - single_currency: Single-currency margin mode | [optional] **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_initial_margin** | **str** | Total initial margin (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode | [optional] +**total_margin_balance** | **str** | Total margin balance (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode | [optional] +**total_maintenance_margin** | **str** | Total maintenance margin (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode | [optional] +**total_initial_margin_rate** | **str** | Total initial margin rate (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode | [optional] +**total_maintenance_margin_rate** | **str** | Total maintenance margin rate (cross), effective in multi-currency margin/portfolio margin mode, 0 in 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] +**unified_account_total** | **str** | Total unified account assets, includes both cross and isolated total assets in single-currency/multi-currency mode, only cross total assets in portfolio margin mode | [optional] +**unified_account_total_liab** | **str** | Total unified account borrowed, i.e. total cross borrowed, effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode | [optional] +**unified_account_total_equity** | **str** | Total unified account equity, includes both cross and isolated total equity in single-currency/multi-currency mode, only cross total equity in portfolio margin mode | [optional] +**leverage** | **str** | Account leverage multiplier, effective in multi-currency/portfolio margin mode (deprecated). Currency leverage query API: GET /unified/leverage/user_currency_setting | [optional] [readonly] **spot_order_loss** | **str** | Spot Pending Order Loss, in USDT, effective only in Cross-Currency Margin Mode and Portfolio Margin Mode. | [optional] **options_order_loss** | **str** | Option Pending Order Loss, in USDT, effective only in Portfolio Margin Mode. | [optional] **spot_hedge** | **bool** | Spot hedging status: true - enabled, false - disabled | [optional] diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md index a6c38ecd..917bea76 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -26,6 +26,10 @@ Method | HTTP request | Description [**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 +[**get_estimated_quick_repayment**](UnifiedApi.md#get_estimated_quick_repayment) | **GET** /unified/estimated_quick_repayment | Estimated quick repayment details +[**create_quick_repayment**](UnifiedApi.md#create_quick_repayment) | **POST** /unified/quick_repayment | Quick repayment +[**get_unified_delta_neutral**](UnifiedApi.md#get_unified_delta_neutral) | **GET** /unified/delta_neutral | Query the account Delta-neutral strategy mode setting +[**set_unified_delta_neutral**](UnifiedApi.md#set_unified_delta_neutral) | **POST** /unified/delta_neutral | Set the account Delta-neutral strategy mode # **list_unified_accounts** @@ -301,7 +305,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) # **get_unified_borrowable_list** -> list[UnifiedBorrowable1] get_unified_borrowable_list(currencies) +> list[UnifiedBorrowable] get_unified_borrowable_list(currencies) Batch query unified account maximum borrowable amount @@ -349,7 +353,7 @@ Name | Type | Description | Notes ### Return type -[**list[UnifiedBorrowable1]**](UnifiedBorrowable1.md) +[**list[UnifiedBorrowable]**](UnifiedBorrowable.md) ### Authorization @@ -1485,3 +1489,280 @@ 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_estimated_quick_repayment** +> QuickEstimatedRepayment get_estimated_quick_repayment() + +Estimated quick repayment details + +Available for unified account cross-currency margin mode and 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: + # Estimated quick repayment details + api_response = api_instance.get_estimated_quick_repayment() + 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_estimated_quick_repayment: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**QuickEstimatedRepayment**](QuickEstimatedRepayment.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 | - | +**400** | Invalid request parameters | - | +**401** | Authentication failed | - | +**403** | Access denied (e.g. account mode does not support quick repayment) | - | + +[[Back to top]](#) [[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_quick_repayment** +> QuickRepaymentResponse create_quick_repayment(quick_repayment_request) + +Quick repayment + +Available for unified account cross-currency margin mode and portfolio margin mode. Use `GET /unified/estimated_quick_repayment` to query liabilities and pending repayment 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.UnifiedApi(api_client) +quick_repayment_request = gate_api.QuickRepaymentRequest() # QuickRepaymentRequest | + +try: + # Quick repayment + api_response = api_instance.create_quick_repayment(quick_repayment_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 UnifiedApi->create_quick_repayment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **quick_repayment_request** | [**QuickRepaymentRequest**](QuickRepaymentRequest.md)| | + +### Return type + +[**QuickRepaymentResponse**](QuickRepaymentResponse.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** | Repayment successful | - | +**400** | Invalid request parameters | - | +**401** | Authentication failed | - | +**403** | Access denied (e.g. account mode does not support quick repayment) | - | + +[[Back to top]](#) [[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_delta_neutral** +> DeltaNeutralEnabled get_unified_delta_neutral() + +Query the account Delta-neutral strategy mode setting + +### 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 the account Delta-neutral strategy mode setting + api_response = api_instance.get_unified_delta_neutral() + 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_delta_neutral: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DeltaNeutralEnabled**](DeltaNeutralEnabled.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 | - | +**401** | Authentication failed | - | +**403** | Access denied (e.g. insufficient VIP level or the account is not in cross-currency margin mode) | - | + +[[Back to top]](#) [[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_delta_neutral** +> DeltaNeutralEnabled set_unified_delta_neutral(delta_neutral_enabled) + +Set the account Delta-neutral strategy mode + +Enable or disable the account Delta-neutral strategy mode. Requirements for enabling: VIP level >= 4 and the account is in cross-currency margin mode; otherwise 403 is returned. Returns the enabled status after the setting takes effect. + +### 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) +delta_neutral_enabled = gate_api.DeltaNeutralEnabled() # DeltaNeutralEnabled | + +try: + # Set the account Delta-neutral strategy mode + api_response = api_instance.set_unified_delta_neutral(delta_neutral_enabled) + 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_delta_neutral: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **delta_neutral_enabled** | [**DeltaNeutralEnabled**](DeltaNeutralEnabled.md)| | + +### Return type + +[**DeltaNeutralEnabled**](DeltaNeutralEnabled.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** | Set successfully | - | +**400** | Invalid request parameters | - | +**401** | Authentication failed | - | +**403** | Access denied (e.g. insufficient VIP level or the account is not in cross-currency margin mode) | - | + +[[Back to top]](#) [[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 index 9d28adf9..8cbc9960 100644 --- a/docs/UnifiedBalance.md +++ b/docs/UnifiedBalance.md @@ -3,26 +3,27 @@ ## 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] +**available** | **str** | Cross available balance, deducted futures isolated margin occupation and frozen amount (futures isolated occupation, i.e. futures isolated balance), effective in single-currency/multi-currency/portfolio margin mode. | [optional] +**freeze** | **str** | Frozen amount, effective in single-currency/multi-currency/portfolio 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] +**equity** | **str** | Currency equity amount (cross), effective in single-currency/multi-currency/portfolio 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 applies to Single-Currency Margin Mode and Cross-Currency Margin Mode, and is 0 in other modes such as Portfolio 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] +**iso_balance** | **str** | Futures isolated balance, effective in single-currency and multi-currency margin mode, 0 in portfolio margin mode | [optional] +**im** | **str** | Cross initial margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode | [optional] +**mm** | **str** | Cross maintenance margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode | [optional] +**imr** | **str** | Cross initial margin rate, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode | [optional] +**mmr** | **str** | Cross maintenance margin rate, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode | [optional] +**margin_balance** | **str** | Cross margin balance, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode | [optional] +**available_margin** | **str** | Cross available margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode | [optional] **enabled_collateral** | **bool** | Currency enabled as margin: true - Enabled, false - Disabled | [optional] +**balance_version** | **float** | Balance 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/UnifiedBorrowable.md b/docs/UnifiedBorrowable.md index edd2c953..b736493a 100644 --- a/docs/UnifiedBorrowable.md +++ b/docs/UnifiedBorrowable.md @@ -1,5 +1,6 @@ # UnifiedBorrowable +Maximum borrowable amount for unified account ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/UnifiedBorrowable1.md b/docs/UnifiedBorrowable1.md deleted file mode 100644 index 81b38b3d..00000000 --- a/docs/UnifiedBorrowable1.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnifiedBorrowable1 - -Batch query unified account maximum borrowable results -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [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/UnifiedQuickRepayAvailableItem.md b/docs/UnifiedQuickRepayAvailableItem.md new file mode 100644 index 00000000..e2cb3907 --- /dev/null +++ b/docs/UnifiedQuickRepayAvailableItem.md @@ -0,0 +1,12 @@ +# UnifiedQuickRepayAvailableItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**available** | **str** | Available Balance | [optional] +**estimated_usd** | **str** | Estimated USD value | [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/UnifiedQuickRepayDebtItem.md b/docs/UnifiedQuickRepayDebtItem.md new file mode 100644 index 00000000..4ea739f3 --- /dev/null +++ b/docs/UnifiedQuickRepayDebtItem.md @@ -0,0 +1,14 @@ +# UnifiedQuickRepayDebtItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**debt_amount** | **str** | Debt Quantity | [optional] +**estimated_usd** | **str** | Estimated USD value | [optional] +**borrowed** | **str** | Borrowed amount | [optional] +**neg_balance** | **str** | Negative balance | [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/UnifiedQuickRepayRepaidInfo.md b/docs/UnifiedQuickRepayRepaidInfo.md new file mode 100644 index 00000000..bdcbb24c --- /dev/null +++ b/docs/UnifiedQuickRepayRepaidInfo.md @@ -0,0 +1,13 @@ +# UnifiedQuickRepayRepaidInfo + +Repayment details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | +**repaid** | **str** | Repaid amount | +**left** | **str** | Remaining liability 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/UnifiedQuickRepayUsedInfo.md b/docs/UnifiedQuickRepayUsedInfo.md new file mode 100644 index 00000000..3f473dcf --- /dev/null +++ b/docs/UnifiedQuickRepayUsedInfo.md @@ -0,0 +1,12 @@ +# UnifiedQuickRepayUsedInfo + +Repayment details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | +**used** | **str** | Amount converted | + +[[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/UpdateDualCompPositionCrossModeRequest.md similarity index 91% rename from docs/InlineObject.md rename to docs/UpdateDualCompPositionCrossModeRequest.md index dfb7d83a..280e5d0e 100644 --- a/docs/InlineObject.md +++ b/docs/UpdateDualCompPositionCrossModeRequest.md @@ -1,4 +1,4 @@ -# InlineObject +# UpdateDualCompPositionCrossModeRequest ## Properties Name | Type | Description | Notes diff --git a/docs/UploadChatFile.md b/docs/UploadChatFile.md index 3d6338f5..9ce5329e 100644 --- a/docs/UploadChatFile.md +++ b/docs/UploadChatFile.md @@ -4,8 +4,8 @@ Upload chat file request ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**image_content_type** | **str** | File type, currently only images and videos are supported | -**base64_img** | **str** | File content (base64 encoded) | +**image_content_type** | **str** | File MIME type: supports `image/jpeg`, `image/jpg`, `image/png`, `video/mp4`. | +**base64_img** | **str** | Base64 file content; max 20 MB. | [[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 5d1a2937..115d4ee4 100644 --- a/docs/WalletApi.md +++ b/docs/WalletApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description [**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 +[**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 | 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 @@ -740,7 +740,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) # **list_sub_account_balances** -> list[SubAccountBalance] list_sub_account_balances(sub_uid=sub_uid) +> list[SubAccountBalance] list_sub_account_balances(sub_uid=sub_uid, page=page, limit=limit) Query sub-account balance information @@ -769,10 +769,12 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) 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) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned. Default 20, max 100. (optional) (default to 100) try: # Query sub-account balance information - api_response = api_instance.list_sub_account_balances(sub_uid=sub_uid) + api_response = api_instance.list_sub_account_balances(sub_uid=sub_uid, page=page, limit=limit) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -785,6 +787,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **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] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned. Default 20, max 100. | [optional] [default to 100] ### Return type @@ -1010,9 +1014,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) # **list_saved_address** -> list[SavedAddress] list_saved_address(currency, chain=chain, limit=limit, page=page) +> list[SavedAddress] list_saved_address(currency=currency, chain=chain, verified=verified, limit=limit, page=page) -Query withdrawal address whitelist +Query saved address ### Example @@ -1038,14 +1042,15 @@ 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 +currency = 'USDT' # str | Currency (optional) chain = '' # str | Chain name (optional) (default to '') +verified = '' # str | 1 means verified address, 0 means normal address, empty string means no limit (optional) (default to '') limit = '50' # str | Maximum number returned, up to 100 (optional) (default to '50') -page = 1 # int | Page number (optional) (default to 1) +page = 1 # int | page number (optional) (default to 1) try: - # Query withdrawal address whitelist - api_response = api_instance.list_saved_address(currency, chain=chain, limit=limit, page=page) + # Query saved address + api_response = api_instance.list_saved_address(currency=currency, chain=chain, verified=verified, limit=limit, page=page) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1057,10 +1062,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | + **currency** | **str**| Currency | [optional] **chain** | **str**| Chain name | [optional] [default to ''] + **verified** | **str**| 1 means verified address, 0 means normal address, empty string means no limit | [optional] [default to ''] **limit** | **str**| Maximum number returned, up to 100 | [optional] [default to '50'] - **page** | **int**| Page number | [optional] [default to 1] + **page** | **int**| page number | [optional] [default to 1] ### Return type diff --git a/docs/WelfareApi.md b/docs/WelfareApi.md new file mode 100644 index 00000000..d864c5b3 --- /dev/null +++ b/docs/WelfareApi.md @@ -0,0 +1,284 @@ +# gate_api.WelfareApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_identity**](WelfareApi.md#get_user_identity) | **GET** /rewards/getUserIdentity | Get user identity +[**get_beginner_task_list**](WelfareApi.md#get_beginner_task_list) | **GET** /rewards/getBeginnerTaskList | Get beginner task list +[**claim_task**](WelfareApi.md#claim_task) | **POST** /rewards/claimTask | Get the task +[**claim_reward**](WelfareApi.md#claim_reward) | **POST** /rewards/claimReward | Receive mission rewards + + +# **get_user_identity** +> ApiResponseExSkillGetUserIdentityResp get_user_identity() + +Get user identity + +Validate whether the user is eligible for new user rewards. Returns the corresponding error code on validation failure, data is an empty object on success. + +### 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.WelfareApi(api_client) + +try: + # Get user identity + api_response = api_instance.get_user_identity() + 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 WelfareApi->get_user_identity: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ApiResponseExSkillGetUserIdentityResp**](ApiResponseExSkillGetUserIdentityResp.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** | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[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_beginner_task_list** +> ApiResponseExSkillGetBeginnerTaskListResp get_beginner_task_list() + +Get beginner task list + +Get the current user's onboarding task list. By default, the registration tasks (type=10) and guidance tasks (type=11) that have been assigned to the current user are returned. The registration tasks are ranked first and the guidance tasks are ranked behind. When the user does not have a download task and the system determines that the user has not downloaded the app, a \"Download task to be received\" card will be dynamically added. Among them: - `task_type = 23` for download tasks - `status = 0` for download tasks to be collected Results are cached for 60 seconds. Task lists are limited in number (usually no more than 10) and do not require pagination. + +### 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.WelfareApi(api_client) + +try: + # Get beginner task list + api_response = api_instance.get_beginner_task_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 WelfareApi->get_beginner_task_list: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ApiResponseExSkillGetBeginnerTaskListResp**](ApiResponseExSkillGetBeginnerTaskListResp.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** | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **claim_task** +> ApiResponseExSkillClaimTaskResp claim_task(ex_skill_claim_task_req) + +Get the task + +Receive a single welfare task. The current main scene is for new customer download tasks to be collected, but the interface itself supports new customer registration, guidance, and advanced task types. Processing flow: 1. Read the logged in user 2. Verify user qualifications 3. Risk control verification (event code `task_center`) 4. Verify task configuration and task center tasks 5. Verify whether there is an ongoing task 6. If it is a download task, verify whether the App has been downloaded 7. Write `welfare_user_tasks_xx` 8. Report to task center Risk control transparent transmission fields: - Old fields: `user_id`, `ip`, `const_id`, `is_async`, `action`, `task_id` - New fields: `req_method`, `traceid` - Among them: - `req_method` from `X-Gate-Request-Source` - `ip` from `X-Gate-Ip` - `traceid` from `X-Gate-Trace-Id` - `const_id` is fixed to 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.WelfareApi(api_client) +ex_skill_claim_task_req = gate_api.ExSkillClaimTaskReq() # ExSkillClaimTaskReq | + +try: + # Get the task + api_response = api_instance.claim_task(ex_skill_claim_task_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 WelfareApi->claim_task: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ex_skill_claim_task_req** | [**ExSkillClaimTaskReq**](ExSkillClaimTaskReq.md)| | + +### Return type + +[**ApiResponseExSkillClaimTaskResp**](ApiResponseExSkillClaimTaskResp.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** | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **claim_reward** +> ApiResponseExSkillClaimRewardResp claim_reward(ex_skill_claim_reward_req) + +Receive mission rewards + +Receive rewards from a single welfare task. Processing flow: 1. Read the logged in user 2. Verify user qualifications 3. Query `welfare_user_tasks_xx` and require the task status to be `StatusDone(2)` 4. Risk control verification (event code `index_page_check`) 5. Query task details and reward information in the task center 6. If the reward is m and n is selected from the prize pool, then `has_m_n_task = true` will be returned and the reward will not be actually issued. 7. Ordinary rewards will enter the original reward collection logic of the Welfare Center Risk control transparent transmission fields: - Old fields: `user_id`, `ip`, `const_id`, `is_async` - New fields: `req_method`, `traceid` - Among them: - `req_method` from `X-Gate-Request-Source` - `ip` from `X-Gate-Ip` - `traceid` from `X-Gate-Trace-Id` - `const_id` is fixed to 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.WelfareApi(api_client) +ex_skill_claim_reward_req = gate_api.ExSkillClaimRewardReq() # ExSkillClaimRewardReq | + +try: + # Receive mission rewards + api_response = api_instance.claim_reward(ex_skill_claim_reward_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 WelfareApi->claim_reward: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ex_skill_claim_reward_req** | [**ExSkillClaimRewardReq**](ExSkillClaimRewardReq.md)| | + +### Return type + +[**ApiResponseExSkillClaimRewardResp**](ApiResponseExSkillClaimRewardResp.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** | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - | +**400** | Invalid request parameters | - | + +[[Back to top]](#) [[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 index 4a01e58a..cf190c22 100644 --- a/docs/WithdrawalRecord.md +++ b/docs/WithdrawalRecord.md @@ -14,9 +14,9 @@ Name | Type | Description | Notes **address** | **str** | Withdrawal address | [optional] **type** | **str** | Business Type | [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] +**timestamp2** | **str** | Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE, it is the withdrawal success time | [optional] **memo** | **str** | Additional remarks with regards to the withdrawal | [optional] -**status** | **str** | Transaction Status - BCODE: Deposit Code Operation - CANCEL: Cancelled - CANCELPEND: Withdrawal Cancellation Pending - DONE: Completed (Only considered truly on-chain when block_number > 0) - EXTPEND: Sent and Waiting for Confirmation - FAIL: On-Chain Failure Pending Confirmation - FVERIFY: Facial Verification in Progress - LOCKED: Wallet-Side Order Locked - MANUAL: Pending Manual Review - REJECT: Rejected - REQUEST: Request in Progress - REVIEW: Under Review | [optional] [readonly] +**status** | **str** | Transaction Status - BCODE: Deposit Code Operation - CANCEL: Cancelled - CANCELPEND: Withdrawal Cancellation Pending - DONE: Completed - EXTPEND: Sent and Waiting for Confirmation - FAIL: On-Chain Failure Pending Confirmation - FVERIFY: Facial Verification in Progress - LOCKED: Wallet-Side Order Locked - MANUAL: Pending Manual Review - REJECT: Rejected - REQUEST: Request in Progress - 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/example/p2p_merchant_api.py b/example/p2p_merchant_api.py index 7072bf36..a9bf4344 100644 --- a/example/p2p_merchant_api.py +++ b/example/p2p_merchant_api.py @@ -11,7 +11,7 @@ GetCounterpartyUserInfoRequest, GetMyselfPaymentRequest, GetPendingTransactionListRequest, GetTransactionDetailsRequest, MyAdsListRequest, PlaceBizPushOrder, - SendChatMessageRequest, UploadChatFile, + SendChatMessageRequest, SetMerchantWorkHoursRequest, UploadChatFile, ) from gate_api.exceptions import ApiException @@ -35,7 +35,7 @@ def p2p_merchant_demo(run_config): try: # ============================================================ - # 1. Account - user info and payment methods + # 1. Account - user info, payment methods, and work hours # ============================================================ logger.info("=== 1. P2P Merchant Account ===") @@ -47,6 +47,18 @@ def p2p_merchant_demo(run_config): ) logger.info("Payment methods: %s", myself_payment) + # Set merchant work hours (write op, use with care) + # api.p2p_merchant_account_set_merchant_work_hours( + # SetMerchantWorkHoursRequest( + # work_status=2, + # cycle_type="Weekly", + # day_of_week="1,2,3,4,5", + # time_zone="+8", + # start_time="09:00", + # end_time="18:00", + # ) + # ) + # ============================================================ # 2. Ads - my ads, market ads, ad detail; place/update (write ops commented) # ============================================================ @@ -71,10 +83,11 @@ def p2p_merchant_demo(run_config): logger.info("Ad detail: %s", ad_detail) # Example when no my ads (replace with real adv_no): # ad_detail = api.p2p_merchant_books_ads_detail( - # AdsDetailRequest(adv_no="2124287072") + # AdsDetailRequest(adv_no="2124000001") # ) - # Place/edit ad (write op, use with care) + # Place/edit ad (write op, use with care). + # Content risk rejection returns code 70305102 with data.risk_event. # api.p2p_merchant_books_place_biz_push_order( # PlaceBizPushOrder( # currency_type="USDT", @@ -85,17 +98,17 @@ def p2p_merchant_demo(run_config): # min_amount="100", # max_amount="1000", # pay_type="bank", + # pay_type_json='{"bank":"10001"}', # rate_fixed="1", - # hide_payment="0", - # expire_min="15", - # trade_tips="Please pay within 15 minutes", - # auto_reply="Auto reply example", + # expire_min="20", + # trade_tips="Please pay from an account under your own name.", + # auto_reply="Please tap Paid after completing the transfer.", # ) # ) # Update ad status: 1=active, 3=inactive, 4=closed # api.p2p_merchant_books_ads_update_status( - # AdsUpdateStatus(adv_no=123456, adv_status=1) + # AdsUpdateStatus(adv_no=2124000001, adv_status=3) # ) # ============================================================ @@ -110,7 +123,7 @@ def p2p_merchant_demo(run_config): order_tab="pending", select_type="sell", # status="OPEN", - # txid=40036321, + # txid=40000001, # start_time=1700000000, # end_time=1700086399, ) @@ -123,7 +136,7 @@ def p2p_merchant_demo(run_config): fiat_currency="USD", # select_type="sell", # status="ACCEPT", - # txid=40036321, + # txid=40000001, # start_time=1700000000, # end_time=1700086399, # query_dispute=0, @@ -148,7 +161,7 @@ def p2p_merchant_demo(run_config): order_detail = api.p2p_merchant_transaction_get_transaction_details( GetTransactionDetailsRequest( txid=txid_for_detail, - # channel="web3", + # channel="", ) ) logger.info("Order detail: %s", order_detail) @@ -169,10 +182,10 @@ def p2p_merchant_demo(run_config): logger.info("Chat list: %s", chats) # Example when no orders (replace with real txid): # order_detail = api.p2p_merchant_transaction_get_transaction_details( - # GetTransactionDetailsRequest(txid=40036321) + # GetTransactionDetailsRequest(txid=40000001) # ) # chats = api.p2p_merchant_chat_get_chats_list( - # GetChatsListRequest(txid=40036321) + # GetChatsListRequest(txid=40000001) # ) # ============================================================ @@ -182,20 +195,20 @@ def p2p_merchant_demo(run_config): # Buyer confirms payment # api.p2p_merchant_transaction_confirm_payment( - # ConfirmPayment(trade_id="40036321", payment_method="bank") + # ConfirmPayment(txid="40000001", payment_method="bank") # ) # Seller confirms receipt and release # api.p2p_merchant_transaction_confirm_receipt( - # ConfirmReceipt(trade_id="40036321") + # ConfirmReceipt(txid="40000001") # ) # Cancel order # api.p2p_merchant_transaction_cancel( # CancelOrder( - # trade_id="40036321", + # txid="40000001", # reason_id="1", - # reason_memo="I don't want to trade anymore.", + # reason_memo="Canceled after agreement with the counterparty.", # ) # ) @@ -204,11 +217,12 @@ def p2p_merchant_demo(run_config): # ============================================================ logger.info("=== 5. P2P Chat write ops (examples commented) ===") - # Send text message (requires real txid) + # Send text message (requires real txid). + # Content risk matches return code=0 with data.risk_type=1 and data.toast_msg. # api.p2p_merchant_chat_send_chat_message( # SendChatMessageRequest( - # txid=40036321, - # message="Please complete the payment within 15 minutes.", + # txid=40000001, + # message="Payment completed, please check.", # type=0, # ) # ) @@ -217,7 +231,7 @@ def p2p_merchant_demo(run_config): # api.p2p_merchant_chat_upload_chat_file( # UploadChatFile( # image_content_type="image/png", - # base64_img="BASE64_STRING", + # base64_img="iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB...", # ) # ) diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 05ddd69b..218cb7ba 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,9 +14,10 @@ from __future__ import absolute_import -__version__ = "7.2.39" +__version__ = "7.2.100" # import apis into sdk package +from gate_api.api.activity_api import ActivityApi from gate_api.api.cross_ex_api import CrossExApi from gate_api.api.earn_uni_api import EarnUniApi from gate_api.api.margin_uni_api import MarginUniApi @@ -26,17 +27,23 @@ from gate_api.api.unified_api import UnifiedApi from gate_api.api.account_api import AccountApi from gate_api.api.alpha_api import AlphaApi +from gate_api.api.assetswap_api import AssetswapApi +from gate_api.api.bot_api import BotApi +from gate_api.api.coupon_api import CouponApi 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.launch_api import LaunchApi 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.p2p_api import P2pApi from gate_api.api.rebate_api import RebateApi from gate_api.api.spot_api import SpotApi +from gate_api.api.square_api import SquareApi from gate_api.api.wallet_api import WalletApi +from gate_api.api.welfare_api import WelfareApi from gate_api.api.withdrawal_api import WithdrawalApi # import ApiClient @@ -48,6 +55,22 @@ from gate_api.exceptions import ApiKeyError from gate_api.exceptions import ApiException # import models into sdk package +from gate_api.models.ai_hub_create_data import AIHubCreateData +from gate_api.models.ai_hub_create_success_response import AIHubCreateSuccessResponse +from gate_api.models.ai_hub_discover_data import AIHubDiscoverData +from gate_api.models.ai_hub_discover_success_response import AIHubDiscoverSuccessResponse +from gate_api.models.ai_hub_portfolio_base_info import AIHubPortfolioBaseInfo +from gate_api.models.ai_hub_portfolio_detail_data import AIHubPortfolioDetailData +from gate_api.models.ai_hub_portfolio_detail_success_response import AIHubPortfolioDetailSuccessResponse +from gate_api.models.ai_hub_portfolio_metrics import AIHubPortfolioMetrics +from gate_api.models.ai_hub_portfolio_position import AIHubPortfolioPosition +from gate_api.models.ai_hub_portfolio_running_data import AIHubPortfolioRunningData +from gate_api.models.ai_hub_portfolio_running_item import AIHubPortfolioRunningItem +from gate_api.models.ai_hub_portfolio_running_success_response import AIHubPortfolioRunningSuccessResponse +from gate_api.models.ai_hub_portfolio_stop_data import AIHubPortfolioStopData +from gate_api.models.ai_hub_portfolio_stop_request import AIHubPortfolioStopRequest +from gate_api.models.ai_hub_portfolio_stop_success_response import AIHubPortfolioStopSuccessResponse +from gate_api.models.ai_hub_recommendation import AIHubRecommendation from gate_api.models.account_balance import AccountBalance from gate_api.models.account_book_response import AccountBookResponse from gate_api.models.account_detail import AccountDetail @@ -63,10 +86,46 @@ 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.alpha_currency import AlphaCurrency from gate_api.models.alpha_ticker import AlphaTicker +from gate_api.models.amend_options_order_request import AmendOptionsOrderRequest +from gate_api.models.api_response_asset_swap_config import ApiResponseAssetSwapConfig +from gate_api.models.api_response_asset_swap_evaluate import ApiResponseAssetSwapEvaluate +from gate_api.models.api_response_asset_swap_list_assets import ApiResponseAssetSwapListAssets +from gate_api.models.api_response_asset_swap_order_create_v1 import ApiResponseAssetSwapOrderCreateV1 +from gate_api.models.api_response_asset_swap_order_list_v1 import ApiResponseAssetSwapOrderListV1 +from gate_api.models.api_response_asset_swap_order_preview_v1 import ApiResponseAssetSwapOrderPreviewV1 +from gate_api.models.api_response_asset_swap_order_query_v1 import ApiResponseAssetSwapOrderQueryV1 +from gate_api.models.api_response_ex_skill_claim_reward_resp import ApiResponseExSkillClaimRewardResp +from gate_api.models.api_response_ex_skill_claim_reward_resp_data import ApiResponseExSkillClaimRewardRespData +from gate_api.models.api_response_ex_skill_claim_task_resp import ApiResponseExSkillClaimTaskResp +from gate_api.models.api_response_ex_skill_get_beginner_task_list_resp import ApiResponseExSkillGetBeginnerTaskListResp +from gate_api.models.api_response_ex_skill_get_beginner_task_list_resp_data import ApiResponseExSkillGetBeginnerTaskListRespData +from gate_api.models.api_response_ex_skill_get_beginner_task_list_resp_data_tasks import ApiResponseExSkillGetBeginnerTaskListRespDataTasks +from gate_api.models.api_response_ex_skill_get_user_identity_resp import ApiResponseExSkillGetUserIdentityResp +from gate_api.models.asset_list_resp import AssetListResp +from gate_api.models.asset_swap_frontend import AssetSwapFrontend +from gate_api.models.auto_invest_coins_item import AutoInvestCoinsItem +from gate_api.models.auto_invest_config_item import AutoInvestConfigItem +from gate_api.models.auto_invest_min_invest_amount import AutoInvestMinInvestAmount +from gate_api.models.auto_invest_min_invest_amount_items import AutoInvestMinInvestAmountItems +from gate_api.models.auto_invest_min_invest_amount_resp import AutoInvestMinInvestAmountResp +from gate_api.models.auto_invest_order_item import AutoInvestOrderItem +from gate_api.models.auto_invest_plan_add_position import AutoInvestPlanAddPosition +from gate_api.models.auto_invest_plan_create import AutoInvestPlanCreate +from gate_api.models.auto_invest_plan_create_items import AutoInvestPlanCreateItems +from gate_api.models.auto_invest_plan_create_resp import AutoInvestPlanCreateResp +from gate_api.models.auto_invest_plan_detail import AutoInvestPlanDetail +from gate_api.models.auto_invest_plan_list_info_resp import AutoInvestPlanListInfoResp +from gate_api.models.auto_invest_plan_record_item import AutoInvestPlanRecordItem +from gate_api.models.auto_invest_plan_records_resp import AutoInvestPlanRecordsResp +from gate_api.models.auto_invest_plan_stop import AutoInvestPlanStop +from gate_api.models.auto_invest_plan_update import AutoInvestPlanUpdate +from gate_api.models.auto_invest_portfolio_item import AutoInvestPortfolioItem from gate_api.models.auto_repay_setting import AutoRepaySetting from gate_api.models.award_list_struct import AwardListStruct from gate_api.models.award_list_struct_list import AwardListStructList +from gate_api.models.base_response import BaseResponse from gate_api.models.batch_amend_item import BatchAmendItem from gate_api.models.batch_amend_order_req import BatchAmendOrderReq from gate_api.models.batch_funding_rates_request import BatchFundingRatesRequest @@ -75,16 +134,30 @@ 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_item import BrokerCommissionItem 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.broker_transaction_history import BrokerTransactionHistory from gate_api.models.cancel_batch_order import CancelBatchOrder from gate_api.models.cancel_order import CancelOrder from gate_api.models.cancel_order_result import CancelOrderResult +from gate_api.models.candy_drop_v4_activity_cd01 import CandyDropV4ActivityCd01 +from gate_api.models.candy_drop_v4_activity_rules_cd03 import CandyDropV4ActivityRulesCd03 +from gate_api.models.candy_drop_v4_airdrop_record_cd06 import CandyDropV4AirdropRecordCd06 +from gate_api.models.candy_drop_v4_error_cd01 import CandyDropV4ErrorCd01 +from gate_api.models.candy_drop_v4_participation_record_cd05 import CandyDropV4ParticipationRecordCd05 +from gate_api.models.candy_drop_v4_prize_pool_cd03 import CandyDropV4PrizePoolCd03 +from gate_api.models.candy_drop_v4_register_req_cd02 import CandyDropV4RegisterReqCd02 +from gate_api.models.candy_drop_v4_register_resp_cd02 import CandyDropV4RegisterRespCd02 +from gate_api.models.candy_drop_v4_task_cd03 import CandyDropV4TaskCd03 +from gate_api.models.candy_drop_v4_task_progress_cd04 import CandyDropV4TaskProgressCd04 +from gate_api.models.candy_drop_v4_task_progress_item_cd04 import CandyDropV4TaskProgressItemCd04 from gate_api.models.categories import Categories from gate_api.models.categories_data import CategoriesData from gate_api.models.categories_data_list import CategoriesDataList +from gate_api.models.chase_order import ChaseOrder +from gate_api.models.claim_reward_error import ClaimRewardError +from gate_api.models.claim_task_error import ClaimTaskError from gate_api.models.collateral_adjust import CollateralAdjust from gate_api.models.collateral_adjust_res import CollateralAdjustRes from gate_api.models.collateral_currency import CollateralCurrency @@ -99,15 +172,30 @@ from gate_api.models.contract_detail import ContractDetail from gate_api.models.contract_detail_data import ContractDetailData from gate_api.models.contract_detail_data_list import ContractDetailDataList +from gate_api.models.contract_martingale_create_params import ContractMartingaleCreateParams +from gate_api.models.contract_martingale_create_request import ContractMartingaleCreateRequest +from gate_api.models.contract_martingale_direction import ContractMartingaleDirection from gate_api.models.contract_stat import ContractStat +from gate_api.models.convert_currencies_v2_item import ConvertCurrenciesV2Item 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_chase_order_req import CreateChaseOrderReq +from gate_api.models.create_chase_order_resp import CreateChaseOrderResp +from gate_api.models.create_earn_fixed_term_lend_response import CreateEarnFixedTermLendResponse +from gate_api.models.create_earn_fixed_term_lend_response_data import CreateEarnFixedTermLendResponseData +from gate_api.models.create_earn_fixed_term_pre_redeem_response import CreateEarnFixedTermPreRedeemResponse from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder from gate_api.models.create_order import CreateOrder -from gate_api.models.create_order_data import CreateOrderData +from gate_api.models.create_order2 import CreateOrder2 +from gate_api.models.create_order2_data import CreateOrder2Data +from gate_api.models.create_order_detail import CreateOrderDetail +from gate_api.models.create_order_v4 import CreateOrderV4 +from gate_api.models.create_param import CreateParam from gate_api.models.create_trail_order import CreateTrailOrder +from gate_api.models.create_trail_order_response import CreateTrailOrderResponse +from gate_api.models.create_trail_order_result import CreateTrailOrderResult from gate_api.models.create_transaction import CreateTransaction from gate_api.models.create_uni_lend import CreateUniLend from gate_api.models.create_uni_loan import CreateUniLoan @@ -116,17 +204,39 @@ from gate_api.models.cross_margin_balance import CrossMarginBalance from gate_api.models.cross_margin_loan import CrossMarginLoan from gate_api.models.cross_margin_repayment import CrossMarginRepayment +from gate_api.models.crossex_account import CrossexAccount +from gate_api.models.crossex_account_asset import CrossexAccountAsset +from gate_api.models.crossex_account_book_record import CrossexAccountBookRecord from gate_api.models.crossex_account_update_request import CrossexAccountUpdateRequest +from gate_api.models.crossex_account_update_response import CrossexAccountUpdateResponse +from gate_api.models.crossex_adl_rank import CrossexAdlRank from gate_api.models.crossex_close_position_request import CrossexClosePositionRequest +from gate_api.models.crossex_coin_discount_rate import CrossexCoinDiscountRate from gate_api.models.crossex_convert_order_request import CrossexConvertOrderRequest +from gate_api.models.crossex_convert_order_response import CrossexConvertOrderResponse from gate_api.models.crossex_convert_quote_request import CrossexConvertQuoteRequest +from gate_api.models.crossex_convert_quote_response import CrossexConvertQuoteResponse +from gate_api.models.crossex_historical_margin_position import CrossexHistoricalMarginPosition +from gate_api.models.crossex_historical_position import CrossexHistoricalPosition +from gate_api.models.crossex_interest_rate import CrossexInterestRate from gate_api.models.crossex_leverage_request import CrossexLeverageRequest +from gate_api.models.crossex_leverage_response import CrossexLeverageResponse +from gate_api.models.crossex_margin_interest_record import CrossexMarginInterestRecord +from gate_api.models.crossex_margin_position import CrossexMarginPosition +from gate_api.models.crossex_order import CrossexOrder +from gate_api.models.crossex_order_action_response import CrossexOrderActionResponse from gate_api.models.crossex_order_request import CrossexOrderRequest from gate_api.models.crossex_order_update_request import CrossexOrderUpdateRequest -from gate_api.models.crossex_rule_risk_limits_tiers import CrossexRuleRiskLimitsTiers +from gate_api.models.crossex_position import CrossexPosition +from gate_api.models.crossex_risk_limit import CrossexRiskLimit +from gate_api.models.crossex_risk_limit_tier import CrossexRiskLimitTier +from gate_api.models.crossex_special_fee import CrossexSpecialFee +from gate_api.models.crossex_trade import CrossexTrade +from gate_api.models.crossex_transfer_coin import CrossexTransferCoin +from gate_api.models.crossex_transfer_record import CrossexTransferRecord from gate_api.models.crossex_transfer_request import CrossexTransferRequest +from gate_api.models.crossex_transfer_response import CrossexTransferResponse from gate_api.models.currency import Currency -from gate_api.models.currency2 import Currency2 from gate_api.models.currency_chain import CurrencyChain from gate_api.models.currency_pair import CurrencyPair from gate_api.models.currency_quota import CurrencyQuota @@ -142,23 +252,66 @@ from gate_api.models.delivery_my_trade import DeliveryMyTrade from gate_api.models.delivery_order import DeliveryOrder from gate_api.models.delivery_order_book import DeliveryOrderBook +from gate_api.models.delivery_order_book_item import DeliveryOrderBookItem from gate_api.models.delivery_position import DeliveryPosition from gate_api.models.delivery_position_close import DeliveryPositionClose from gate_api.models.delivery_settlement import DeliverySettlement from gate_api.models.delivery_ticker import DeliveryTicker from gate_api.models.delivery_trade import DeliveryTrade +from gate_api.models.delta_neutral_enabled import DeltaNeutralEnabled from gate_api.models.deposit_address import DepositAddress from gate_api.models.deposit_record import DepositRecord +from gate_api.models.discover_scene import DiscoverScene from gate_api.models.dual_get_balance import DualGetBalance from gate_api.models.dual_get_orders import DualGetOrders from gate_api.models.dual_get_plans import DualGetPlans -from gate_api.models.error import Error -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.dual_modify_order_reinvest_params import DualModifyOrderReinvestParams +from gate_api.models.dual_order_refund_params import DualOrderRefundParams +from gate_api.models.dual_order_refund_preview import DualOrderRefundPreview +from gate_api.models.dual_project_recommend import DualProjectRecommend +from gate_api.models.earn_fixed_term_pre_redeem_request import EarnFixedTermPreRedeemRequest +from gate_api.models.eligibility import Eligibility +from gate_api.models.eligibility_response import EligibilityResponse +from gate_api.models.eligibility_response_all_of import EligibilityResponseAllOf +from gate_api.models.err_code_msg import ErrCodeMsg +from gate_api.models.error_response import ErrorResponse +from gate_api.models.evaluate_item import EvaluateItem +from gate_api.models.evaluate_resp import EvaluateResp +from gate_api.models.ex_skill_claim_reward_req import ExSkillClaimRewardReq +from gate_api.models.ex_skill_claim_task_req import ExSkillClaimTaskReq +from gate_api.models.fixed_term_bonus_info import FixedTermBonusInfo +from gate_api.models.fixed_term_coupon_info import FixedTermCouponInfo +from gate_api.models.fixed_term_history_record import FixedTermHistoryRecord +from gate_api.models.fixed_term_lend_order import FixedTermLendOrder +from gate_api.models.fixed_term_lend_request import FixedTermLendRequest +from gate_api.models.fixed_term_product import FixedTermProduct +from gate_api.models.fixed_term_product_info import FixedTermProductInfo +from gate_api.models.fixed_term_product_simple import FixedTermProductSimple from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair +from gate_api.models.flash_swap_error_response import FlashSwapErrorResponse +from gate_api.models.flash_swap_multi_currency_create_param import FlashSwapMultiCurrencyCreateParam +from gate_api.models.flash_swap_multi_currency_many_to_one_order_create_req import FlashSwapMultiCurrencyManyToOneOrderCreateReq +from gate_api.models.flash_swap_multi_currency_many_to_one_order_create_resp import FlashSwapMultiCurrencyManyToOneOrderCreateResp +from gate_api.models.flash_swap_multi_currency_many_to_one_order_create_resp_data import FlashSwapMultiCurrencyManyToOneOrderCreateRespData +from gate_api.models.flash_swap_multi_currency_many_to_one_order_preview_req import FlashSwapMultiCurrencyManyToOneOrderPreviewReq +from gate_api.models.flash_swap_multi_currency_many_to_one_order_preview_resp import FlashSwapMultiCurrencyManyToOneOrderPreviewResp +from gate_api.models.flash_swap_multi_currency_many_to_one_order_preview_resp_data import FlashSwapMultiCurrencyManyToOneOrderPreviewRespData +from gate_api.models.flash_swap_multi_currency_one_to_many_order_create_req import FlashSwapMultiCurrencyOneToManyOrderCreateReq +from gate_api.models.flash_swap_multi_currency_one_to_many_order_create_resp import FlashSwapMultiCurrencyOneToManyOrderCreateResp +from gate_api.models.flash_swap_multi_currency_one_to_many_order_create_resp_data import FlashSwapMultiCurrencyOneToManyOrderCreateRespData +from gate_api.models.flash_swap_multi_currency_one_to_many_order_preview_req import FlashSwapMultiCurrencyOneToManyOrderPreviewReq +from gate_api.models.flash_swap_multi_currency_one_to_many_order_preview_resp import FlashSwapMultiCurrencyOneToManyOrderPreviewResp +from gate_api.models.flash_swap_multi_currency_one_to_many_order_preview_resp_data import FlashSwapMultiCurrencyOneToManyOrderPreviewRespData +from gate_api.models.flash_swap_multi_currency_order import FlashSwapMultiCurrencyOrder +from gate_api.models.flash_swap_multi_currency_preview_order import FlashSwapMultiCurrencyPreviewOrder +from gate_api.models.flash_swap_multi_currency_preview_param import FlashSwapMultiCurrencyPreviewParam from gate_api.models.flash_swap_order import FlashSwapOrder +from gate_api.models.flash_swap_order_create_req import FlashSwapOrderCreateReq +from gate_api.models.flash_swap_order_create_resp import FlashSwapOrderCreateResp +from gate_api.models.flash_swap_order_create_resp_data import FlashSwapOrderCreateRespData from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview +from gate_api.models.flash_swap_order_preview_resp import FlashSwapOrderPreviewResp +from gate_api.models.flash_swap_order_preview_resp_data import FlashSwapOrderPreviewRespData 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 @@ -171,7 +324,10 @@ from gate_api.models.futures_bbo_order import FuturesBBOOrder from gate_api.models.futures_batch_amend_order_request import FuturesBatchAmendOrderRequest from gate_api.models.futures_candlestick import FuturesCandlestick +from gate_api.models.futures_direction import FuturesDirection from gate_api.models.futures_fee import FuturesFee +from gate_api.models.futures_grid_create_params import FuturesGridCreateParams +from gate_api.models.futures_grid_create_request import FuturesGridCreateRequest from gate_api.models.futures_index_constituents import FuturesIndexConstituents from gate_api.models.futures_initial_order import FuturesInitialOrder from gate_api.models.futures_leverage import FuturesLeverage @@ -182,7 +338,7 @@ 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_order_book_item1 import FuturesOrderBookItem1 +from gate_api.models.futures_order_timerange import FuturesOrderTimerange 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 @@ -191,109 +347,80 @@ from gate_api.models.futures_ticker import FuturesTicker from gate_api.models.futures_trade import FuturesTrade from gate_api.models.futures_update_price_triggered_order import FuturesUpdatePriceTriggeredOrder +from gate_api.models.gate_error_response import GateErrorResponse +from gate_api.models.get_beginner_task_list_error import GetBeginnerTaskListError +from gate_api.models.get_chase_order_detail_resp import GetChaseOrderDetailResp +from gate_api.models.get_chase_orders_resp import GetChaseOrdersResp from gate_api.models.get_chats_list_request import GetChatsListRequest from gate_api.models.get_completed_transaction_list_request import GetCompletedTransactionListRequest from gate_api.models.get_counterparty_user_info_request import GetCounterpartyUserInfoRequest +from gate_api.models.get_my_activity_entry_response import GetMyActivityEntryResponse +from gate_api.models.get_my_activity_entry_response_data import GetMyActivityEntryResponseData from gate_api.models.get_myself_payment_request import GetMyselfPaymentRequest from gate_api.models.get_pending_transaction_list_request import GetPendingTransactionListRequest from gate_api.models.get_transaction_details_request import GetTransactionDetailsRequest +from gate_api.models.get_user_coupon_detail_response import GetUserCouponDetailResponse +from gate_api.models.get_user_coupon_detail_response_data import GetUserCouponDetailResponseData +from gate_api.models.get_user_identity_error import GetUserIdentityError +from gate_api.models.hodler_airdrop_v4_error_response import HodlerAirdropV4ErrorResponse +from gate_api.models.hodler_airdrop_v4_order_request import HodlerAirdropV4OrderRequest +from gate_api.models.hodler_airdrop_v4_order_response import HodlerAirdropV4OrderResponse +from gate_api.models.hodler_airdrop_v4_project_item import HodlerAirdropV4ProjectItem +from gate_api.models.hodler_airdrop_v4_user_airdrop_record import HodlerAirdropV4UserAirdropRecord +from gate_api.models.hodler_airdrop_v4_user_order_record import HodlerAirdropV4UserOrderRecord from gate_api.models.index_constituent import IndexConstituent -from gate_api.models.inline_object import InlineObject -from gate_api.models.inline_object1 import InlineObject1 +from gate_api.models.infinite_grid_create_params import InfiniteGridCreateParams +from gate_api.models.infinite_grid_create_request import InfiniteGridCreateRequest from gate_api.models.inline_response200 import InlineResponse200 -from gate_api.models.inline_response2001 import InlineResponse2001 -from gate_api.models.inline_response20010 import InlineResponse20010 -from gate_api.models.inline_response20010_data import InlineResponse20010Data -from gate_api.models.inline_response20010_data_lists import InlineResponse20010DataLists -from gate_api.models.inline_response20011 import InlineResponse20011 -from gate_api.models.inline_response20011_data import InlineResponse20011Data -from gate_api.models.inline_response20011_data_crypto_currency_info import InlineResponse20011DataCryptoCurrencyInfo -from gate_api.models.inline_response20011_data_fiat_currency_info import InlineResponse20011DataFiatCurrencyInfo -from gate_api.models.inline_response20011_data_list import InlineResponse20011DataList -from gate_api.models.inline_response20012 import InlineResponse20012 -from gate_api.models.inline_response20012_data import InlineResponse20012Data -from gate_api.models.inline_response20012_data_list import InlineResponse20012DataList -from gate_api.models.inline_response20013 import InlineResponse20013 -from gate_api.models.inline_response20013_data import InlineResponse20013Data -from gate_api.models.inline_response20014 import InlineResponse20014 -from gate_api.models.inline_response20014_data import InlineResponse20014Data -from gate_api.models.inline_response20014_data_merchant_info import InlineResponse20014DataMerchantInfo -from gate_api.models.inline_response20015 import InlineResponse20015 -from gate_api.models.inline_response20015_data import InlineResponse20015Data -from gate_api.models.inline_response20016 import InlineResponse20016 -from gate_api.models.inline_response20016_data import InlineResponse20016Data -from gate_api.models.inline_response20016_list import InlineResponse20016List -from gate_api.models.inline_response20017 import InlineResponse20017 -from gate_api.models.inline_response20017_data import InlineResponse20017Data -from gate_api.models.inline_response20017_data_convert_info import InlineResponse20017DataConvertInfo -from gate_api.models.inline_response20017_data_list import InlineResponse20017DataList -from gate_api.models.inline_response20017_data_trans_time import InlineResponse20017DataTransTime -from gate_api.models.inline_response20018 import InlineResponse20018 -from gate_api.models.inline_response20018_data import InlineResponse20018Data -from gate_api.models.inline_response20019 import InlineResponse20019 -from gate_api.models.inline_response2002 import InlineResponse2002 -from gate_api.models.inline_response20020 import InlineResponse20020 -from gate_api.models.inline_response20020_data import InlineResponse20020Data -from gate_api.models.inline_response20021 import InlineResponse20021 -from gate_api.models.inline_response20021_data import InlineResponse20021Data -from gate_api.models.inline_response20022 import InlineResponse20022 -from gate_api.models.inline_response20022_data import InlineResponse20022Data -from gate_api.models.inline_response20022_data_lists import InlineResponse20022DataLists -from gate_api.models.inline_response20023 import InlineResponse20023 -from gate_api.models.inline_response20023_data import InlineResponse20023Data -from gate_api.models.inline_response20024 import InlineResponse20024 -from gate_api.models.inline_response20024_data import InlineResponse20024Data -from gate_api.models.inline_response20024_data_messages import InlineResponse20024DataMessages -from gate_api.models.inline_response20024_data_msg_obj import InlineResponse20024DataMsgObj -from gate_api.models.inline_response20025 import InlineResponse20025 -from gate_api.models.inline_response20025_data import InlineResponse20025Data -from gate_api.models.inline_response20026 import InlineResponse20026 -from gate_api.models.inline_response20026_data import InlineResponse20026Data -from gate_api.models.inline_response20027 import InlineResponse20027 -from gate_api.models.inline_response20028 import InlineResponse20028 -from gate_api.models.inline_response20029 import InlineResponse20029 -from gate_api.models.inline_response2003 import InlineResponse2003 -from gate_api.models.inline_response20030 import InlineResponse20030 -from gate_api.models.inline_response20031 import InlineResponse20031 -from gate_api.models.inline_response20032 import InlineResponse20032 -from gate_api.models.inline_response20033 import InlineResponse20033 -from gate_api.models.inline_response20034 import InlineResponse20034 -from gate_api.models.inline_response20035 import InlineResponse20035 -from gate_api.models.inline_response20035_assets import InlineResponse20035Assets -from gate_api.models.inline_response20036 import InlineResponse20036 -from gate_api.models.inline_response20037 import InlineResponse20037 -from gate_api.models.inline_response20037_special_fee_list import InlineResponse20037SpecialFeeList -from gate_api.models.inline_response20038 import InlineResponse20038 -from gate_api.models.inline_response20039 import InlineResponse20039 -from gate_api.models.inline_response2004 import InlineResponse2004 -from gate_api.models.inline_response20040 import InlineResponse20040 -from gate_api.models.inline_response20041 import InlineResponse20041 -from gate_api.models.inline_response20042 import InlineResponse20042 -from gate_api.models.inline_response20043 import InlineResponse20043 -from gate_api.models.inline_response20044 import InlineResponse20044 -from gate_api.models.inline_response20045 import InlineResponse20045 -from gate_api.models.inline_response20046 import InlineResponse20046 -from gate_api.models.inline_response20047 import InlineResponse20047 -from gate_api.models.inline_response2005 import InlineResponse2005 -from gate_api.models.inline_response2006 import InlineResponse2006 -from gate_api.models.inline_response2006_data import InlineResponse2006Data -from gate_api.models.inline_response2007 import InlineResponse2007 -from gate_api.models.inline_response2008 import InlineResponse2008 -from gate_api.models.inline_response2009 import InlineResponse2009 -from gate_api.models.inline_response2009_data import InlineResponse2009Data -from gate_api.models.inline_response201 import InlineResponse201 -from gate_api.models.inline_response201_data import InlineResponse201Data -from gate_api.models.inline_response202 import InlineResponse202 -from gate_api.models.inline_response2021 import InlineResponse2021 from gate_api.models.insurance_record import InsuranceRecord from gate_api.models.klines import Klines from gate_api.models.klines_data import KlinesData from gate_api.models.klines_data_list import KlinesDataList +from gate_api.models.ladder_apr import LadderApr +from gate_api.models.launch_pool_v4_create_order_response import LaunchPoolV4CreateOrderResponse +from gate_api.models.launch_pool_v4_error_response import LaunchPoolV4ErrorResponse +from gate_api.models.launch_pool_v4_pledge_record import LaunchPoolV4PledgeRecord +from gate_api.models.launch_pool_v4_project import LaunchPoolV4Project +from gate_api.models.launch_pool_v4_reward_pool import LaunchPoolV4RewardPool +from gate_api.models.launch_pool_v4_reward_record import LaunchPoolV4RewardRecord from gate_api.models.ledger_record import LedgerRecord from gate_api.models.liquidate_order import LiquidateOrder +from gate_api.models.list_activities_response import ListActivitiesResponse +from gate_api.models.list_activities_response_data import ListActivitiesResponseData +from gate_api.models.list_activities_response_data_list import ListActivitiesResponseDataList +from gate_api.models.list_activity_types_response import ListActivityTypesResponse +from gate_api.models.list_activity_types_response_data import ListActivityTypesResponseData +from gate_api.models.list_activity_types_response_data_list import ListActivityTypesResponseDataList +from gate_api.models.list_earn_fixed_term_history_response import ListEarnFixedTermHistoryResponse +from gate_api.models.list_earn_fixed_term_history_response_data import ListEarnFixedTermHistoryResponseData +from gate_api.models.list_earn_fixed_term_lends_response import ListEarnFixedTermLendsResponse +from gate_api.models.list_earn_fixed_term_lends_response_data import ListEarnFixedTermLendsResponseData +from gate_api.models.list_earn_fixed_term_products_by_asset_response import ListEarnFixedTermProductsByAssetResponse +from gate_api.models.list_earn_fixed_term_products_by_asset_response_data import ListEarnFixedTermProductsByAssetResponseData +from gate_api.models.list_earn_fixed_term_products_response import ListEarnFixedTermProductsResponse +from gate_api.models.list_earn_fixed_term_products_response_data import ListEarnFixedTermProductsResponseData +from gate_api.models.list_live_replay_error import ListLiveReplayError +from gate_api.models.list_live_replay_response import ListLiveReplayResponse +from gate_api.models.list_live_replay_response_data import ListLiveReplayResponseData +from gate_api.models.list_live_replay_response_data_list import ListLiveReplayResponseDataList +from gate_api.models.list_live_replay_response_data_live import ListLiveReplayResponseDataLive +from gate_api.models.list_live_replay_response_data_live_host import ListLiveReplayResponseDataLiveHost +from gate_api.models.list_live_replay_response_data_video import ListLiveReplayResponseDataVideo +from gate_api.models.list_square_ai_search_error import ListSquareAiSearchError +from gate_api.models.list_square_ai_search_response import ListSquareAiSearchResponse +from gate_api.models.list_square_ai_search_response_data import ListSquareAiSearchResponseData +from gate_api.models.list_square_ai_search_response_data_items import ListSquareAiSearchResponseDataItems +from gate_api.models.list_user_coupons_response import ListUserCouponsResponse +from gate_api.models.list_user_coupons_response_data import ListUserCouponsResponseData +from gate_api.models.list_user_coupons_response_data_help_url import ListUserCouponsResponseDataHelpUrl +from gate_api.models.list_user_coupons_response_data_jump_url import ListUserCouponsResponseDataJumpUrl +from gate_api.models.list_user_coupons_response_data_list import ListUserCouponsResponseDataList +from gate_api.models.list_user_coupons_response_data_progress_config import ListUserCouponsResponseDataProgressConfig 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_grid_create_params import MarginGridCreateParams +from gate_api.models.margin_grid_create_request import MarginGridCreateRequest 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 @@ -344,6 +471,8 @@ 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_create_v1_req import OrderCreateV1Req +from gate_api.models.order_create_v1_resp import OrderCreateV1Resp from gate_api.models.order_history_list import OrderHistoryList from gate_api.models.order_history_list_data import OrderHistoryListData from gate_api.models.order_history_list_data_list import OrderHistoryListDataList @@ -352,14 +481,93 @@ from gate_api.models.order_list_data_list import OrderListDataList from gate_api.models.order_list_struct import OrderListStruct from gate_api.models.order_list_struct_list import OrderListStructList +from gate_api.models.order_list_v1_resp import OrderListV1Resp +from gate_api.models.order_log import OrderLog +from gate_api.models.order_log_data import OrderLogData from gate_api.models.order_patch import OrderPatch +from gate_api.models.order_preview_v1_req import OrderPreviewV1Req +from gate_api.models.order_preview_v1_resp import OrderPreviewV1Resp from gate_api.models.order_resp import OrderResp from gate_api.models.order_response import OrderResponse +from gate_api.models.otc_action_response import OtcActionResponse +from gate_api.models.otc_bank_create_multipart_request import OtcBankCreateMultipartRequest +from gate_api.models.otc_bank_create_response import OtcBankCreateResponse +from gate_api.models.otc_bank_create_response_data import OtcBankCreateResponseData +from gate_api.models.otc_bank_enterprise_supplement_multipart_request import OtcBankEnterpriseSupplementMultipartRequest +from gate_api.models.otc_bank_id_request import OtcBankIdRequest +from gate_api.models.otc_bank_list_item import OtcBankListItem +from gate_api.models.otc_bank_list_response import OtcBankListResponse +from gate_api.models.otc_bank_list_result import OtcBankListResult +from gate_api.models.otc_bank_personal_supplement_multipart_request import OtcBankPersonalSupplementMultipartRequest +from gate_api.models.otc_bank_supplement_checklist_item import OtcBankSupplementChecklistItem +from gate_api.models.otc_bank_supplement_checklist_response import OtcBankSupplementChecklistResponse +from gate_api.models.otc_bank_supplement_checklist_response_data import OtcBankSupplementChecklistResponseData from gate_api.models.otc_mark_order_paid_request import OtcMarkOrderPaidRequest +from gate_api.models.otc_order_detail import OtcOrderDetail +from gate_api.models.otc_order_detail_response import OtcOrderDetailResponse +from gate_api.models.otc_order_list_crypto_currency_info import OtcOrderListCryptoCurrencyInfo +from gate_api.models.otc_order_list_fiat_currency_info import OtcOrderListFiatCurrencyInfo +from gate_api.models.otc_order_list_item import OtcOrderListItem +from gate_api.models.otc_order_list_response import OtcOrderListResponse +from gate_api.models.otc_order_list_result import OtcOrderListResult from gate_api.models.otc_order_request import OtcOrderRequest from gate_api.models.otc_quote_request import OtcQuoteRequest +from gate_api.models.otc_quote_response import OtcQuoteResponse +from gate_api.models.otc_quote_result import OtcQuoteResult +from gate_api.models.otc_stable_coin_order_create_response import OtcStableCoinOrderCreateResponse +from gate_api.models.otc_stable_coin_order_list_item import OtcStableCoinOrderListItem +from gate_api.models.otc_stable_coin_order_list_response import OtcStableCoinOrderListResponse +from gate_api.models.otc_stable_coin_order_list_result import OtcStableCoinOrderListResult from gate_api.models.otc_stable_coin_order_request import OtcStableCoinOrderRequest +from gate_api.models.other_contact import OtherContact +from gate_api.models.p2p_ad_detail import P2pAdDetail +from gate_api.models.p2p_ad_detail_response import P2pAdDetailResponse +from gate_api.models.p2p_ads_list_item import P2pAdsListItem +from gate_api.models.p2p_ads_list_response import P2pAdsListResponse +from gate_api.models.p2p_ads_update_status_response import P2pAdsUpdateStatusResponse +from gate_api.models.p2p_ads_update_status_result import P2pAdsUpdateStatusResult +from gate_api.models.p2p_chat_list_response import P2pChatListResponse +from gate_api.models.p2p_chat_list_result import P2pChatListResult +from gate_api.models.p2p_chat_message import P2pChatMessage +from gate_api.models.p2p_chat_message_payload import P2pChatMessagePayload +from gate_api.models.p2p_counterparty_user_info import P2pCounterpartyUserInfo +from gate_api.models.p2p_counterparty_user_info_response import P2pCounterpartyUserInfoResponse +from gate_api.models.p2p_merchant_books_place_biz_push_order_response import P2pMerchantBooksPlaceBizPushOrderResponse +from gate_api.models.p2p_merchant_books_place_biz_push_order_response_data import P2pMerchantBooksPlaceBizPushOrderResponseData +from gate_api.models.p2p_merchant_books_place_biz_push_order_response_data_risk_event import P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent +from gate_api.models.p2p_merchant_books_place_biz_push_order_response_data_risk_event_action import P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction +from gate_api.models.p2p_merchant_market_info import P2pMerchantMarketInfo +from gate_api.models.p2p_merchant_user_info import P2pMerchantUserInfo +from gate_api.models.p2p_merchant_user_info_response import P2pMerchantUserInfoResponse +from gate_api.models.p2p_merchant_work_hours import P2pMerchantWorkHours +from gate_api.models.p2p_merchant_work_hours_response import P2pMerchantWorkHoursResponse +from gate_api.models.p2p_my_ad import P2pMyAd +from gate_api.models.p2p_my_ads_list_response import P2pMyAdsListResponse +from gate_api.models.p2p_my_ads_list_result import P2pMyAdsListResult +from gate_api.models.p2p_payment_method_account import P2pPaymentMethodAccount +from gate_api.models.p2p_payment_method_group import P2pPaymentMethodGroup +from gate_api.models.p2p_payment_methods_response import P2pPaymentMethodsResponse +from gate_api.models.p2p_send_chat_message_response import P2pSendChatMessageResponse +from gate_api.models.p2p_send_chat_message_result import P2pSendChatMessageResult +from gate_api.models.p2p_transaction_action_response import P2pTransactionActionResponse +from gate_api.models.p2p_transaction_convert_info import P2pTransactionConvertInfo +from gate_api.models.p2p_transaction_detail import P2pTransactionDetail +from gate_api.models.p2p_transaction_detail_pay_others import P2pTransactionDetailPayOthers +from gate_api.models.p2p_transaction_detail_response import P2pTransactionDetailResponse +from gate_api.models.p2p_transaction_list_item import P2pTransactionListItem +from gate_api.models.p2p_transaction_list_response import P2pTransactionListResponse +from gate_api.models.p2p_transaction_list_result import P2pTransactionListResult +from gate_api.models.p2p_transaction_list_result_pay_others import P2pTransactionListResultPayOthers +from gate_api.models.p2p_transaction_time_marker import P2pTransactionTimeMarker +from gate_api.models.p2p_upload_chat_file_response import P2pUploadChatFileResponse +from gate_api.models.p2p_upload_chat_file_result import P2pUploadChatFileResult +from gate_api.models.partner_application import PartnerApplication +from gate_api.models.partner_application_response import PartnerApplicationResponse +from gate_api.models.partner_application_response_all_of import PartnerApplicationResponseAllOf from gate_api.models.partner_commission_history import PartnerCommissionHistory +from gate_api.models.partner_data_aggregated import PartnerDataAggregated +from gate_api.models.partner_data_aggregated_response import PartnerDataAggregatedResponse +from gate_api.models.partner_data_aggregated_response_all_of import PartnerDataAggregatedResponseAllOf 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 @@ -381,10 +589,22 @@ from gate_api.models.position_list_data import PositionListData from gate_api.models.position_list_data_list import PositionListDataList from gate_api.models.position_timerange import PositionTimerange +from gate_api.models.preview_from_param import PreviewFromParam +from gate_api.models.preview_order import PreviewOrder +from gate_api.models.preview_order_detail import PreviewOrderDetail +from gate_api.models.preview_to_param import PreviewToParam from gate_api.models.profit_loss_range import ProfitLossRange +from gate_api.models.quick_estimated_repayment import QuickEstimatedRepayment +from gate_api.models.quick_repayment_request import QuickRepaymentRequest +from gate_api.models.quick_repayment_response import QuickRepaymentResponse from gate_api.models.quote_request import QuoteRequest from gate_api.models.quote_response import QuoteResponse from gate_api.models.rebate_user_info import RebateUserInfo +from gate_api.models.recommend import Recommend +from gate_api.models.recommend_v2_scheme import RecommendV2Scheme +from gate_api.models.recommend_v2_strategy import RecommendV2Strategy +from gate_api.models.redeem_launch_pool_response import RedeemLaunchPoolResponse +from gate_api.models.redeem_v4 import RedeemV4 from gate_api.models.repay_currency_res import RepayCurrencyRes from gate_api.models.repay_multi_loan import RepayMultiLoan from gate_api.models.repay_record_currency import RepayRecordCurrency @@ -394,23 +614,32 @@ from gate_api.models.risk_units import RiskUnits from gate_api.models.saved_address import SavedAddress from gate_api.models.send_chat_message_request import SendChatMessageRequest +from gate_api.models.set_merchant_work_hours_request import SetMerchantWorkHoursRequest 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_grid_create_params import SpotGridCreateParams +from gate_api.models.spot_grid_create_request import SpotGridCreateRequest from gate_api.models.spot_insurance_history import SpotInsuranceHistory +from gate_api.models.spot_martingale_create_params import SpotMartingaleCreateParams +from gate_api.models.spot_martingale_create_request import SpotMartingaleCreateRequest +from gate_api.models.spot_order_stop_loss import SpotOrderStopLoss +from gate_api.models.spot_order_stop_profit import SpotOrderStopProfit 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.stop_all_chase_orders_req import StopAllChaseOrdersReq +from gate_api.models.stop_all_chase_orders_resp import StopAllChaseOrdersResp from gate_api.models.stop_all_trail_orders import StopAllTrailOrders +from gate_api.models.stop_chase_order_req import StopChaseOrderReq +from gate_api.models.stop_chase_order_resp import StopChaseOrderResp from gate_api.models.stop_trail_order import StopTrailOrder 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.strategy_type import StrategyType 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 @@ -431,19 +660,25 @@ from gate_api.models.symbols_data_list import SymbolsDataList from gate_api.models.system_time import SystemTime from gate_api.models.ticker import Ticker -from gate_api.models.ticker2 import Ticker2 -from gate_api.models.ticker2_data import Ticker2Data from gate_api.models.tokens import Tokens from gate_api.models.total_balance import TotalBalance from gate_api.models.trad_fi_close_position_request import TradFiClosePositionRequest +from gate_api.models.trad_fi_error import TradFiError from gate_api.models.trad_fi_order_request import TradFiOrderRequest from gate_api.models.trad_fi_order_update_request import TradFiOrderUpdateRequest from gate_api.models.trad_fi_position_update_request import TradFiPositionUpdateRequest +from gate_api.models.trad_fi_ticker import TradFiTicker +from gate_api.models.trad_fi_ticker_data import TradFiTickerData from gate_api.models.trad_fi_transaction_request import TradFiTransactionRequest from gate_api.models.trade import Trade from gate_api.models.trade_fee import TradeFee from gate_api.models.trail_change_log import TrailChangeLog from gate_api.models.trail_order import TrailOrder +from gate_api.models.trail_order_change_log_response import TrailOrderChangeLogResponse +from gate_api.models.trail_order_detail_response import TrailOrderDetailResponse +from gate_api.models.trail_order_list_response import TrailOrderListResponse +from gate_api.models.trail_order_response import TrailOrderResponse +from gate_api.models.transaction_config import TransactionConfig from gate_api.models.transaction_id import TransactionID from gate_api.models.transaction_list import TransactionList from gate_api.models.transaction_list_data import TransactionListData @@ -456,9 +691,11 @@ 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_chart_point import UniChartPoint 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_estimated_rate import UniEstimatedRate from gate_api.models.uni_interest_record import UniInterestRecord from gate_api.models.uni_lend import UniLend from gate_api.models.uni_lend_interest import UniLendInterest @@ -469,7 +706,6 @@ 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 @@ -486,9 +722,14 @@ 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_quick_repay_available_item import UnifiedQuickRepayAvailableItem +from gate_api.models.unified_quick_repay_debt_item import UnifiedQuickRepayDebtItem +from gate_api.models.unified_quick_repay_repaid_info import UnifiedQuickRepayRepaidInfo +from gate_api.models.unified_quick_repay_used_info import UnifiedQuickRepayUsedInfo 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.update_dual_comp_position_cross_mode_request import UpdateDualCompPositionCrossModeRequest from gate_api.models.update_order import UpdateOrder from gate_api.models.update_order_data import UpdateOrderData from gate_api.models.update_position import UpdatePosition diff --git a/gate_api/api/__init__.py b/gate_api/api/__init__.py index 0b189423..62d96039 100644 --- a/gate_api/api/__init__.py +++ b/gate_api/api/__init__.py @@ -3,6 +3,7 @@ # flake8: noqa # import apis into api package +from gate_api.api.activity_api import ActivityApi from gate_api.api.cross_ex_api import CrossExApi from gate_api.api.earn_uni_api import EarnUniApi from gate_api.api.margin_uni_api import MarginUniApi @@ -12,15 +13,21 @@ from gate_api.api.unified_api import UnifiedApi from gate_api.api.account_api import AccountApi from gate_api.api.alpha_api import AlphaApi +from gate_api.api.assetswap_api import AssetswapApi +from gate_api.api.bot_api import BotApi +from gate_api.api.coupon_api import CouponApi 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.launch_api import LaunchApi 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.p2p_api import P2pApi from gate_api.api.rebate_api import RebateApi from gate_api.api.spot_api import SpotApi +from gate_api.api.square_api import SquareApi from gate_api.api.wallet_api import WalletApi +from gate_api.api.welfare_api import WelfareApi from gate_api.api.withdrawal_api import WithdrawalApi diff --git a/gate_api/api/activity_api.py b/gate_api/api/activity_api.py new file mode 100644 index 00000000..0cfdf775 --- /dev/null +++ b/gate_api/api/activity_api.py @@ -0,0 +1,382 @@ +# 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 ActivityApi(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 get_my_activity_entry(self, **kwargs): # noqa: E501 + """My activity entry # noqa: E501 + + Query user's Activity Center entry information, including activity icon and redirect link # 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_activity_entry(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.GetMyActivityEntryResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_my_activity_entry_with_http_info(**kwargs) # noqa: E501 + + def get_my_activity_entry_with_http_info(self, **kwargs): # noqa: E501 + """My activity entry # noqa: E501 + + Query user's Activity Center entry information, including activity icon and redirect link # 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_activity_entry_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.GetMyActivityEntryResponse, 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_my_activity_entry" % 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( + '/rewards/activity/my-activity-entry', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetMyActivityEntryResponse', # 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_activities(self, **kwargs): # noqa: E501 + """Recommended activity list # noqa: E501 + + Query recommended activity list from Activity Center, supports pagination and sorting # 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_activities(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str recommend_type: Recommendation type: hot for popular activities, type for filtering by activity type (type_ids), scenario for matching by activity name + :param str type_ids: Activity type ID, multiple IDs separated by commas (supports filtering by activity type through this field) + :param str keywords: Activity name. When scenario type is used, keyword matching is applied + :param int page: Page number, starting from 1 + :param int page_size: Items per page + :param str sort_by: Sort order, e.g., hot for sorting by popularity + :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.ListActivitiesResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_activities_with_http_info(**kwargs) # noqa: E501 + + def list_activities_with_http_info(self, **kwargs): # noqa: E501 + """Recommended activity list # noqa: E501 + + Query recommended activity list from Activity Center, supports pagination and sorting # 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_activities_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str recommend_type: Recommendation type: hot for popular activities, type for filtering by activity type (type_ids), scenario for matching by activity name + :param str type_ids: Activity type ID, multiple IDs separated by commas (supports filtering by activity type through this field) + :param str keywords: Activity name. When scenario type is used, keyword matching is applied + :param int page: Page number, starting from 1 + :param int page_size: Items per page + :param str sort_by: Sort order, e.g., hot for sorting by popularity + :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.ListActivitiesResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'recommend_type', + 'type_ids', + 'keywords', + 'page', + 'page_size', + 'sort_by' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_activities" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'recommend_type' in local_var_params and local_var_params['recommend_type'] is not None: # noqa: E501 + query_params.append(('recommend_type', local_var_params['recommend_type'])) # noqa: E501 + if 'type_ids' in local_var_params and local_var_params['type_ids'] is not None: # noqa: E501 + query_params.append(('type_ids', local_var_params['type_ids'])) # noqa: E501 + if 'keywords' in local_var_params and local_var_params['keywords'] is not None: # noqa: E501 + query_params.append(('keywords', local_var_params['keywords'])) # 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 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # 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 + + 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( + '/rewards/activity/activity-list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListActivitiesResponse', # 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_activity_types(self, **kwargs): # noqa: E501 + """Activity type list # noqa: E501 + + Query all activity types supported by Activity Center # 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_activity_types(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.ListActivityTypesResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_activity_types_with_http_info(**kwargs) # noqa: E501 + + def list_activity_types_with_http_info(self, **kwargs): # noqa: E501 + """Activity type list # noqa: E501 + + Query all activity types supported by Activity Center # 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_activity_types_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.ListActivityTypesResponse, 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_activity_types" % 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( + '/rewards/activity/activity-type', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListActivityTypesResponse', # 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/alpha_api.py b/gate_api/api/alpha_api.py index 68baacf6..e5665220 100644 --- a/gate_api/api/alpha_api.py +++ b/gate_api/api/alpha_api.py @@ -782,7 +782,7 @@ def list_alpha_currencies(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.Currency2] + :rtype: list[gate_api.AlphaCurrency] :return: If the method is called asynchronously, returns the request thread. """ @@ -811,7 +811,7 @@ def list_alpha_currencies_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.Currency2], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.AlphaCurrency], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -880,7 +880,7 @@ def list_alpha_currencies_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Currency2]', # noqa: E501 + response_type='list[AlphaCurrency]', # 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 diff --git a/gate_api/api/assetswap_api.py b/gate_api/api/assetswap_api.py new file mode 100644 index 00000000..0058cac6 --- /dev/null +++ b/gate_api/api/assetswap_api.py @@ -0,0 +1,857 @@ +# 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 AssetswapApi(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_asset_swap_assets(self, **kwargs): # noqa: E501 + """Portfolio optimization — currency list # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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_asset_swap_assets(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.ApiResponseAssetSwapListAssets + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_asset_swap_assets_with_http_info(**kwargs) # noqa: E501 + + def list_asset_swap_assets_with_http_info(self, **kwargs): # noqa: E501 + """Portfolio optimization — currency list # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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_asset_swap_assets_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.ApiResponseAssetSwapListAssets, 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_asset_swap_assets" % 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( + '/asset-swap/asset/list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseAssetSwapListAssets', # 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_asset_swap_config(self, **kwargs): # noqa: E501 + """Portfolio optimization — configuration # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.get_asset_swap_config(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.ApiResponseAssetSwapConfig + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_asset_swap_config_with_http_info(**kwargs) # noqa: E501 + + def get_asset_swap_config_with_http_info(self, **kwargs): # noqa: E501 + """Portfolio optimization — configuration # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.get_asset_swap_config_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.ApiResponseAssetSwapConfig, 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_asset_swap_config" % 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( + '/asset-swap/config', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseAssetSwapConfig', # 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 evaluate_asset_swap(self, **kwargs): # noqa: E501 + """Portfolio optimization — valuation # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.evaluate_asset_swap(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int max_evaluate_value: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str cursor: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int size: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :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.ApiResponseAssetSwapEvaluate + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.evaluate_asset_swap_with_http_info(**kwargs) # noqa: E501 + + def evaluate_asset_swap_with_http_info(self, **kwargs): # noqa: E501 + """Portfolio optimization — valuation # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.evaluate_asset_swap_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int max_evaluate_value: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str cursor: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int size: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :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.ApiResponseAssetSwapEvaluate, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'max_evaluate_value', + 'cursor', + 'size' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method evaluate_asset_swap" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'max_evaluate_value' in local_var_params and local_var_params['max_evaluate_value'] is not None: # noqa: E501 + query_params.append(('max_evaluate_value', local_var_params['max_evaluate_value'])) # noqa: E501 + if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 + query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # 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( + '/asset-swap/evaluate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseAssetSwapEvaluate', # 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_asset_swap_order_v1(self, order_create_v1_req, **kwargs): # noqa: E501 + """Portfolio optimization — place order # noqa: E501 + + Swap several source currencies in the account into the target currency side configuration according to the specified amount. **It is strongly recommended to call** `POST /asset-swap/order/preview` **and `code=0` before placing an official order, and then submit this interface with consistent semantics**. **The request body does not contain `ratio`** - This interface `OrderCreateV1Req` only contains `from` / `to`, and the array elements are all `CreateParam` (**only** `asset` + `amount`). **Do not** pass in `ratio` in the order JSON; the ratio field `ratio` only exists in the preview interface `OrderPreviewV1Req.to` (`PreviewToParam`). **Key differences from the preview interface (error-prone points)** - The `to` array element of this interface is `CreateParam`: **`asset` + `amount` (target side quantity, decimal string)**. - The preview interface `to` is **`asset` + `ratio` (ratio string)**, **the two cannot be mixed**: do not fill in the `ratio` in the preview to the `amount` of the order as it is, and do not use the `amount` of the order as the `ratio` of the preview. **Recommended calling order** 1. `GET /asset-swap/asset/list`: Confirm currency support. 2. `GET /asset-swap/config`: Read `recommend` / `recommend_v2` (such as `schemes` of a strategy under `recommend_v2.market`, use `scheme.name` as the target `asset`, `scheme.ratio` is only used for `to[].ratio` of **preview**). 3. `GET /asset-swap/evaluate` (optional): Refer to the sellable quantity. 4. `POST /asset-swap/order/preview`: `from` and `to` (ratio) construct inquiry. 5. After the preview is successful, map the preview results to the `from`/`to` (**both are amount**) of the order according to the product/server agreement and then call this interface. **Field Convention** - `from`: selling side, each item is `asset` + `amount` (string, decimal, indicating the selling amount of the currency). - `to`: Buy/target side, each item is `asset` + **`amount`** (string, decimal, indicating the amount of the target currency side; the semantics are different from the previewed `ratio`). - This interface only verifies the accuracy and range of the above `amount`; if not satisfied, it returns non-0 `code` and `message`. For the verification rules of `to[].ratio` on the preview side, see the `POST /asset-swap/order/preview` document. # 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_asset_swap_order_v1(order_create_v1_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OrderCreateV1Req order_create_v1_req: Order request body (`OrderCreateV1Req`). **No `ratio` field**; `from`/`to` items are only `asset` + `amount`. `to` uses the target side **amount** `amount`, which is different from the **ratio** (ratio) semantics of `to` in preview, do not mix them. (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.ApiResponseAssetSwapOrderCreateV1 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_asset_swap_order_v1_with_http_info(order_create_v1_req, **kwargs) # noqa: E501 + + def create_asset_swap_order_v1_with_http_info(self, order_create_v1_req, **kwargs): # noqa: E501 + """Portfolio optimization — place order # noqa: E501 + + Swap several source currencies in the account into the target currency side configuration according to the specified amount. **It is strongly recommended to call** `POST /asset-swap/order/preview` **and `code=0` before placing an official order, and then submit this interface with consistent semantics**. **The request body does not contain `ratio`** - This interface `OrderCreateV1Req` only contains `from` / `to`, and the array elements are all `CreateParam` (**only** `asset` + `amount`). **Do not** pass in `ratio` in the order JSON; the ratio field `ratio` only exists in the preview interface `OrderPreviewV1Req.to` (`PreviewToParam`). **Key differences from the preview interface (error-prone points)** - The `to` array element of this interface is `CreateParam`: **`asset` + `amount` (target side quantity, decimal string)**. - The preview interface `to` is **`asset` + `ratio` (ratio string)**, **the two cannot be mixed**: do not fill in the `ratio` in the preview to the `amount` of the order as it is, and do not use the `amount` of the order as the `ratio` of the preview. **Recommended calling order** 1. `GET /asset-swap/asset/list`: Confirm currency support. 2. `GET /asset-swap/config`: Read `recommend` / `recommend_v2` (such as `schemes` of a strategy under `recommend_v2.market`, use `scheme.name` as the target `asset`, `scheme.ratio` is only used for `to[].ratio` of **preview**). 3. `GET /asset-swap/evaluate` (optional): Refer to the sellable quantity. 4. `POST /asset-swap/order/preview`: `from` and `to` (ratio) construct inquiry. 5. After the preview is successful, map the preview results to the `from`/`to` (**both are amount**) of the order according to the product/server agreement and then call this interface. **Field Convention** - `from`: selling side, each item is `asset` + `amount` (string, decimal, indicating the selling amount of the currency). - `to`: Buy/target side, each item is `asset` + **`amount`** (string, decimal, indicating the amount of the target currency side; the semantics are different from the previewed `ratio`). - This interface only verifies the accuracy and range of the above `amount`; if not satisfied, it returns non-0 `code` and `message`. For the verification rules of `to[].ratio` on the preview side, see the `POST /asset-swap/order/preview` document. # 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_asset_swap_order_v1_with_http_info(order_create_v1_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OrderCreateV1Req order_create_v1_req: Order request body (`OrderCreateV1Req`). **No `ratio` field**; `from`/`to` items are only `asset` + `amount`. `to` uses the target side **amount** `amount`, which is different from the **ratio** (ratio) semantics of `to` in preview, do not mix them. (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.ApiResponseAssetSwapOrderCreateV1, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'order_create_v1_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 create_asset_swap_order_v1" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_create_v1_req' is set + if self.api_client.client_side_validation and ('order_create_v1_req' not in local_var_params or # noqa: E501 + local_var_params['order_create_v1_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_create_v1_req` when calling `create_asset_swap_order_v1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'order_create_v1_req' in local_var_params: + body_params = local_var_params['order_create_v1_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( + '/asset-swap/order/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseAssetSwapOrderCreateV1', # 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_asset_swap_orders_v1(self, **kwargs): # noqa: E501 + """Portfolio optimization — order list # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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_asset_swap_orders_v1(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int to: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int status: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int offset: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int size: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int sort_mode: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int order_by: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :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.ApiResponseAssetSwapOrderListV1 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_asset_swap_orders_v1_with_http_info(**kwargs) # noqa: E501 + + def list_asset_swap_orders_v1_with_http_info(self, **kwargs): # noqa: E501 + """Portfolio optimization — order list # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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_asset_swap_orders_v1_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int to: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int status: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int offset: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int size: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int sort_mode: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param int order_by: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :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.ApiResponseAssetSwapOrderListV1, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + '_from', + 'to', + 'status', + 'offset', + 'size', + 'sort_mode', + 'order_by' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_asset_swap_orders_v1" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + 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 '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 '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 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort_mode' in local_var_params and local_var_params['sort_mode'] is not None: # noqa: E501 + query_params.append(('sort_mode', local_var_params['sort_mode'])) # noqa: E501 + if 'order_by' in local_var_params and local_var_params['order_by'] is not None: # noqa: E501 + query_params.append(('order_by', local_var_params['order_by'])) # 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( + '/asset-swap/order/list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseAssetSwapOrderListV1', # 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 preview_asset_swap_order_v1(self, order_preview_v1_req, **kwargs): # noqa: E501 + """Portfolio optimization — preview # noqa: E501 + + The transaction and fees are estimated based on the quantity of coins sold and the **target allocation ratio**, and **no orders are written**. When `code=0`, `data` contains estimated `order` and `transaction_fee`. **Key differences from the order interface (error-prone points)** - The `to` array element of this interface is `PreviewToParam`: **`asset` + `ratio` (ratio, decimal string)**, which represents the weight/proportion of the target currency in the portfolio. - The `to` of the order interface `POST /asset-swap/order/create` is **`asset` + `amount` (absolute quantity)**, **not** `ratio`. Callers should never mix the two sets of fields. **How to construct `to`(ratio)** - Prioritize the value from `data.recommend_v2` of `GET /asset-swap/config`: find a certain `RecommendV2Strategy` in the strategy list (such as `name` is `top2`) by grouping key (such as `market`, `faith`, `conservative`), and map its `schemes` to a preview request: - `to[].asset` ← `scheme.name` (target currency symbol) - `to[].ratio` ← `scheme.ratio` (ratio string consistent with configuration) - You can also use the flat map (currency → ratio string) under `recommend` to expand it into a multi-element `to` (one `asset` + `ratio` for each item). - When there are multiple targets, it is recommended that each `ratio` be consistent with the front-end/operation configuration; whether it needs to be summed to 1 is subject to server-side verification. **`from` (sell side)** - Each item is `asset` + `amount` (string, decimal), indicating the amount of the currency participating in the exchange this time. The currency should be within the supported range of `GET /asset-swap/asset/list`; when the magnitude is too small or the market depth is insufficient, a non-0 `code` may be returned (if the price cannot be inquired). **Connection with order placement** - After the preview is successful, convert the preview results allowed by the business into the request body where **`from`/`to` is all amount** required for ordering and then call create (the specific mapping rules are subject to the product documentation or server agreement). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_asset_swap_order_v1(order_preview_v1_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OrderPreviewV1Req order_preview_v1_req: Preview the request body. `to` must be **ratio**; unlike create's **amount** semantics. (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.ApiResponseAssetSwapOrderPreviewV1 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.preview_asset_swap_order_v1_with_http_info(order_preview_v1_req, **kwargs) # noqa: E501 + + def preview_asset_swap_order_v1_with_http_info(self, order_preview_v1_req, **kwargs): # noqa: E501 + """Portfolio optimization — preview # noqa: E501 + + The transaction and fees are estimated based on the quantity of coins sold and the **target allocation ratio**, and **no orders are written**. When `code=0`, `data` contains estimated `order` and `transaction_fee`. **Key differences from the order interface (error-prone points)** - The `to` array element of this interface is `PreviewToParam`: **`asset` + `ratio` (ratio, decimal string)**, which represents the weight/proportion of the target currency in the portfolio. - The `to` of the order interface `POST /asset-swap/order/create` is **`asset` + `amount` (absolute quantity)**, **not** `ratio`. Callers should never mix the two sets of fields. **How to construct `to`(ratio)** - Prioritize the value from `data.recommend_v2` of `GET /asset-swap/config`: find a certain `RecommendV2Strategy` in the strategy list (such as `name` is `top2`) by grouping key (such as `market`, `faith`, `conservative`), and map its `schemes` to a preview request: - `to[].asset` ← `scheme.name` (target currency symbol) - `to[].ratio` ← `scheme.ratio` (ratio string consistent with configuration) - You can also use the flat map (currency → ratio string) under `recommend` to expand it into a multi-element `to` (one `asset` + `ratio` for each item). - When there are multiple targets, it is recommended that each `ratio` be consistent with the front-end/operation configuration; whether it needs to be summed to 1 is subject to server-side verification. **`from` (sell side)** - Each item is `asset` + `amount` (string, decimal), indicating the amount of the currency participating in the exchange this time. The currency should be within the supported range of `GET /asset-swap/asset/list`; when the magnitude is too small or the market depth is insufficient, a non-0 `code` may be returned (if the price cannot be inquired). **Connection with order placement** - After the preview is successful, convert the preview results allowed by the business into the request body where **`from`/`to` is all amount** required for ordering and then call create (the specific mapping rules are subject to the product documentation or server agreement). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_asset_swap_order_v1_with_http_info(order_preview_v1_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OrderPreviewV1Req order_preview_v1_req: Preview the request body. `to` must be **ratio**; unlike create's **amount** semantics. (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.ApiResponseAssetSwapOrderPreviewV1, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'order_preview_v1_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 preview_asset_swap_order_v1" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_preview_v1_req' is set + if self.api_client.client_side_validation and ('order_preview_v1_req' not in local_var_params or # noqa: E501 + local_var_params['order_preview_v1_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_preview_v1_req` when calling `preview_asset_swap_order_v1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'order_preview_v1_req' in local_var_params: + body_params = local_var_params['order_preview_v1_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( + '/asset-swap/order/preview', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseAssetSwapOrderPreviewV1', # 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_asset_swap_order_v1(self, order_id, **kwargs): # noqa: E501 + """Portfolio optimization — query order # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.get_asset_swap_order_v1(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (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.ApiResponseAssetSwapOrderQueryV1 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_asset_swap_order_v1_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_asset_swap_order_v1_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Portfolio optimization — query order # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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.get_asset_swap_order_v1_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 (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.ApiResponseAssetSwapOrderQueryV1, 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_asset_swap_order_v1" % 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_asset_swap_order_v1`") # 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( + '/asset-swap/order/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseAssetSwapOrderQueryV1', # 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/bot_api.py b/gate_api/api/bot_api.py new file mode 100644 index 00000000..da287ead --- /dev/null +++ b/gate_api/api/bot_api.py @@ -0,0 +1,1469 @@ +# 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 BotApi(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 get_ai_hub_strategy_recommend(self, **kwargs): # noqa: E501 + """Get AIHub strategy recommendations # noqa: E501 + + The only formal interface for the discover domain. Support scenarios: - `top1` - `bundle` - `filter` - `refresh` Constraints: - The active recommendation pool only contains `spot_grid`, `futures_grid`, `spot_martingale` - Can return but do not actively recommend `infinite_grid`, `margin_grid` - `contract_martingale`, `smart-position`, `spot-future-arbitrage` must not be returned - When `scene=filter` is used, only filtering by `market`, `backtest_apr_gte`, `max_drawdown_lte` is allowed - `scene=refresh` inherits the refresh context through `refresh_recommendation_id`; the official minimum format only requires `strategy_type|market` - If the upstream directly transmits the previous recommendation `recommendation_id`, the third paragraph `backtest_id` will currently be ignored. # 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_ai_hub_strategy_recommend(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str market: Trading pair, such as `BTC_USDT` + :param str strategy_type: Recommended target policy type; `contract_martingale` not allowed + :param str direction: Market direction + :param str invest_amount: Investment amount, string transparent transmission + :param str scene: Recommended scenario; when empty, bot-service can automatically infer according to the implementation logic. + :param str refresh_recommendation_id: It is recommended to refresh the context. Used when `scene=refresh` is used; when `scene` is empty but the field exists, bot-service will also automatically determine as `refresh`. The official minimum format is `strategy_type|market`; if the `recommendation_id` of the previous recommendation is directly passed through, the third paragraph `backtest_id` will be ignored. + :param int limit: Return quantity; when `scene=filter` is used, the actual results are up to 10 + :param str max_drawdown_lte: Maximum drawdown limit + :param str backtest_apr_gte: Backtest annualized lower limit + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubDiscoverSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_ai_hub_strategy_recommend_with_http_info(**kwargs) # noqa: E501 + + def get_ai_hub_strategy_recommend_with_http_info(self, **kwargs): # noqa: E501 + """Get AIHub strategy recommendations # noqa: E501 + + The only formal interface for the discover domain. Support scenarios: - `top1` - `bundle` - `filter` - `refresh` Constraints: - The active recommendation pool only contains `spot_grid`, `futures_grid`, `spot_martingale` - Can return but do not actively recommend `infinite_grid`, `margin_grid` - `contract_martingale`, `smart-position`, `spot-future-arbitrage` must not be returned - When `scene=filter` is used, only filtering by `market`, `backtest_apr_gte`, `max_drawdown_lte` is allowed - `scene=refresh` inherits the refresh context through `refresh_recommendation_id`; the official minimum format only requires `strategy_type|market` - If the upstream directly transmits the previous recommendation `recommendation_id`, the third paragraph `backtest_id` will currently be ignored. # 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_ai_hub_strategy_recommend_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str market: Trading pair, such as `BTC_USDT` + :param str strategy_type: Recommended target policy type; `contract_martingale` not allowed + :param str direction: Market direction + :param str invest_amount: Investment amount, string transparent transmission + :param str scene: Recommended scenario; when empty, bot-service can automatically infer according to the implementation logic. + :param str refresh_recommendation_id: It is recommended to refresh the context. Used when `scene=refresh` is used; when `scene` is empty but the field exists, bot-service will also automatically determine as `refresh`. The official minimum format is `strategy_type|market`; if the `recommendation_id` of the previous recommendation is directly passed through, the third paragraph `backtest_id` will be ignored. + :param int limit: Return quantity; when `scene=filter` is used, the actual results are up to 10 + :param str max_drawdown_lte: Maximum drawdown limit + :param str backtest_apr_gte: Backtest annualized lower limit + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubDiscoverSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'market', + 'strategy_type', + 'direction', + 'invest_amount', + 'scene', + 'refresh_recommendation_id', + 'limit', + 'max_drawdown_lte', + 'backtest_apr_gte', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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_ai_hub_strategy_recommend" % 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 `get_ai_hub_strategy_recommend`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'market' in local_var_params and local_var_params['market'] is not None: # noqa: E501 + query_params.append(('market', local_var_params['market'])) # noqa: E501 + if 'strategy_type' in local_var_params and local_var_params['strategy_type'] is not None: # noqa: E501 + query_params.append(('strategy_type', local_var_params['strategy_type'])) # noqa: E501 + if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 + query_params.append(('direction', local_var_params['direction'])) # noqa: E501 + if 'invest_amount' in local_var_params and local_var_params['invest_amount'] is not None: # noqa: E501 + query_params.append(('invest_amount', local_var_params['invest_amount'])) # noqa: E501 + if 'scene' in local_var_params and local_var_params['scene'] is not None: # noqa: E501 + query_params.append(('scene', local_var_params['scene'])) # noqa: E501 + if 'refresh_recommendation_id' in local_var_params and local_var_params['refresh_recommendation_id'] is not None: # noqa: E501 + query_params.append(('refresh_recommendation_id', local_var_params['refresh_recommendation_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 'max_drawdown_lte' in local_var_params and local_var_params['max_drawdown_lte'] is not None: # noqa: E501 + query_params.append(('max_drawdown_lte', local_var_params['max_drawdown_lte'])) # noqa: E501 + if 'backtest_apr_gte' in local_var_params and local_var_params['backtest_apr_gte'] is not None: # noqa: E501 + query_params.append(('backtest_apr_gte', local_var_params['backtest_apr_gte'])) # noqa: E501 + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # 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 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/bot/strategy/recommend', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubDiscoverSuccessResponse', # 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 post_ai_hub_spot_grid_create(self, spot_grid_create_request, **kwargs): # noqa: E501 + """Create spot grid # noqa: E501 + + Create a spot grid strategy based on the incoming parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_spot_grid_create(spot_grid_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SpotGridCreateRequest spot_grid_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.post_ai_hub_spot_grid_create_with_http_info(spot_grid_create_request, **kwargs) # noqa: E501 + + def post_ai_hub_spot_grid_create_with_http_info(self, spot_grid_create_request, **kwargs): # noqa: E501 + """Create spot grid # noqa: E501 + + Create a spot grid strategy based on the incoming parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_spot_grid_create_with_http_info(spot_grid_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SpotGridCreateRequest spot_grid_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'spot_grid_create_request', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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 post_ai_hub_spot_grid_create" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'spot_grid_create_request' is set + if self.api_client.client_side_validation and ('spot_grid_create_request' not in local_var_params or # noqa: E501 + local_var_params['spot_grid_create_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `spot_grid_create_request` when calling `post_ai_hub_spot_grid_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'spot_grid_create_request' in local_var_params: + body_params = local_var_params['spot_grid_create_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( + '/bot/spot-grid/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubCreateSuccessResponse', # 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 post_ai_hub_margin_grid_create(self, margin_grid_create_request, **kwargs): # noqa: E501 + """Create a lever grid # noqa: E501 + + Create a leverage grid strategy based on the passed parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_margin_grid_create(margin_grid_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param MarginGridCreateRequest margin_grid_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.post_ai_hub_margin_grid_create_with_http_info(margin_grid_create_request, **kwargs) # noqa: E501 + + def post_ai_hub_margin_grid_create_with_http_info(self, margin_grid_create_request, **kwargs): # noqa: E501 + """Create a lever grid # noqa: E501 + + Create a leverage grid strategy based on the passed parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_margin_grid_create_with_http_info(margin_grid_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param MarginGridCreateRequest margin_grid_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'margin_grid_create_request', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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 post_ai_hub_margin_grid_create" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'margin_grid_create_request' is set + if self.api_client.client_side_validation and ('margin_grid_create_request' not in local_var_params or # noqa: E501 + local_var_params['margin_grid_create_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `margin_grid_create_request` when calling `post_ai_hub_margin_grid_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'margin_grid_create_request' in local_var_params: + body_params = local_var_params['margin_grid_create_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( + '/bot/margin-grid/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubCreateSuccessResponse', # 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 post_ai_hub_infinite_grid_create(self, infinite_grid_create_request, **kwargs): # noqa: E501 + """Create infinite grid # noqa: E501 + + Create an infinite grid strategy based on passed parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_infinite_grid_create(infinite_grid_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param InfiniteGridCreateRequest infinite_grid_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.post_ai_hub_infinite_grid_create_with_http_info(infinite_grid_create_request, **kwargs) # noqa: E501 + + def post_ai_hub_infinite_grid_create_with_http_info(self, infinite_grid_create_request, **kwargs): # noqa: E501 + """Create infinite grid # noqa: E501 + + Create an infinite grid strategy based on passed parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_infinite_grid_create_with_http_info(infinite_grid_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param InfiniteGridCreateRequest infinite_grid_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'infinite_grid_create_request', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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 post_ai_hub_infinite_grid_create" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'infinite_grid_create_request' is set + if self.api_client.client_side_validation and ('infinite_grid_create_request' not in local_var_params or # noqa: E501 + local_var_params['infinite_grid_create_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `infinite_grid_create_request` when calling `post_ai_hub_infinite_grid_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'infinite_grid_create_request' in local_var_params: + body_params = local_var_params['infinite_grid_create_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( + '/bot/infinite-grid/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubCreateSuccessResponse', # 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 post_ai_hub_futures_grid_create(self, futures_grid_create_request, **kwargs): # noqa: E501 + """Create a contract grid # noqa: E501 + + Create a contract grid strategy based on the incoming parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_futures_grid_create(futures_grid_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FuturesGridCreateRequest futures_grid_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.post_ai_hub_futures_grid_create_with_http_info(futures_grid_create_request, **kwargs) # noqa: E501 + + def post_ai_hub_futures_grid_create_with_http_info(self, futures_grid_create_request, **kwargs): # noqa: E501 + """Create a contract grid # noqa: E501 + + Create a contract grid strategy based on the incoming parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_futures_grid_create_with_http_info(futures_grid_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FuturesGridCreateRequest futures_grid_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'futures_grid_create_request', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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 post_ai_hub_futures_grid_create" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'futures_grid_create_request' is set + if self.api_client.client_side_validation and ('futures_grid_create_request' not in local_var_params or # noqa: E501 + local_var_params['futures_grid_create_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `futures_grid_create_request` when calling `post_ai_hub_futures_grid_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'futures_grid_create_request' in local_var_params: + body_params = local_var_params['futures_grid_create_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( + '/bot/futures-grid/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubCreateSuccessResponse', # 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 post_ai_hub_spot_martingale_create(self, spot_martingale_create_request, **kwargs): # noqa: E501 + """Create Spot Martin # noqa: E501 + + Create a spot martingale strategy from the given parameters. Stop-loss semantics match the app / `MartingaleBot`: - Use **`create_params.stop_loss_per_cycle`** (ratio per round as a decimal string) for creation-side stop-loss; **do not** use `stop_loss_price` for creation logic. - Stop-loss prices shown on detail pages are computed per round by the engine; creation accepts optional **`create_params.trigger_price`** (trigger price). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_spot_martingale_create(spot_martingale_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SpotMartingaleCreateRequest spot_martingale_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.post_ai_hub_spot_martingale_create_with_http_info(spot_martingale_create_request, **kwargs) # noqa: E501 + + def post_ai_hub_spot_martingale_create_with_http_info(self, spot_martingale_create_request, **kwargs): # noqa: E501 + """Create Spot Martin # noqa: E501 + + Create a spot martingale strategy from the given parameters. Stop-loss semantics match the app / `MartingaleBot`: - Use **`create_params.stop_loss_per_cycle`** (ratio per round as a decimal string) for creation-side stop-loss; **do not** use `stop_loss_price` for creation logic. - Stop-loss prices shown on detail pages are computed per round by the engine; creation accepts optional **`create_params.trigger_price`** (trigger price). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_spot_martingale_create_with_http_info(spot_martingale_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SpotMartingaleCreateRequest spot_martingale_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'spot_martingale_create_request', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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 post_ai_hub_spot_martingale_create" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'spot_martingale_create_request' is set + if self.api_client.client_side_validation and ('spot_martingale_create_request' not in local_var_params or # noqa: E501 + local_var_params['spot_martingale_create_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `spot_martingale_create_request` when calling `post_ai_hub_spot_martingale_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'spot_martingale_create_request' in local_var_params: + body_params = local_var_params['spot_martingale_create_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( + '/bot/spot-martingale/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubCreateSuccessResponse', # 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 post_ai_hub_contract_martingale_create(self, contract_martingale_create_request, **kwargs): # noqa: E501 + """Create contract martin # noqa: E501 + + Create a contract Martin strategy based on the input parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_contract_martingale_create(contract_martingale_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param ContractMartingaleCreateRequest contract_martingale_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.post_ai_hub_contract_martingale_create_with_http_info(contract_martingale_create_request, **kwargs) # noqa: E501 + + def post_ai_hub_contract_martingale_create_with_http_info(self, contract_martingale_create_request, **kwargs): # noqa: E501 + """Create contract martin # noqa: E501 + + Create a contract Martin strategy based on the input parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_contract_martingale_create_with_http_info(contract_martingale_create_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param ContractMartingaleCreateRequest contract_martingale_create_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubCreateSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contract_martingale_create_request', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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 post_ai_hub_contract_martingale_create" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'contract_martingale_create_request' is set + if self.api_client.client_side_validation and ('contract_martingale_create_request' not in local_var_params or # noqa: E501 + local_var_params['contract_martingale_create_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract_martingale_create_request` when calling `post_ai_hub_contract_martingale_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'contract_martingale_create_request' in local_var_params: + body_params = local_var_params['contract_martingale_create_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( + '/bot/contract-martingale/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubCreateSuccessResponse', # 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_ai_hub_portfolio_running(self, **kwargs): # noqa: E501 + """Query the list of running policies # noqa: E501 + + Query the list of AIHub strategies currently running by the user, and support filtering by strategy type, trading pair and paging conditions. # 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_ai_hub_portfolio_running(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str strategy_type: Filter by policy type + :param str market: Filter by trading pair + :param int page: Page number, default 1 + :param int page_size: Paging size, default 20, maximum 50 + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubPortfolioRunningSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_ai_hub_portfolio_running_with_http_info(**kwargs) # noqa: E501 + + def get_ai_hub_portfolio_running_with_http_info(self, **kwargs): # noqa: E501 + """Query the list of running policies # noqa: E501 + + Query the list of AIHub strategies currently running by the user, and support filtering by strategy type, trading pair and paging conditions. # 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_ai_hub_portfolio_running_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str strategy_type: Filter by policy type + :param str market: Filter by trading pair + :param int page: Page number, default 1 + :param int page_size: Paging size, default 20, maximum 50 + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubPortfolioRunningSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'strategy_type', + 'market', + 'page', + 'page_size', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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_ai_hub_portfolio_running" % 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_ai_hub_portfolio_running`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 50: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `get_ai_hub_portfolio_running`, must be a value less than or equal to `50`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `get_ai_hub_portfolio_running`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'strategy_type' in local_var_params and local_var_params['strategy_type'] is not None: # noqa: E501 + query_params.append(('strategy_type', local_var_params['strategy_type'])) # noqa: E501 + if 'market' in local_var_params and local_var_params['market'] is not None: # noqa: E501 + query_params.append(('market', local_var_params['market'])) # 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 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # 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 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/bot/portfolio/running', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubPortfolioRunningSuccessResponse', # 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_ai_hub_portfolio_detail(self, strategy_id, strategy_type, **kwargs): # noqa: E501 + """Query order policy details # noqa: E501 + + Both `strategy_id` and `strategy_type` must be passed in the request, where `strategy_type` is used to distribute to the underlying detailed implementation by strategy type. # 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_ai_hub_portfolio_detail(strategy_id, strategy_type, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str strategy_id: Policy ID (required) + :param str strategy_type: Policy type; used for underlying detail distribution (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubPortfolioDetailSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_ai_hub_portfolio_detail_with_http_info(strategy_id, strategy_type, **kwargs) # noqa: E501 + + def get_ai_hub_portfolio_detail_with_http_info(self, strategy_id, strategy_type, **kwargs): # noqa: E501 + """Query order policy details # noqa: E501 + + Both `strategy_id` and `strategy_type` must be passed in the request, where `strategy_type` is used to distribute to the underlying detailed implementation by strategy type. # 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_ai_hub_portfolio_detail_with_http_info(strategy_id, strategy_type, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str strategy_id: Policy ID (required) + :param str strategy_type: Policy type; used for underlying detail distribution (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubPortfolioDetailSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'strategy_id', + 'strategy_type', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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_ai_hub_portfolio_detail" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'strategy_id' is set + if self.api_client.client_side_validation and ('strategy_id' not in local_var_params or # noqa: E501 + local_var_params['strategy_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `strategy_id` when calling `get_ai_hub_portfolio_detail`") # noqa: E501 + # verify the required parameter 'strategy_type' is set + if self.api_client.client_side_validation and ('strategy_type' not in local_var_params or # noqa: E501 + local_var_params['strategy_type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `strategy_type` when calling `get_ai_hub_portfolio_detail`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'strategy_id' in local_var_params and local_var_params['strategy_id'] is not None: # noqa: E501 + query_params.append(('strategy_id', local_var_params['strategy_id'])) # noqa: E501 + if 'strategy_type' in local_var_params and local_var_params['strategy_type'] is not None: # noqa: E501 + query_params.append(('strategy_type', local_var_params['strategy_type'])) # noqa: E501 + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # 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 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/bot/portfolio/detail', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubPortfolioDetailSuccessResponse', # 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 post_ai_hub_portfolio_stop(self, ai_hub_portfolio_stop_request, **kwargs): # noqa: E501 + """Terminate a single running policy # noqa: E501 + + Only one policy is allowed to be terminated per request. Risk warning and secondary confirmation are borne by the upper layer of OpenClaw; this interface is only responsible for executing stop. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_portfolio_stop(ai_hub_portfolio_stop_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param AIHubPortfolioStopRequest ai_hub_portfolio_stop_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubPortfolioStopSuccessResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.post_ai_hub_portfolio_stop_with_http_info(ai_hub_portfolio_stop_request, **kwargs) # noqa: E501 + + def post_ai_hub_portfolio_stop_with_http_info(self, ai_hub_portfolio_stop_request, **kwargs): # noqa: E501 + """Terminate a single running policy # noqa: E501 + + Only one policy is allowed to be terminated per request. Risk warning and secondary confirmation are borne by the upper layer of OpenClaw; this interface is only responsible for executing stop. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_ai_hub_portfolio_stop_with_http_info(ai_hub_portfolio_stop_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param AIHubPortfolioStopRequest ai_hub_portfolio_stop_request: (required) + :param str x_gate_service_id: Call source identifier; injected by APIv4 if necessary + :param str x_gate_app_lang: Language context, such as `zh-CN` / `en-US` + :param str x_request_id: Request link ID; caller can transmit transparently + :param str x_trace_id: trace header; can be generated uniformly by APIv4 + :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.AIHubPortfolioStopSuccessResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'ai_hub_portfolio_stop_request', + 'x_gate_service_id', + 'x_gate_app_lang', + 'x_request_id', + 'x_trace_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 post_ai_hub_portfolio_stop" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'ai_hub_portfolio_stop_request' is set + if self.api_client.client_side_validation and ('ai_hub_portfolio_stop_request' not in local_var_params or # noqa: E501 + local_var_params['ai_hub_portfolio_stop_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ai_hub_portfolio_stop_request` when calling `post_ai_hub_portfolio_stop`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_service_id' in local_var_params: + header_params['X-Gate-Service-Id'] = local_var_params['x_gate_service_id'] # noqa: E501 + if 'x_gate_app_lang' in local_var_params: + header_params['X-Gate-AppLang'] = local_var_params['x_gate_app_lang'] # noqa: E501 + if 'x_request_id' in local_var_params: + header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 + if 'x_trace_id' in local_var_params: + header_params['X-Trace-Id'] = local_var_params['x_trace_id'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'ai_hub_portfolio_stop_request' in local_var_params: + body_params = local_var_params['ai_hub_portfolio_stop_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( + '/bot/portfolio/stop', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AIHubPortfolioStopSuccessResponse', # 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/coupon_api.py b/gate_api/api/coupon_api.py new file mode 100644 index 00000000..66e7f2a3 --- /dev/null +++ b/gate_api/api/coupon_api.py @@ -0,0 +1,321 @@ +# 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 CouponApi(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_user_coupons(self, **kwargs): # noqa: E501 + """Coupon Center list # noqa: E501 + + ## Interface description The general list interface of the card and coupon center returns all the cards and coupons of the currently logged in user (supports paging, filtering type, and valid/invalid switching). --- ## Query Parameters | Parameter name | Type | Required | Default value | Constraints | Description | |--------|------|------|--------|------|------| | `expired` | integer | No | `0` | `0` or `1` | `0` = Query valid cards and coupons; `1` = Check expired/used cards | | `limit` | integer | No | `10` | 1 ~ 20 | The number of cards returned per page | | `last_id` | integer | No | `0` | 1 ~ 1000000000 | Cursor paging: the last record of the previous page `id`, the home page does not transmit | | `expire_time` | integer | no | `0` | 1 ~ 2147483647 | Cursor pagination: with `last_id` Union usage expiration time (Unix timestamp) | | `order_by` | string | no | `latest` | `latest` / `expired` | Sorting method: `latest` = sort by latest receipt; `expired` = sort by expiration time in ascending order | | `type` | string | No | Empty (return all) | See the card type table below | Only return cards of the specified type | | `is_task_coupon` | integer | No | Do not pass (return all) | `0` or `1` | `0` = Only ordinary cards and coupons are returned; `1` = Only mission cards and coupons are returned; both are returned without passing | ### Supported coupon types (`type` parameter enumeration value) The main site (gate.io default site) supports the following types, and different sub-sites (Türkiye, United States, Malta, Australia) have their own whitelist restrictions. | `type` value | Coupon name | Version limit (below this version will not be returned/cannot be transferred) | |-----------|---------|-------------------------------| | `position_voucher` | Position experience coupon | Unlimited | | `tradfi_position_voucher` | TradFi position experience coupon | Android < 7320000 / iOS < 202507320000 does not return | | `contract_bonus` | Contract trial bonus | Unlimited | | `contract_bonus_new` | Contract experience coupon | Unlimited | | `commission_rebate` | Fee rebate coupons | Unlimited | | `hold_bonus` | Financial management trial bonus | Unlimited | | `point` | Point card | Unlimited (main site/Türkiye site only) | | `financial_rate` | Interest rate coupons | Unlimited | | `robot_bonus` | Robot trial bonus | Unlimited | | `loss_protection_copier` | Worry-free money for copying orders | Unlimited | | `vip_card` | VIP experience card | Unlimited | | `interest_voucher` | Leveraged coupons | Unlimited | | `p2p` | P2P transaction coupons | Unlimited | | `cash` | Cash Vouchers | Unlimited | | `crypto_loan_interest` | Mortgage currency interest reduction coupons | Android < 7290000 / iOS < 202507290000 does not return | | `copy_trading` | Trading experience bonus | Android < 7320000 / iOS < 202507320000 No return | | `alpha_voucher` | Alpha Cash Voucher | Android < 7320000 / iOS < 202507320000 Do not return | | `etf_voucher` | ETF trial fund | Android < 7320000 / iOS < 202507320000 No return | --- ##Response ### Outer structure ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": true, \"list\": [ ...array of coupon objects... ] } } ``` | Field | Type | Description | |------|------|------| | `code` | integer | `0` = success | | `message` | string | response message | | `data.next_page` | boolean | Whether there is a next page. `true` = There is more data, the `id` of the last item on this page needs to be `last_id` is passed in for the next request | | `data.list` | array | Array of coupon objects, see below for details | --- ### Public fields of card and coupon objects (included in all types) | Field name | Type | Description | |--------|------|------| | `id` | integer | Card and coupon issuance record ID (`coupon_send_issuing_log.id`), used for paging cursor `last_id` | | `details_id` | integer | The primary key ID of the user card details table (independent tables for each type) | | `coupon_type` | string | Coupon type, see the enumeration table above | | `name` | string | Card display name (i18n translated) | | `amount` | string | Coupon denomination (formatted string, including thousandth sign). Different types have different meanings, see explanation below | | `currency` | string | The denomination unit. Different types have different values, see explanation below | | `rule_new` | string | Use rule text (this field in the list interface always returns the empty string `\"\"`, and only in the detail interface) | | `status` | string | Card status, see status enumeration below | | `jump_url` | object | jump link | | `jump_url.web` | string | Web jump link | | `jump_url.app` | string | App jump link | | `jump_url.mini_app` | string | Mini program jump link (most types are empty strings) | | `help_url` | object | Help center link | | `help_url.web` | string | Web help link | | `help_url.app` | string | App help link | | `expire_time` | integer | Expiration time (Unix timestamp). Note: Some types will be adjusted to the actual expiration time after they have been activated or used | | `expire_time_order_by` | integer | Expiration time for sorting (taken from the original expiration time of the issuance record, not affected by activation) | | `expire_second` | integer | The number of seconds remaining before expiration (expired or point card type returns `0`) | | `has_usage_history` | boolean | Whether there is a usage record (the point card type is fixed to `true`, and the rest are judged based on the type) | | `has_progress` | boolean | Whether to display the progress bar (only `commission_rebate`, `interest_voucher` and task coupons that meet the conditions are `true`) | | `progress_config` | object | Progress bar configuration, when `has_progress` is `false`, each field is an empty string | | `progress_config.total_balance` | string | The total amount to be completed | | `progress_config.current_used` | string | Amount used | | `progress_config.current_achived` | string | Amount achieved | | `progress_config.currency` | string | Progress unit | | `activation_info` | object | Activation information exclusive to each type, see each type description below (types without exclusive information return empty objects `{}`) | | `is_task_coupon` | integer | `0` = ordinary coupon; `1` = task coupon | | `upgrade_toast` | boolean | Whether the user needs to be prompted to upgrade the App (`true` when the version is too old and cannot support the coupon) | | `task_title` | string | Task title (only task coupons have value, ordinary coupons are `\"\"`) | | `task_desc` | string | Task description (only task coupons have value, ordinary coupons are `\"\"`) | | `task_start_at` | integer | Task start timestamp (only `TASK_EXPIRED` status task coupons have value, the rest are `0`) | | `task_expire_at` | integer | Task expiration timestamp (currently fixed to `0`, reserved field) | | `task_completed_at` | integer | Task completion timestamp (currently fixed at `0`, reserved field) | | `extra` | array | Extended field, fixed return empty array `[]` | --- ### `status` status enumeration | Value | Applicable objects | Description | |----|---------|------| | `NOT_ACTIVE` | Ordinary coupons | Pending activation (not yet activated) | | `ACTIVATED` | Ordinary coupons | Activated (activating or after activation) | | `TO_BE_USED` | Ordinary coupons | To be used (valid and not used) | | `EXPIRED` | Ordinary coupons | Expired (expired without being used) | | `RECYCLED` | Ordinary cards and coupons | Recycled (such as contract recharge experience coupons are recycled) | | `INVALID` | Ordinary coupons | Expired | | `USED` | Ordinary coupons | Used/consumed | | `UNKNOWN` | Ordinary coupons | Unknown status | | `LOCKED` | Ordinary cards and coupons (`p2p`) | Locked (P2P transaction in progress, waiting for write-off) | | `TASK_START` | Task coupons | The task has not started (the coupon has been issued and the task is to be started) | | `TASK_WAIT` | Task coupons | Task in progress (to be completed) | | `TASK_DONE` | Task coupons | The task has been completed (receiving is being processed) | | `TASK_EXPIRED` | Task coupon | The task is not completed and has expired | | `TASK_NOT_STARTED_EXPIRED` | Task coupon | The task has expired before it started | | `TASK_RECEIVE_SUCCESS` | Task coupons | Task rewards received successfully | | `TASK_RECEIVE_FAIL` | Task coupons | Failed to receive task rewards | --- ### `amount` / `currency` Description of each type | `coupon_type` | `amount` description | `currency` value | |---------------|--------------|---------------| | `point` | Point card balance (including thousandths) | `\"POINT\"` | | `position_voucher` | `Coupon face amount × leverage multiple` (including thousandths) | Such as `\"USDT\"` | | `tradfi_position_voucher` | `Coupon face amount × leverage multiple` (including thousandths) | `\"USDx\"` | | `financial_rate` | Interest rate increase value + `%`, such as `\"5%\"` | `\"APR\"` | | `vip_card` | VIP level number, such as `\"4\"` | `\"VIP\"` | | `interest_voucher` | Interest rate discount percentage + `%` | Discount logo (Chinese site is `\"discount\"`, other sites are empty) | | `crypto_loan_interest` | Interest rate discount percentage + `%` | `\"\"` | | `alpha_voucher` | Coupon face amount (including thousandths) | Alpha base currency (such as `\"USDT\"` or `\"ETH\"`) | | Other types | Coupon face amount (including thousandths) | Capital currency symbol, such as `\"USDT\"` / `\"GT\"` / `\"BTC\"` | > **Note**: The `point` type additionally returns the `origin_amount` field (the original balance string with the trailing zeros removed), other types do not have this field. --- ### `activation_info` Exclusive fields for each type #### `interest_voucher` (leverage coupon) ```json { \"supported_pairs\": \"BTC/USDT\", \"transaction_type\": \"borrow\" } ``` | Field | Type | Description | |------|------|------| | `supported_pairs` | string | Applicable trading pairs, separated by `/`, such as `\"BTC/USDT\"` | | `transaction_type` | string | Transaction type (such as `borrow`) | #### `contract_bonus_new` (contract experience coupon) ```json { \"received_expired_hour\": 48 } ``` | Field | Type | Description | |------|------|------| | `received_expired_hour` | integer | The number of hours valid after activation (automatic recycling after timeout) | #### `contract_bonus` (Contract experience bonus) ```json { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false } ``` | Field | Type | Description | |------|------|------| | `check_unified_account_mode` | boolean | Whether to check the unified account mode (fixed `true`) | | `received_expired_days` | integer | Number of days valid after activation | | `abtest` | boolean | AB test flag (currently fixed to `false`) | #### `commission_rebate` (handling fee cashback coupon) ```json { \"market\": \"futures\", \"market_name\": \"Futures\" } ``` | Field | Type | Description | |------|------|------| | `market` | string | Applicable market, enumeration value: `spot` / `margin` / `futures` / `alpha` / `etf` / `tradfi` | | `market_name` | string | Market display name (i18n translated) | #### `robot_bonus` (robot experience bonus) ```json { \"designated_bots\": \"DISABLED\" } ``` | Field | Type | Description | |------|------|------| | `designated_bots` | string | `\"ENABLED\"` = can only be used by specified policies; `\"DISABLED\"` = Unlimited strategy | #### `position_voucher` (position experience coupon) ```json { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"100\", \"position_bonus\": \"500\" } ``` | Field | Type | Description | |------|------|------| | `symbols` | string | Applicable trading pairs (such as `\"BTC_USDT\"`), empty means no limit | | `leverage` | string | Leverage multiple | | `need_user_funds` | integer | `0` = No user-owned funds are required; `1` = Fund allocation is required | | `user_funds_amount` | string | The amount of funds required by the user (meaningful when `need_user_funds=1`) | | `position_bonus` | string | The original amount of the coupon (remove the trailing zero) | #### `tradfi_position_voucher` (TradFi position experience coupon) ```json { \"symbols\": \"AAPL\", \"leverage\": \"5\", \"position_bonus\": \"200\" } ``` | Field | Type | Description | |------|------|------| | `symbols` | string | Applicable to TradFi varieties (such as `\"AAPL\"`), empty means no limit | | `leverage` | string | Leverage multiple | | `position_bonus` | string | The original amount of the coupon (remove the trailing zero) | #### `etf_voucher` (ETF trial bonus) ```json { \"currency_markets\": \"BTC3L_USDT,ETH3L_USDT\", \"amount\": \"50\" } ``` | Field | Type | Description | |------|------|------| | `currency_markets` | string | List of applicable ETF markets (comma separated) | | `amount` | string | The original amount of the coupon (remove the trailing zero) | #### Other types `point` (point card), `hold_bonus` (financial experience fund), `loss_protection_copier` (worry-free money for following orders), `vip_card` (VIP experience card), `p2p` (P2P transaction coupon), `cash` (cash coupon) , `crypto_loan_interest` (interest-reduced coupon for mortgage loan), `copy_trading` (trading experience fee), `alpha_voucher` (Alpha cash coupon), `financial_rate` (interest-increasing coupon) and other types return empty objects: ```json {} ``` --- ## Complete response example ### Ordinary cards and coupons (contract experience money) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 1234567, \"details_id\": 890, \"coupon_type\": \"contract_bonus\", \"name\": \"Futures Bonus\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"\", \"status\": \"NOT_ACTIVE\", \"jump_url\": { \"web\": \"/futures/USDT\", \"app\": \"/futures/USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 86400, \"has_usage_history\": false, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false }, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` ### Task coupons (handling fee cashback coupons) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"commission_rebate\", \"name\": \"10% Futures Commission Rebate\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"\", \"status\": \"TASK_WAIT\", \"jump_url\": { \"web\": \"https://www.gate.io/futures\", \"app\": \"gateio://futures\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 172800, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"1000\", \"current_used\": \"350\", \"current_achived\": \"350\", \"currency\": \"USDT\" }, \"activation_info\": { \"market\": \"futures\", \"market_name\": \"Futures\" }, \"is_task_coupon\": 1, \"upgrade_toast\": false, \"task_title\": \"Trade 1000 USDT to earn commission rebate\", \"task_desc\": \"Complete futures trading volume task to get 100 USDT commission rebate\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` ### Point card (point) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 0, \"details_id\": 0, \"coupon_type\": \"point\", \"name\": \"Points\", \"amount\": \"1,234.56\", \"origin_amount\": \"1234.56\", \"currency\": \"POINT\", \"rule_new\": \"...\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/trade/BTC_USDT\", \"app\": \"/trade/BTC_USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 0, \"expire_time_order_by\": 0, \"expire_second\": 0, \"has_usage_history\": true, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": {}, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` # 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_coupons(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int expired: Coupon status filter. `0` = query valid coupons (default); `1` = query expired/used coupons + :param int limit: Number of coupons returned per page, range 1-20, default 10 + :param int last_id: Cursor-based pagination: the `id` value of the last record from the previous page, omit (or pass 0) for the first page + :param int expire_time: Cursor-based pagination: used together with `last_id`, pass the `expire_time_order_by` value of the last record from the previous page (Unix timestamp), omit for the first page + :param str order_by: Sort order. `latest` = by latest claim time descending (default); `expired` = by expiration time ascending + :param str type: Coupon type filter. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) + :param int is_task_coupon: Task Coupon Filter. `0` = Return only regular coupons; `1` = Return only task coupons; Omit to return both + :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.ListUserCouponsResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_user_coupons_with_http_info(**kwargs) # noqa: E501 + + def list_user_coupons_with_http_info(self, **kwargs): # noqa: E501 + """Coupon Center list # noqa: E501 + + ## Interface description The general list interface of the card and coupon center returns all the cards and coupons of the currently logged in user (supports paging, filtering type, and valid/invalid switching). --- ## Query Parameters | Parameter name | Type | Required | Default value | Constraints | Description | |--------|------|------|--------|------|------| | `expired` | integer | No | `0` | `0` or `1` | `0` = Query valid cards and coupons; `1` = Check expired/used cards | | `limit` | integer | No | `10` | 1 ~ 20 | The number of cards returned per page | | `last_id` | integer | No | `0` | 1 ~ 1000000000 | Cursor paging: the last record of the previous page `id`, the home page does not transmit | | `expire_time` | integer | no | `0` | 1 ~ 2147483647 | Cursor pagination: with `last_id` Union usage expiration time (Unix timestamp) | | `order_by` | string | no | `latest` | `latest` / `expired` | Sorting method: `latest` = sort by latest receipt; `expired` = sort by expiration time in ascending order | | `type` | string | No | Empty (return all) | See the card type table below | Only return cards of the specified type | | `is_task_coupon` | integer | No | Do not pass (return all) | `0` or `1` | `0` = Only ordinary cards and coupons are returned; `1` = Only mission cards and coupons are returned; both are returned without passing | ### Supported coupon types (`type` parameter enumeration value) The main site (gate.io default site) supports the following types, and different sub-sites (Türkiye, United States, Malta, Australia) have their own whitelist restrictions. | `type` value | Coupon name | Version limit (below this version will not be returned/cannot be transferred) | |-----------|---------|-------------------------------| | `position_voucher` | Position experience coupon | Unlimited | | `tradfi_position_voucher` | TradFi position experience coupon | Android < 7320000 / iOS < 202507320000 does not return | | `contract_bonus` | Contract trial bonus | Unlimited | | `contract_bonus_new` | Contract experience coupon | Unlimited | | `commission_rebate` | Fee rebate coupons | Unlimited | | `hold_bonus` | Financial management trial bonus | Unlimited | | `point` | Point card | Unlimited (main site/Türkiye site only) | | `financial_rate` | Interest rate coupons | Unlimited | | `robot_bonus` | Robot trial bonus | Unlimited | | `loss_protection_copier` | Worry-free money for copying orders | Unlimited | | `vip_card` | VIP experience card | Unlimited | | `interest_voucher` | Leveraged coupons | Unlimited | | `p2p` | P2P transaction coupons | Unlimited | | `cash` | Cash Vouchers | Unlimited | | `crypto_loan_interest` | Mortgage currency interest reduction coupons | Android < 7290000 / iOS < 202507290000 does not return | | `copy_trading` | Trading experience bonus | Android < 7320000 / iOS < 202507320000 No return | | `alpha_voucher` | Alpha Cash Voucher | Android < 7320000 / iOS < 202507320000 Do not return | | `etf_voucher` | ETF trial fund | Android < 7320000 / iOS < 202507320000 No return | --- ##Response ### Outer structure ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": true, \"list\": [ ...array of coupon objects... ] } } ``` | Field | Type | Description | |------|------|------| | `code` | integer | `0` = success | | `message` | string | response message | | `data.next_page` | boolean | Whether there is a next page. `true` = There is more data, the `id` of the last item on this page needs to be `last_id` is passed in for the next request | | `data.list` | array | Array of coupon objects, see below for details | --- ### Public fields of card and coupon objects (included in all types) | Field name | Type | Description | |--------|------|------| | `id` | integer | Card and coupon issuance record ID (`coupon_send_issuing_log.id`), used for paging cursor `last_id` | | `details_id` | integer | The primary key ID of the user card details table (independent tables for each type) | | `coupon_type` | string | Coupon type, see the enumeration table above | | `name` | string | Card display name (i18n translated) | | `amount` | string | Coupon denomination (formatted string, including thousandth sign). Different types have different meanings, see explanation below | | `currency` | string | The denomination unit. Different types have different values, see explanation below | | `rule_new` | string | Use rule text (this field in the list interface always returns the empty string `\"\"`, and only in the detail interface) | | `status` | string | Card status, see status enumeration below | | `jump_url` | object | jump link | | `jump_url.web` | string | Web jump link | | `jump_url.app` | string | App jump link | | `jump_url.mini_app` | string | Mini program jump link (most types are empty strings) | | `help_url` | object | Help center link | | `help_url.web` | string | Web help link | | `help_url.app` | string | App help link | | `expire_time` | integer | Expiration time (Unix timestamp). Note: Some types will be adjusted to the actual expiration time after they have been activated or used | | `expire_time_order_by` | integer | Expiration time for sorting (taken from the original expiration time of the issuance record, not affected by activation) | | `expire_second` | integer | The number of seconds remaining before expiration (expired or point card type returns `0`) | | `has_usage_history` | boolean | Whether there is a usage record (the point card type is fixed to `true`, and the rest are judged based on the type) | | `has_progress` | boolean | Whether to display the progress bar (only `commission_rebate`, `interest_voucher` and task coupons that meet the conditions are `true`) | | `progress_config` | object | Progress bar configuration, when `has_progress` is `false`, each field is an empty string | | `progress_config.total_balance` | string | The total amount to be completed | | `progress_config.current_used` | string | Amount used | | `progress_config.current_achived` | string | Amount achieved | | `progress_config.currency` | string | Progress unit | | `activation_info` | object | Activation information exclusive to each type, see each type description below (types without exclusive information return empty objects `{}`) | | `is_task_coupon` | integer | `0` = ordinary coupon; `1` = task coupon | | `upgrade_toast` | boolean | Whether the user needs to be prompted to upgrade the App (`true` when the version is too old and cannot support the coupon) | | `task_title` | string | Task title (only task coupons have value, ordinary coupons are `\"\"`) | | `task_desc` | string | Task description (only task coupons have value, ordinary coupons are `\"\"`) | | `task_start_at` | integer | Task start timestamp (only `TASK_EXPIRED` status task coupons have value, the rest are `0`) | | `task_expire_at` | integer | Task expiration timestamp (currently fixed to `0`, reserved field) | | `task_completed_at` | integer | Task completion timestamp (currently fixed at `0`, reserved field) | | `extra` | array | Extended field, fixed return empty array `[]` | --- ### `status` status enumeration | Value | Applicable objects | Description | |----|---------|------| | `NOT_ACTIVE` | Ordinary coupons | Pending activation (not yet activated) | | `ACTIVATED` | Ordinary coupons | Activated (activating or after activation) | | `TO_BE_USED` | Ordinary coupons | To be used (valid and not used) | | `EXPIRED` | Ordinary coupons | Expired (expired without being used) | | `RECYCLED` | Ordinary cards and coupons | Recycled (such as contract recharge experience coupons are recycled) | | `INVALID` | Ordinary coupons | Expired | | `USED` | Ordinary coupons | Used/consumed | | `UNKNOWN` | Ordinary coupons | Unknown status | | `LOCKED` | Ordinary cards and coupons (`p2p`) | Locked (P2P transaction in progress, waiting for write-off) | | `TASK_START` | Task coupons | The task has not started (the coupon has been issued and the task is to be started) | | `TASK_WAIT` | Task coupons | Task in progress (to be completed) | | `TASK_DONE` | Task coupons | The task has been completed (receiving is being processed) | | `TASK_EXPIRED` | Task coupon | The task is not completed and has expired | | `TASK_NOT_STARTED_EXPIRED` | Task coupon | The task has expired before it started | | `TASK_RECEIVE_SUCCESS` | Task coupons | Task rewards received successfully | | `TASK_RECEIVE_FAIL` | Task coupons | Failed to receive task rewards | --- ### `amount` / `currency` Description of each type | `coupon_type` | `amount` description | `currency` value | |---------------|--------------|---------------| | `point` | Point card balance (including thousandths) | `\"POINT\"` | | `position_voucher` | `Coupon face amount × leverage multiple` (including thousandths) | Such as `\"USDT\"` | | `tradfi_position_voucher` | `Coupon face amount × leverage multiple` (including thousandths) | `\"USDx\"` | | `financial_rate` | Interest rate increase value + `%`, such as `\"5%\"` | `\"APR\"` | | `vip_card` | VIP level number, such as `\"4\"` | `\"VIP\"` | | `interest_voucher` | Interest rate discount percentage + `%` | Discount logo (Chinese site is `\"discount\"`, other sites are empty) | | `crypto_loan_interest` | Interest rate discount percentage + `%` | `\"\"` | | `alpha_voucher` | Coupon face amount (including thousandths) | Alpha base currency (such as `\"USDT\"` or `\"ETH\"`) | | Other types | Coupon face amount (including thousandths) | Capital currency symbol, such as `\"USDT\"` / `\"GT\"` / `\"BTC\"` | > **Note**: The `point` type additionally returns the `origin_amount` field (the original balance string with the trailing zeros removed), other types do not have this field. --- ### `activation_info` Exclusive fields for each type #### `interest_voucher` (leverage coupon) ```json { \"supported_pairs\": \"BTC/USDT\", \"transaction_type\": \"borrow\" } ``` | Field | Type | Description | |------|------|------| | `supported_pairs` | string | Applicable trading pairs, separated by `/`, such as `\"BTC/USDT\"` | | `transaction_type` | string | Transaction type (such as `borrow`) | #### `contract_bonus_new` (contract experience coupon) ```json { \"received_expired_hour\": 48 } ``` | Field | Type | Description | |------|------|------| | `received_expired_hour` | integer | The number of hours valid after activation (automatic recycling after timeout) | #### `contract_bonus` (Contract experience bonus) ```json { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false } ``` | Field | Type | Description | |------|------|------| | `check_unified_account_mode` | boolean | Whether to check the unified account mode (fixed `true`) | | `received_expired_days` | integer | Number of days valid after activation | | `abtest` | boolean | AB test flag (currently fixed to `false`) | #### `commission_rebate` (handling fee cashback coupon) ```json { \"market\": \"futures\", \"market_name\": \"Futures\" } ``` | Field | Type | Description | |------|------|------| | `market` | string | Applicable market, enumeration value: `spot` / `margin` / `futures` / `alpha` / `etf` / `tradfi` | | `market_name` | string | Market display name (i18n translated) | #### `robot_bonus` (robot experience bonus) ```json { \"designated_bots\": \"DISABLED\" } ``` | Field | Type | Description | |------|------|------| | `designated_bots` | string | `\"ENABLED\"` = can only be used by specified policies; `\"DISABLED\"` = Unlimited strategy | #### `position_voucher` (position experience coupon) ```json { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"100\", \"position_bonus\": \"500\" } ``` | Field | Type | Description | |------|------|------| | `symbols` | string | Applicable trading pairs (such as `\"BTC_USDT\"`), empty means no limit | | `leverage` | string | Leverage multiple | | `need_user_funds` | integer | `0` = No user-owned funds are required; `1` = Fund allocation is required | | `user_funds_amount` | string | The amount of funds required by the user (meaningful when `need_user_funds=1`) | | `position_bonus` | string | The original amount of the coupon (remove the trailing zero) | #### `tradfi_position_voucher` (TradFi position experience coupon) ```json { \"symbols\": \"AAPL\", \"leverage\": \"5\", \"position_bonus\": \"200\" } ``` | Field | Type | Description | |------|------|------| | `symbols` | string | Applicable to TradFi varieties (such as `\"AAPL\"`), empty means no limit | | `leverage` | string | Leverage multiple | | `position_bonus` | string | The original amount of the coupon (remove the trailing zero) | #### `etf_voucher` (ETF trial bonus) ```json { \"currency_markets\": \"BTC3L_USDT,ETH3L_USDT\", \"amount\": \"50\" } ``` | Field | Type | Description | |------|------|------| | `currency_markets` | string | List of applicable ETF markets (comma separated) | | `amount` | string | The original amount of the coupon (remove the trailing zero) | #### Other types `point` (point card), `hold_bonus` (financial experience fund), `loss_protection_copier` (worry-free money for following orders), `vip_card` (VIP experience card), `p2p` (P2P transaction coupon), `cash` (cash coupon) , `crypto_loan_interest` (interest-reduced coupon for mortgage loan), `copy_trading` (trading experience fee), `alpha_voucher` (Alpha cash coupon), `financial_rate` (interest-increasing coupon) and other types return empty objects: ```json {} ``` --- ## Complete response example ### Ordinary cards and coupons (contract experience money) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 1234567, \"details_id\": 890, \"coupon_type\": \"contract_bonus\", \"name\": \"Futures Bonus\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"\", \"status\": \"NOT_ACTIVE\", \"jump_url\": { \"web\": \"/futures/USDT\", \"app\": \"/futures/USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 86400, \"has_usage_history\": false, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false }, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` ### Task coupons (handling fee cashback coupons) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"commission_rebate\", \"name\": \"10% Futures Commission Rebate\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"\", \"status\": \"TASK_WAIT\", \"jump_url\": { \"web\": \"https://www.gate.io/futures\", \"app\": \"gateio://futures\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 172800, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"1000\", \"current_used\": \"350\", \"current_achived\": \"350\", \"currency\": \"USDT\" }, \"activation_info\": { \"market\": \"futures\", \"market_name\": \"Futures\" }, \"is_task_coupon\": 1, \"upgrade_toast\": false, \"task_title\": \"Trade 1000 USDT to earn commission rebate\", \"task_desc\": \"Complete futures trading volume task to get 100 USDT commission rebate\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` ### Point card (point) ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 0, \"details_id\": 0, \"coupon_type\": \"point\", \"name\": \"Points\", \"amount\": \"1,234.56\", \"origin_amount\": \"1234.56\", \"currency\": \"POINT\", \"rule_new\": \"...\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/trade/BTC_USDT\", \"app\": \"/trade/BTC_USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 0, \"expire_time_order_by\": 0, \"expire_second\": 0, \"has_usage_history\": true, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": {}, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ``` # 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_coupons_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int expired: Coupon status filter. `0` = query valid coupons (default); `1` = query expired/used coupons + :param int limit: Number of coupons returned per page, range 1-20, default 10 + :param int last_id: Cursor-based pagination: the `id` value of the last record from the previous page, omit (or pass 0) for the first page + :param int expire_time: Cursor-based pagination: used together with `last_id`, pass the `expire_time_order_by` value of the last record from the previous page (Unix timestamp), omit for the first page + :param str order_by: Sort order. `latest` = by latest claim time descending (default); `expired` = by expiration time ascending + :param str type: Coupon type filter. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) + :param int is_task_coupon: Task Coupon Filter. `0` = Return only regular coupons; `1` = Return only task coupons; Omit to return both + :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.ListUserCouponsResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'expired', + 'limit', + 'last_id', + 'expire_time', + 'order_by', + 'type', + 'is_task_coupon' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_coupons" % 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'] > 20: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_user_coupons`, must be a value less than or equal to `20`") # 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_coupons`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'last_id' in local_var_params and local_var_params['last_id'] > 1000000000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `last_id` when calling `list_user_coupons`, must be a value less than or equal to `1000000000`") # noqa: E501 + if self.api_client.client_side_validation and 'last_id' in local_var_params and local_var_params['last_id'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `last_id` when calling `list_user_coupons`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'expire_time' in local_var_params and local_var_params['expire_time'] > 2147483647: # noqa: E501 + raise ApiValueError("Invalid value for parameter `expire_time` when calling `list_user_coupons`, must be a value less than or equal to `2147483647`") # noqa: E501 + if self.api_client.client_side_validation and 'expire_time' in local_var_params and local_var_params['expire_time'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `expire_time` when calling `list_user_coupons`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'expired' in local_var_params and local_var_params['expired'] is not None: # noqa: E501 + query_params.append(('expired', local_var_params['expired'])) # 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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 + query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 + if 'expire_time' in local_var_params and local_var_params['expire_time'] is not None: # noqa: E501 + query_params.append(('expire_time', local_var_params['expire_time'])) # noqa: E501 + if 'order_by' in local_var_params and local_var_params['order_by'] is not None: # noqa: E501 + query_params.append(('order_by', local_var_params['order_by'])) # 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 'is_task_coupon' in local_var_params and local_var_params['is_task_coupon'] is not None: # noqa: E501 + query_params.append(('is_task_coupon', local_var_params['is_task_coupon'])) # 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( + '/coupon/user-coupon-list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListUserCouponsResponse', # 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_coupon_detail(self, coupon_type, detail_id, **kwargs): # noqa: E501 + """Coupon Center details # noqa: E501 + + ## Interface description The general details interface of the card and coupon center returns the complete detailed information of a single card and coupon. Compared with the list interface, it additionally includes: usage rule text, block-based card and coupon detailed attributes (`extra`), and source completion task information (`from_task`). ## Query Parameters | Parameter name | Type | Required | Constraints | Description | | ---------------- | ------- | --- | --------------------- | ------------------------------------------------- | | `coupon_type` | string | Yes | See coupon type enumeration | Coupon type, the value is the same as `coupon-list` has the same interface | | `detail_id` | integer | Yes | min:1, max:2147483647 | Ordinary card and coupon transfer `details_id`; the `id` of the task card and coupon transfer record (i.e. the `id` field in the list) | | `is_task_coupon` | integer | no | `0` or `1`, default `0` | `0` = Ordinary coupons; `1` = mission coupons | > **Note**: The `detail_id` semantics of ordinary coupons and mission coupons are different. > > - Ordinary cards and coupons: `detail_id` = the primary key of each type of user card and coupon table (`details_id` in the list) > - Task coupon: `detail_id` = primary key of issuance record table (`id` in the list) --- ##Response ### Outer structure ```json { \"code\": 0, \"message\": \"\", \"data\": { ...card details object... } } ``` ### Details object fields The details interface returns the same basic fields as the list interface, with differences in the following fields: rule_new | Field name | Type | Difference from list | Description | | ------------------- | ------- | ----------------- | -------------------------------------------- | | `rule_new` | string | **Value** (the list returns an empty string) | Card and coupon usage rule text (i18n translation) | | `extra` | array | **Value** (list returns `[]`) | For the detailed attributes of the cards and coupons in the partitions, please see the description below | | `from_task` | boolean | **New field** | Ordinary coupons redeemed by completing tasks (sub-coupons automatically issued after the task is completed) | | `task_start_at` | integer | **May have value** | Task coupon: task start timestamp; ordinary coupon (`from_task=true`): start time of the source task | | `task_expire_at` | integer | **May have value** | Task coupons: receive the validity expiration timestamp (`0` means no limit); ordinary cards and coupons are fixed `0` | | `task_completed_at` | integer | **May have value** | Task coupon: task completion timestamp; ordinary coupon (`from_task=true`): completion time of the source task | The remaining basic fields (`id`, `details_id`, `coupon_type`, `name`, `amount`, `currency`, `status`, `jump_url`, `help_url`, `expire_time`, `expire_second`, `has_ progress`, `progress_config`, `activation_info`, `is_task_coupon`, `upgrade_toast`, `task_title`, `task_desc`) are exactly the same as the list interface (`listUserCoupons`). --- ## `extra` field description `extra` is a **two-dimensional array**, composed of several \"blocks\", and the front end displays them separately by blocks. ``` extra = [ [block1_item1, block1_item2, ...], // Block 1: Card name/source/status [block2_item1, block2_item2, ...], // Block 2: Core attributes of cards and coupons [block3_item1, block3_item2, ...], // Block 3: time information ] ``` ### The structure of each item in `extra` | Field | Type | Description | | ------- | ---------------- | --------------- | | `type` | string | Display type, enumeration values ​​are shown in the table below | | `key` | string | Label text (i18n translated) | | `value` | string / integer | Value, type changes with `type` | ### `type` enumeration | `type` value | `value` type | description | | ----------- | ---------- | ------------------------ | | `string` | string | Normal text display | | `timestamp` | integer | Unix timestamp, the front end is responsible for formatting into date and time | | `day` | integer | Number of days (integer) | | `hour` | integer | Number of hours (integer) | | `status` | string | Status enum value (same meaning as `status` field) | | `btn` | string | With jump button, `value` is the button copy | --- ## Block 1 (fixed): Coupon name/source/status All types (except `point`) contain this block, the fixed fields are as follows: | Serial number | `type` | `key` (translation key) | `value` | Remarks | | --- | -------- | ----------------------------- | ------- | --------- | | 1 | `string` | `COUPON_VOUCHER_NAME` (coupon name) | Coupon name text | Required | | 2 | `string` | `COUPON_VOUCHER_SOURCE` (coupon source) | Source activity name | Return this item only if there is a source | | 3 | `status` | `COUPON_STATUS` (coupon status) | Status enumeration value | Required | > `extra` of type `point` (point card) is fixed to an empty array `[]`. --- ## Block 2 + Block 3: Exclusive fields for each type ### `contract_bonus` (contract experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | --------------------------------- | ---------- | ----- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `day` | `COUPON_USAGE_DURATION` (duration of use) | Number of days valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | activation timestamp | only if activated | --- ### `contract_bonus_new` (contract experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ------------------ | ------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_MAXIMUM_LEVERAGE` (maximum leverage) | `NX` or `Unlimited` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair list | When there are limited trading pairs | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | --------------------------------- | ---------- | ---- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `hour` | `COUPON_USAGE_DURATION` (duration of use) | Number of hours valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When activated | --- ### `commission_rebate` (handling fee cashback coupon) **Block 2: Core Attributes** | `type` | `key` | `value` description | condition | | -------- | -------------------------------- | -------------- | --- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_REBATE_PERCENTAGE` (cashback ratio) | `N%` | Required | | `string` | `COUPON_BALANCE` (remaining balance) | `amount + space + currency` | Required | | `string` | `COUPON_USED_AMOUNT` (used amount) | `Amount + space + currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (applicable market) | Market name | Required | **Block 3: Time Information** | `type` | `key` | `value` Description | Conditions | | ----------- | --------------------------------- | ---------- | --------------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Vouchers that require activation are displayed | | `day` | `COUPON_USAGE_DURATION` (duration of use) | Number of days valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When the status is activated/used/expired | --- ### `hold_bonus` (Financial Management Experience Bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `financial_rate` (interest rate coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------------ | ----------------------- | --- | | `string` | `COUPON_RATE_UP_CAP` (rate increase cap) | `amount + currency` or `Unlimited` | Required | | `string` | `COUPON_RATE_UP_APR` (rate increase ratio) | `N%APR` | Required | | `string` | `COUPON_RATE_UP_TERM_DAYS` (number of days to increase interest rate) | `N days` or `Unlimited` | Required | | `string` | `COUPON_AVAILABLE_INVESTMENT_TYPE` (available financial management type) | Such as `Lend & Earn` | required | | `string` | `COUPON_AVAILABLE_PRODUCTS` (available products) | List of product names (comma separated) | Required | | `string` | `COUPON_MINIMUM_INVESTMENT_UP` (minimum purchase amount) | `≥ Amount Currency` or interval | required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `robot_bonus` (robot experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `amount + space + Currency` | Required | | `string` | `COUPON_APPLICABLE_BOTS` (for robots) | such as `Future Grids` | Unlimited robot time | | `string` | `COUPON_MAXIMUM_LEVERAGE` (maximum leverage multiple) | Multiples | Unlimited and with leverage restrictions | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair or `All` | When not limited to robots | | `string` | `COUPON_STOP_LOSS_AMOUNT` (stop loss amount) | `Amount + Currency` | When there is a stop loss amount | | `btn` | `COUPON_DESIGNATED_BOTS` (limited to bots) | `ViewMyaccountLeft` Button copy | When limited to robots | | `day` | `COUPON_RUNTIME_DURATION` (running duration) | Number of days | required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `loss_protection_copier` (worry-free money for following orders) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ----------------------------------- | ------------------- | ------------ | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (where applicable) | `Contract` or `Spot` | Required | | `string` | `COUPON_MINIMUM_INVESTMENT` (minimum order amount) | `amount + currency` | When there is a minimum amount limit | | `string` | `COUPON_AVAILABLE_TRADERS` (available traders) | Nickname list | When Partially Available (Designated Trader) | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | use timestamp | when there is use time | --- ### `position_voucher` (position experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ----------------- | ------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `Amount × Leverage + Space + Currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (applicable market) | `USDT Perpetual Contract` | Required | | `hour` | `COUPON_POSITION_DURATION` (position duration) | Number of hours | Required | | `string` | `COUPON_LEVERAGE` (leverage multiple) | `NX` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair, empty means no limit | Required | | `string` | `COUPON_USER_INVESTMENT_QUOTA` (capital quota) | `amount + currency` | When user allocation is required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `tradfi_position_voucher` (TradFi position experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------------ | ----------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `Amount × Leverage + Space + Currency` | | `string` | `COUPON_POSITION_DURATION` (position duration) | `N trading days` | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | TradFi varieties | | `string` | `COUPON_LEVERAGE` (leverage multiple) | `Nx` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `vip_card` (VIP experience card) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------- | ---------- | | `string` | `COUPON_VIP_TIER` (VIP level) | `VIPN` | | `day` | `COUPON_BENEFIT_DURATION` (benefits duration) | Number of days | **Block 3: Time information** | `type` | `key` | `value` Description | Conditions | | ----------- | --------------------------------- | ---------- | ----------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Create timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When the status is used or expired | | `timestamp` | `COUPON_EXPIRY_TIME` (expiration time) | Expiration timestamp | When the status is used or expired | --- ### `p2p` (P2P transaction discount coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------- | -------------- | | `string` | `COUPON_DEDUCTION_LIMIT` (deduction limit) | `amount + currency` | | `string` | `COUPON_DEDUCTION_RATIO` (discount ratio) | `N%` | | `string` | `COUPON_USAGE_CONDITIONS` (conditions of use) | `No less than N currencies per transaction` | | `string` | `COUPON_SUPPORTED_FIAT` (for fiat currencies) | Fiat currency list or `all` | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `interest_voucher` (leverage coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | --------------------------------------- | ----------------- | -------- | | `string` | `max_discount_amount` (maximum discount amount) | `amount + currency` | Required | | `string` | `COUPON_APPLICABLE_TRADES` (applicable transactions) | `Isolated Margin` | Required | | `string` | `COUPON_INTEREST_DISCOUNT` (reduction ratio) | `N%` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair, empty means no limit | Required | | `string` | `COUPON_BALANCE` (remaining balance) | `amount + currency` | Required | | `string` | `COUPON_BORROWING_AMOUNT_LIMIT` (borrowing amount limit) | Borrowing amount range | When there is a limit on the borrowing amount | | `hour` | `COUPON_VALIDITY_PERIOD` (reduction time) | Number of hours | When set | **Block 3: Time Information** | `type` | `key` | `value` Description | Conditions | | ----------- | ------------------------------------- | ---------- | -------------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | When the status is pending or expired | | `timestamp` | `COUPON_EFFECTIVE_TIME` (reduction start time) | Start using timestamp | When the status is invalid/in use/used | | `timestamp` | `COUPON_DISCOUNT_EXPIRY_TIME` (reduction expiry time) | Reduction expiration timestamp | When the status is invalid/in use/used | --- ### `cash` (cash coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When there is a redemption time | --- ### `crypto_loan_interest` (Mortgage loan interest coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ---------------------------------------------- | ---------- | -------- | | `string` | `coupon_center_discount_max_amount` (maximum discount amount) | `amount + currency` | Required | | `string` | `COUPON_INTEREST_DISCOUNT` (reduction ratio) | `N%` | Required | | `string` | `coupon_center_loan_min_amount` (minimum loan amount) | `amount + currency` | When there is a minimum amount requirement | | `hour` | `coupon_center_interest_discount_period` (discount duration) | Number of hours | Required | | `string` | `coupon_center_trade_applicable` (applicable transactions) | `demand deposit` | Required | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `copy_trading` (Following experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ---------------------------------- | ------------------- | ---- | | `string` | `COUPON_VOUCHER_AMOUNT` (face value) | `amount + currency` | Required | | `string` | `coupon_applicable_traders` (applicable traders) | `all` or `specified traders` | Required | | `string` | `coupon_trade_category` (applicable transaction type) | `Spot` or `Contract` | Required | | `day` | `coupon_usage_days` (the number of days the experience is valid) | Number of days | Required | | `string` | `COUPON_STOP_LOSS_AMOUNT` (stop loss amount) | `amount + currency` | Required | | `string` | `coupon_ineligible_mkts` (cannot experience the market) | Market list | When there are restrictions | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `alpha_voucher` (Alpha cash coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When there is a collection time | --- ### `etf_voucher` (ETF trial bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | | `hour` | `coupon_trial_duration` (trial duration) | Number of hours | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | ETF market list | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | use timestamp | when there is use time | --- ### `point` (point card) `extra` always returns `[]` without any blocks. --- ## Complete response example ### Ordinary cards and coupons (handling fee cashback coupons) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 1234567, \"details_id\": 890, \"coupon_type\": \"commission_rebate\", \"name\": \"10% Futures Commission Rebate\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"Rebate up to 100% of futures trading fee within 30 days.\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/futures/USDT\", \"app\": \"/futures/USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 86400, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"100\", \"current_used\": \"30\", \"current_achived\": \"30\", \"currency\": \"USDT\" }, \"activation_info\": { \"market\": \"futures\", \"market_name\": \"Futures\" }, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Coupon name\", \"value\": \"10% Futures Commission Rebate\" }, { \"type\": \"string\", \"key\": \"Card and coupon source\", \"value\": \"New user registration activity\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"Card coupon amount\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Cashback ratio\", \"value\": \"10%\" }, { \"type\": \"string\", \"key\": \"Remaining Amount\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Used quota\", \"value\": \"0 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable markets\", \"value\": \"Futures\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 }, { \"type\": \"day\", \"key\": \"duration\", \"value\": 30 } ] ] } } ``` ### Task coupons (position experience coupons) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"position_voucher\", \"name\": \"position experience coupon\", \"amount\": \"5,000\", \"currency\": \"USDT\", \"rule_new\": \"Experience the position coupon rules...\", \"status\": \"TASK_WAIT\", \"jump_url\": { \"web\": \"https://www.gate.io/futures\", \"app\": \"gateio://futures\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 172800, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"10000\", \"current_used\": \"3000\", \"current_achived\": \"3000\", \"currency\": \"USDT\" }, \"activation_info\": { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"\", \"position_bonus\": \"500\" }, \"is_task_coupon\": 1, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"Complete 10,000 USDT contract trading volume and obtain position experience coupon\", \"task_desc\": \"Complete the specified trading volume task in the perpetual contract\", \"task_start_at\": 1757000000, \"task_expire_at\": 1760000000, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Card name\", \"value\": \"position experience coupon\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TASK_WAIT\" } ], [ { \"type\": \"string\", \"key\": \"Coupon amount\", \"value\": \"5,000 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable market\", \"value\": \"USDT perpetual contract\" }, { \"type\": \"hour\", \"key\": \"position duration\", \"value\": 24 }, { \"type\": \"string\", \"key\": \"Leverage multiple\", \"value\": \"10X\" }, { \"type\": \"string\", \"key\": \"Limited trading pairs\", \"value\": \"BTCUSDT\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 } ] ] } } ``` ### P2P transaction coupon (p2p) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 5678901, \"details_id\": 234, \"coupon_type\": \"p2p\", \"name\": \"5.5% P2P transaction discount coupon\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"Each P2P transaction can deduct up to 100 USDT in handling fees, with a discount rate of 5.5%, and each transaction is not less than 200 USDT.\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/p2p\", \"app\": \"gateio://p2p\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 2592000, \"has_usage_history\": false, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": {}, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Coupon name\", \"value\": \"5.5% P2P transaction discount coupon\" }, { \"type\": \"string\", \"key\": \"Card and coupon source\", \"value\": \"New user registration activity\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"deduction limit\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Discount ratio\", \"value\": \"5.5%\" }, { \"type\": \"string\", \"key\": \"Usage conditions\", \"value\": \"Each transaction must not be less than 200 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable legal currency\", \"value\": \"CNY, USD\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 }, { \"type\": \"timestamp\", \"key\": \"expiration time\", \"value\": 1760000000 } ] ] } } ``` --- ## Error code | `code` | Description | | -------------------------------------------- | ------------------------- | | `0` | Success | | `10001`(`COUPON_SEND_ISSUING_LOG_NOT_FOUND`) | The card and coupon record does not exist or does not belong to the current user | | `10000` (`PARAMS_INVALID`) | The parameter is invalid (such as the task card is missing coupon_info) | | `50105` (`INVALID_PARAMETERS`) | Input parameter verification failed (such as coupon_type illegal) | # 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_coupon_detail(coupon_type, detail_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str coupon_type: Coupon type enum. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) (required) + :param int detail_id: Coupon ID. **Regular coupon**: pass `details_id` from the list (primary key of each type's user coupon table); **Task coupon**: pass `id` from the list (primary key of the distribution record table) (required) + :param int is_task_coupon: Coupon source type. `0` = regular coupon (default); `1` = task coupon. This parameter determines the query logic for `detail_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.GetUserCouponDetailResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_coupon_detail_with_http_info(coupon_type, detail_id, **kwargs) # noqa: E501 + + def get_user_coupon_detail_with_http_info(self, coupon_type, detail_id, **kwargs): # noqa: E501 + """Coupon Center details # noqa: E501 + + ## Interface description The general details interface of the card and coupon center returns the complete detailed information of a single card and coupon. Compared with the list interface, it additionally includes: usage rule text, block-based card and coupon detailed attributes (`extra`), and source completion task information (`from_task`). ## Query Parameters | Parameter name | Type | Required | Constraints | Description | | ---------------- | ------- | --- | --------------------- | ------------------------------------------------- | | `coupon_type` | string | Yes | See coupon type enumeration | Coupon type, the value is the same as `coupon-list` has the same interface | | `detail_id` | integer | Yes | min:1, max:2147483647 | Ordinary card and coupon transfer `details_id`; the `id` of the task card and coupon transfer record (i.e. the `id` field in the list) | | `is_task_coupon` | integer | no | `0` or `1`, default `0` | `0` = Ordinary coupons; `1` = mission coupons | > **Note**: The `detail_id` semantics of ordinary coupons and mission coupons are different. > > - Ordinary cards and coupons: `detail_id` = the primary key of each type of user card and coupon table (`details_id` in the list) > - Task coupon: `detail_id` = primary key of issuance record table (`id` in the list) --- ##Response ### Outer structure ```json { \"code\": 0, \"message\": \"\", \"data\": { ...card details object... } } ``` ### Details object fields The details interface returns the same basic fields as the list interface, with differences in the following fields: rule_new | Field name | Type | Difference from list | Description | | ------------------- | ------- | ----------------- | -------------------------------------------- | | `rule_new` | string | **Value** (the list returns an empty string) | Card and coupon usage rule text (i18n translation) | | `extra` | array | **Value** (list returns `[]`) | For the detailed attributes of the cards and coupons in the partitions, please see the description below | | `from_task` | boolean | **New field** | Ordinary coupons redeemed by completing tasks (sub-coupons automatically issued after the task is completed) | | `task_start_at` | integer | **May have value** | Task coupon: task start timestamp; ordinary coupon (`from_task=true`): start time of the source task | | `task_expire_at` | integer | **May have value** | Task coupons: receive the validity expiration timestamp (`0` means no limit); ordinary cards and coupons are fixed `0` | | `task_completed_at` | integer | **May have value** | Task coupon: task completion timestamp; ordinary coupon (`from_task=true`): completion time of the source task | The remaining basic fields (`id`, `details_id`, `coupon_type`, `name`, `amount`, `currency`, `status`, `jump_url`, `help_url`, `expire_time`, `expire_second`, `has_ progress`, `progress_config`, `activation_info`, `is_task_coupon`, `upgrade_toast`, `task_title`, `task_desc`) are exactly the same as the list interface (`listUserCoupons`). --- ## `extra` field description `extra` is a **two-dimensional array**, composed of several \"blocks\", and the front end displays them separately by blocks. ``` extra = [ [block1_item1, block1_item2, ...], // Block 1: Card name/source/status [block2_item1, block2_item2, ...], // Block 2: Core attributes of cards and coupons [block3_item1, block3_item2, ...], // Block 3: time information ] ``` ### The structure of each item in `extra` | Field | Type | Description | | ------- | ---------------- | --------------- | | `type` | string | Display type, enumeration values ​​are shown in the table below | | `key` | string | Label text (i18n translated) | | `value` | string / integer | Value, type changes with `type` | ### `type` enumeration | `type` value | `value` type | description | | ----------- | ---------- | ------------------------ | | `string` | string | Normal text display | | `timestamp` | integer | Unix timestamp, the front end is responsible for formatting into date and time | | `day` | integer | Number of days (integer) | | `hour` | integer | Number of hours (integer) | | `status` | string | Status enum value (same meaning as `status` field) | | `btn` | string | With jump button, `value` is the button copy | --- ## Block 1 (fixed): Coupon name/source/status All types (except `point`) contain this block, the fixed fields are as follows: | Serial number | `type` | `key` (translation key) | `value` | Remarks | | --- | -------- | ----------------------------- | ------- | --------- | | 1 | `string` | `COUPON_VOUCHER_NAME` (coupon name) | Coupon name text | Required | | 2 | `string` | `COUPON_VOUCHER_SOURCE` (coupon source) | Source activity name | Return this item only if there is a source | | 3 | `status` | `COUPON_STATUS` (coupon status) | Status enumeration value | Required | > `extra` of type `point` (point card) is fixed to an empty array `[]`. --- ## Block 2 + Block 3: Exclusive fields for each type ### `contract_bonus` (contract experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | --------------------------------- | ---------- | ----- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `day` | `COUPON_USAGE_DURATION` (duration of use) | Number of days valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | activation timestamp | only if activated | --- ### `contract_bonus_new` (contract experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ------------------ | ------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_MAXIMUM_LEVERAGE` (maximum leverage) | `NX` or `Unlimited` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair list | When there are limited trading pairs | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | --------------------------------- | ---------- | ---- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `hour` | `COUPON_USAGE_DURATION` (duration of use) | Number of hours valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When activated | --- ### `commission_rebate` (handling fee cashback coupon) **Block 2: Core Attributes** | `type` | `key` | `value` description | condition | | -------- | -------------------------------- | -------------- | --- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_REBATE_PERCENTAGE` (cashback ratio) | `N%` | Required | | `string` | `COUPON_BALANCE` (remaining balance) | `amount + space + currency` | Required | | `string` | `COUPON_USED_AMOUNT` (used amount) | `Amount + space + currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (applicable market) | Market name | Required | **Block 3: Time Information** | `type` | `key` | `value` Description | Conditions | | ----------- | --------------------------------- | ---------- | --------------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Vouchers that require activation are displayed | | `day` | `COUPON_USAGE_DURATION` (duration of use) | Number of days valid after activation | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When the status is activated/used/expired | --- ### `hold_bonus` (Financial Management Experience Bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `financial_rate` (interest rate coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------------ | ----------------------- | --- | | `string` | `COUPON_RATE_UP_CAP` (rate increase cap) | `amount + currency` or `Unlimited` | Required | | `string` | `COUPON_RATE_UP_APR` (rate increase ratio) | `N%APR` | Required | | `string` | `COUPON_RATE_UP_TERM_DAYS` (number of days to increase interest rate) | `N days` or `Unlimited` | Required | | `string` | `COUPON_AVAILABLE_INVESTMENT_TYPE` (available financial management type) | Such as `Lend & Earn` | required | | `string` | `COUPON_AVAILABLE_PRODUCTS` (available products) | List of product names (comma separated) | Required | | `string` | `COUPON_MINIMUM_INVESTMENT_UP` (minimum purchase amount) | `≥ Amount Currency` or interval | required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `robot_bonus` (robot experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `amount + space + Currency` | Required | | `string` | `COUPON_APPLICABLE_BOTS` (for robots) | such as `Future Grids` | Unlimited robot time | | `string` | `COUPON_MAXIMUM_LEVERAGE` (maximum leverage multiple) | Multiples | Unlimited and with leverage restrictions | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair or `All` | When not limited to robots | | `string` | `COUPON_STOP_LOSS_AMOUNT` (stop loss amount) | `Amount + Currency` | When there is a stop loss amount | | `btn` | `COUPON_DESIGNATED_BOTS` (limited to bots) | `ViewMyaccountLeft` Button copy | When limited to robots | | `day` | `COUPON_RUNTIME_DURATION` (running duration) | Number of days | required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `loss_protection_copier` (worry-free money for following orders) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ----------------------------------- | ------------------- | ------------ | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + space + currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (where applicable) | `Contract` or `Spot` | Required | | `string` | `COUPON_MINIMUM_INVESTMENT` (minimum order amount) | `amount + currency` | When there is a minimum amount limit | | `string` | `COUPON_AVAILABLE_TRADERS` (available traders) | Nickname list | When Partially Available (Designated Trader) | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | use timestamp | when there is use time | --- ### `position_voucher` (position experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ------------------------------------ | ----------------- | ------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `Amount × Leverage + Space + Currency` | Required | | `string` | `COUPON_APPLICABLE_MARKET` (applicable market) | `USDT Perpetual Contract` | Required | | `hour` | `COUPON_POSITION_DURATION` (position duration) | Number of hours | Required | | `string` | `COUPON_LEVERAGE` (leverage multiple) | `NX` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair, empty means no limit | Required | | `string` | `COUPON_USER_INVESTMENT_QUOTA` (capital quota) | `amount + currency` | When user allocation is required | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `tradfi_position_voucher` (TradFi position experience coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------------ | ----------------- | | `string` | `COUPON_VOUCHER_AMOUNT` (coupon amount) | `Amount × Leverage + Space + Currency` | | `string` | `COUPON_POSITION_DURATION` (position duration) | `N trading days` | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | TradFi varieties | | `string` | `COUPON_LEVERAGE` (leverage multiple) | `Nx` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `vip_card` (VIP experience card) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------- | ---------- | | `string` | `COUPON_VIP_TIER` (VIP level) | `VIPN` | | `day` | `COUPON_BENEFIT_DURATION` (benefits duration) | Number of days | **Block 3: Time information** | `type` | `key` | `value` Description | Conditions | | ----------- | --------------------------------- | ---------- | ----------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Create timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_PERIOD` (activation validity period) | Activation expiration timestamp | Required | | `timestamp` | `COUPON_ACTIVATION_TIME` (activation time) | Activation timestamp | When the status is used or expired | | `timestamp` | `COUPON_EXPIRY_TIME` (expiration time) | Expiration timestamp | When the status is used or expired | --- ### `p2p` (P2P transaction discount coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------- | -------------- | | `string` | `COUPON_DEDUCTION_LIMIT` (deduction limit) | `amount + currency` | | `string` | `COUPON_DEDUCTION_RATIO` (discount ratio) | `N%` | | `string` | `COUPON_USAGE_CONDITIONS` (conditions of use) | `No less than N currencies per transaction` | | `string` | `COUPON_SUPPORTED_FIAT` (for fiat currencies) | Fiat currency list or `all` | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `interest_voucher` (leverage coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | --------------------------------------- | ----------------- | -------- | | `string` | `max_discount_amount` (maximum discount amount) | `amount + currency` | Required | | `string` | `COUPON_APPLICABLE_TRADES` (applicable transactions) | `Isolated Margin` | Required | | `string` | `COUPON_INTEREST_DISCOUNT` (reduction ratio) | `N%` | Required | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | Trading pair, empty means no limit | Required | | `string` | `COUPON_BALANCE` (remaining balance) | `amount + currency` | Required | | `string` | `COUPON_BORROWING_AMOUNT_LIMIT` (borrowing amount limit) | Borrowing amount range | When there is a limit on the borrowing amount | | `hour` | `COUPON_VALIDITY_PERIOD` (reduction time) | Number of hours | When set | **Block 3: Time Information** | `type` | `key` | `value` Description | Conditions | | ----------- | ------------------------------------- | ---------- | -------------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | When the status is pending or expired | | `timestamp` | `COUPON_EFFECTIVE_TIME` (reduction start time) | Start using timestamp | When the status is invalid/in use/used | | `timestamp` | `COUPON_DISCOUNT_EXPIRY_TIME` (reduction expiry time) | Reduction expiration timestamp | When the status is invalid/in use/used | --- ### `cash` (cash coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When there is a redemption time | --- ### `crypto_loan_interest` (Mortgage loan interest coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ---------------------------------------------- | ---------- | -------- | | `string` | `coupon_center_discount_max_amount` (maximum discount amount) | `amount + currency` | Required | | `string` | `COUPON_INTEREST_DISCOUNT` (reduction ratio) | `N%` | Required | | `string` | `coupon_center_loan_min_amount` (minimum loan amount) | `amount + currency` | When there is a minimum amount requirement | | `hour` | `coupon_center_interest_discount_period` (discount duration) | Number of hours | Required | | `string` | `coupon_center_trade_applicable` (applicable transactions) | `demand deposit` | Required | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `copy_trading` (Following experience bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | Conditions | | -------- | ---------------------------------- | ------------------- | ---- | | `string` | `COUPON_VOUCHER_AMOUNT` (face value) | `amount + currency` | Required | | `string` | `coupon_applicable_traders` (applicable traders) | `all` or `specified traders` | Required | | `string` | `coupon_trade_category` (applicable transaction type) | `Spot` or `Contract` | Required | | `day` | `coupon_usage_days` (the number of days the experience is valid) | Number of days | Required | | `string` | `COUPON_STOP_LOSS_AMOUNT` (stop loss amount) | `amount + currency` | Required | | `string` | `coupon_ineligible_mkts` (cannot experience the market) | Market list | When there are restrictions | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When the status is used | --- ### `alpha_voucher` (Alpha cash coupon) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | **Block 3: Time Information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | Use timestamp | When there is a collection time | --- ### `etf_voucher` (ETF trial bonus) **Block 2: Core Attributes** | `type` | `key` | `value` Description | | -------- | ------------------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT` (voucher amount) | `amount + currency` | | `hour` | `coupon_trial_duration` (trial duration) | Number of hours | | `string` | `COUPON_LIMITED_TRADING_PAIR` (limited trading pair) | ETF market list | **Block 3: Time information** | `type` | `key` | `value` description | condition | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT` (get time) | Get timestamp | Required | | `timestamp` | `COUPON_VALID_UNTIL` (expiration time) | Expiration timestamp | Required | | `timestamp` | `COUPON_USED_AT` (use time) | use timestamp | when there is use time | --- ### `point` (point card) `extra` always returns `[]` without any blocks. --- ## Complete response example ### Ordinary cards and coupons (handling fee cashback coupons) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 1234567, \"details_id\": 890, \"coupon_type\": \"commission_rebate\", \"name\": \"10% Futures Commission Rebate\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"Rebate up to 100% of futures trading fee within 30 days.\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/futures/USDT\", \"app\": \"/futures/USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 86400, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"100\", \"current_used\": \"30\", \"current_achived\": \"30\", \"currency\": \"USDT\" }, \"activation_info\": { \"market\": \"futures\", \"market_name\": \"Futures\" }, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Coupon name\", \"value\": \"10% Futures Commission Rebate\" }, { \"type\": \"string\", \"key\": \"Card and coupon source\", \"value\": \"New user registration activity\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"Card coupon amount\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Cashback ratio\", \"value\": \"10%\" }, { \"type\": \"string\", \"key\": \"Remaining Amount\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Used quota\", \"value\": \"0 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable markets\", \"value\": \"Futures\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 }, { \"type\": \"day\", \"key\": \"duration\", \"value\": 30 } ] ] } } ``` ### Task coupons (position experience coupons) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"position_voucher\", \"name\": \"position experience coupon\", \"amount\": \"5,000\", \"currency\": \"USDT\", \"rule_new\": \"Experience the position coupon rules...\", \"status\": \"TASK_WAIT\", \"jump_url\": { \"web\": \"https://www.gate.io/futures\", \"app\": \"gateio://futures\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 172800, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"10000\", \"current_used\": \"3000\", \"current_achived\": \"3000\", \"currency\": \"USDT\" }, \"activation_info\": { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"\", \"position_bonus\": \"500\" }, \"is_task_coupon\": 1, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"Complete 10,000 USDT contract trading volume and obtain position experience coupon\", \"task_desc\": \"Complete the specified trading volume task in the perpetual contract\", \"task_start_at\": 1757000000, \"task_expire_at\": 1760000000, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Card name\", \"value\": \"position experience coupon\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TASK_WAIT\" } ], [ { \"type\": \"string\", \"key\": \"Coupon amount\", \"value\": \"5,000 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable market\", \"value\": \"USDT perpetual contract\" }, { \"type\": \"hour\", \"key\": \"position duration\", \"value\": 24 }, { \"type\": \"string\", \"key\": \"Leverage multiple\", \"value\": \"10X\" }, { \"type\": \"string\", \"key\": \"Limited trading pairs\", \"value\": \"BTCUSDT\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 } ] ] } } ``` ### P2P transaction coupon (p2p) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 5678901, \"details_id\": 234, \"coupon_type\": \"p2p\", \"name\": \"5.5% P2P transaction discount coupon\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"Each P2P transaction can deduct up to 100 USDT in handling fees, with a discount rate of 5.5%, and each transaction is not less than 200 USDT.\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/p2p\", \"app\": \"gateio://p2p\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 2592000, \"has_usage_history\": false, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": {}, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Coupon name\", \"value\": \"5.5% P2P transaction discount coupon\" }, { \"type\": \"string\", \"key\": \"Card and coupon source\", \"value\": \"New user registration activity\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"deduction limit\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Discount ratio\", \"value\": \"5.5%\" }, { \"type\": \"string\", \"key\": \"Usage conditions\", \"value\": \"Each transaction must not be less than 200 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable legal currency\", \"value\": \"CNY, USD\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 }, { \"type\": \"timestamp\", \"key\": \"expiration time\", \"value\": 1760000000 } ] ] } } ``` --- ## Error code | `code` | Description | | -------------------------------------------- | ------------------------- | | `0` | Success | | `10001`(`COUPON_SEND_ISSUING_LOG_NOT_FOUND`) | The card and coupon record does not exist or does not belong to the current user | | `10000` (`PARAMS_INVALID`) | The parameter is invalid (such as the task card is missing coupon_info) | | `50105` (`INVALID_PARAMETERS`) | Input parameter verification failed (such as coupon_type illegal) | # 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_coupon_detail_with_http_info(coupon_type, detail_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str coupon_type: Coupon type enum. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) (required) + :param int detail_id: Coupon ID. **Regular coupon**: pass `details_id` from the list (primary key of each type's user coupon table); **Task coupon**: pass `id` from the list (primary key of the distribution record table) (required) + :param int is_task_coupon: Coupon source type. `0` = regular coupon (default); `1` = task coupon. This parameter determines the query logic for `detail_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.GetUserCouponDetailResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'coupon_type', + 'detail_id', + 'is_task_coupon' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_coupon_detail" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'coupon_type' is set + if self.api_client.client_side_validation and ('coupon_type' not in local_var_params or # noqa: E501 + local_var_params['coupon_type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `coupon_type` when calling `get_user_coupon_detail`") # noqa: E501 + # verify the required parameter 'detail_id' is set + if self.api_client.client_side_validation and ('detail_id' not in local_var_params or # noqa: E501 + local_var_params['detail_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `detail_id` when calling `get_user_coupon_detail`") # noqa: E501 + + if self.api_client.client_side_validation and 'detail_id' in local_var_params and local_var_params['detail_id'] > 2147483647: # noqa: E501 + raise ApiValueError("Invalid value for parameter `detail_id` when calling `get_user_coupon_detail`, must be a value less than or equal to `2147483647`") # noqa: E501 + if self.api_client.client_side_validation and 'detail_id' in local_var_params and local_var_params['detail_id'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `detail_id` when calling `get_user_coupon_detail`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'coupon_type' in local_var_params and local_var_params['coupon_type'] is not None: # noqa: E501 + query_params.append(('coupon_type', local_var_params['coupon_type'])) # noqa: E501 + if 'detail_id' in local_var_params and local_var_params['detail_id'] is not None: # noqa: E501 + query_params.append(('detail_id', local_var_params['detail_id'])) # noqa: E501 + if 'is_task_coupon' in local_var_params and local_var_params['is_task_coupon'] is not None: # noqa: E501 + query_params.append(('is_task_coupon', local_var_params['is_task_coupon'])) # 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( + '/coupon/user-coupon-detail', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetUserCouponDetailResponse', # 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/cross_ex_api.py b/gate_api/api/cross_ex_api.py index 08953fac..399747f9 100644 --- a/gate_api/api/cross_ex_api.py +++ b/gate_api/api/cross_ex_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_crossex_rule_symbols(self, **kwargs): # noqa: E501 - """[Public Interface] Query Trading Pair Information # noqa: E501 + """Query symbol information # noqa: E501 Query Trading Pair Information # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -46,7 +46,7 @@ def list_crossex_rule_symbols(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str symbols: 币对列表,多个以逗号分隔 示例值: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT + :param str symbols: List of trading pairs, comma-separated. Example: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -62,7 +62,7 @@ def list_crossex_rule_symbols(self, **kwargs): # noqa: E501 return self.list_crossex_rule_symbols_with_http_info(**kwargs) # noqa: E501 def list_crossex_rule_symbols_with_http_info(self, **kwargs): # noqa: E501 - """[Public Interface] Query Trading Pair Information # noqa: E501 + """Query symbol information # noqa: E501 Query Trading Pair Information # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -71,7 +71,7 @@ def list_crossex_rule_symbols_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str symbols: 币对列表,多个以逗号分隔 示例值: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT + :param str symbols: List of trading pairs, comma-separated. Example: BINANCE_FUTURE_ADA_USDT,OKX_FUTURE_ADA_USDT :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -147,7 +147,7 @@ def list_crossex_rule_symbols_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_crossex_rule_risk_limits(self, symbols, **kwargs): # noqa: E501 - """[Public Interface] Query Risk Limit Information # noqa: E501 + """Query risk limit information # noqa: E501 Query risk limit information for futures/margin trading pairs # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -164,7 +164,7 @@ def list_crossex_rule_risk_limits(self, symbols, **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.InlineResponse20027] + :rtype: list[gate_api.CrossexRiskLimit] :return: If the method is called asynchronously, returns the request thread. """ @@ -172,7 +172,7 @@ def list_crossex_rule_risk_limits(self, symbols, **kwargs): # noqa: E501 return self.list_crossex_rule_risk_limits_with_http_info(symbols, **kwargs) # noqa: E501 def list_crossex_rule_risk_limits_with_http_info(self, symbols, **kwargs): # noqa: E501 - """[Public Interface] Query Risk Limit Information # noqa: E501 + """Query risk limit information # noqa: E501 Query risk limit information for futures/margin trading pairs # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -191,7 +191,7 @@ def list_crossex_rule_risk_limits_with_http_info(self, symbols, **kwargs): # no number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.InlineResponse20027], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexRiskLimit], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -252,7 +252,7 @@ def list_crossex_rule_risk_limits_with_http_info(self, symbols, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20027]', # noqa: E501 + response_type='list[CrossexRiskLimit]', # 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 @@ -261,7 +261,7 @@ def list_crossex_rule_risk_limits_with_http_info(self, symbols, **kwargs): # no collection_formats=collection_formats) def list_crossex_transfer_coins(self, **kwargs): # noqa: E501 - """[Public Interface] Query Supported Transfer Currencies # noqa: E501 + """Query supported transfer currencies # noqa: E501 Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 @@ -270,7 +270,7 @@ def list_crossex_transfer_coins(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str coin: Currency + :param str coin: 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. @@ -278,7 +278,7 @@ def list_crossex_transfer_coins(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.InlineResponse20028] + :rtype: list[gate_api.CrossexTransferCoin] :return: If the method is called asynchronously, returns the request thread. """ @@ -286,7 +286,7 @@ def list_crossex_transfer_coins(self, **kwargs): # noqa: E501 return self.list_crossex_transfer_coins_with_http_info(**kwargs) # noqa: E501 def list_crossex_transfer_coins_with_http_info(self, **kwargs): # noqa: E501 - """[Public Interface] Query Supported Transfer Currencies # noqa: E501 + """Query supported transfer currencies # noqa: E501 Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 @@ -295,7 +295,7 @@ def list_crossex_transfer_coins_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str coin: Currency + :param str coin: 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 @@ -305,7 +305,7 @@ def list_crossex_transfer_coins_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.InlineResponse20028], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexTransferCoin], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -362,7 +362,7 @@ def list_crossex_transfer_coins_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20028]', # noqa: E501 + response_type='list[CrossexTransferCoin]', # 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 @@ -393,7 +393,7 @@ def list_crossex_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.InlineResponse20029] + :rtype: list[gate_api.CrossexTransferRecord] :return: If the method is called asynchronously, returns the request thread. """ @@ -425,7 +425,7 @@ def list_crossex_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.InlineResponse20029], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexTransferRecord], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -497,7 +497,7 @@ def list_crossex_transfers_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20029]', # noqa: E501 + response_type='list[CrossexTransferRecord]', # 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 @@ -508,7 +508,7 @@ def list_crossex_transfers_with_http_info(self, **kwargs): # noqa: E501 def create_crossex_transfer(self, **kwargs): # noqa: E501 """Fund Transfer # noqa: E501 - Rate limit: 10 requests per 10 seconds - In cross-exchange mode, when transferring USDT, either `from` or `to` must be `SPOT`, and the other side must be `CROSSEX`. If `CROSSEX_${exchange_type}` (e.g. `CROSSEX_GATE`) is provided, it will be automatically treated as `CROSSEX`. - In isolated exchange mode, when transferring USDT, either `from` or `to` must be `CROSSEX_${exchange_type}`, and the other side must be `SPOT` or `CROSSEX_${exchange_type}`. If `CROSSEX` is provided, it will be automatically treated as `CROSSEX_GATE`. - When transferring non-USDT assets to or from CrossEx, neither `from` nor `to` can be `CROSSEX`; `CROSSEX_${exchange_type}` must be explicitly specified. - When transferring non-USDT assets, transfers between `CROSSEX_{exchange_type}` accounts are supported, for example: from = `CROSSEX_BINANCE`, to = `CROSSEX_GATE` # noqa: E501 + Rate limit: 10 requests per 10 seconds - In cross-exchange mode, when transferring USDT, either `from` or `to` must be `SPOT`, and the other side must be `CROSSEX`. If `CROSSEX_${exchange_type}` (e.g. `CROSSEX_GATE`) is provided, it will be automatically treated as `CROSSEX`. - In isolated exchange mode, when transferring USDT, either `from` or `to` must be `CROSSEX_${exchange_type}`, and the other side must be `SPOT` or `CROSSEX_${exchange_type}`. If `CROSSEX` is provided, it will be automatically treated as `CROSSEX_GATE`. - When transferring non-USDT assets to or from CrossEx, neither `from` nor `to` can be `CROSSEX`; `CROSSEX_${exchange_type}` must be explicitly specified. - When transferring non-USDT assets, transfers between `CROSSEX_{exchange_type}` accounts are supported, for example: from = `CROSSEX_BINANCE`, to = `CROSSEX_GATE` - When either side of the transfer is `CROSSEX_KRAKEN`, only USDT is supported for now. - When either side of the transfer is `CROSSEX_HYPERLIQUID`, the other side must be `SPOT`, and only USDC is supported. # 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_crossex_transfer(async_req=True) @@ -523,7 +523,7 @@ def create_crossex_transfer(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.InlineResponse20030 + :rtype: gate_api.CrossexTransferResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -533,7 +533,7 @@ def create_crossex_transfer(self, **kwargs): # noqa: E501 def create_crossex_transfer_with_http_info(self, **kwargs): # noqa: E501 """Fund Transfer # noqa: E501 - Rate limit: 10 requests per 10 seconds - In cross-exchange mode, when transferring USDT, either `from` or `to` must be `SPOT`, and the other side must be `CROSSEX`. If `CROSSEX_${exchange_type}` (e.g. `CROSSEX_GATE`) is provided, it will be automatically treated as `CROSSEX`. - In isolated exchange mode, when transferring USDT, either `from` or `to` must be `CROSSEX_${exchange_type}`, and the other side must be `SPOT` or `CROSSEX_${exchange_type}`. If `CROSSEX` is provided, it will be automatically treated as `CROSSEX_GATE`. - When transferring non-USDT assets to or from CrossEx, neither `from` nor `to` can be `CROSSEX`; `CROSSEX_${exchange_type}` must be explicitly specified. - When transferring non-USDT assets, transfers between `CROSSEX_{exchange_type}` accounts are supported, for example: from = `CROSSEX_BINANCE`, to = `CROSSEX_GATE` # noqa: E501 + Rate limit: 10 requests per 10 seconds - In cross-exchange mode, when transferring USDT, either `from` or `to` must be `SPOT`, and the other side must be `CROSSEX`. If `CROSSEX_${exchange_type}` (e.g. `CROSSEX_GATE`) is provided, it will be automatically treated as `CROSSEX`. - In isolated exchange mode, when transferring USDT, either `from` or `to` must be `CROSSEX_${exchange_type}`, and the other side must be `SPOT` or `CROSSEX_${exchange_type}`. If `CROSSEX` is provided, it will be automatically treated as `CROSSEX_GATE`. - When transferring non-USDT assets to or from CrossEx, neither `from` nor `to` can be `CROSSEX`; `CROSSEX_${exchange_type}` must be explicitly specified. - When transferring non-USDT assets, transfers between `CROSSEX_{exchange_type}` accounts are supported, for example: from = `CROSSEX_BINANCE`, to = `CROSSEX_GATE` - When either side of the transfer is `CROSSEX_KRAKEN`, only USDT is supported for now. - When either side of the transfer is `CROSSEX_HYPERLIQUID`, the other side must be `SPOT`, and only USDC is supported. # 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_crossex_transfer_with_http_info(async_req=True) @@ -550,7 +550,7 @@ def create_crossex_transfer_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.InlineResponse20030, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexTransferResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -611,7 +611,7 @@ def create_crossex_transfer_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20030', # noqa: E501 + response_type='CrossexTransferResponse', # 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 @@ -637,7 +637,7 @@ def create_crossex_order(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.InlineResponse20031 + :rtype: gate_api.CrossexOrderActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -664,7 +664,7 @@ def create_crossex_order_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.InlineResponse20031, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexOrderActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -725,7 +725,7 @@ def create_crossex_order_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20031', # noqa: E501 + response_type='CrossexOrderActionResponse', # 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 @@ -751,7 +751,7 @@ def get_crossex_order(self, order_id, **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.InlineResponse20032 + :rtype: gate_api.CrossexOrder :return: If the method is called asynchronously, returns the request thread. """ @@ -778,7 +778,7 @@ def get_crossex_order_with_http_info(self, order_id, **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.InlineResponse20032, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexOrder, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -839,7 +839,7 @@ def get_crossex_order_with_http_info(self, order_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20032', # noqa: E501 + response_type='CrossexOrder', # 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 @@ -866,7 +866,7 @@ def update_crossex_order(self, order_id, **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.InlineResponse20033 + :rtype: gate_api.CrossexOrderActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -894,7 +894,7 @@ def update_crossex_order_with_http_info(self, order_id, **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.InlineResponse20033, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexOrderActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -962,7 +962,7 @@ def update_crossex_order_with_http_info(self, order_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20033', # noqa: E501 + response_type='CrossexOrderActionResponse', # 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 @@ -988,7 +988,7 @@ def cancel_crossex_order(self, order_id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: object + :rtype: gate_api.CrossexOrderActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1015,7 +1015,7 @@ def cancel_crossex_order_with_http_info(self, order_id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexOrderActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1076,7 +1076,7 @@ def cancel_crossex_order_with_http_info(self, order_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='CrossexOrderActionResponse', # 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 @@ -1102,7 +1102,7 @@ def create_crossex_convert_quote(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.InlineResponse20034 + :rtype: gate_api.CrossexConvertQuoteResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1129,7 +1129,7 @@ def create_crossex_convert_quote_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.InlineResponse20034, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexConvertQuoteResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1190,7 +1190,7 @@ def create_crossex_convert_quote_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20034', # noqa: E501 + response_type='CrossexConvertQuoteResponse', # 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 @@ -1216,7 +1216,7 @@ def create_crossex_convert_order(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: object + :rtype: gate_api.CrossexConvertOrderResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1243,7 +1243,7 @@ def create_crossex_convert_order_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(object, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexConvertOrderResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1304,7 +1304,7 @@ def create_crossex_convert_order_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='CrossexConvertOrderResponse', # 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 @@ -1322,7 +1322,7 @@ def get_crossex_account(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str exchange_type: Exchange. Not required in cross-exchange mode; required in single-exchange mode (BINANCE/OKX/GATE/BYBIT) + :param str exchange_type: Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1330,7 +1330,7 @@ def get_crossex_account(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.InlineResponse20035 + :rtype: gate_api.CrossexAccount :return: If the method is called asynchronously, returns the request thread. """ @@ -1347,7 +1347,7 @@ def get_crossex_account_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str exchange_type: Exchange. Not required in cross-exchange mode; required in single-exchange mode (BINANCE/OKX/GATE/BYBIT) + :param str exchange_type: Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1357,7 +1357,7 @@ def get_crossex_account_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.InlineResponse20035, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexAccount, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1414,7 +1414,7 @@ def get_crossex_account_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20035', # noqa: E501 + response_type='CrossexAccount', # 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 @@ -1440,7 +1440,7 @@ def update_crossex_account(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.InlineResponse202 + :rtype: gate_api.CrossexAccountUpdateResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1467,7 +1467,7 @@ def update_crossex_account_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.InlineResponse202, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexAccountUpdateResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1528,7 +1528,7 @@ def update_crossex_account_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse202', # noqa: E501 + response_type='CrossexAccountUpdateResponse', # 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 @@ -1664,7 +1664,7 @@ def update_crossex_positions_leverage(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.InlineResponse2021 + :rtype: gate_api.CrossexLeverageResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1691,7 +1691,7 @@ def update_crossex_positions_leverage_with_http_info(self, **kwargs): # noqa: E number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse2021, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexLeverageResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1752,7 +1752,7 @@ def update_crossex_positions_leverage_with_http_info(self, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2021', # noqa: E501 + response_type='CrossexLeverageResponse', # 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 @@ -1888,7 +1888,7 @@ def update_crossex_margin_positions_leverage(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.InlineResponse2021 + :rtype: gate_api.CrossexLeverageResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1915,7 +1915,7 @@ def update_crossex_margin_positions_leverage_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(gate_api.InlineResponse2021, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexLeverageResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1976,7 +1976,7 @@ def update_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2021', # noqa: E501 + response_type='CrossexLeverageResponse', # 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 @@ -2002,7 +2002,7 @@ def close_crossex_position(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.InlineResponse20031 + :rtype: gate_api.CrossexOrderActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -2029,7 +2029,7 @@ def close_crossex_position_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.InlineResponse20031, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexOrderActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2090,7 +2090,7 @@ def close_crossex_position_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20031', # noqa: E501 + response_type='CrossexOrderActionResponse', # 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 @@ -2108,7 +2108,7 @@ def get_crossex_interest_rate(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str coin: Currency + :param str coin: Query by specified currency name :param str exchange_type: Exchange :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2117,7 +2117,7 @@ def get_crossex_interest_rate(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.InlineResponse20036] + :rtype: list[gate_api.CrossexInterestRate] :return: If the method is called asynchronously, returns the request thread. """ @@ -2134,7 +2134,7 @@ def get_crossex_interest_rate_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str coin: Currency + :param str coin: Query by specified currency name :param str exchange_type: Exchange :param _return_http_data_only: response data without head status code and headers @@ -2145,7 +2145,7 @@ def get_crossex_interest_rate_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.InlineResponse20036], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexInterestRate], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2205,7 +2205,7 @@ def get_crossex_interest_rate_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20036]', # noqa: E501 + response_type='list[CrossexInterestRate]', # 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 @@ -2230,7 +2230,7 @@ def get_crossex_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.InlineResponse20037 + :rtype: list[gate_api.InlineResponse200] :return: If the method is called asynchronously, returns the request thread. """ @@ -2256,7 +2256,7 @@ def get_crossex_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.InlineResponse20037, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.InlineResponse200], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2310,7 +2310,7 @@ def get_crossex_fee_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20037', # noqa: E501 + 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 @@ -2337,7 +2337,7 @@ def list_crossex_positions(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.InlineResponse20038] + :rtype: list[gate_api.CrossexPosition] :return: If the method is called asynchronously, returns the request thread. """ @@ -2365,7 +2365,7 @@ def list_crossex_positions_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.InlineResponse20038], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexPosition], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2425,7 +2425,7 @@ def list_crossex_positions_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20038]', # noqa: E501 + response_type='list[CrossexPosition]', # 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 @@ -2452,7 +2452,7 @@ def list_crossex_margin_positions(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.InlineResponse20039] + :rtype: list[gate_api.CrossexMarginPosition] :return: If the method is called asynchronously, returns the request thread. """ @@ -2480,7 +2480,7 @@ def list_crossex_margin_positions_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.InlineResponse20039], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexMarginPosition], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2540,7 +2540,7 @@ def list_crossex_margin_positions_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20039]', # noqa: E501 + response_type='list[CrossexMarginPosition]', # 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 @@ -2566,7 +2566,7 @@ def list_crossex_adl_rank(self, symbol, **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.InlineResponse20040] + :rtype: list[gate_api.CrossexAdlRank] :return: If the method is called asynchronously, returns the request thread. """ @@ -2593,7 +2593,7 @@ def list_crossex_adl_rank_with_http_info(self, symbol, **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.InlineResponse20040], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexAdlRank], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2654,7 +2654,7 @@ def list_crossex_adl_rank_with_http_info(self, symbol, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20040]', # noqa: E501 + response_type='list[CrossexAdlRank]', # 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 @@ -2682,7 +2682,7 @@ def list_crossex_open_orders(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.InlineResponse20032] + :rtype: list[gate_api.CrossexOrder] :return: If the method is called asynchronously, returns the request thread. """ @@ -2711,7 +2711,7 @@ def list_crossex_open_orders_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.InlineResponse20032], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexOrder], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2774,7 +2774,7 @@ def list_crossex_open_orders_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20032]', # noqa: E501 + response_type='list[CrossexOrder]', # 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 @@ -2794,9 +2794,10 @@ def list_crossex_history_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 a single list - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp + :param str attributes: Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage / `SETTLEMENT` delisting settlement). Multiple values, comma-separated. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2804,7 +2805,7 @@ def list_crossex_history_orders(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.InlineResponse20041] + :rtype: list[gate_api.CrossexOrder] :return: If the method is called asynchronously, returns the request thread. """ @@ -2823,9 +2824,10 @@ def list_crossex_history_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 a single list - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp + :param str attributes: Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage / `SETTLEMENT` delisting settlement). Multiple values, comma-separated. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2835,7 +2837,7 @@ def list_crossex_history_orders_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.InlineResponse20041], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexOrder], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2847,7 +2849,8 @@ def list_crossex_history_orders_with_http_info(self, **kwargs): # noqa: E501 'limit', 'symbol', '_from', - 'to' + 'to', + 'attributes' ] all_params.extend( [ @@ -2882,6 +2885,8 @@ def list_crossex_history_orders_with_http_info(self, **kwargs): # 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 'attributes' in local_var_params and local_var_params['attributes'] is not None: # noqa: E501 + query_params.append(('attributes', local_var_params['attributes'])) # noqa: E501 header_params = {} @@ -2904,7 +2909,7 @@ def list_crossex_history_orders_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20041]', # noqa: E501 + response_type='list[CrossexOrder]', # 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 @@ -2924,7 +2929,7 @@ def list_crossex_history_positions(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number returned by list, max 1000 - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2934,7 +2939,7 @@ def list_crossex_history_positions(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.InlineResponse20042] + :rtype: list[gate_api.CrossexHistoricalPosition] :return: If the method is called asynchronously, returns the request thread. """ @@ -2953,7 +2958,7 @@ def list_crossex_history_positions_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number returned by list, max 1000 - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp :param _return_http_data_only: response data without head status code @@ -2965,7 +2970,7 @@ def list_crossex_history_positions_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.InlineResponse20042], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexHistoricalPosition], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -3034,7 +3039,7 @@ def list_crossex_history_positions_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20042]', # noqa: E501 + response_type='list[CrossexHistoricalPosition]', # 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 @@ -3054,7 +3059,7 @@ def list_crossex_history_margin_positions(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number returned by list, max 1000 - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3064,7 +3069,7 @@ def list_crossex_history_margin_positions(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.InlineResponse20043] + :rtype: list[gate_api.CrossexHistoricalMarginPosition] :return: If the method is called asynchronously, returns the request thread. """ @@ -3083,7 +3088,7 @@ def list_crossex_history_margin_positions_with_http_info(self, **kwargs): # noq :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number returned by list, max 1000 - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp :param _return_http_data_only: response data without head status code @@ -3095,7 +3100,7 @@ def list_crossex_history_margin_positions_with_http_info(self, **kwargs): # noq number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.InlineResponse20043], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexHistoricalMarginPosition], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -3164,7 +3169,7 @@ def list_crossex_history_margin_positions_with_http_info(self, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20043]', # noqa: E501 + response_type='list[CrossexHistoricalMarginPosition]', # 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 @@ -3182,7 +3187,7 @@ def list_crossex_history_margin_interests(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 :param int to: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 :param int page: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 @@ -3195,7 +3200,7 @@ def list_crossex_history_margin_interests(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.InlineResponse20044] + :rtype: list[gate_api.CrossexMarginInterestRecord] :return: If the method is called asynchronously, returns the request thread. """ @@ -3212,7 +3217,7 @@ def list_crossex_history_margin_interests_with_http_info(self, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 :param int to: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 :param int page: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 @@ -3227,7 +3232,7 @@ def list_crossex_history_margin_interests_with_http_info(self, **kwargs): # noq number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.InlineResponse20044], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexMarginInterestRecord], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -3299,7 +3304,7 @@ def list_crossex_history_margin_interests_with_http_info(self, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20044]', # noqa: E501 + response_type='list[CrossexMarginInterestRecord]', # 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 @@ -3319,7 +3324,7 @@ def list_crossex_history_trades(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number returned by list, max 1000 - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3329,7 +3334,7 @@ def list_crossex_history_trades(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.InlineResponse20045] + :rtype: list[gate_api.CrossexTrade] :return: If the method is called asynchronously, returns the request thread. """ @@ -3348,7 +3353,7 @@ def list_crossex_history_trades_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number returned by list, max 1000 - :param str symbol: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str symbol: Currency pair :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp :param _return_http_data_only: response data without head status code @@ -3360,7 +3365,7 @@ def list_crossex_history_trades_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.InlineResponse20045], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexTrade], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -3429,7 +3434,7 @@ def list_crossex_history_trades_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20045]', # noqa: E501 + response_type='list[CrossexTrade]', # 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 @@ -3449,7 +3454,8 @@ def list_crossex_account_book(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number returned by list, max 1000 - :param str coin: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str coin: Query by specified currency name + :param str statement_type: Bill entry type. The filter accepts the same values returned in the response. :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3459,7 +3465,7 @@ def list_crossex_account_book(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.InlineResponse20046] + :rtype: list[gate_api.CrossexAccountBookRecord] :return: If the method is called asynchronously, returns the request thread. """ @@ -3478,7 +3484,8 @@ def list_crossex_account_book_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number returned by list, max 1000 - :param str coin: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 + :param str coin: Query by specified currency name + :param str statement_type: Bill entry type. The filter accepts the same values returned in the response. :param int _from: Start Millisecond Timestamp :param int to: End Millisecond Timestamp :param _return_http_data_only: response data without head status code @@ -3490,7 +3497,7 @@ def list_crossex_account_book_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.InlineResponse20046], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexAccountBookRecord], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -3501,6 +3508,7 @@ def list_crossex_account_book_with_http_info(self, **kwargs): # noqa: E501 'page', 'limit', 'coin', + 'statement_type', '_from', 'to' ] @@ -3533,6 +3541,8 @@ def list_crossex_account_book_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 query_params.append(('coin', local_var_params['coin'])) # noqa: E501 + if 'statement_type' in local_var_params and local_var_params['statement_type'] is not None: # noqa: E501 + query_params.append(('statement_type', local_var_params['statement_type'])) # 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 @@ -3559,7 +3569,7 @@ def list_crossex_account_book_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20046]', # noqa: E501 + response_type='list[CrossexAccountBookRecord]', # 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 @@ -3568,7 +3578,7 @@ def list_crossex_account_book_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_crossex_coin_discount_rate(self, **kwargs): # noqa: E501 - """Query currency discount rate (discount rate of margin currency in isolated exchange mode) # noqa: E501 + """Query Currency Discount Rate # noqa: E501 Rate Limit: 200 requests per 10 seconds # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3577,8 +3587,8 @@ def list_crossex_coin_discount_rate(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str coin: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 - :param str exchange_type: OKX/GATE/BINANCE/BYBIT + :param str coin: Query by specified currency name + :param str exchange_type: OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3586,7 +3596,7 @@ def list_crossex_coin_discount_rate(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.InlineResponse20047] + :rtype: list[gate_api.CrossexCoinDiscountRate] :return: If the method is called asynchronously, returns the request thread. """ @@ -3594,7 +3604,7 @@ def list_crossex_coin_discount_rate(self, **kwargs): # noqa: E501 return self.list_crossex_coin_discount_rate_with_http_info(**kwargs) # noqa: E501 def list_crossex_coin_discount_rate_with_http_info(self, **kwargs): # noqa: E501 - """Query currency discount rate (discount rate of margin currency in isolated exchange mode) # noqa: E501 + """Query Currency Discount Rate # noqa: E501 Rate Limit: 200 requests per 10 seconds # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3603,8 +3613,8 @@ def list_crossex_coin_discount_rate_with_http_info(self, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str coin: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 - :param str exchange_type: OKX/GATE/BINANCE/BYBIT + :param str coin: Query by specified currency name + :param str exchange_type: OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3614,7 +3624,7 @@ def list_crossex_coin_discount_rate_with_http_info(self, **kwargs): # noqa: E50 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.InlineResponse20047], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossexCoinDiscountRate], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -3674,7 +3684,7 @@ def list_crossex_coin_discount_rate_with_http_info(self, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse20047]', # noqa: E501 + response_type='list[CrossexCoinDiscountRate]', # 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 diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py index 568ebc07..628171a4 100644 --- a/gate_api/api/earn_api.py +++ b/gate_api/api/earn_api.py @@ -36,16 +36,1893 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501 - """ETH swap # 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.list_dual_investment_plans(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int plan_id: Financial project ID + :param str coin: Investment Token + :param str type: Type enum: `put` — buy low; `call` — sell high + :param str quote_currency: Settlement currency enum: defaults to USDT; GUSD optional + :param str sort: Sort field enum: `apy` — highest APY first `short-period` — shortest tenor first `multiple` — highest premium first + :param int page: page number + :param int page_size: Items per page + :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.DualGetPlans] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_dual_investment_plans_with_http_info(**kwargs) # 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.list_dual_investment_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int plan_id: Financial project ID + :param str coin: Investment Token + :param str type: Type enum: `put` — buy low; `call` — sell high + :param str quote_currency: Settlement currency enum: defaults to USDT; GUSD optional + :param str sort: Sort field enum: `apy` — highest APY first `short-period` — shortest tenor first `multiple` — highest premium first + :param int page: page number + :param int page_size: Items per page + :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.DualGetPlans], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'plan_id', + 'coin', + 'type', + 'quote_currency', + 'sort', + 'page', + 'page_size' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_dual_investment_plans" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + 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 + if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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 'quote_currency' in local_var_params and local_var_params['quote_currency'] is not None: # noqa: E501 + query_params.append(('quote_currency', local_var_params['quote_currency'])) # 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 '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 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # 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/dual/investment_plan', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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) + + 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.list_dual_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start settlement time + :param int to: End settlement time + :param str type: Type enum: `put` — buy low; `call` — sell high + :param str status: Order status enum: `HOLD` — open position `REPAY` — historical position `PROCESSING` — position active `SETTLEMENT_PROCESSING` — settlement in progress `ALL` — all + :param str coin: Investment Token + :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.DualGetOrders] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_dual_orders_with_http_info(**kwargs) # 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.list_dual_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start settlement time + :param int to: End settlement time + :param str type: Type enum: `put` — buy low; `call` — sell high + :param str status: Order status enum: `HOLD` — open position `REPAY` — historical position `PROCESSING` — position active `SETTLEMENT_PROCESSING` — settlement in progress `ALL` — all + :param str coin: Investment Token + :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.DualGetOrders], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + '_from', + 'to', + 'type', + 'status', + 'coin', + '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_dual_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_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 '_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 + 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 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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( + '/earn/dual/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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) + + def place_dual_order(self, place_dual_investment_order_params, **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.place_dual_order(place_dual_investment_order_params, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param PlaceDualInvestmentOrderParams place_dual_investment_order_params: (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.PlaceDualInvestmentOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.place_dual_order_with_http_info(place_dual_investment_order_params, **kwargs) # noqa: E501 + + def place_dual_order_with_http_info(self, place_dual_investment_order_params, **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.place_dual_order_with_http_info(place_dual_investment_order_params, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param PlaceDualInvestmentOrderParams place_dual_investment_order_params: (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.PlaceDualInvestmentOrder, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'place_dual_investment_order_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 place_dual_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'place_dual_investment_order_params' is set + if self.api_client.client_side_validation and ('place_dual_investment_order_params' not in local_var_params or # noqa: E501 + local_var_params['place_dual_investment_order_params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `place_dual_investment_order_params` when calling `place_dual_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'place_dual_investment_order_params' in local_var_params: + body_params = local_var_params['place_dual_investment_order_params'] + # 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( + '/earn/dual/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PlaceDualInvestmentOrder', # 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_dual_balance(self, **kwargs): # noqa: E501 + """Dual-Currency Earning Assets # 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_dual_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: gate_api.DualGetBalance + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_dual_balance_with_http_info(**kwargs) # noqa: E501 + + def list_dual_balance_with_http_info(self, **kwargs): # noqa: E501 + """Dual-Currency Earning Assets # 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_dual_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(gate_api.DualGetBalance, 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_dual_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( + '/earn/dual/balance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DualGetBalance', # 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_order_refund_preview(self, order_id, **kwargs): # noqa: E501 + """Dual-currency early redemption preview # 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_order_refund_preview(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Order 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.DualOrderRefundPreview + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_dual_order_refund_preview_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_dual_order_refund_preview_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Dual-currency early redemption preview # 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_order_refund_preview_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Order 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.DualOrderRefundPreview, 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_dual_order_refund_preview" % 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_dual_order_refund_preview`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'order_id' in local_var_params and local_var_params['order_id'] is not None: # noqa: E501 + query_params.append(('order_id', local_var_params['order_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( + '/earn/dual/order-refund-preview', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DualOrderRefundPreview', # 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 place_dual_order_refund(self, dual_order_refund_params, **kwargs): # noqa: E501 + """Dual-currency order early redemption # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_dual_order_refund(dual_order_refund_params, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param DualOrderRefundParams dual_order_refund_params: (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.place_dual_order_refund_with_http_info(dual_order_refund_params, **kwargs) # noqa: E501 + + def place_dual_order_refund_with_http_info(self, dual_order_refund_params, **kwargs): # noqa: E501 + """Dual-currency order early redemption # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_dual_order_refund_with_http_info(dual_order_refund_params, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param DualOrderRefundParams dual_order_refund_params: (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 = [ + 'dual_order_refund_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 place_dual_order_refund" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'dual_order_refund_params' is set + if self.api_client.client_side_validation and ('dual_order_refund_params' not in local_var_params or # noqa: E501 + local_var_params['dual_order_refund_params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `dual_order_refund_params` when calling `place_dual_order_refund`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'dual_order_refund_params' in local_var_params: + body_params = local_var_params['dual_order_refund_params'] + # 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( + '/earn/dual/order-refund', '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 modify_dual_order_reinvest(self, dual_modify_order_reinvest_params, **kwargs): # noqa: E501 + """Modify dual-currency order reinvest # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.modify_dual_order_reinvest(dual_modify_order_reinvest_params, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param DualModifyOrderReinvestParams dual_modify_order_reinvest_params: (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.modify_dual_order_reinvest_with_http_info(dual_modify_order_reinvest_params, **kwargs) # noqa: E501 + + def modify_dual_order_reinvest_with_http_info(self, dual_modify_order_reinvest_params, **kwargs): # noqa: E501 + """Modify dual-currency order reinvest # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.modify_dual_order_reinvest_with_http_info(dual_modify_order_reinvest_params, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param DualModifyOrderReinvestParams dual_modify_order_reinvest_params: (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 = [ + 'dual_modify_order_reinvest_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 modify_dual_order_reinvest" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'dual_modify_order_reinvest_params' is set + if self.api_client.client_side_validation and ('dual_modify_order_reinvest_params' not in local_var_params or # noqa: E501 + local_var_params['dual_modify_order_reinvest_params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `dual_modify_order_reinvest_params` when calling `modify_dual_order_reinvest`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'dual_modify_order_reinvest_params' in local_var_params: + body_params = local_var_params['dual_modify_order_reinvest_params'] + # 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( + '/earn/dual/modify-order-reinvest', '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 get_dual_project_recommend(self, **kwargs): # noqa: E501 + """Dual-currency recommended projects # 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_project_recommend(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str mode: Sort mode; default `normal`: `senior` — curated picks (APR/tenor) `apy_up` — APY ascending `ep_down` — target price descending `ep_up` — target price ascending `dt_down` — maturity time descending `dt_up` — maturity time ascending + :param str coin: Investment Token + :param str type: `call`: sell high; `put`: buy low + :param str history_pids: Comma-separated project IDs to exclude already recommended items + :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.DualProjectRecommend] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_dual_project_recommend_with_http_info(**kwargs) # noqa: E501 + + def get_dual_project_recommend_with_http_info(self, **kwargs): # noqa: E501 + """Dual-currency recommended projects # 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_project_recommend_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str mode: Sort mode; default `normal`: `senior` — curated picks (APR/tenor) `apy_up` — APY ascending `ep_down` — target price descending `ep_up` — target price ascending `dt_down` — maturity time descending `dt_up` — maturity time ascending + :param str coin: Investment Token + :param str type: `call`: sell high; `put`: buy low + :param str history_pids: Comma-separated project IDs to exclude already recommended items + :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.DualProjectRecommend], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'mode', + 'coin', + 'type', + 'history_pids' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_project_recommend" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'mode' in local_var_params and local_var_params['mode'] is not None: # noqa: E501 + query_params.append(('mode', local_var_params['mode'])) # noqa: E501 + if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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 'history_pids' in local_var_params and local_var_params['history_pids'] is not None: # noqa: E501 + query_params.append(('history_pids', local_var_params['history_pids'])) # 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/dual/project-recommend', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DualProjectRecommend]', # 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 find_coin(self, **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.find_coin(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str cointype: Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. + :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 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.find_coin_with_http_info(**kwargs) # noqa: E501 + + def find_coin_with_http_info(self, **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.find_coin_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str cointype: Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. + :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, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'cointype' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method find_coin" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'cointype' in local_var_params and local_var_params['cointype'] is not None: # noqa: E501 + query_params.append(('cointype', local_var_params['cointype'])) # 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/staking/coins', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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) + + 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.swap_staking_coin(swap_coin, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :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. + :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.SwapCoinStruct + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.swap_staking_coin_with_http_info(swap_coin, **kwargs) # 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.swap_staking_coin_with_http_info(swap_coin, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :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 + 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.SwapCoinStruct, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + 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 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 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + 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 + + # 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( + '/earn/staking/swap', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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) + + def order_list(self, **kwargs): # noqa: E501 + """List of on-chain coin-earning 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.order_list(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int pid: Product ID + :param str coin: Currency name + :param int type: Type 0-staking 1-redemption + :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. + :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.OrderListStruct + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.order_list_with_http_info(**kwargs) # noqa: E501 + + def order_list_with_http_info(self, **kwargs): # noqa: E501 + """List of on-chain coin-earning 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.order_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int pid: Product ID + :param str coin: Currency name + :param int type: Type 0-staking 1-redemption + :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 + 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.OrderListStruct, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'pid', + 'coin', + 'type', + '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 order_list" % 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 `order_list`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + 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 + if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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 '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 = {} + + 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/staking/order_list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrderListStruct', # 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 award_list(self, **kwargs): # noqa: E501 + """On-chain coin-earning dividend 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.award_list(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int pid: Product ID + :param str coin: Currency name + :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. + :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.AwardListStruct + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.award_list_with_http_info(**kwargs) # noqa: E501 + + def award_list_with_http_info(self, **kwargs): # noqa: E501 + """On-chain coin-earning dividend 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.award_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int pid: Product ID + :param str coin: Currency name + :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 + 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.AwardListStruct, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'pid', + 'coin', + '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 award_list" % 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 `award_list`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + 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 + if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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 = {} + + 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/staking/award_list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AwardListStruct', # 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 asset_list(self, **kwargs): # noqa: E501 + """On-chain coin-earning assets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.asset_list(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str coin: Currency name + :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 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.asset_list_with_http_info(**kwargs) # noqa: E501 + + def asset_list_with_http_info(self, **kwargs): # noqa: E501 + """On-chain coin-earning assets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.asset_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str coin: 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 + 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, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + '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 asset_list" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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/staking/assets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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) + + def create_auto_invest_plan(self, auto_invest_plan_create, **kwargs): # noqa: E501 + """Create auto invest plan # 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_auto_invest_plan(auto_invest_plan_create, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param AutoInvestPlanCreate auto_invest_plan_create: (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.AutoInvestPlanCreateResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_auto_invest_plan_with_http_info(auto_invest_plan_create, **kwargs) # noqa: E501 + + def create_auto_invest_plan_with_http_info(self, auto_invest_plan_create, **kwargs): # noqa: E501 + """Create auto invest plan # 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_auto_invest_plan_with_http_info(auto_invest_plan_create, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param AutoInvestPlanCreate auto_invest_plan_create: (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.AutoInvestPlanCreateResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'auto_invest_plan_create' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_auto_invest_plan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'auto_invest_plan_create' is set + if self.api_client.client_side_validation and ('auto_invest_plan_create' not in local_var_params or # noqa: E501 + local_var_params['auto_invest_plan_create'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `auto_invest_plan_create` when calling `create_auto_invest_plan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'auto_invest_plan_create' in local_var_params: + body_params = local_var_params['auto_invest_plan_create'] + # 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( + '/earn/autoinvest/plans/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AutoInvestPlanCreateResp', # 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_auto_invest_plan(self, auto_invest_plan_update, **kwargs): # noqa: E501 + """UpdateAuto invest plan # 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_auto_invest_plan(auto_invest_plan_update, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param AutoInvestPlanUpdate auto_invest_plan_update: (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.update_auto_invest_plan_with_http_info(auto_invest_plan_update, **kwargs) # noqa: E501 + + def update_auto_invest_plan_with_http_info(self, auto_invest_plan_update, **kwargs): # noqa: E501 + """UpdateAuto invest plan # 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_auto_invest_plan_with_http_info(auto_invest_plan_update, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param AutoInvestPlanUpdate auto_invest_plan_update: (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 = [ + 'auto_invest_plan_update' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_auto_invest_plan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'auto_invest_plan_update' is set + if self.api_client.client_side_validation and ('auto_invest_plan_update' not in local_var_params or # noqa: E501 + local_var_params['auto_invest_plan_update'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `auto_invest_plan_update` when calling `update_auto_invest_plan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'auto_invest_plan_update' in local_var_params: + body_params = local_var_params['auto_invest_plan_update'] + # 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( + '/earn/autoinvest/plans/update', '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 stop_auto_invest_plan(self, auto_invest_plan_stop, **kwargs): # noqa: E501 + """StopAuto invest plan # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stop_auto_invest_plan(auto_invest_plan_stop, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param AutoInvestPlanStop auto_invest_plan_stop: (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.stop_auto_invest_plan_with_http_info(auto_invest_plan_stop, **kwargs) # noqa: E501 + + def stop_auto_invest_plan_with_http_info(self, auto_invest_plan_stop, **kwargs): # noqa: E501 + """StopAuto invest plan # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stop_auto_invest_plan_with_http_info(auto_invest_plan_stop, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param AutoInvestPlanStop auto_invest_plan_stop: (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 = [ + 'auto_invest_plan_stop' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method stop_auto_invest_plan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'auto_invest_plan_stop' is set + if self.api_client.client_side_validation and ('auto_invest_plan_stop' not in local_var_params or # noqa: E501 + local_var_params['auto_invest_plan_stop'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `auto_invest_plan_stop` when calling `stop_auto_invest_plan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'auto_invest_plan_stop' in local_var_params: + body_params = local_var_params['auto_invest_plan_stop'] + # 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( + '/earn/autoinvest/plans/stop', '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 add_position_auto_invest_plan(self, auto_invest_plan_add_position, **kwargs): # noqa: E501 + """Add position immediately # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.swap_eth2(eth2_swap, async_req=True) + >>> thread = api.add_position_auto_invest_plan(auto_invest_plan_add_position, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param Eth2Swap eth2_swap: (required) + :param AutoInvestPlanAddPosition auto_invest_plan_add_position: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -58,18 +1935,18 @@ def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.swap_eth2_with_http_info(eth2_swap, **kwargs) # noqa: E501 + return self.add_position_auto_invest_plan_with_http_info(auto_invest_plan_add_position, **kwargs) # noqa: E501 - def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 - """ETH swap # noqa: E501 + def add_position_auto_invest_plan_with_http_info(self, auto_invest_plan_add_position, **kwargs): # noqa: E501 + """Add position immediately # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.swap_eth2_with_http_info(eth2_swap, async_req=True) + >>> thread = api.add_position_auto_invest_plan_with_http_info(auto_invest_plan_add_position, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param Eth2Swap eth2_swap: (required) + :param AutoInvestPlanAddPosition auto_invest_plan_add_position: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -87,7 +1964,7 @@ def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'eth2_swap' + 'auto_invest_plan_add_position' ] all_params.extend( [ @@ -102,14 +1979,14 @@ def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method swap_eth2" % k + " to method add_position_auto_invest_plan" % 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 + # verify the required parameter 'auto_invest_plan_add_position' is set + if self.api_client.client_side_validation and ('auto_invest_plan_add_position' not in local_var_params or # noqa: E501 + local_var_params['auto_invest_plan_add_position'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `auto_invest_plan_add_position` when calling `add_position_auto_invest_plan`") # noqa: E501 collection_formats = {} @@ -123,8 +2000,8 @@ def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'eth2_swap' in local_var_params: - body_params = local_var_params['eth2_swap'] + if 'auto_invest_plan_add_position' in local_var_params: + body_params = local_var_params['auto_invest_plan_add_position'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -133,7 +2010,7 @@ def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/earn/staking/eth2/swap', 'POST', + '/earn/autoinvest/plans/add_position', 'POST', path_params, query_params, header_params, @@ -148,16 +2025,16 @@ def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def rate_list_eth2(self, **kwargs): # noqa: E501 - """GTETH historical return rate query # noqa: E501 + def list_auto_invest_coins(self, **kwargs): # noqa: E501 + """QueryCurrencies supporting auto invest # 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.rate_list_eth2(async_req=True) + >>> thread = api.list_auto_invest_coins(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously + :param str plan_money: Pricing currency,Optional: USDT or BTC,Default: USDT :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -165,23 +2042,23 @@ def rate_list_eth2(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.Eth2RateList] + :rtype: list[gate_api.AutoInvestCoinsItem] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.rate_list_eth2_with_http_info(**kwargs) # noqa: E501 + return self.list_auto_invest_coins_with_http_info(**kwargs) # noqa: E501 - def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 - """GTETH historical return rate query # noqa: E501 + def list_auto_invest_coins_with_http_info(self, **kwargs): # noqa: E501 + """QueryCurrencies supporting auto invest # 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.rate_list_eth2_with_http_info(async_req=True) + >>> thread = api.list_auto_invest_coins_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously + :param str plan_money: Pricing currency,Optional: USDT or BTC,Default: USDT :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -191,7 +2068,7 @@ def rate_list_eth2_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.Eth2RateList], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.AutoInvestCoinsItem], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -199,6 +2076,7 @@ def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ + 'plan_money' ] all_params.extend( [ @@ -213,7 +2091,7 @@ def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method rate_list_eth2" % k + " to method list_auto_invest_coins" % k ) local_var_params[k] = v del local_var_params['kwargs'] @@ -223,6 +2101,8 @@ def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'plan_money' in local_var_params and local_var_params['plan_money'] is not None: # noqa: E501 + query_params.append(('plan_money', local_var_params['plan_money'])) # noqa: E501 header_params = {} @@ -238,14 +2118,14 @@ def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/earn/staking/eth2/rate_records', 'GET', + '/earn/autoinvest/coins', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Eth2RateList]', # noqa: E501 + response_type='list[AutoInvestCoinsItem]', # 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 @@ -253,16 +2133,16 @@ def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_dual_investment_plans(self, **kwargs): # noqa: E501 - """Dual Investment product list # noqa: E501 + def get_auto_invest_min_amount(self, auto_invest_min_invest_amount, **kwargs): # noqa: E501 + """Get minimum investment 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.list_dual_investment_plans(async_req=True) + >>> thread = api.get_auto_invest_min_amount(auto_invest_min_invest_amount, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int plan_id: Financial project ID + :param AutoInvestMinInvestAmount auto_invest_min_invest_amount: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -270,23 +2150,23 @@ def list_dual_investment_plans(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.DualGetPlans] + :rtype: gate_api.AutoInvestMinInvestAmountResp :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_dual_investment_plans_with_http_info(**kwargs) # noqa: E501 + return self.get_auto_invest_min_amount_with_http_info(auto_invest_min_invest_amount, **kwargs) # noqa: E501 - def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 - """Dual Investment product list # noqa: E501 + def get_auto_invest_min_amount_with_http_info(self, auto_invest_min_invest_amount, **kwargs): # noqa: E501 + """Get minimum investment 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.list_dual_investment_plans_with_http_info(async_req=True) + >>> thread = api.get_auto_invest_min_amount_with_http_info(auto_invest_min_invest_amount, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int plan_id: Financial project ID + :param AutoInvestMinInvestAmount auto_invest_min_invest_amount: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -296,7 +2176,7 @@ def list_dual_investment_plans_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.DualGetPlans], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.AutoInvestMinInvestAmountResp, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -304,7 +2184,7 @@ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'plan_id' + 'auto_invest_min_invest_amount' ] all_params.extend( [ @@ -319,18 +2199,20 @@ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_dual_investment_plans" % k + " to method get_auto_invest_min_amount" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'auto_invest_min_invest_amount' is set + if self.api_client.client_side_validation and ('auto_invest_min_invest_amount' not in local_var_params or # noqa: E501 + local_var_params['auto_invest_min_invest_amount'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `auto_invest_min_invest_amount` when calling `get_auto_invest_min_amount`") # 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 = {} @@ -338,22 +2220,28 @@ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'auto_invest_min_invest_amount' in local_var_params: + body_params = local_var_params['auto_invest_min_invest_amount'] # 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 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/earn/dual/investment_plan', 'GET', + '/earn/autoinvest/min_invest_amount', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[DualGetPlans]', # noqa: E501 + response_type='AutoInvestMinInvestAmountResp', # 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 @@ -361,19 +2249,18 @@ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_dual_orders(self, **kwargs): # noqa: E501 - """Dual Investment order list # noqa: E501 + def list_auto_invest_plan_records(self, plan_id, **kwargs): # noqa: E501 + """List plan execution 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_dual_orders(async_req=True) + >>> thread = api.list_auto_invest_plan_records(plan_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :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 int plan_id: Plan ID (required) + :param int page: page number + :param int page_size: Items per page,Maximum 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -381,26 +2268,25 @@ def list_dual_orders(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.DualGetOrders] + :rtype: gate_api.AutoInvestPlanRecordsResp :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_dual_orders_with_http_info(**kwargs) # noqa: E501 + return self.list_auto_invest_plan_records_with_http_info(plan_id, **kwargs) # noqa: E501 - def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 - """Dual Investment order list # noqa: E501 + def list_auto_invest_plan_records_with_http_info(self, plan_id, **kwargs): # noqa: E501 + """List plan execution 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_dual_orders_with_http_info(async_req=True) + >>> thread = api.list_auto_invest_plan_records_with_http_info(plan_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :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 int plan_id: Plan ID (required) + :param int page: page number + :param int page_size: Items per page,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 @@ -410,7 +2296,7 @@ def list_dual_orders_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.DualGetOrders], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.AutoInvestPlanRecordsResp, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -418,10 +2304,9 @@ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - '_from', - 'to', + 'plan_id', 'page', - 'limit' + 'page_size' ] all_params.extend( [ @@ -436,30 +2321,26 @@ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_dual_orders" % k + " to method list_auto_invest_plan_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_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 + # verify the required parameter 'plan_id' is set + if self.api_client.client_side_validation and ('plan_id' not in local_var_params or # noqa: E501 + local_var_params['plan_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `plan_id` when calling `list_auto_invest_plan_records`") # 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 '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 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 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 header_params = {} @@ -475,14 +2356,14 @@ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/earn/dual/orders', 'GET', + '/earn/autoinvest/plans/records', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[DualGetOrders]', # noqa: E501 + response_type='AutoInvestPlanRecordsResp', # 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 @@ -490,16 +2371,17 @@ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def place_dual_order(self, place_dual_investment_order_params, **kwargs): # noqa: E501 - """Place Dual Investment order # noqa: E501 + def list_auto_invest_orders(self, plan_id, record_id, **kwargs): # noqa: E501 + """List plan execution recordsDetails(OrderDetails) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.place_dual_order(place_dual_investment_order_params, async_req=True) + >>> thread = api.list_auto_invest_orders(plan_id, record_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param PlaceDualInvestmentOrderParams place_dual_investment_order_params: (required) + :param int plan_id: Plan ID (required) + :param int record_id: Record ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -507,23 +2389,24 @@ def place_dual_order(self, place_dual_investment_order_params, **kwargs): # noq number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.PlaceDualInvestmentOrder + :rtype: list[gate_api.AutoInvestOrderItem] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.place_dual_order_with_http_info(place_dual_investment_order_params, **kwargs) # noqa: E501 + return self.list_auto_invest_orders_with_http_info(plan_id, record_id, **kwargs) # noqa: E501 - def place_dual_order_with_http_info(self, place_dual_investment_order_params, **kwargs): # noqa: E501 - """Place Dual Investment order # noqa: E501 + def list_auto_invest_orders_with_http_info(self, plan_id, record_id, **kwargs): # noqa: E501 + """List plan execution recordsDetails(OrderDetails) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.place_dual_order_with_http_info(place_dual_investment_order_params, async_req=True) + >>> thread = api.list_auto_invest_orders_with_http_info(plan_id, record_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param PlaceDualInvestmentOrderParams place_dual_investment_order_params: (required) + :param int plan_id: Plan ID (required) + :param int record_id: Record 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 @@ -533,7 +2416,7 @@ def place_dual_order_with_http_info(self, place_dual_investment_order_params, ** number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.PlaceDualInvestmentOrder, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.AutoInvestOrderItem], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -541,7 +2424,8 @@ def place_dual_order_with_http_info(self, place_dual_investment_order_params, ** local_var_params = locals() all_params = [ - 'place_dual_investment_order_params' + 'plan_id', + 'record_id' ] all_params.extend( [ @@ -556,20 +2440,28 @@ def place_dual_order_with_http_info(self, place_dual_investment_order_params, ** if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method place_dual_order" % k + " to method list_auto_invest_orders" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'place_dual_investment_order_params' is set - if self.api_client.client_side_validation and ('place_dual_investment_order_params' not in local_var_params or # noqa: E501 - local_var_params['place_dual_investment_order_params'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `place_dual_investment_order_params` when calling `place_dual_order`") # noqa: E501 + # verify the required parameter 'plan_id' is set + if self.api_client.client_side_validation and ('plan_id' not in local_var_params or # noqa: E501 + local_var_params['plan_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `plan_id` when calling `list_auto_invest_orders`") # noqa: E501 + # verify the required parameter 'record_id' is set + if self.api_client.client_side_validation and ('record_id' not in local_var_params or # noqa: E501 + local_var_params['record_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `record_id` when calling `list_auto_invest_orders`") # 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 + if 'record_id' in local_var_params and local_var_params['record_id'] is not None: # noqa: E501 + query_params.append(('record_id', local_var_params['record_id'])) # noqa: E501 header_params = {} @@ -577,28 +2469,22 @@ def place_dual_order_with_http_info(self, place_dual_investment_order_params, ** local_var_files = {} body_params = None - if 'place_dual_investment_order_params' in local_var_params: - body_params = local_var_params['place_dual_investment_order_params'] # 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( - '/earn/dual/orders', 'POST', + '/earn/autoinvest/orders', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PlaceDualInvestmentOrder', # noqa: E501 + response_type='list[AutoInvestOrderItem]', # 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 @@ -606,12 +2492,12 @@ def place_dual_order_with_http_info(self, place_dual_investment_order_params, ** _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_dual_balance(self, **kwargs): # noqa: E501 - """Dual-Currency Earning Assets # noqa: E501 + def list_auto_invest_config(self, **kwargs): # noqa: E501 + """List investment currency configuration # 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_dual_balance(async_req=True) + >>> thread = api.list_auto_invest_config(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously @@ -622,19 +2508,19 @@ def list_dual_balance(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.DualGetBalance + :rtype: list[gate_api.AutoInvestConfigItem] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_dual_balance_with_http_info(**kwargs) # noqa: E501 + return self.list_auto_invest_config_with_http_info(**kwargs) # noqa: E501 - def list_dual_balance_with_http_info(self, **kwargs): # noqa: E501 - """Dual-Currency Earning Assets # noqa: E501 + def list_auto_invest_config_with_http_info(self, **kwargs): # noqa: E501 + """List investment currency configuration # 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_dual_balance_with_http_info(async_req=True) + >>> thread = api.list_auto_invest_config_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously @@ -647,7 +2533,7 @@ def list_dual_balance_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.DualGetBalance, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.AutoInvestConfigItem], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -669,7 +2555,7 @@ def list_dual_balance_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_dual_balance" % k + " to method list_auto_invest_config" % k ) local_var_params[k] = v del local_var_params['kwargs'] @@ -694,14 +2580,14 @@ def list_dual_balance_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/earn/dual/balance', 'GET', + '/earn/autoinvest/config', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DualGetBalance', # noqa: E501 + response_type='list[AutoInvestConfigItem]', # 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 @@ -709,19 +2595,16 @@ def list_dual_balance_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_structured_products(self, status, **kwargs): # noqa: E501 - """Structured Product List # noqa: E501 + def get_auto_invest_plan_detail(self, plan_id, **kwargs): # noqa: E501 + """QueryAuto invest planDetails # 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) + >>> thread = api.get_auto_invest_plan_detail(plan_id, 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 int plan_id: Plan ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -729,26 +2612,23 @@ def list_structured_products(self, status, **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.StructuredGetProjectList] + :rtype: gate_api.AutoInvestPlanDetail :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 + return self.get_auto_invest_plan_detail_with_http_info(plan_id, **kwargs) # noqa: E501 - def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E501 - """Structured Product List # noqa: E501 + def get_auto_invest_plan_detail_with_http_info(self, plan_id, **kwargs): # noqa: E501 + """QueryAuto invest planDetails # 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) + >>> thread = api.get_auto_invest_plan_detail_with_http_info(plan_id, 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 int plan_id: Plan 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 @@ -758,7 +2638,7 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 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)) + :rtype: tuple(gate_api.AutoInvestPlanDetail, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -766,10 +2646,7 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 local_var_params = locals() all_params = [ - 'status', - 'type', - 'page', - 'limit' + 'plan_id' ] all_params.extend( [ @@ -784,34 +2661,22 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_structured_products" % k + " to method get_auto_invest_plan_detail" % 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 + # verify the required parameter 'plan_id' is set + if self.api_client.client_side_validation and ('plan_id' not in local_var_params or # noqa: E501 + local_var_params['plan_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `plan_id` when calling `get_auto_invest_plan_detail`") # 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 + 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 = {} @@ -824,17 +2689,17 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/earn/structured/products', 'GET', + '/earn/autoinvest/plans/detail', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[StructuredGetProjectList]', # noqa: E501 + response_type='AutoInvestPlanDetail', # 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 @@ -842,19 +2707,18 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 _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 + def list_auto_invest_plans(self, status, **kwargs): # noqa: E501 + """QueryAuto invest planList # 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_orders(async_req=True) + >>> thread = api.list_auto_invest_plans(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :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 number of records returned in a single list + :param str status: Plan status,History history,Active active (required) + :param int page: page number + :param int page_size: Items per page,Maximum 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -862,26 +2726,25 @@ def list_structured_orders(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.StructuredOrderList] + :rtype: gate_api.AutoInvestPlanListInfoResp :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_structured_orders_with_http_info(**kwargs) # noqa: E501 + return self.list_auto_invest_plans_with_http_info(status, **kwargs) # noqa: E501 - def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 - """Structured Product Order List # noqa: E501 + def list_auto_invest_plans_with_http_info(self, status, **kwargs): # noqa: E501 + """QueryAuto invest planList # 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_orders_with_http_info(async_req=True) + >>> thread = api.list_auto_invest_plans_with_http_info(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :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 number of records returned in a single list + :param str status: Plan status,History history,Active active (required) + :param int page: page number + :param int page_size: Items per page,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 @@ -891,7 +2754,7 @@ def list_structured_orders_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.StructuredOrderList], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.AutoInvestPlanListInfoResp, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -899,10 +2762,9 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - '_from', - 'to', + 'status', 'page', - 'limit' + 'page_size' ] all_params.extend( [ @@ -917,30 +2779,26 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_structured_orders" % k + " to method list_auto_invest_plans" % 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_auto_invest_plans`") # 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 '_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 '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 + if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 header_params = {} @@ -956,14 +2814,14 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/earn/structured/orders', 'GET', + '/earn/autoinvest/plans/list_info', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[StructuredOrderList]', # noqa: E501 + response_type='AutoInvestPlanListInfoResp', # 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 @@ -971,16 +2829,20 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def place_structured_order(self, structured_buy, **kwargs): # noqa: E501 - """Place Structured Product Order # noqa: E501 + def list_earn_fixed_term_products(self, page, limit, **kwargs): # noqa: E501 + """Get product list # noqa: E501 + Query fixed-term earn product list. Supports filtering by currency, product type, status, etc. Returns product interest rate, lock-up period, quota, and reward campaign 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.place_structured_order(structured_buy, async_req=True) + >>> thread = api.list_earn_fixed_term_products(page, limit, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param StructuredBuy structured_buy: (required) + :param int page: Page number (required) + :param int limit: Page size (required) + :param str asset: Currency + :param int type: Product type: 1 for regular, 2 for VIP :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -988,23 +2850,27 @@ def place_structured_order(self, structured_buy, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: gate_api.ListEarnFixedTermProductsResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.place_structured_order_with_http_info(structured_buy, **kwargs) # noqa: E501 + return self.list_earn_fixed_term_products_with_http_info(page, limit, **kwargs) # noqa: E501 - def place_structured_order_with_http_info(self, structured_buy, **kwargs): # noqa: E501 - """Place Structured Product Order # noqa: E501 + def list_earn_fixed_term_products_with_http_info(self, page, limit, **kwargs): # noqa: E501 + """Get product list # noqa: E501 + Query fixed-term earn product list. Supports filtering by currency, product type, status, etc. Returns product interest rate, lock-up period, quota, and reward campaign 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.place_structured_order_with_http_info(structured_buy, async_req=True) + >>> thread = api.list_earn_fixed_term_products_with_http_info(page, limit, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param StructuredBuy structured_buy: (required) + :param int page: Page number (required) + :param int limit: Page size (required) + :param str asset: Currency + :param int type: Product type: 1 for regular, 2 for VIP :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1014,7 +2880,7 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no 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.ListEarnFixedTermProductsResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1022,7 +2888,10 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no local_var_params = locals() all_params = [ - 'structured_buy' + 'page', + 'limit', + 'asset', + 'type' ] all_params.extend( [ @@ -1037,20 +2906,32 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method place_structured_order" % k + " to method list_earn_fixed_term_products" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # 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 + # verify the required parameter 'page' is set + if self.api_client.client_side_validation and ('page' not in local_var_params or # noqa: E501 + local_var_params['page'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `page` when calling `list_earn_fixed_term_products`") # noqa: E501 + # verify the required parameter 'limit' is set + if self.api_client.client_side_validation and ('limit' not in local_var_params or # noqa: E501 + local_var_params['limit'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `limit` when calling `list_earn_fixed_term_products`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + 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 + 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 '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 = {} @@ -1058,24 +2939,22 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no local_var_files = {} body_params = None - 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 + # HTTP header `Accept` + 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( - '/earn/structured/orders', 'POST', + '/earn/fixed-term/product', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='ListEarnFixedTermProductsResponse', # 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 @@ -1083,16 +2962,18 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def find_coin(self, find_coin, **kwargs): # noqa: E501 - """Staking coins # noqa: E501 + def list_earn_fixed_term_products_by_asset(self, asset, **kwargs): # noqa: E501 + """Get product list by single currency # noqa: E501 + Sort by product term in 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.find_coin(find_coin, async_req=True) + >>> thread = api.list_earn_fixed_term_products_by_asset(asset, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param FindCoin find_coin: (required) + :param str asset: Currency name, e.g., USDT, BTC (required) + :param str type: Product type: \"\" or 1 for regular product list, 2 for VIP product list, 0 for all products :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1100,23 +2981,25 @@ def find_coin(self, find_coin, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list + :rtype: gate_api.ListEarnFixedTermProductsByAssetResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.find_coin_with_http_info(find_coin, **kwargs) # noqa: E501 + return self.list_earn_fixed_term_products_by_asset_with_http_info(asset, **kwargs) # noqa: E501 - def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 - """Staking coins # noqa: E501 + def list_earn_fixed_term_products_by_asset_with_http_info(self, asset, **kwargs): # noqa: E501 + """Get product list by single currency # noqa: E501 + Sort by product term in 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.find_coin_with_http_info(find_coin, async_req=True) + >>> thread = api.list_earn_fixed_term_products_by_asset_with_http_info(asset, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param FindCoin find_coin: (required) + :param str asset: Currency name, e.g., USDT, BTC (required) + :param str type: Product type: \"\" or 1 for regular product list, 2 for VIP product list, 0 for all products :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1126,7 +3009,7 @@ def find_coin_with_http_info(self, find_coin, **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, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.ListEarnFixedTermProductsByAssetResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1134,7 +3017,8 @@ def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'find_coin' + 'asset', + 'type' ] all_params.extend( [ @@ -1149,20 +3033,24 @@ def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method find_coin" % k + " to method list_earn_fixed_term_products_by_asset" % 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 + # 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_earn_fixed_term_products_by_asset`") # noqa: E501 collection_formats = {} path_params = {} + if 'asset' in local_var_params: + path_params['asset'] = local_var_params['asset'] # noqa: E501 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 header_params = {} @@ -1170,28 +3058,22 @@ def find_coin_with_http_info(self, find_coin, **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 - # 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 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/earn/staking/coins', 'GET', + '/earn/fixed-term/product/{asset}/list', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[object]', # noqa: E501 + response_type='ListEarnFixedTermProductsByAssetResponse', # 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 @@ -1199,16 +3081,24 @@ def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def swap_staking_coin(self, swap_coin, **kwargs): # noqa: E501 - """On-chain token swap for earned coins # noqa: E501 + def list_earn_fixed_term_lends(self, order_type, page, limit, **kwargs): # noqa: E501 + """Subscription list # noqa: E501 + Query the user's fixed-term earn subscription order list. Supports filtering by product, currency, order type, etc. Returns order details, earnings, rewards, and interest rate boost coupon 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.swap_staking_coin(swap_coin, async_req=True) + >>> thread = api.list_earn_fixed_term_lends(order_type, page, limit, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param SwapCoin swap_coin: (required) + :param str order_type: Order type: 1 for current orders, 2 for historical orders (required) + :param int page: Page number (required) + :param int limit: Page size (required) + :param int product_id: Product ID + :param int order_id: Order ID + :param str asset: Currency + :param int sub_business: Sub-business + :param str business_filter: Business filter conditions, JSON array format, e.g., [{\"business\":1, \"sub_business\": 0}]. business: 1 for regular, 2 for VIP :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1216,23 +3106,31 @@ def swap_staking_coin(self, swap_coin, **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.SwapCoinStruct + :rtype: gate_api.ListEarnFixedTermLendsResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.swap_staking_coin_with_http_info(swap_coin, **kwargs) # noqa: E501 + return self.list_earn_fixed_term_lends_with_http_info(order_type, page, limit, **kwargs) # noqa: E501 - def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 - """On-chain token swap for earned coins # noqa: E501 + def list_earn_fixed_term_lends_with_http_info(self, order_type, page, limit, **kwargs): # noqa: E501 + """Subscription list # noqa: E501 + Query the user's fixed-term earn subscription order list. Supports filtering by product, currency, order type, etc. Returns order details, earnings, rewards, and interest rate boost coupon 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.swap_staking_coin_with_http_info(swap_coin, async_req=True) + >>> thread = api.list_earn_fixed_term_lends_with_http_info(order_type, page, limit, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param SwapCoin swap_coin: (required) + :param str order_type: Order type: 1 for current orders, 2 for historical orders (required) + :param int page: Page number (required) + :param int limit: Page size (required) + :param int product_id: Product ID + :param int order_id: Order ID + :param str asset: Currency + :param int sub_business: Sub-business + :param str business_filter: Business filter conditions, JSON array format, e.g., [{\"business\":1, \"sub_business\": 0}]. business: 1 for regular, 2 for VIP :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1242,7 +3140,7 @@ def swap_staking_coin_with_http_info(self, swap_coin, **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.SwapCoinStruct, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.ListEarnFixedTermLendsResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1250,7 +3148,14 @@ def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'swap_coin' + 'order_type', + 'page', + 'limit', + 'product_id', + 'order_id', + 'asset', + 'sub_business', + 'business_filter' ] all_params.extend( [ @@ -1265,20 +3170,44 @@ def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method swap_staking_coin" % k + " to method list_earn_fixed_term_lends" % 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 + # verify the required parameter 'order_type' is set + if self.api_client.client_side_validation and ('order_type' not in local_var_params or # noqa: E501 + local_var_params['order_type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_type` when calling `list_earn_fixed_term_lends`") # noqa: E501 + # verify the required parameter 'page' is set + if self.api_client.client_side_validation and ('page' not in local_var_params or # noqa: E501 + local_var_params['page'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `page` when calling `list_earn_fixed_term_lends`") # noqa: E501 + # verify the required parameter 'limit' is set + if self.api_client.client_side_validation and ('limit' not in local_var_params or # noqa: E501 + local_var_params['limit'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `limit` when calling `list_earn_fixed_term_lends`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'product_id' in local_var_params and local_var_params['product_id'] is not None: # noqa: E501 + query_params.append(('product_id', local_var_params['product_id'])) # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] is not None: # noqa: E501 + query_params.append(('order_id', local_var_params['order_id'])) # 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 + 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 + 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 'sub_business' in local_var_params and local_var_params['sub_business'] is not None: # noqa: E501 + query_params.append(('sub_business', local_var_params['sub_business'])) # noqa: E501 + if 'business_filter' in local_var_params and local_var_params['business_filter'] is not None: # noqa: E501 + query_params.append(('business_filter', local_var_params['business_filter'])) # noqa: E501 header_params = {} @@ -1286,28 +3215,22 @@ def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 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 - # 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( - '/earn/staking/swap', 'POST', + '/earn/fixed-term/user/lend', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='SwapCoinStruct', # noqa: E501 + response_type='ListEarnFixedTermLendsResponse', # 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 @@ -1315,19 +3238,17 @@ def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def order_list(self, **kwargs): # noqa: E501 - """List of on-chain coin-earning orders # noqa: E501 + def create_earn_fixed_term_lend(self, **kwargs): # noqa: E501 + """Subscription # noqa: E501 + Subscribe to a fixed-term earn product by specifying the product ID and subscription amount. Optionally enable auto-renewal and apply an interest rate boost coupon # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.order_list(async_req=True) + >>> thread = api.create_earn_fixed_term_lend(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int pid: Product ID - :param str coin: Currency name - :param int type: Type 0-staking 1-redemption - :param int page: Page number + :param FixedTermLendRequest fixed_term_lend_request: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1335,26 +3256,24 @@ def order_list(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.OrderListStruct + :rtype: gate_api.CreateEarnFixedTermLendResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.order_list_with_http_info(**kwargs) # noqa: E501 + return self.create_earn_fixed_term_lend_with_http_info(**kwargs) # noqa: E501 - def order_list_with_http_info(self, **kwargs): # noqa: E501 - """List of on-chain coin-earning orders # noqa: E501 + def create_earn_fixed_term_lend_with_http_info(self, **kwargs): # noqa: E501 + """Subscription # noqa: E501 + Subscribe to a fixed-term earn product by specifying the product ID and subscription amount. Optionally enable auto-renewal and apply an interest rate boost coupon # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.order_list_with_http_info(async_req=True) + >>> thread = api.create_earn_fixed_term_lend_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int pid: Product ID - :param str coin: Currency name - :param int type: Type 0-staking 1-redemption - :param int page: Page number + :param FixedTermLendRequest fixed_term_lend_request: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1364,7 +3283,7 @@ def order_list_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.OrderListStruct, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CreateEarnFixedTermLendResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1372,10 +3291,7 @@ def order_list_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'pid', - 'coin', - 'type', - 'page' + 'fixed_term_lend_request' ] all_params.extend( [ @@ -1390,26 +3306,16 @@ def order_list_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method order_list" % k + " to method create_earn_fixed_term_lend" % 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 `order_list`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - 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 - if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 - query_params.append(('coin', local_var_params['coin'])) # 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 '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 = {} @@ -1417,22 +3323,28 @@ def order_list_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'fixed_term_lend_request' in local_var_params: + body_params = local_var_params['fixed_term_lend_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( - '/earn/staking/order_list', 'GET', + '/earn/fixed-term/user/lend', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='OrderListStruct', # noqa: E501 + response_type='CreateEarnFixedTermLendResponse', # 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 @@ -1440,18 +3352,17 @@ def order_list_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def award_list(self, **kwargs): # noqa: E501 - """On-chain coin-earning dividend records # noqa: E501 + def create_earn_fixed_term_pre_redeem(self, **kwargs): # noqa: E501 + """Redeem # noqa: E501 + Early redemption of a fixed-term earn order, order ID is required # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.award_list(async_req=True) + >>> thread = api.create_earn_fixed_term_pre_redeem(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int pid: Product ID - :param str coin: Currency name - :param int page: Page number + :param EarnFixedTermPreRedeemRequest earn_fixed_term_pre_redeem_request: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1459,25 +3370,24 @@ def award_list(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.AwardListStruct + :rtype: gate_api.CreateEarnFixedTermPreRedeemResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.award_list_with_http_info(**kwargs) # noqa: E501 + return self.create_earn_fixed_term_pre_redeem_with_http_info(**kwargs) # noqa: E501 - def award_list_with_http_info(self, **kwargs): # noqa: E501 - """On-chain coin-earning dividend records # noqa: E501 + def create_earn_fixed_term_pre_redeem_with_http_info(self, **kwargs): # noqa: E501 + """Redeem # noqa: E501 + Early redemption of a fixed-term earn order, order ID is required # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.award_list_with_http_info(async_req=True) + >>> thread = api.create_earn_fixed_term_pre_redeem_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int pid: Product ID - :param str coin: Currency name - :param int page: Page number + :param EarnFixedTermPreRedeemRequest earn_fixed_term_pre_redeem_request: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1487,7 +3397,7 @@ def award_list_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.AwardListStruct, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CreateEarnFixedTermPreRedeemResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1495,9 +3405,7 @@ def award_list_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'pid', - 'coin', - 'page' + 'earn_fixed_term_pre_redeem_request' ] all_params.extend( [ @@ -1512,24 +3420,16 @@ def award_list_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method award_list" % k + " to method create_earn_fixed_term_pre_redeem" % 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 `award_list`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - 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 - if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 - query_params.append(('coin', local_var_params['coin'])) # 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 = {} @@ -1537,22 +3437,28 @@ def award_list_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'earn_fixed_term_pre_redeem_request' in local_var_params: + body_params = local_var_params['earn_fixed_term_pre_redeem_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( - '/earn/staking/award_list', 'GET', + '/earn/fixed-term/user/pre-redeem', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='AwardListStruct', # noqa: E501 + response_type='CreateEarnFixedTermPreRedeemResponse', # 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 @@ -1560,16 +3466,26 @@ def award_list_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def asset_list(self, **kwargs): # noqa: E501 - """On-chain coin-earning assets # noqa: E501 + def list_earn_fixed_term_history(self, type, page, limit, **kwargs): # noqa: E501 + """Subscription history # noqa: E501 + Query the user's fixed-term earn history records. Supports filtering by type (subscription, redemption, interest, bonus rewards) and time range # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.asset_list(async_req=True) + >>> thread = api.list_earn_fixed_term_history(type, page, limit, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str coin: Currency name + :param str type: 1 for subscription, 2 for redemption, 3 for interest, 4 for bonus reward (required) + :param int page: Page number (required) + :param int limit: Page size (required) + :param int product_id: Product ID + :param str order_id: Order ID + :param str asset: Currency + :param int start_at: Start timestamp + :param int end_at: End Timestamp + :param int sub_business: Sub-business + :param str business_filter: Business filter conditions, JSON array format, e.g., [{\"business\":1, \"sub_business\": 0}]. business: 1 for regular, 2 for VIP :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1577,23 +3493,33 @@ def asset_list(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 + :rtype: gate_api.ListEarnFixedTermHistoryResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.asset_list_with_http_info(**kwargs) # noqa: E501 + return self.list_earn_fixed_term_history_with_http_info(type, page, limit, **kwargs) # noqa: E501 - def asset_list_with_http_info(self, **kwargs): # noqa: E501 - """On-chain coin-earning assets # noqa: E501 + def list_earn_fixed_term_history_with_http_info(self, type, page, limit, **kwargs): # noqa: E501 + """Subscription history # noqa: E501 + Query the user's fixed-term earn history records. Supports filtering by type (subscription, redemption, interest, bonus rewards) and time range # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.asset_list_with_http_info(async_req=True) + >>> thread = api.list_earn_fixed_term_history_with_http_info(type, page, limit, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str coin: Currency name + :param str type: 1 for subscription, 2 for redemption, 3 for interest, 4 for bonus reward (required) + :param int page: Page number (required) + :param int limit: Page size (required) + :param int product_id: Product ID + :param str order_id: Order ID + :param str asset: Currency + :param int start_at: Start timestamp + :param int end_at: End Timestamp + :param int sub_business: Sub-business + :param str business_filter: Business filter conditions, JSON array format, e.g., [{\"business\":1, \"sub_business\": 0}]. business: 1 for regular, 2 for VIP :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1603,7 +3529,7 @@ def asset_list_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, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.ListEarnFixedTermHistoryResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1611,7 +3537,16 @@ def asset_list_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'coin' + 'type', + 'page', + 'limit', + 'product_id', + 'order_id', + 'asset', + 'start_at', + 'end_at', + 'sub_business', + 'business_filter' ] all_params.extend( [ @@ -1626,18 +3561,48 @@ def asset_list_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method asset_list" % k + " to method list_earn_fixed_term_history" % 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_earn_fixed_term_history`") # noqa: E501 + # verify the required parameter 'page' is set + if self.api_client.client_side_validation and ('page' not in local_var_params or # noqa: E501 + local_var_params['page'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `page` when calling `list_earn_fixed_term_history`") # noqa: E501 + # verify the required parameter 'limit' is set + if self.api_client.client_side_validation and ('limit' not in local_var_params or # noqa: E501 + local_var_params['limit'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `limit` when calling `list_earn_fixed_term_history`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 - query_params.append(('coin', local_var_params['coin'])) # noqa: E501 + if 'product_id' in local_var_params and local_var_params['product_id'] is not None: # noqa: E501 + query_params.append(('product_id', local_var_params['product_id'])) # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] is not None: # noqa: E501 + query_params.append(('order_id', local_var_params['order_id'])) # 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 + 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 '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 'start_at' in local_var_params and local_var_params['start_at'] is not None: # noqa: E501 + query_params.append(('start_at', local_var_params['start_at'])) # noqa: E501 + if 'end_at' in local_var_params and local_var_params['end_at'] is not None: # noqa: E501 + query_params.append(('end_at', local_var_params['end_at'])) # noqa: E501 + if 'sub_business' in local_var_params and local_var_params['sub_business'] is not None: # noqa: E501 + query_params.append(('sub_business', local_var_params['sub_business'])) # noqa: E501 + if 'business_filter' in local_var_params and local_var_params['business_filter'] is not None: # noqa: E501 + query_params.append(('business_filter', local_var_params['business_filter'])) # noqa: E501 header_params = {} @@ -1653,14 +3618,14 @@ def asset_list_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/earn/staking/assets', 'GET', + '/earn/fixed-term/user/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[object]', # noqa: E501 + response_type='ListEarnFixedTermHistoryResponse', # 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 diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index f2ac78d5..75f144df 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1119,7 +1119,7 @@ def list_uni_chart(self, _from, to, asset, **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.InlineResponse2004] + :rtype: list[gate_api.UniChartPoint] :return: If the method is called asynchronously, returns the request thread. """ @@ -1147,7 +1147,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.InlineResponse2004], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UniChartPoint], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1222,7 +1222,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse2004]', # noqa: E501 + response_type='list[UniChartPoint]', # 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 @@ -1246,7 +1246,7 @@ def list_uni_rate(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.InlineResponse2005] + :rtype: list[gate_api.UniEstimatedRate] :return: If the method is called asynchronously, returns the request thread. """ @@ -1271,7 +1271,7 @@ def list_uni_rate_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.InlineResponse2005], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UniEstimatedRate], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1325,7 +1325,7 @@ def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse2005]', # noqa: E501 + response_type='list[UniEstimatedRate]', # 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 diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py index ffbba85f..23e2b5de 100644 --- a/gate_api/api/flash_swap_api.py +++ b/gate_api/api/flash_swap_api.py @@ -646,3 +646,726 @@ def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, ** _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + + def create_flash_swap_multi_currency_many_to_one_order(self, flash_swap_multi_currency_many_to_one_order_create_req, **kwargs): # noqa: E501 + """Flash Swap - Multi-currency exchange - Place order (many-to-one) # noqa: E501 + + Create a multi-currency to single target currency exchange 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_flash_swap_multi_currency_many_to_one_order(flash_swap_multi_currency_many_to_one_order_create_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapMultiCurrencyManyToOneOrderCreateReq flash_swap_multi_currency_many_to_one_order_create_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.FlashSwapMultiCurrencyManyToOneOrderCreateResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_flash_swap_multi_currency_many_to_one_order_with_http_info(flash_swap_multi_currency_many_to_one_order_create_req, **kwargs) # noqa: E501 + + def create_flash_swap_multi_currency_many_to_one_order_with_http_info(self, flash_swap_multi_currency_many_to_one_order_create_req, **kwargs): # noqa: E501 + """Flash Swap - Multi-currency exchange - Place order (many-to-one) # noqa: E501 + + Create a multi-currency to single target currency exchange 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_flash_swap_multi_currency_many_to_one_order_with_http_info(flash_swap_multi_currency_many_to_one_order_create_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapMultiCurrencyManyToOneOrderCreateReq flash_swap_multi_currency_many_to_one_order_create_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.FlashSwapMultiCurrencyManyToOneOrderCreateResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'flash_swap_multi_currency_many_to_one_order_create_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 create_flash_swap_multi_currency_many_to_one_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'flash_swap_multi_currency_many_to_one_order_create_req' is set + if self.api_client.client_side_validation and ('flash_swap_multi_currency_many_to_one_order_create_req' not in local_var_params or # noqa: E501 + local_var_params['flash_swap_multi_currency_many_to_one_order_create_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `flash_swap_multi_currency_many_to_one_order_create_req` when calling `create_flash_swap_multi_currency_many_to_one_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'flash_swap_multi_currency_many_to_one_order_create_req' in local_var_params: + body_params = local_var_params['flash_swap_multi_currency_many_to_one_order_create_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( + '/flash_swap/multi-currency/many-to-one/order/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapMultiCurrencyManyToOneOrderCreateResp', # 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 preview_flash_swap_multi_currency_many_to_one_order(self, flash_swap_multi_currency_many_to_one_order_preview_req, **kwargs): # noqa: E501 + """Flash Swap - Multi-currency exchange - Preview (many-to-one) # noqa: E501 + + Preview quote for multi-currency to single target currency exchange # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_flash_swap_multi_currency_many_to_one_order(flash_swap_multi_currency_many_to_one_order_preview_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapMultiCurrencyManyToOneOrderPreviewReq flash_swap_multi_currency_many_to_one_order_preview_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.FlashSwapMultiCurrencyManyToOneOrderPreviewResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.preview_flash_swap_multi_currency_many_to_one_order_with_http_info(flash_swap_multi_currency_many_to_one_order_preview_req, **kwargs) # noqa: E501 + + def preview_flash_swap_multi_currency_many_to_one_order_with_http_info(self, flash_swap_multi_currency_many_to_one_order_preview_req, **kwargs): # noqa: E501 + """Flash Swap - Multi-currency exchange - Preview (many-to-one) # noqa: E501 + + Preview quote for multi-currency to single target currency exchange # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_flash_swap_multi_currency_many_to_one_order_with_http_info(flash_swap_multi_currency_many_to_one_order_preview_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapMultiCurrencyManyToOneOrderPreviewReq flash_swap_multi_currency_many_to_one_order_preview_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.FlashSwapMultiCurrencyManyToOneOrderPreviewResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'flash_swap_multi_currency_many_to_one_order_preview_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 preview_flash_swap_multi_currency_many_to_one_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'flash_swap_multi_currency_many_to_one_order_preview_req' is set + if self.api_client.client_side_validation and ('flash_swap_multi_currency_many_to_one_order_preview_req' not in local_var_params or # noqa: E501 + local_var_params['flash_swap_multi_currency_many_to_one_order_preview_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `flash_swap_multi_currency_many_to_one_order_preview_req` when calling `preview_flash_swap_multi_currency_many_to_one_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'flash_swap_multi_currency_many_to_one_order_preview_req' in local_var_params: + body_params = local_var_params['flash_swap_multi_currency_many_to_one_order_preview_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( + '/flash_swap/multi-currency/many-to-one/order/preview', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapMultiCurrencyManyToOneOrderPreviewResp', # 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_flash_swap_order_v1(self, flash_swap_order_create_req, **kwargs): # noqa: E501 + """Flash Swap - Place order (one-to-one) # noqa: E501 + + Submit a one-to-one flash swap order. A quote_id must be obtained from the preview endpoint 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.create_flash_swap_order_v1(flash_swap_order_create_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapOrderCreateReq flash_swap_order_create_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.FlashSwapOrderCreateResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_flash_swap_order_v1_with_http_info(flash_swap_order_create_req, **kwargs) # noqa: E501 + + def create_flash_swap_order_v1_with_http_info(self, flash_swap_order_create_req, **kwargs): # noqa: E501 + """Flash Swap - Place order (one-to-one) # noqa: E501 + + Submit a one-to-one flash swap order. A quote_id must be obtained from the preview endpoint 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.create_flash_swap_order_v1_with_http_info(flash_swap_order_create_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapOrderCreateReq flash_swap_order_create_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.FlashSwapOrderCreateResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'flash_swap_order_create_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 create_flash_swap_order_v1" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'flash_swap_order_create_req' is set + if self.api_client.client_side_validation and ('flash_swap_order_create_req' not in local_var_params or # noqa: E501 + local_var_params['flash_swap_order_create_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `flash_swap_order_create_req` when calling `create_flash_swap_order_v1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'flash_swap_order_create_req' in local_var_params: + body_params = local_var_params['flash_swap_order_create_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( + '/flash_swap/order/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapOrderCreateResp', # 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_flash_swap_multi_currency_one_to_many_order(self, flash_swap_multi_currency_one_to_many_order_create_req, **kwargs): # noqa: E501 + """Flash Swap - Multi-currency exchange - Place order (one-to-many) # noqa: E501 + + Create a single currency to multiple target currencies exchange 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_flash_swap_multi_currency_one_to_many_order(flash_swap_multi_currency_one_to_many_order_create_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapMultiCurrencyOneToManyOrderCreateReq flash_swap_multi_currency_one_to_many_order_create_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.FlashSwapMultiCurrencyOneToManyOrderCreateResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_flash_swap_multi_currency_one_to_many_order_with_http_info(flash_swap_multi_currency_one_to_many_order_create_req, **kwargs) # noqa: E501 + + def create_flash_swap_multi_currency_one_to_many_order_with_http_info(self, flash_swap_multi_currency_one_to_many_order_create_req, **kwargs): # noqa: E501 + """Flash Swap - Multi-currency exchange - Place order (one-to-many) # noqa: E501 + + Create a single currency to multiple target currencies exchange 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_flash_swap_multi_currency_one_to_many_order_with_http_info(flash_swap_multi_currency_one_to_many_order_create_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapMultiCurrencyOneToManyOrderCreateReq flash_swap_multi_currency_one_to_many_order_create_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.FlashSwapMultiCurrencyOneToManyOrderCreateResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'flash_swap_multi_currency_one_to_many_order_create_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 create_flash_swap_multi_currency_one_to_many_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'flash_swap_multi_currency_one_to_many_order_create_req' is set + if self.api_client.client_side_validation and ('flash_swap_multi_currency_one_to_many_order_create_req' not in local_var_params or # noqa: E501 + local_var_params['flash_swap_multi_currency_one_to_many_order_create_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `flash_swap_multi_currency_one_to_many_order_create_req` when calling `create_flash_swap_multi_currency_one_to_many_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'flash_swap_multi_currency_one_to_many_order_create_req' in local_var_params: + body_params = local_var_params['flash_swap_multi_currency_one_to_many_order_create_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( + '/flash_swap/multi-currency/one-to-many/order/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapMultiCurrencyOneToManyOrderCreateResp', # 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 preview_flash_swap_multi_currency_one_to_many_order(self, flash_swap_multi_currency_one_to_many_order_preview_req, **kwargs): # noqa: E501 + """Flash Swap - Multi-currency exchange - Preview (one-to-many) # noqa: E501 + + Preview quote for single currency to multiple target currencies exchange # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_flash_swap_multi_currency_one_to_many_order(flash_swap_multi_currency_one_to_many_order_preview_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapMultiCurrencyOneToManyOrderPreviewReq flash_swap_multi_currency_one_to_many_order_preview_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.FlashSwapMultiCurrencyOneToManyOrderPreviewResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.preview_flash_swap_multi_currency_one_to_many_order_with_http_info(flash_swap_multi_currency_one_to_many_order_preview_req, **kwargs) # noqa: E501 + + def preview_flash_swap_multi_currency_one_to_many_order_with_http_info(self, flash_swap_multi_currency_one_to_many_order_preview_req, **kwargs): # noqa: E501 + """Flash Swap - Multi-currency exchange - Preview (one-to-many) # noqa: E501 + + Preview quote for single currency to multiple target currencies exchange # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_flash_swap_multi_currency_one_to_many_order_with_http_info(flash_swap_multi_currency_one_to_many_order_preview_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapMultiCurrencyOneToManyOrderPreviewReq flash_swap_multi_currency_one_to_many_order_preview_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.FlashSwapMultiCurrencyOneToManyOrderPreviewResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'flash_swap_multi_currency_one_to_many_order_preview_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 preview_flash_swap_multi_currency_one_to_many_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'flash_swap_multi_currency_one_to_many_order_preview_req' is set + if self.api_client.client_side_validation and ('flash_swap_multi_currency_one_to_many_order_preview_req' not in local_var_params or # noqa: E501 + local_var_params['flash_swap_multi_currency_one_to_many_order_preview_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `flash_swap_multi_currency_one_to_many_order_preview_req` when calling `preview_flash_swap_multi_currency_one_to_many_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'flash_swap_multi_currency_one_to_many_order_preview_req' in local_var_params: + body_params = local_var_params['flash_swap_multi_currency_one_to_many_order_preview_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( + '/flash_swap/multi-currency/one-to-many/order/preview', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapMultiCurrencyOneToManyOrderPreviewResp', # 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 preview_flash_swap_order_v1(self, sell_asset, buy_asset, **kwargs): # noqa: E501 + """Flash Swap - Preview (one-to-one) # noqa: E501 + + Get one-to-one flash swap quote. Either sell_amount or buy_amount must be specified # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_flash_swap_order_v1(sell_asset, buy_asset, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sell_asset: Currency to sell (required) + :param str buy_asset: Currency to buy (required) + :param str sell_amount: Sell amount, either this or buy_amount must be specified + :param str buy_amount: Buy amount, either this or sell_amount must be 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: gate_api.FlashSwapOrderPreviewResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.preview_flash_swap_order_v1_with_http_info(sell_asset, buy_asset, **kwargs) # noqa: E501 + + def preview_flash_swap_order_v1_with_http_info(self, sell_asset, buy_asset, **kwargs): # noqa: E501 + """Flash Swap - Preview (one-to-one) # noqa: E501 + + Get one-to-one flash swap quote. Either sell_amount or buy_amount must be specified # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_flash_swap_order_v1_with_http_info(sell_asset, buy_asset, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sell_asset: Currency to sell (required) + :param str buy_asset: Currency to buy (required) + :param str sell_amount: Sell amount, either this or buy_amount must be specified + :param str buy_amount: Buy amount, either this or sell_amount must be 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(gate_api.FlashSwapOrderPreviewResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sell_asset', + 'buy_asset', + 'sell_amount', + 'buy_amount' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_v1" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'sell_asset' is set + if self.api_client.client_side_validation and ('sell_asset' not in local_var_params or # noqa: E501 + local_var_params['sell_asset'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sell_asset` when calling `preview_flash_swap_order_v1`") # noqa: E501 + # verify the required parameter 'buy_asset' is set + if self.api_client.client_side_validation and ('buy_asset' not in local_var_params or # noqa: E501 + local_var_params['buy_asset'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `buy_asset` when calling `preview_flash_swap_order_v1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'sell_asset' in local_var_params and local_var_params['sell_asset'] is not None: # noqa: E501 + query_params.append(('sell_asset', local_var_params['sell_asset'])) # noqa: E501 + if 'sell_amount' in local_var_params and local_var_params['sell_amount'] is not None: # noqa: E501 + query_params.append(('sell_amount', local_var_params['sell_amount'])) # noqa: E501 + if 'buy_asset' in local_var_params and local_var_params['buy_asset'] is not None: # noqa: E501 + query_params.append(('buy_asset', local_var_params['buy_asset'])) # noqa: E501 + if 'buy_amount' in local_var_params and local_var_params['buy_amount'] is not None: # noqa: E501 + query_params.append(('buy_amount', local_var_params['buy_amount'])) # 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( + '/flash_swap/order/preview', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapOrderPreviewResp', # 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/futures_api.py b/gate_api/api/futures_api.py index df81dcab..6b2d7c4a 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -164,6 +164,134 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def list_futures_contracts_all(self, settle, **kwargs): # noqa: E501 + """Query all contract information (including delisted) # 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_contracts_all(settle, async_req=True) + >>> result = thread.get() + + :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. + :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.Contract] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_contracts_all_with_http_info(settle, **kwargs) # noqa: E501 + + def list_futures_contracts_all_with_http_info(self, settle, **kwargs): # noqa: E501 + """Query all contract information (including delisted) # 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_contracts_all_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :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 + 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.Contract], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + 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_all" % 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_contracts_all`") # 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_all`, 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_all`, 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_all`, 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 '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}/contracts_all', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Contract]', # 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_contract(self, settle, contract, **kwargs): # noqa: E501 """Query single contract information # noqa: E501 @@ -2578,20 +2706,20 @@ def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_leverage(self, settle, contract, **kwargs): # noqa: E501 + def get_leverage(self, settle, contract, pos_margin_mode, dual_side, **kwargs): # noqa: E501 """Get Leverage Information for Specified Mode # noqa: E501 Get Leverage Information for Specified 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_leverage(settle, contract, async_req=True) + >>> thread = api.get_leverage(settle, contract, pos_margin_mode, dual_side, 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 pos_margin_mode: Position Margin Mode, required for split position mode, values: isolated/cross. - :param str dual_side: dual_long - Long, dual_short - Short + :param str pos_margin_mode: Position Margin Mode, required for split position mode, values: isolated/cross. (required) + :param str dual_side: dual_long - Long, dual_short - Short (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2604,22 +2732,22 @@ def get_leverage(self, settle, contract, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_leverage_with_http_info(settle, contract, **kwargs) # noqa: E501 + return self.get_leverage_with_http_info(settle, contract, pos_margin_mode, dual_side, **kwargs) # noqa: E501 - def get_leverage_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + def get_leverage_with_http_info(self, settle, contract, pos_margin_mode, dual_side, **kwargs): # noqa: E501 """Get Leverage Information for Specified Mode # noqa: E501 Get Leverage Information for Specified 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_leverage_with_http_info(settle, contract, async_req=True) + >>> thread = api.get_leverage_with_http_info(settle, contract, pos_margin_mode, dual_side, 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 pos_margin_mode: Position Margin Mode, required for split position mode, values: isolated/cross. - :param str dual_side: dual_long - Long, dual_short - Short + :param str pos_margin_mode: Position Margin Mode, required for split position mode, values: isolated/cross. (required) + :param str dual_side: dual_long - Long, dual_short - Short (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2667,6 +2795,14 @@ def get_leverage_with_http_info(self, settle, contract, **kwargs): # 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_leverage`") # noqa: E501 + # verify the required parameter 'pos_margin_mode' is set + if self.api_client.client_side_validation and ('pos_margin_mode' not in local_var_params or # noqa: E501 + local_var_params['pos_margin_mode'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `pos_margin_mode` when calling `get_leverage`") # 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 # noqa: E501 + local_var_params['dual_side'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `dual_side` when calling `get_leverage`") # noqa: E501 collection_formats = {} @@ -3256,17 +3392,17 @@ def update_position_cross_mode_with_http_info(self, settle, futures_position_cro _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_dual_comp_position_cross_mode(self, settle, inline_object, **kwargs): # noqa: E501 + def update_dual_comp_position_cross_mode(self, settle, update_dual_comp_position_cross_mode_request, **kwargs): # noqa: E501 """Switch Between Cross and Isolated Margin Modes Under Hedge 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_dual_comp_position_cross_mode(settle, inline_object, async_req=True) + >>> thread = api.update_dual_comp_position_cross_mode(settle, update_dual_comp_position_cross_mode_request, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param InlineObject inline_object: (required) + :param UpdateDualCompPositionCrossModeRequest update_dual_comp_position_cross_mode_request: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3279,19 +3415,19 @@ def update_dual_comp_position_cross_mode(self, settle, inline_object, **kwargs): returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.update_dual_comp_position_cross_mode_with_http_info(settle, inline_object, **kwargs) # noqa: E501 + return self.update_dual_comp_position_cross_mode_with_http_info(settle, update_dual_comp_position_cross_mode_request, **kwargs) # noqa: E501 - def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_object, **kwargs): # noqa: E501 + def update_dual_comp_position_cross_mode_with_http_info(self, settle, update_dual_comp_position_cross_mode_request, **kwargs): # noqa: E501 """Switch Between Cross and Isolated Margin Modes Under Hedge 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_dual_comp_position_cross_mode_with_http_info(settle, inline_object, async_req=True) + >>> thread = api.update_dual_comp_position_cross_mode_with_http_info(settle, update_dual_comp_position_cross_mode_request, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param InlineObject inline_object: (required) + :param UpdateDualCompPositionCrossModeRequest update_dual_comp_position_cross_mode_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 @@ -3310,7 +3446,7 @@ def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_obj all_params = [ 'settle', - 'inline_object' + 'update_dual_comp_position_cross_mode_request' ] all_params.extend( [ @@ -3333,10 +3469,10 @@ def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_obj 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 + # verify the required parameter 'update_dual_comp_position_cross_mode_request' is set + if self.api_client.client_side_validation and ('update_dual_comp_position_cross_mode_request' not in local_var_params or # noqa: E501 + local_var_params['update_dual_comp_position_cross_mode_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_dual_comp_position_cross_mode_request` when calling `update_dual_comp_position_cross_mode`") # noqa: E501 collection_formats = {} @@ -3352,8 +3488,8 @@ def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_obj local_var_files = {} body_params = None - if 'inline_object' in local_var_params: - body_params = local_var_params['inline_object'] + if 'update_dual_comp_position_cross_mode_request' in local_var_params: + body_params = local_var_params['update_dual_comp_position_cross_mode_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -4580,6 +4716,7 @@ def cancel_futures_orders(self, settle, **kwargs): # noqa: E501 :param str settle: Settle currency (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 str contract: Contract Identifier; if specified, only cancel pending orders related to this contract + :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 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 @@ -4610,6 +4747,7 @@ def cancel_futures_orders_with_http_info(self, settle, **kwargs): # noqa: E501 :param str settle: Settle currency (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 str contract: Contract Identifier; if specified, only cancel pending orders related to this contract + :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 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 @@ -4633,6 +4771,7 @@ def cancel_futures_orders_with_http_info(self, settle, **kwargs): # noqa: E501 'settle', 'x_gate_exptime', 'contract', + 'action_mode', 'side', 'exclude_reduce_only', 'text' @@ -4668,6 +4807,8 @@ def cancel_futures_orders_with_http_info(self, settle, **kwargs): # 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 '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 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 @@ -4728,7 +4869,7 @@ def get_orders_with_time_range(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.FuturesOrder] + :rtype: list[gate_api.FuturesOrderTimerange] :return: If the method is called asynchronously, returns the request thread. """ @@ -4759,7 +4900,7 @@ def get_orders_with_time_range_with_http_info(self, settle, **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.FuturesOrder], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.FuturesOrderTimerange], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -4841,7 +4982,7 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='list[FuturesOrder]', # noqa: E501 + response_type='list[FuturesOrderTimerange]', # 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 @@ -4992,7 +5133,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. 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: The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -5018,7 +5159,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. 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: The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5114,7 +5255,7 @@ 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. 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: The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. (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 @@ -5141,7 +5282,7 @@ 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. 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: The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. (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 @@ -5253,8 +5394,9 @@ 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. 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: The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. (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 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 _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -5279,8 +5421,9 @@ 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. 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: The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely. (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 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 _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5300,7 +5443,8 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no all_params = [ 'settle', 'order_id', - 'x_gate_exptime' + 'x_gate_exptime', + 'action_mode' ] all_params.extend( [ @@ -5337,6 +5481,8 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no path_params['order_id'] = local_var_params['order_id'] # noqa: E501 query_params = [] + 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: @@ -6892,7 +7038,7 @@ def create_trail_order(self, settle, create_trail_order, **kwargs): # noqa: E50 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse201 + :rtype: gate_api.CreateTrailOrderResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -6919,7 +7065,7 @@ def create_trail_order_with_http_info(self, settle, create_trail_order, **kwargs number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse201, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CreateTrailOrderResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -6991,7 +7137,7 @@ def create_trail_order_with_http_info(self, settle, create_trail_order, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse201', # noqa: E501 + response_type='CreateTrailOrderResponse', # 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 @@ -7017,7 +7163,7 @@ def stop_trail_order(self, settle, stop_trail_order, **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.InlineResponse200 + :rtype: gate_api.TrailOrderResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -7044,7 +7190,7 @@ def stop_trail_order_with_http_info(self, settle, stop_trail_order, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse200, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.TrailOrderResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -7116,7 +7262,7 @@ def stop_trail_order_with_http_info(self, settle, stop_trail_order, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='TrailOrderResponse', # 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 @@ -7142,7 +7288,7 @@ def stop_all_trail_orders(self, settle, stop_all_trail_orders, **kwargs): # noq number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse2001 + :rtype: gate_api.TrailOrderListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -7169,7 +7315,7 @@ def stop_all_trail_orders_with_http_info(self, settle, stop_all_trail_orders, ** number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse2001, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.TrailOrderListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -7241,7 +7387,7 @@ def stop_all_trail_orders_with_http_info(self, settle, stop_all_trail_orders, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2001', # noqa: E501 + response_type='TrailOrderListResponse', # 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 @@ -7278,7 +7424,7 @@ def get_trail_orders(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: gate_api.InlineResponse2001 + :rtype: gate_api.TrailOrderListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -7316,7 +7462,7 @@ def get_trail_orders_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(gate_api.InlineResponse2001, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.TrailOrderListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -7413,7 +7559,7 @@ def get_trail_orders_with_http_info(self, settle, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2001', # noqa: E501 + response_type='TrailOrderListResponse', # 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 @@ -7439,7 +7585,7 @@ def get_trail_order_detail(self, settle, id, **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.InlineResponse2002 + :rtype: gate_api.TrailOrderDetailResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -7466,7 +7612,7 @@ def get_trail_order_detail_with_http_info(self, settle, id, **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.InlineResponse2002, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.TrailOrderDetailResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -7534,7 +7680,7 @@ def get_trail_order_detail_with_http_info(self, settle, id, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2002', # noqa: E501 + response_type='TrailOrderDetailResponse', # 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 @@ -7560,7 +7706,7 @@ def update_trail_order(self, settle, update_trail_order, **kwargs): # noqa: E50 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse200 + :rtype: gate_api.TrailOrderResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -7587,7 +7733,7 @@ def update_trail_order_with_http_info(self, settle, update_trail_order, **kwargs number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse200, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.TrailOrderResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -7659,7 +7805,7 @@ def update_trail_order_with_http_info(self, settle, update_trail_order, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='TrailOrderResponse', # 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 @@ -7687,7 +7833,7 @@ def get_trail_order_change_log(self, settle, id, **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.InlineResponse2003 + :rtype: gate_api.TrailOrderChangeLogResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -7716,7 +7862,7 @@ def get_trail_order_change_log_with_http_info(self, settle, id, **kwargs): # no number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse2003, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.TrailOrderChangeLogResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -7790,7 +7936,7 @@ def get_trail_order_change_log_with_http_info(self, settle, id, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2003', # noqa: E501 + response_type='TrailOrderChangeLogResponse', # 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 @@ -7798,20 +7944,17 @@ def get_trail_order_change_log_with_http_info(self, settle, id, **kwargs): # no _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 - """Query auto order list # noqa: E501 + def create_chase_order(self, settle, create_chase_order_req, **kwargs): # noqa: E501 + """Create a chase 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.list_price_triggered_orders(settle, status, async_req=True) + >>> thread = api.create_chase_order(settle, create_chase_order_req, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (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 returned in a single list - :param int offset: List offset, starting from 0 + :param CreateChaseOrderReq create_chase_order_req: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -7819,27 +7962,24 @@ def list_price_triggered_orders(self, settle, status, **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.FuturesPriceTriggeredOrder] + :rtype: gate_api.CreateChaseOrderResp :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_price_triggered_orders_with_http_info(settle, status, **kwargs) # noqa: E501 + return self.create_chase_order_with_http_info(settle, create_chase_order_req, **kwargs) # noqa: E501 - def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """Query auto order list # noqa: E501 + def create_chase_order_with_http_info(self, settle, create_chase_order_req, **kwargs): # noqa: E501 + """Create a chase 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.list_price_triggered_orders_with_http_info(settle, status, async_req=True) + >>> thread = api.create_chase_order_with_http_info(settle, create_chase_order_req, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (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 returned in a single list - :param int offset: List offset, starting from 0 + :param CreateChaseOrderReq create_chase_order_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 @@ -7849,7 +7989,7 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **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.FuturesPriceTriggeredOrder], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CreateChaseOrderResp, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -7858,10 +7998,7 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): all_params = [ 'settle', - 'status', - 'contract', - 'limit', - 'offset' + 'create_chase_order_req' ] all_params.extend( [ @@ -7876,25 +8013,19 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_price_triggered_orders" % k + " to method create_chase_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 # 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 # 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 + raise ApiValueError("Missing the required parameter `settle` when calling `create_chase_order`") # noqa: E501 + # verify the required parameter 'create_chase_order_req' is set + if self.api_client.client_side_validation and ('create_chase_order_req' not in local_var_params or # noqa: E501 + local_var_params['create_chase_order_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_chase_order_req` when calling `create_chase_order`") # 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 = {} @@ -7902,14 +8033,6 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): path_params['settle'] = local_var_params['settle'] # noqa: E501 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 '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 = {} @@ -7917,22 +8040,28 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): local_var_files = {} body_params = None + if 'create_chase_order_req' in local_var_params: + body_params = local_var_params['create_chase_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}/price_orders', 'GET', + '/futures/{settle}/autoorder/v1/chase/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[FuturesPriceTriggeredOrder]', # noqa: E501 + response_type='CreateChaseOrderResp', # 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 @@ -7940,17 +8069,17 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_price_triggered_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create price-triggered order # noqa: E501 + def stop_chase_order(self, settle, stop_chase_order_req, **kwargs): # noqa: E501 + """Stop a chase 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_price_triggered_order(settle, futures_price_triggered_order, async_req=True) + >>> thread = api.stop_chase_order(settle, stop_chase_order_req, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param FuturesPriceTriggeredOrder futures_price_triggered_order: (required) + :param StopChaseOrderReq stop_chase_order_req: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -7958,24 +8087,24 @@ def create_price_triggered_order(self, settle, futures_price_triggered_order, ** number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.TriggerOrderResponse + :rtype: gate_api.StopChaseOrderResp :return: If the method is called asynchronously, 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.stop_chase_order_with_http_info(settle, stop_chase_order_req, **kwargs) # 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 + def stop_chase_order_with_http_info(self, settle, stop_chase_order_req, **kwargs): # noqa: E501 + """Stop a chase 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_price_triggered_order_with_http_info(settle, futures_price_triggered_order, async_req=True) + >>> thread = api.stop_chase_order_with_http_info(settle, stop_chase_order_req, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param FuturesPriceTriggeredOrder futures_price_triggered_order: (required) + :param StopChaseOrderReq stop_chase_order_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 @@ -7985,7 +8114,7 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.TriggerOrderResponse, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.StopChaseOrderResp, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -7994,7 +8123,7 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig all_params = [ 'settle', - 'futures_price_triggered_order' + 'stop_chase_order_req' ] all_params.extend( [ @@ -8009,18 +8138,18 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_price_triggered_order" % k + " to method stop_chase_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 # 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 # 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 + raise ApiValueError("Missing the required parameter `settle` when calling `stop_chase_order`") # noqa: E501 + # verify the required parameter 'stop_chase_order_req' is set + if self.api_client.client_side_validation and ('stop_chase_order_req' not in local_var_params or # noqa: E501 + local_var_params['stop_chase_order_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stop_chase_order_req` when calling `stop_chase_order`") # noqa: E501 collection_formats = {} @@ -8036,8 +8165,8 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig local_var_files = {} body_params = None - if 'futures_price_triggered_order' in local_var_params: - body_params = local_var_params['futures_price_triggered_order'] + if 'stop_chase_order_req' in local_var_params: + body_params = local_var_params['stop_chase_order_req'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -8050,14 +8179,14 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/futures/{settle}/price_orders', 'POST', + '/futures/{settle}/autoorder/v1/chase/stop', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TriggerOrderResponse', # noqa: E501 + response_type='StopChaseOrderResp', # 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 @@ -8065,17 +8194,17 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def cancel_price_triggered_order_list(self, settle, **kwargs): # noqa: E501 - """Cancel all auto orders # noqa: E501 + def stop_all_chase_orders(self, settle, stop_all_chase_orders_req, **kwargs): # noqa: E501 + """Stop chase orders in batch # 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, async_req=True) + >>> thread = api.stop_all_chase_orders(settle, stop_all_chase_orders_req, 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 StopAllChaseOrdersReq stop_all_chase_orders_req: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -8083,24 +8212,24 @@ def cancel_price_triggered_order_list(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.FuturesPriceTriggeredOrder] + :rtype: gate_api.StopAllChaseOrdersResp :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.cancel_price_triggered_order_list_with_http_info(settle, **kwargs) # noqa: E501 + return self.stop_all_chase_orders_with_http_info(settle, stop_all_chase_orders_req, **kwargs) # noqa: E501 - def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # noqa: E501 - """Cancel all auto orders # noqa: E501 + def stop_all_chase_orders_with_http_info(self, settle, stop_all_chase_orders_req, **kwargs): # noqa: E501 + """Stop chase orders in batch # 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, async_req=True) + >>> thread = api.stop_all_chase_orders_with_http_info(settle, stop_all_chase_orders_req, 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 StopAllChaseOrdersReq stop_all_chase_orders_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 @@ -8110,7 +8239,7 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **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.FuturesPriceTriggeredOrder], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.StopAllChaseOrdersResp, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -8119,7 +8248,7 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # all_params = [ 'settle', - 'contract' + 'stop_all_chase_orders_req' ] all_params.extend( [ @@ -8134,14 +8263,18 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method cancel_price_triggered_order_list" % k + " to method stop_all_chase_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_price_triggered_order_list`") # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `stop_all_chase_orders`") # noqa: E501 + # verify the required parameter 'stop_all_chase_orders_req' is set + if self.api_client.client_side_validation and ('stop_all_chase_orders_req' not in local_var_params or # noqa: E501 + local_var_params['stop_all_chase_orders_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stop_all_chase_orders_req` when calling `stop_all_chase_orders`") # noqa: E501 collection_formats = {} @@ -8150,8 +8283,6 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # 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 header_params = {} @@ -8159,22 +8290,28 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # local_var_files = {} body_params = None + if 'stop_all_chase_orders_req' in local_var_params: + body_params = local_var_params['stop_all_chase_orders_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}/price_orders', 'DELETE', + '/futures/{settle}/autoorder/v1/chase/stop_all', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[FuturesPriceTriggeredOrder]', # noqa: E501 + response_type='StopAllChaseOrdersResp', # 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 @@ -8182,17 +8319,26 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 - """Query single auto order details # noqa: E501 + def get_chase_orders(self, settle, sort_by, **kwargs): # noqa: E501 + """List chase 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.get_price_triggered_order(settle, order_id, async_req=True) + >>> thread = api.get_chase_orders(settle, sort_by, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param int order_id: ID returned when order is successfully created (required) + :param int sort_by: Sort field: 1 ORDER_SORT_CREATED_AT, 2 ORDER_SORT_FINISHED_AT; cannot be 0 (required) + :param str contract: Optional. When non-empty, must be a valid contract (validated against the market cache for the path settle); server-side converted to uppercase + :param bool is_finished: true to query finished orders, false to query in-progress orders + :param int start_at: Lower time bound for the history list, paired with end_at. Required when is_finished is true + :param int end_at: Upper time bound for the history list, paired with start_at. Required when is_finished is true + :param int page_num: Page number, starting from 1 + :param int page_size: Page size; must be between 1 and 100 + :param bool hide_cancel: When true, cancelled orders are hidden in the list + :param int reduce_only: OptionalBool: 0 unknown, 1 true, 2 false; used to filter by reduce-only flag + :param int side: Filter by long/short side: 1 long, 2 short :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -8200,24 +8346,33 @@ def get_price_triggered_order(self, settle, order_id, **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.FuturesPriceTriggeredOrder + :rtype: gate_api.GetChaseOrdersResp :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 + return self.get_chase_orders_with_http_info(settle, sort_by, **kwargs) # noqa: E501 - def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Query single auto order details # noqa: E501 + def get_chase_orders_with_http_info(self, settle, sort_by, **kwargs): # noqa: E501 + """List chase 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.get_price_triggered_order_with_http_info(settle, order_id, async_req=True) + >>> thread = api.get_chase_orders_with_http_info(settle, sort_by, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param int order_id: ID returned when order is successfully created (required) + :param int sort_by: Sort field: 1 ORDER_SORT_CREATED_AT, 2 ORDER_SORT_FINISHED_AT; cannot be 0 (required) + :param str contract: Optional. When non-empty, must be a valid contract (validated against the market cache for the path settle); server-side converted to uppercase + :param bool is_finished: true to query finished orders, false to query in-progress orders + :param int start_at: Lower time bound for the history list, paired with end_at. Required when is_finished is true + :param int end_at: Upper time bound for the history list, paired with start_at. Required when is_finished is true + :param int page_num: Page number, starting from 1 + :param int page_size: Page size; must be between 1 and 100 + :param bool hide_cancel: When true, cancelled orders are hidden in the list + :param int reduce_only: OptionalBool: 0 unknown, 1 true, 2 false; used to filter by reduce-only flag + :param int side: Filter by long/short side: 1 long, 2 short :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -8227,7 +8382,7 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.FuturesPriceTriggeredOrder, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.GetChaseOrdersResp, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -8236,7 +8391,16 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): all_params = [ 'settle', - 'order_id' + 'sort_by', + 'contract', + 'is_finished', + 'start_at', + 'end_at', + 'page_num', + 'page_size', + 'hide_cancel', + 'reduce_only', + 'side' ] all_params.extend( [ @@ -8251,35 +8415,685 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_price_triggered_order" % k + " to method get_chase_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 `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 # 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 - + raise ApiValueError("Missing the required parameter `settle` when calling `get_chase_orders`") # noqa: E501 + # verify the required parameter 'sort_by' is set + if self.api_client.client_side_validation and ('sort_by' not in local_var_params or # noqa: E501 + local_var_params['sort_by'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sort_by` when calling `get_chase_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'page_num' in local_var_params and local_var_params['page_num'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_num` when calling `get_chase_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `get_chase_orders`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `get_chase_orders`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'settle' in local_var_params: path_params['settle'] = local_var_params['settle'] # noqa: E501 - 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 + 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 'is_finished' in local_var_params and local_var_params['is_finished'] is not None: # noqa: E501 + query_params.append(('is_finished', local_var_params['is_finished'])) # noqa: E501 + if 'start_at' in local_var_params and local_var_params['start_at'] is not None: # noqa: E501 + query_params.append(('start_at', local_var_params['start_at'])) # noqa: E501 + if 'end_at' in local_var_params and local_var_params['end_at'] is not None: # noqa: E501 + query_params.append(('end_at', local_var_params['end_at'])) # noqa: E501 + if 'page_num' in local_var_params and local_var_params['page_num'] is not None: # noqa: E501 + query_params.append(('page_num', local_var_params['page_num'])) # noqa: E501 + if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # 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 'hide_cancel' in local_var_params and local_var_params['hide_cancel'] is not None: # noqa: E501 + query_params.append(('hide_cancel', local_var_params['hide_cancel'])) # noqa: E501 + if 'reduce_only' in local_var_params and local_var_params['reduce_only'] is not None: # noqa: E501 + query_params.append(('reduce_only', local_var_params['reduce_only'])) # 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 + + 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}/autoorder/v1/chase/list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetChaseOrdersResp', # 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_chase_order_detail(self, settle, id, **kwargs): # noqa: E501 + """Get chase order 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_chase_order_detail(settle, id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str id: Order ID, must be a non-zero positive integer (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.GetChaseOrderDetailResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_chase_order_detail_with_http_info(settle, id, **kwargs) # noqa: E501 + + def get_chase_order_detail_with_http_info(self, settle, id, **kwargs): # noqa: E501 + """Get chase order 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_chase_order_detail_with_http_info(settle, id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str id: Order ID, must be a non-zero positive integer (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.GetChaseOrderDetailResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + '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_chase_order_detail" % 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_chase_order_detail`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_chase_order_detail`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + 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 + + 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}/autoorder/v1/chase/detail', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetChaseOrderDetailResp', # 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 + """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 + >>> thread = api.list_price_triggered_orders(settle, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (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 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.FuturesPriceTriggeredOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + 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 + """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 + >>> thread = api.list_price_triggered_orders_with_http_info(settle, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (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 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.FuturesPriceTriggeredOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + 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 + ) + 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_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 # 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 = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + 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 '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 = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/price_orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesPriceTriggeredOrder]', # 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_price_triggered_order(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 + >>> thread = api.create_price_triggered_order(settle, futures_price_triggered_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param FuturesPriceTriggeredOrder futures_price_triggered_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.TriggerOrderResponse + :return: If the method is called asynchronously, + 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 + + 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 + >>> thread = api.create_price_triggered_order_with_http_info(settle, futures_price_triggered_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param FuturesPriceTriggeredOrder futures_price_triggered_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.TriggerOrderResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + 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 + ) + 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 `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 # 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 = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + 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 + + # 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}/price_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TriggerOrderResponse', # 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_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, 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 _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.FuturesPriceTriggeredOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + 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, **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, 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 _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.FuturesPriceTriggeredOrder], 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 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 # 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 = {} + + 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 + + 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}/price_orders', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesPriceTriggeredOrder]', # 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_price_triggered_order(self, settle, order_id, **kwargs): # 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 + >>> thread = api.get_price_triggered_order(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param int 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. + :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.FuturesPriceTriggeredOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + 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 + """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 + >>> thread = api.get_price_triggered_order_with_http_info(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param int 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 + 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.FuturesPriceTriggeredOrder, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + 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 + ) + 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_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 # 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 = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + 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 @@ -8424,17 +9238,16 @@ def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_price_triggered_order(self, settle, order_id, futures_update_price_triggered_order, **kwargs): # noqa: E501 + def update_price_triggered_order(self, settle, futures_update_price_triggered_order, **kwargs): # noqa: E501 """Modify a 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 - >>> thread = api.update_price_triggered_order(settle, order_id, futures_update_price_triggered_order, async_req=True) + >>> thread = api.update_price_triggered_order(settle, futures_update_price_triggered_order, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param int order_id: ID returned when order is successfully created (required) :param FuturesUpdatePriceTriggeredOrder futures_update_price_triggered_order: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -8448,19 +9261,18 @@ def update_price_triggered_order(self, settle, order_id, futures_update_price_tr returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.update_price_triggered_order_with_http_info(settle, order_id, futures_update_price_triggered_order, **kwargs) # noqa: E501 + return self.update_price_triggered_order_with_http_info(settle, futures_update_price_triggered_order, **kwargs) # noqa: E501 - def update_price_triggered_order_with_http_info(self, settle, order_id, futures_update_price_triggered_order, **kwargs): # noqa: E501 + def update_price_triggered_order_with_http_info(self, settle, futures_update_price_triggered_order, **kwargs): # noqa: E501 """Modify a 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 - >>> thread = api.update_price_triggered_order_with_http_info(settle, order_id, futures_update_price_triggered_order, async_req=True) + >>> thread = api.update_price_triggered_order_with_http_info(settle, futures_update_price_triggered_order, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param int order_id: ID returned when order is successfully created (required) :param FuturesUpdatePriceTriggeredOrder futures_update_price_triggered_order: (required) :param _return_http_data_only: response data without head status code and headers @@ -8480,7 +9292,6 @@ def update_price_triggered_order_with_http_info(self, settle, order_id, futures_ all_params = [ 'settle', - 'order_id', 'futures_update_price_triggered_order' ] all_params.extend( @@ -8504,10 +9315,6 @@ def update_price_triggered_order_with_http_info(self, settle, order_id, futures_ 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_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 # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `update_price_triggered_order`") # noqa: E501 # verify the required parameter 'futures_update_price_triggered_order' is set if self.api_client.client_side_validation and ('futures_update_price_triggered_order' not in local_var_params or # noqa: E501 local_var_params['futures_update_price_triggered_order'] is None): # noqa: E501 @@ -8518,8 +9325,6 @@ def update_price_triggered_order_with_http_info(self, settle, order_id, futures_ path_params = {} if 'settle' in local_var_params: path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'order_id' in local_var_params: - path_params['order_id'] = local_var_params['order_id'] # noqa: E501 query_params = [] @@ -8543,7 +9348,7 @@ def update_price_triggered_order_with_http_info(self, settle, order_id, futures_ auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/futures/{settle}/price_orders/amend/{order_id}', 'PUT', + '/futures/{settle}/price_orders/amend', 'PUT', path_params, query_params, header_params, diff --git a/gate_api/api/launch_api.py b/gate_api/api/launch_api.py new file mode 100644 index 00000000..bbe52fe2 --- /dev/null +++ b/gate_api/api/launch_api.py @@ -0,0 +1,1998 @@ +# 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 LaunchApi(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_launch_pool_projects(self, **kwargs): # noqa: E501 + """Query LaunchPool project list # noqa: E501 + + Retrieve the list of available LaunchPool projects, including basic project information and reward pool configuration. This endpoint does not require user authentication. # 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_launch_pool_projects(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int status: Filter by project status: 0 for all, 1 for ongoing, 2 for warming up, 3 for ended, 4 for ongoing and warming up + :param str mortgage_coin: Exact match by staking currency + :param str search_coin: Fuzzy match by reward currency and name + :param int limit_rule: Limit rule: 0 for regular pool, 1 for beginner pool + :param int sort_type: Sort type: 1 for max APR descending, 2 for max APR ascending + :param int page: Page number, default 1 + :param int page_size: Number of items per page, default 10, maximum 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.LaunchPoolV4Project] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_launch_pool_projects_with_http_info(**kwargs) # noqa: E501 + + def list_launch_pool_projects_with_http_info(self, **kwargs): # noqa: E501 + """Query LaunchPool project list # noqa: E501 + + Retrieve the list of available LaunchPool projects, including basic project information and reward pool configuration. This endpoint does not require user authentication. # 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_launch_pool_projects_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int status: Filter by project status: 0 for all, 1 for ongoing, 2 for warming up, 3 for ended, 4 for ongoing and warming up + :param str mortgage_coin: Exact match by staking currency + :param str search_coin: Fuzzy match by reward currency and name + :param int limit_rule: Limit rule: 0 for regular pool, 1 for beginner pool + :param int sort_type: Sort type: 1 for max APR descending, 2 for max APR ascending + :param int page: Page number, default 1 + :param int page_size: Number of items per page, default 10, maximum 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.LaunchPoolV4Project], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'mortgage_coin', + 'search_coin', + 'limit_rule', + 'sort_type', + 'page', + 'page_size' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_launch_pool_projects" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'status' in local_var_params and local_var_params['status'] > 4: # noqa: E501 + raise ApiValueError("Invalid value for parameter `status` when calling `list_launch_pool_projects`, must be a value less than or equal to `4`") # noqa: E501 + if self.api_client.client_side_validation and 'status' in local_var_params and local_var_params['status'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `status` when calling `list_launch_pool_projects`, must be a value greater than or equal to `0`") # noqa: E501 + if self.api_client.client_side_validation and 'limit_rule' in local_var_params and local_var_params['limit_rule'] > 2: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit_rule` when calling `list_launch_pool_projects`, must be a value less than or equal to `2`") # noqa: E501 + if self.api_client.client_side_validation and 'limit_rule' in local_var_params and local_var_params['limit_rule'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit_rule` when calling `list_launch_pool_projects`, must be a value greater than or equal to `0`") # noqa: E501 + if self.api_client.client_side_validation and 'sort_type' in local_var_params and local_var_params['sort_type'] > 2: # noqa: E501 + raise ApiValueError("Invalid value for parameter `sort_type` when calling `list_launch_pool_projects`, must be a value less than or equal to `2`") # noqa: E501 + if self.api_client.client_side_validation and 'sort_type' in local_var_params and local_var_params['sort_type'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `sort_type` when calling `list_launch_pool_projects`, 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_launch_pool_projects`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 30: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `list_launch_pool_projects`, must be a value less than or equal to `30`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `list_launch_pool_projects`, 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 'mortgage_coin' in local_var_params and local_var_params['mortgage_coin'] is not None: # noqa: E501 + query_params.append(('mortgageCoin', local_var_params['mortgage_coin'])) # noqa: E501 + if 'search_coin' in local_var_params and local_var_params['search_coin'] is not None: # noqa: E501 + query_params.append(('searchCoin', local_var_params['search_coin'])) # noqa: E501 + if 'limit_rule' in local_var_params and local_var_params['limit_rule'] is not None: # noqa: E501 + query_params.append(('limitRule', local_var_params['limit_rule'])) # noqa: E501 + if 'sort_type' in local_var_params and local_var_params['sort_type'] is not None: # noqa: E501 + query_params.append(('sortType', local_var_params['sort_type'])) # 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 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('pageSize', local_var_params['page_size'])) # 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( + '/launch/project-list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LaunchPoolV4Project]', # 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_launch_pool_order(self, create_order_v4, **kwargs): # noqa: E501 + """Create LaunchPool staking order # noqa: E501 + + Create a new staking order for asset staking mining. This endpoint requires API Key signature authentication. # 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_launch_pool_order(create_order_v4, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateOrderV4 create_order_v4: (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.LaunchPoolV4CreateOrderResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_launch_pool_order_with_http_info(create_order_v4, **kwargs) # noqa: E501 + + def create_launch_pool_order_with_http_info(self, create_order_v4, **kwargs): # noqa: E501 + """Create LaunchPool staking order # noqa: E501 + + Create a new staking order for asset staking mining. This endpoint requires API Key signature authentication. # 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_launch_pool_order_with_http_info(create_order_v4, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateOrderV4 create_order_v4: (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.LaunchPoolV4CreateOrderResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_order_v4' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_launch_pool_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'create_order_v4' is set + if self.api_client.client_side_validation and ('create_order_v4' not in local_var_params or # noqa: E501 + local_var_params['create_order_v4'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_order_v4` when calling `create_launch_pool_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_order_v4' in local_var_params: + body_params = local_var_params['create_order_v4'] + # 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( + '/launch/create-order', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LaunchPoolV4CreateOrderResponse', # 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 redeem_launch_pool(self, redeem_v4, **kwargs): # noqa: E501 + """Redeem LaunchPool staked assets # noqa: E501 + + Redeem staked assets and end staking mining. This endpoint requires API Key signature authentication. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.redeem_launch_pool(redeem_v4, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param RedeemV4 redeem_v4: (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.RedeemLaunchPoolResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.redeem_launch_pool_with_http_info(redeem_v4, **kwargs) # noqa: E501 + + def redeem_launch_pool_with_http_info(self, redeem_v4, **kwargs): # noqa: E501 + """Redeem LaunchPool staked assets # noqa: E501 + + Redeem staked assets and end staking mining. This endpoint requires API Key signature authentication. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.redeem_launch_pool_with_http_info(redeem_v4, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param RedeemV4 redeem_v4: (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.RedeemLaunchPoolResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'redeem_v4' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method redeem_launch_pool" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'redeem_v4' is set + if self.api_client.client_side_validation and ('redeem_v4' not in local_var_params or # noqa: E501 + local_var_params['redeem_v4'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `redeem_v4` when calling `redeem_launch_pool`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'redeem_v4' in local_var_params: + body_params = local_var_params['redeem_v4'] + # 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( + '/launch/redeem', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RedeemLaunchPoolResponse', # 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_launch_pool_pledge_records(self, **kwargs): # noqa: E501 + """Query user pledge records # noqa: E501 + + Query user's staking and redemption operation records. This endpoint requires user authentication. # 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_launch_pool_pledge_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number, default 1 + :param int page_size: Number of items per page, maximum 30 + :param int type: Type: 1 for pledge, 2 for redemption + :param str start_time: Start time, format: YYYY-MM-DD HH:MM:SS + :param str end_time: End time, format: YYYY-MM-DD HH:MM:SS + :param str coin: 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.LaunchPoolV4PledgeRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_launch_pool_pledge_records_with_http_info(**kwargs) # noqa: E501 + + def list_launch_pool_pledge_records_with_http_info(self, **kwargs): # noqa: E501 + """Query user pledge records # noqa: E501 + + Query user's staking and redemption operation records. This endpoint requires user authentication. # 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_launch_pool_pledge_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number, default 1 + :param int page_size: Number of items per page, maximum 30 + :param int type: Type: 1 for pledge, 2 for redemption + :param str start_time: Start time, format: YYYY-MM-DD HH:MM:SS + :param str end_time: End time, format: YYYY-MM-DD HH:MM:SS + :param str coin: 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.LaunchPoolV4PledgeRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'page_size', + 'type', + 'start_time', + 'end_time', + '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_launch_pool_pledge_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_launch_pool_pledge_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 30: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `list_launch_pool_pledge_records`, must be a value less than or equal to `30`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `list_launch_pool_pledge_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'start_time' in local_var_params and not re.search(r'^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$', local_var_params['start_time']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `start_time` when calling `list_launch_pool_pledge_records`, must conform to the pattern `/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/`") # noqa: E501 + if self.api_client.client_side_validation and 'end_time' in local_var_params and not re.search(r'^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$', local_var_params['end_time']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `end_time` when calling `list_launch_pool_pledge_records`, must conform to the pattern `/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/`") # 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 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('pageSize', local_var_params['page_size'])) # 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 'start_time' in local_var_params and local_var_params['start_time'] is not None: # noqa: E501 + query_params.append(('startTime', local_var_params['start_time'])) # noqa: E501 + if 'end_time' in local_var_params and local_var_params['end_time'] is not None: # noqa: E501 + query_params.append(('endTime', local_var_params['end_time'])) # noqa: E501 + if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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( + '/launch/user-pledge-records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LaunchPoolV4PledgeRecord]', # 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_launch_pool_reward_records(self, **kwargs): # noqa: E501 + """Query user reward records # noqa: E501 + + Query the user's staking reward records. This endpoint requires user authentication. # 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_launch_pool_reward_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number, default 1 + :param int page_size: Number of items per page, maximum 30 + :param int start_time: Start timestamp + :param int end_time: End Timestamp + :param str coin: Reward 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.LaunchPoolV4RewardRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_launch_pool_reward_records_with_http_info(**kwargs) # noqa: E501 + + def list_launch_pool_reward_records_with_http_info(self, **kwargs): # noqa: E501 + """Query user reward records # noqa: E501 + + Query the user's staking reward records. This endpoint requires user authentication. # 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_launch_pool_reward_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number, default 1 + :param int page_size: Number of items per page, maximum 30 + :param int start_time: Start timestamp + :param int end_time: End Timestamp + :param str coin: Reward 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.LaunchPoolV4RewardRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'page_size', + 'start_time', + 'end_time', + '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_launch_pool_reward_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_launch_pool_reward_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 30: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `list_launch_pool_reward_records`, must be a value less than or equal to `30`") # noqa: E501 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `list_launch_pool_reward_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 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('pageSize', local_var_params['page_size'])) # noqa: E501 + if 'start_time' in local_var_params and local_var_params['start_time'] is not None: # noqa: E501 + query_params.append(('start_time', local_var_params['start_time'])) # noqa: E501 + if 'end_time' in local_var_params and local_var_params['end_time'] is not None: # noqa: E501 + query_params.append(('end_time', local_var_params['end_time'])) # noqa: E501 + if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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( + '/launch/get-user-reward-records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LaunchPoolV4RewardRecord]', # 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_hodler_airdrop_project_list(self, **kwargs): # noqa: E501 + """Check the list of HODLer Airdrop activities # noqa: E501 + + Get the HODLer Airdrop activity list, which supports filtering by status, currency/project name, and participation status. This interface does not require user login, and logged in users can obtain personal participation 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_hodler_airdrop_project_list(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Activity status filtering, optional values: ACTIVE (in progress + preheating), UNDERWAY (in progress), PREHEAT (preheating), FINISH (ended), return all if not passed + :param str keyword: Currency/project name keywords, fuzzy matching + :param int join: Participation filter: 0 all (default), 1 only participated + :param int page: Page number, default 1 + :param int size: Number of items per page, default 10 + :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.HodlerAirdropV4ProjectItem] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_hodler_airdrop_project_list_with_http_info(**kwargs) # noqa: E501 + + def get_hodler_airdrop_project_list_with_http_info(self, **kwargs): # noqa: E501 + """Check the list of HODLer Airdrop activities # noqa: E501 + + Get the HODLer Airdrop activity list, which supports filtering by status, currency/project name, and participation status. This interface does not require user login, and logged in users can obtain personal participation 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_hodler_airdrop_project_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Activity status filtering, optional values: ACTIVE (in progress + preheating), UNDERWAY (in progress), PREHEAT (preheating), FINISH (ended), return all if not passed + :param str keyword: Currency/project name keywords, fuzzy matching + :param int join: Participation filter: 0 all (default), 1 only participated + :param int page: Page number, default 1 + :param int size: Number of items per page, default 10 + :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.HodlerAirdropV4ProjectItem], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'keyword', + 'join', + 'page', + 'size' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_hodler_airdrop_project_list" % 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_hodler_airdrop_project_list`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_hodler_airdrop_project_list`, 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 'keyword' in local_var_params and local_var_params['keyword'] is not None: # noqa: E501 + query_params.append(('keyword', local_var_params['keyword'])) # noqa: E501 + if 'join' in local_var_params and local_var_params['join'] is not None: # noqa: E501 + query_params.append(('join', local_var_params['join'])) # 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 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # 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( + '/launch/hodler-airdrop/project-list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[HodlerAirdropV4ProjectItem]', # 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 hodler_airdrop_order(self, hodler_airdrop_v4_order_request, **kwargs): # noqa: E501 + """Participate in the HODLer Airdrop event # noqa: E501 + + To participate in designated HODLer Airdrop activities, you need to hold GT. This interface requires user login authentication and must meet KYC requirements. It does not support sub-accounts and enterprise/institutional users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.hodler_airdrop_order(hodler_airdrop_v4_order_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param HodlerAirdropV4OrderRequest hodler_airdrop_v4_order_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.HodlerAirdropV4OrderResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.hodler_airdrop_order_with_http_info(hodler_airdrop_v4_order_request, **kwargs) # noqa: E501 + + def hodler_airdrop_order_with_http_info(self, hodler_airdrop_v4_order_request, **kwargs): # noqa: E501 + """Participate in the HODLer Airdrop event # noqa: E501 + + To participate in designated HODLer Airdrop activities, you need to hold GT. This interface requires user login authentication and must meet KYC requirements. It does not support sub-accounts and enterprise/institutional users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.hodler_airdrop_order_with_http_info(hodler_airdrop_v4_order_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param HodlerAirdropV4OrderRequest hodler_airdrop_v4_order_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.HodlerAirdropV4OrderResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'hodler_airdrop_v4_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 hodler_airdrop_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'hodler_airdrop_v4_order_request' is set + if self.api_client.client_side_validation and ('hodler_airdrop_v4_order_request' not in local_var_params or # noqa: E501 + local_var_params['hodler_airdrop_v4_order_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `hodler_airdrop_v4_order_request` when calling `hodler_airdrop_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'hodler_airdrop_v4_order_request' in local_var_params: + body_params = local_var_params['hodler_airdrop_v4_order_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( + '/launch/hodler-airdrop/order', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HodlerAirdropV4OrderResponse', # 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_hodler_airdrop_user_order_records(self, **kwargs): # noqa: E501 + """Check HODLer Airdrop participation records # noqa: E501 + + Query the user's HODLer Airdrop participation record and return the effective holdings and airdrop amount of each activity. This interface requires user login authentication. # 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_hodler_airdrop_user_order_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str keyword: Currency name keyword filtering + :param int start_timest: Start timestamp (seconds) + :param int end_timest: end timestamp (seconds) + :param int page: Page number, default 1 + :param int size: Number of items per page, default 10 + :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.HodlerAirdropV4UserOrderRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_hodler_airdrop_user_order_records_with_http_info(**kwargs) # noqa: E501 + + def get_hodler_airdrop_user_order_records_with_http_info(self, **kwargs): # noqa: E501 + """Check HODLer Airdrop participation records # noqa: E501 + + Query the user's HODLer Airdrop participation record and return the effective holdings and airdrop amount of each activity. This interface requires user login authentication. # 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_hodler_airdrop_user_order_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str keyword: Currency name keyword filtering + :param int start_timest: Start timestamp (seconds) + :param int end_timest: end timestamp (seconds) + :param int page: Page number, default 1 + :param int size: Number of items per page, default 10 + :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.HodlerAirdropV4UserOrderRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'keyword', + 'start_timest', + 'end_timest', + 'page', + 'size' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_hodler_airdrop_user_order_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_hodler_airdrop_user_order_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_hodler_airdrop_user_order_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'keyword' in local_var_params and local_var_params['keyword'] is not None: # noqa: E501 + query_params.append(('keyword', local_var_params['keyword'])) # noqa: E501 + if 'start_timest' in local_var_params and local_var_params['start_timest'] is not None: # noqa: E501 + query_params.append(('start_timest', local_var_params['start_timest'])) # noqa: E501 + if 'end_timest' in local_var_params and local_var_params['end_timest'] is not None: # noqa: E501 + query_params.append(('end_timest', local_var_params['end_timest'])) # 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 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # 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( + '/launch/hodler-airdrop/user-order-records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[HodlerAirdropV4UserOrderRecord]', # 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_hodler_airdrop_user_airdrop_records(self, **kwargs): # noqa: E501 + """Query HODLer Airdrop records # noqa: E501 + + Query the HODLer Airdrop airdrop distribution record that the user has obtained, including basic airdrops, additional airdrops and automatic redemption status. This interface requires user login authentication. # 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_hodler_airdrop_user_airdrop_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str keyword: Currency name keyword filtering + :param int start_timest: Start timestamp (seconds) + :param int end_timest: end timestamp (seconds) + :param int page: Page number, default 1 + :param int size: Number of items per page, default 10 + :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.HodlerAirdropV4UserAirdropRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_hodler_airdrop_user_airdrop_records_with_http_info(**kwargs) # noqa: E501 + + def get_hodler_airdrop_user_airdrop_records_with_http_info(self, **kwargs): # noqa: E501 + """Query HODLer Airdrop records # noqa: E501 + + Query the HODLer Airdrop airdrop distribution record that the user has obtained, including basic airdrops, additional airdrops and automatic redemption status. This interface requires user login authentication. # 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_hodler_airdrop_user_airdrop_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str keyword: Currency name keyword filtering + :param int start_timest: Start timestamp (seconds) + :param int end_timest: end timestamp (seconds) + :param int page: Page number, default 1 + :param int size: Number of items per page, default 10 + :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.HodlerAirdropV4UserAirdropRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'keyword', + 'start_timest', + 'end_timest', + 'page', + 'size' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_hodler_airdrop_user_airdrop_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_hodler_airdrop_user_airdrop_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_hodler_airdrop_user_airdrop_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'keyword' in local_var_params and local_var_params['keyword'] is not None: # noqa: E501 + query_params.append(('keyword', local_var_params['keyword'])) # noqa: E501 + if 'start_timest' in local_var_params and local_var_params['start_timest'] is not None: # noqa: E501 + query_params.append(('start_timest', local_var_params['start_timest'])) # noqa: E501 + if 'end_timest' in local_var_params and local_var_params['end_timest'] is not None: # noqa: E501 + query_params.append(('end_timest', local_var_params['end_timest'])) # 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 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # 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( + '/launch/hodler-airdrop/user-airdrop-records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[HodlerAirdropV4UserAirdropRecord]', # 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_candy_drop_activity_list_v4(self, **kwargs): # noqa: E501 + """Query activity list # noqa: E501 + + Supports multi-dimensional filtering of CandyDrop activities, and each query returns the top ten data sorted by the list. No login required. # 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_candy_drop_activity_list_v4(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Activity status filtering: ongoing (in progress), upcoming (about to start), ended (ended), if not passed, all will be returned + :param str rule_name: Task type filtering: spot (spot), futures (contract), deposit (recharge), invite (invitation), trading_bot (trading robot), simple_earn (Yu Bibao), first_deposit (first deposit), alpha (Alpha), flash_swap (flash swap), tradfi (TradFi), etf (ETF) + :param str register_status: Participation status screening: registered (already participated), unregistered (not participated), if not passed, all will be returned + :param str currency: Currency name filter + :param int limit: Number of items returned, default 10, maximum 30 + :param int offset: Offset, default 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.CandyDropV4ActivityCd01] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_candy_drop_activity_list_v4_with_http_info(**kwargs) # noqa: E501 + + def get_candy_drop_activity_list_v4_with_http_info(self, **kwargs): # noqa: E501 + """Query activity list # noqa: E501 + + Supports multi-dimensional filtering of CandyDrop activities, and each query returns the top ten data sorted by the list. No login required. # 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_candy_drop_activity_list_v4_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Activity status filtering: ongoing (in progress), upcoming (about to start), ended (ended), if not passed, all will be returned + :param str rule_name: Task type filtering: spot (spot), futures (contract), deposit (recharge), invite (invitation), trading_bot (trading robot), simple_earn (Yu Bibao), first_deposit (first deposit), alpha (Alpha), flash_swap (flash swap), tradfi (TradFi), etf (ETF) + :param str register_status: Participation status screening: registered (already participated), unregistered (not participated), if not passed, all will be returned + :param str currency: Currency name filter + :param int limit: Number of items returned, default 10, maximum 30 + :param int offset: Offset, default 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.CandyDropV4ActivityCd01], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'rule_name', + 'register_status', + 'currency', + '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_candy_drop_activity_list_v4" % 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'] > 30: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_candy_drop_activity_list_v4`, must be a value less than or equal to `30`") # 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_candy_drop_activity_list_v4`, 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_candy_drop_activity_list_v4`, 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 'rule_name' in local_var_params and local_var_params['rule_name'] is not None: # noqa: E501 + query_params.append(('rule_name', local_var_params['rule_name'])) # noqa: E501 + if 'register_status' in local_var_params and local_var_params['register_status'] is not None: # noqa: E501 + query_params.append(('register_status', local_var_params['register_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 + + 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( + '/launch/candydrop/activity-list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CandyDropV4ActivityCd01]', # 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 register_candy_drop_v4(self, candy_drop_v4_register_req_cd02, **kwargs): # noqa: E501 + """Sign up for events # noqa: E501 + + Sign up for select CandyDrop events. Login is required and API Key signature authentication is required. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.register_candy_drop_v4(candy_drop_v4_register_req_cd02, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CandyDropV4RegisterReqCd02 candy_drop_v4_register_req_cd02: (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.CandyDropV4RegisterRespCd02 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.register_candy_drop_v4_with_http_info(candy_drop_v4_register_req_cd02, **kwargs) # noqa: E501 + + def register_candy_drop_v4_with_http_info(self, candy_drop_v4_register_req_cd02, **kwargs): # noqa: E501 + """Sign up for events # noqa: E501 + + Sign up for select CandyDrop events. Login is required and API Key signature authentication is required. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.register_candy_drop_v4_with_http_info(candy_drop_v4_register_req_cd02, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CandyDropV4RegisterReqCd02 candy_drop_v4_register_req_cd02: (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.CandyDropV4RegisterRespCd02, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'candy_drop_v4_register_req_cd02' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method register_candy_drop_v4" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'candy_drop_v4_register_req_cd02' is set + if self.api_client.client_side_validation and ('candy_drop_v4_register_req_cd02' not in local_var_params or # noqa: E501 + local_var_params['candy_drop_v4_register_req_cd02'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `candy_drop_v4_register_req_cd02` when calling `register_candy_drop_v4`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'candy_drop_v4_register_req_cd02' in local_var_params: + body_params = local_var_params['candy_drop_v4_register_req_cd02'] + # 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( + '/launch/candydrop/register', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CandyDropV4RegisterRespCd02', # 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_candy_drop_activity_rules_v4(self, **kwargs): # noqa: E501 + """Query activity rules # noqa: E501 + + Query the rules of a specific activity, including prize pool and corresponding task data. No login required. # 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_candy_drop_activity_rules_v4(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int activity_id: Activity ID, choose one from currency, at least one of them must be passed + :param str currency: Project/currency name, choose one from activity_id, at least one of them must be passed + :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.CandyDropV4ActivityRulesCd03 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_candy_drop_activity_rules_v4_with_http_info(**kwargs) # noqa: E501 + + def get_candy_drop_activity_rules_v4_with_http_info(self, **kwargs): # noqa: E501 + """Query activity rules # noqa: E501 + + Query the rules of a specific activity, including prize pool and corresponding task data. No login required. # 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_candy_drop_activity_rules_v4_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int activity_id: Activity ID, choose one from currency, at least one of them must be passed + :param str currency: Project/currency name, choose one from activity_id, at least one of them must be passed + :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.CandyDropV4ActivityRulesCd03, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'activity_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 get_candy_drop_activity_rules_v4" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'activity_id' in local_var_params and local_var_params['activity_id'] is not None: # noqa: E501 + query_params.append(('activity_id', local_var_params['activity_id'])) # 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 = [] # noqa: E501 + + return self.api_client.call_api( + '/launch/candydrop/activity-rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CandyDropV4ActivityRulesCd03', # 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_candy_drop_task_progress_v4(self, **kwargs): # noqa: E501 + """Query task completion progress # noqa: E501 + + Check the completion progress of tasks that are in progress and have been registered/participated. Login required. # 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_candy_drop_task_progress_v4(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int activity_id: Activity ID, choose one from currency, at least one of them must be passed + :param str currency: Project/currency name, choose one from activity_id, at least one of them must be passed + :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.CandyDropV4TaskProgressCd04 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_candy_drop_task_progress_v4_with_http_info(**kwargs) # noqa: E501 + + def get_candy_drop_task_progress_v4_with_http_info(self, **kwargs): # noqa: E501 + """Query task completion progress # noqa: E501 + + Check the completion progress of tasks that are in progress and have been registered/participated. Login required. # 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_candy_drop_task_progress_v4_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int activity_id: Activity ID, choose one from currency, at least one of them must be passed + :param str currency: Project/currency name, choose one from activity_id, at least one of them must be passed + :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.CandyDropV4TaskProgressCd04, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'activity_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 get_candy_drop_task_progress_v4" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'activity_id' in local_var_params and local_var_params['activity_id'] is not None: # noqa: E501 + query_params.append(('activity_id', local_var_params['activity_id'])) # 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( + '/launch/candydrop/task-progress', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CandyDropV4TaskProgressCd04', # 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_candy_drop_participation_records_v4(self, **kwargs): # noqa: E501 + """Query participation records # noqa: E501 + + Query the user's CandyDrop participation details. Login required. # 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_candy_drop_participation_records_v4(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name filter + :param str status: Status filtering: ongoing (in progress), awaiting_draw (to be drawn), won (already won), not_win (not won) + :param int start_time: Start time (Unix timestamp seconds) + :param int end_time: End time (Unix timestamp seconds) + :param int page: Page number, default 1 + :param int limit: Number of items per page, default 10, maximum 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.CandyDropV4ParticipationRecordCd05] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_candy_drop_participation_records_v4_with_http_info(**kwargs) # noqa: E501 + + def get_candy_drop_participation_records_v4_with_http_info(self, **kwargs): # noqa: E501 + """Query participation records # noqa: E501 + + Query the user's CandyDrop participation details. Login required. # 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_candy_drop_participation_records_v4_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name filter + :param str status: Status filtering: ongoing (in progress), awaiting_draw (to be drawn), won (already won), not_win (not won) + :param int start_time: Start time (Unix timestamp seconds) + :param int end_time: End time (Unix timestamp seconds) + :param int page: Page number, default 1 + :param int limit: Number of items per page, default 10, maximum 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.CandyDropV4ParticipationRecordCd05], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'status', + 'start_time', + 'end_time', + '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_candy_drop_participation_records_v4" % 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_candy_drop_participation_records_v4`, 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'] > 30: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_candy_drop_participation_records_v4`, must be a value less than or equal to `30`") # 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_candy_drop_participation_records_v4`, 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 '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 'start_time' in local_var_params and local_var_params['start_time'] is not None: # noqa: E501 + query_params.append(('start_time', local_var_params['start_time'])) # noqa: E501 + if 'end_time' in local_var_params and local_var_params['end_time'] is not None: # noqa: E501 + query_params.append(('end_time', local_var_params['end_time'])) # 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( + '/launch/candydrop/participation-records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CandyDropV4ParticipationRecordCd05]', # 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_candy_drop_airdrop_records_v4(self, **kwargs): # noqa: E501 + """Query airdrop records # noqa: E501 + + Query the user's CandyDrop airdrop details. Login required. # 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_candy_drop_airdrop_records_v4(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name filter + :param int start_time: Start time (Unix timestamp seconds) + :param int end_time: End time (Unix timestamp seconds) + :param int page: Page number, default 1 + :param int limit: Number of items per page, default 10, maximum 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.CandyDropV4AirdropRecordCd06] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_candy_drop_airdrop_records_v4_with_http_info(**kwargs) # noqa: E501 + + def get_candy_drop_airdrop_records_v4_with_http_info(self, **kwargs): # noqa: E501 + """Query airdrop records # noqa: E501 + + Query the user's CandyDrop airdrop details. Login required. # 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_candy_drop_airdrop_records_v4_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name filter + :param int start_time: Start time (Unix timestamp seconds) + :param int end_time: End time (Unix timestamp seconds) + :param int page: Page number, default 1 + :param int limit: Number of items per page, default 10, maximum 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.CandyDropV4AirdropRecordCd06], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'start_time', + 'end_time', + '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_candy_drop_airdrop_records_v4" % 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_candy_drop_airdrop_records_v4`, 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'] > 30: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_candy_drop_airdrop_records_v4`, must be a value less than or equal to `30`") # 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_candy_drop_airdrop_records_v4`, 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 'start_time' in local_var_params and local_var_params['start_time'] is not None: # noqa: E501 + query_params.append(('start_time', local_var_params['start_time'])) # noqa: E501 + if 'end_time' in local_var_params and local_var_params['end_time'] is not None: # noqa: E501 + query_params.append(('end_time', local_var_params['end_time'])) # 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( + '/launch/candydrop/airdrop-records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CandyDropV4AirdropRecordCd06]', # 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/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py index 03dbbe36..4f5443f0 100644 --- a/gate_api/api/multi_collateral_loan_api.py +++ b/gate_api/api/multi_collateral_loan_api.py @@ -1344,7 +1344,7 @@ def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 >>> 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 list[str] currencies: Specify currency name query array, separated by commas, maximum 100 (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 @@ -1370,7 +1370,7 @@ def get_multi_collateral_current_rate_with_http_info(self, currencies, **kwargs) >>> 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 list[str] currencies: Specify currency name query array, separated by commas, maximum 100 (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 diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py index f3a85d20..b5da1193 100644 --- a/gate_api/api/options_api.py +++ b/gate_api/api/options_api.py @@ -2729,18 +2729,18 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def amend_options_order(self, order_id, inline_object1, **kwargs): # noqa: E501 + def amend_options_order(self, order_id, amend_options_order_request, **kwargs): # noqa: E501 """Option Order Modification # noqa: E501 Modify the order price and/or quantity of a specified order; only orders with status 'open' are 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.amend_options_order(order_id, inline_object1, async_req=True) + >>> thread = api.amend_options_order(order_id, amend_options_order_request, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param int order_id: Order ID returned when order is successfully created (required) - :param InlineObject1 inline_object1: (required) + :param AmendOptionsOrderRequest amend_options_order_request: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2753,20 +2753,20 @@ def amend_options_order(self, order_id, inline_object1, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.amend_options_order_with_http_info(order_id, inline_object1, **kwargs) # noqa: E501 + return self.amend_options_order_with_http_info(order_id, amend_options_order_request, **kwargs) # noqa: E501 - def amend_options_order_with_http_info(self, order_id, inline_object1, **kwargs): # noqa: E501 + def amend_options_order_with_http_info(self, order_id, amend_options_order_request, **kwargs): # noqa: E501 """Option Order Modification # noqa: E501 Modify the order price and/or quantity of a specified order; only orders with status 'open' are 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.amend_options_order_with_http_info(order_id, inline_object1, async_req=True) + >>> thread = api.amend_options_order_with_http_info(order_id, amend_options_order_request, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param int order_id: Order ID returned when order is successfully created (required) - :param InlineObject1 inline_object1: (required) + :param AmendOptionsOrderRequest amend_options_order_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 @@ -2785,7 +2785,7 @@ def amend_options_order_with_http_info(self, order_id, inline_object1, **kwargs) all_params = [ 'order_id', - 'inline_object1' + 'amend_options_order_request' ] all_params.extend( [ @@ -2808,10 +2808,10 @@ def amend_options_order_with_http_info(self, order_id, inline_object1, **kwargs) 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_options_order`") # noqa: E501 - # verify the required parameter 'inline_object1' is set - if self.api_client.client_side_validation and ('inline_object1' not in local_var_params or # noqa: E501 - local_var_params['inline_object1'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `inline_object1` when calling `amend_options_order`") # noqa: E501 + # verify the required parameter 'amend_options_order_request' is set + if self.api_client.client_side_validation and ('amend_options_order_request' not in local_var_params or # noqa: E501 + local_var_params['amend_options_order_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `amend_options_order_request` when calling `amend_options_order`") # noqa: E501 collection_formats = {} @@ -2827,8 +2827,8 @@ def amend_options_order_with_http_info(self, order_id, inline_object1, **kwargs) local_var_files = {} body_params = None - if 'inline_object1' in local_var_params: - body_params = local_var_params['inline_object1'] + if 'amend_options_order_request' in local_var_params: + body_params = local_var_params['amend_options_order_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/gate_api/api/otc_api.py b/gate_api/api/otc_api.py index a1438ea4..fbbfccd2 100644 --- a/gate_api/api/otc_api.py +++ b/gate_api/api/otc_api.py @@ -54,7 +54,7 @@ def create_otc_quote(self, otc_quote_request, **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.InlineResponse2006 + :rtype: gate_api.OtcQuoteResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -81,7 +81,7 @@ def create_otc_quote_with_http_info(self, otc_quote_request, **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.InlineResponse2006, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcQuoteResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -146,7 +146,7 @@ def create_otc_quote_with_http_info(self, otc_quote_request, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2006', # noqa: E501 + response_type='OtcQuoteResponse', # 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 @@ -172,7 +172,7 @@ def create_otc_order(self, otc_order_request, **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.InlineResponse2007 + :rtype: gate_api.OtcActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -199,7 +199,7 @@ def create_otc_order_with_http_info(self, otc_order_request, **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.InlineResponse2007, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -264,7 +264,7 @@ def create_otc_order_with_http_info(self, otc_order_request, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2007', # noqa: E501 + response_type='OtcActionResponse', # 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 @@ -290,7 +290,7 @@ def create_stable_coin_order(self, otc_stable_coin_order_request, **kwargs): # number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse2008 + :rtype: gate_api.OtcStableCoinOrderCreateResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -317,7 +317,7 @@ def create_stable_coin_order_with_http_info(self, otc_stable_coin_order_request, number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse2008, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcStableCoinOrderCreateResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -382,7 +382,7 @@ def create_stable_coin_order_with_http_info(self, otc_stable_coin_order_request, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2008', # noqa: E501 + response_type='OtcStableCoinOrderCreateResponse', # 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 @@ -390,13 +390,13 @@ def create_stable_coin_order_with_http_info(self, otc_stable_coin_order_request, _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_default_bank(self, **kwargs): # noqa: E501 - """Get user's default bank account information # noqa: E501 + def get_bank_list_inner_path(self, **kwargs): # noqa: E501 + """Get user bank card list # noqa: E501 - Get user's default bank account information for order placement # noqa: E501 + Retrieve the user's bank card list, used to select a bank card when placing an order. **Default card**: refer to the list item field `is_default` (1=default); there is no need to call the deprecated standalone \"default bank card\" endpoint. Corresponding Inner: `GET /bank_list` or `GET /bank/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_user_default_bank(async_req=True) + >>> thread = api.get_bank_list_inner_path(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously @@ -407,20 +407,20 @@ def get_user_default_bank(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.InlineResponse2009 + :rtype: gate_api.OtcBankListResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_user_default_bank_with_http_info(**kwargs) # noqa: E501 + return self.get_bank_list_inner_path_with_http_info(**kwargs) # noqa: E501 - def get_user_default_bank_with_http_info(self, **kwargs): # noqa: E501 - """Get user's default bank account information # noqa: E501 + def get_bank_list_inner_path_with_http_info(self, **kwargs): # noqa: E501 + """Get user bank card list # noqa: E501 - Get user's default bank account information for order placement # noqa: E501 + Retrieve the user's bank card list, used to select a bank card when placing an order. **Default card**: refer to the list item field `is_default` (1=default); there is no need to call the deprecated standalone \"default bank card\" endpoint. Corresponding Inner: `GET /bank_list` or `GET /bank/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_user_default_bank_with_http_info(async_req=True) + >>> thread = api.get_bank_list_inner_path_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously @@ -433,7 +433,7 @@ def get_user_default_bank_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.InlineResponse2009, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcBankListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -455,7 +455,7 @@ def get_user_default_bank_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_user_default_bank" % k + " to method get_bank_list_inner_path" % k ) local_var_params[k] = v del local_var_params['kwargs'] @@ -480,14 +480,14 @@ def get_user_default_bank_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/otc/get_user_def_bank', 'GET', + '/otc/bank/list', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2009', # noqa: E501 + response_type='OtcBankListResponse', # 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 @@ -495,16 +495,26 @@ def get_user_default_bank_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_bank_list(self, **kwargs): # noqa: E501 - """Get user bank card list # noqa: E501 + def create_otc_bank(self, bank_account_name, bank_name, bank_country, bank_address, iban, swift, documentation_file, **kwargs): # noqa: E501 + """Create bank card # noqa: E501 - Get user bank card list for selecting bank card when placing orders # noqa: E501 + Bind a bank card. Under the Global entity, an account with a non-matching name may enter manual review (`status` pending) and require subsequent supplementary materials. Corresponding Inner: `POST /bank/create`. Fields and protocol are subject to the production form/gateway; in some environments `bank_account_name` is passed Base64-encoded, see the integration notes 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.get_bank_list(async_req=True) + >>> thread = api.create_otc_bank(bank_account_name, bank_name, bank_country, bank_address, iban, swift, documentation_file, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously + :param str bank_account_name: (required) + :param str bank_name: (required) + :param str bank_country: (required) + :param str bank_address: (required) + :param str iban: (required) + :param str swift: (required) + :param str documentation_file: 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) (required) + :param str remittance_line_number: + :param str agent_bank_name: + :param str agent_bank_swift: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -512,23 +522,558 @@ def get_bank_list(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.InlineResponse20010 + :rtype: gate_api.OtcBankCreateResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_bank_list_with_http_info(**kwargs) # noqa: E501 + return self.create_otc_bank_with_http_info(bank_account_name, bank_name, bank_country, bank_address, iban, swift, documentation_file, **kwargs) # noqa: E501 - def get_bank_list_with_http_info(self, **kwargs): # noqa: E501 - """Get user bank card list # noqa: E501 + def create_otc_bank_with_http_info(self, bank_account_name, bank_name, bank_country, bank_address, iban, swift, documentation_file, **kwargs): # noqa: E501 + """Create bank card # noqa: E501 + + Bind a bank card. Under the Global entity, an account with a non-matching name may enter manual review (`status` pending) and require subsequent supplementary materials. Corresponding Inner: `POST /bank/create`. Fields and protocol are subject to the production form/gateway; in some environments `bank_account_name` is passed Base64-encoded, see the integration notes 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.create_otc_bank_with_http_info(bank_account_name, bank_name, bank_country, bank_address, iban, swift, documentation_file, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str bank_account_name: (required) + :param str bank_name: (required) + :param str bank_country: (required) + :param str bank_address: (required) + :param str iban: (required) + :param str swift: (required) + :param str documentation_file: 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) (required) + :param str remittance_line_number: + :param str agent_bank_name: + :param str agent_bank_swift: + :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.OtcBankCreateResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'bank_account_name', + 'bank_name', + 'bank_country', + 'bank_address', + 'iban', + 'swift', + 'documentation_file', + 'remittance_line_number', + 'agent_bank_name', + 'agent_bank_swift' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_otc_bank" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'bank_account_name' is set + if self.api_client.client_side_validation and ('bank_account_name' not in local_var_params or # noqa: E501 + local_var_params['bank_account_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bank_account_name` when calling `create_otc_bank`") # noqa: E501 + # verify the required parameter 'bank_name' is set + if self.api_client.client_side_validation and ('bank_name' not in local_var_params or # noqa: E501 + local_var_params['bank_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bank_name` when calling `create_otc_bank`") # noqa: E501 + # verify the required parameter 'bank_country' is set + if self.api_client.client_side_validation and ('bank_country' not in local_var_params or # noqa: E501 + local_var_params['bank_country'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bank_country` when calling `create_otc_bank`") # noqa: E501 + # verify the required parameter 'bank_address' is set + if self.api_client.client_side_validation and ('bank_address' not in local_var_params or # noqa: E501 + local_var_params['bank_address'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bank_address` when calling `create_otc_bank`") # noqa: E501 + # verify the required parameter 'iban' is set + if self.api_client.client_side_validation and ('iban' not in local_var_params or # noqa: E501 + local_var_params['iban'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `iban` when calling `create_otc_bank`") # noqa: E501 + # verify the required parameter 'swift' is set + if self.api_client.client_side_validation and ('swift' not in local_var_params or # noqa: E501 + local_var_params['swift'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `swift` when calling `create_otc_bank`") # noqa: E501 + # verify the required parameter 'documentation_file' is set + if self.api_client.client_side_validation and ('documentation_file' not in local_var_params or # noqa: E501 + local_var_params['documentation_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `documentation_file` when calling `create_otc_bank`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'bank_account_name' in local_var_params: + form_params.append(('bank_account_name', local_var_params['bank_account_name'])) # noqa: E501 + if 'bank_name' in local_var_params: + form_params.append(('bank_name', local_var_params['bank_name'])) # noqa: E501 + if 'bank_country' in local_var_params: + form_params.append(('bank_country', local_var_params['bank_country'])) # noqa: E501 + if 'bank_address' in local_var_params: + form_params.append(('bank_address', local_var_params['bank_address'])) # noqa: E501 + if 'iban' in local_var_params: + form_params.append(('iban', local_var_params['iban'])) # noqa: E501 + if 'swift' in local_var_params: + form_params.append(('swift', local_var_params['swift'])) # noqa: E501 + if 'remittance_line_number' in local_var_params: + form_params.append(('remittance_line_number', local_var_params['remittance_line_number'])) # noqa: E501 + if 'agent_bank_name' in local_var_params: + form_params.append(('agent_bank_name', local_var_params['agent_bank_name'])) # noqa: E501 + if 'agent_bank_swift' in local_var_params: + form_params.append(('agent_bank_swift', local_var_params['agent_bank_swift'])) # noqa: E501 + if 'documentation_file' in local_var_params: + form_params.append(('documentation_file', local_var_params['documentation_file'])) # noqa: E501 + + body_params = None + # 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 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/otc/bank/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtcBankCreateResponse', # 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 delete_otc_bank(self, otc_bank_id_request, **kwargs): # noqa: E501 + """Delete bank card # noqa: E501 + + Delete the specified bank card. Corresponds to Inner: `POST /bank/delete`. # 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_otc_bank(otc_bank_id_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OtcBankIdRequest otc_bank_id_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.OtcActionResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_otc_bank_with_http_info(otc_bank_id_request, **kwargs) # noqa: E501 + + def delete_otc_bank_with_http_info(self, otc_bank_id_request, **kwargs): # noqa: E501 + """Delete bank card # noqa: E501 + + Delete the specified bank card. Corresponds to Inner: `POST /bank/delete`. # 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_otc_bank_with_http_info(otc_bank_id_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OtcBankIdRequest otc_bank_id_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.OtcActionResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'otc_bank_id_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 delete_otc_bank" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'otc_bank_id_request' is set + if self.api_client.client_side_validation and ('otc_bank_id_request' not in local_var_params or # noqa: E501 + local_var_params['otc_bank_id_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `otc_bank_id_request` when calling `delete_otc_bank`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'otc_bank_id_request' in local_var_params: + body_params = local_var_params['otc_bank_id_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( + '/otc/bank/delete', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtcActionResponse', # 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_default_otc_bank(self, otc_bank_id_request, **kwargs): # noqa: E501 + """Set default bank card # noqa: E501 + + Set the specified bank card as default. Corresponds to Inner: `POST /bank/set_default`. # 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_default_otc_bank(otc_bank_id_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OtcBankIdRequest otc_bank_id_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.OtcActionResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_default_otc_bank_with_http_info(otc_bank_id_request, **kwargs) # noqa: E501 + + def set_default_otc_bank_with_http_info(self, otc_bank_id_request, **kwargs): # noqa: E501 + """Set default bank card # noqa: E501 + + Set the specified bank card as default. Corresponds to Inner: `POST /bank/set_default`. # 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_default_otc_bank_with_http_info(otc_bank_id_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OtcBankIdRequest otc_bank_id_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.OtcActionResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'otc_bank_id_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 set_default_otc_bank" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'otc_bank_id_request' is set + if self.api_client.client_side_validation and ('otc_bank_id_request' not in local_var_params or # noqa: E501 + local_var_params['otc_bank_id_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `otc_bank_id_request` when calling `set_default_otc_bank`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] - Get user bank card list for selecting bank card when placing orders # noqa: E501 + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'otc_bank_id_request' in local_var_params: + body_params = local_var_params['otc_bank_id_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( + '/otc/bank/set_default', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtcActionResponse', # 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_otc_bank_supplement_checklist(self, bank_id, **kwargs): # noqa: E501 + """Query the checklist of materials to supplement for a bank card # noqa: E501 + + **①** `bank_id` must be specified: after verifying that the card belongs to the current user and its status allows supplementation, returns the items to be supplemented and whether each sub-item is required, based on the user's **passed professional verification type** (personal/enterprise). Corresponding Inner: `GET /bank/bank_supplement_checklist`. # 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_otc_bank_supplement_checklist(bank_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str bank_id: Bank card ID (otc_rds / the id returned by the list endpoint). (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.OtcBankSupplementChecklistResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_otc_bank_supplement_checklist_with_http_info(bank_id, **kwargs) # noqa: E501 + + def get_otc_bank_supplement_checklist_with_http_info(self, bank_id, **kwargs): # noqa: E501 + """Query the checklist of materials to supplement for a bank card # noqa: E501 + + **①** `bank_id` must be specified: after verifying that the card belongs to the current user and its status allows supplementation, returns the items to be supplemented and whether each sub-item is required, based on the user's **passed professional verification type** (personal/enterprise). Corresponding Inner: `GET /bank/bank_supplement_checklist`. # 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_otc_bank_supplement_checklist_with_http_info(bank_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str bank_id: Bank card ID (otc_rds / the id returned by the list endpoint). (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.OtcBankSupplementChecklistResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'bank_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_otc_bank_supplement_checklist" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'bank_id' is set + if self.api_client.client_side_validation and ('bank_id' not in local_var_params or # noqa: E501 + local_var_params['bank_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bank_id` when calling `get_otc_bank_supplement_checklist`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'bank_id' in local_var_params and local_var_params['bank_id'] is not None: # noqa: E501 + query_params.append(('bank_id', local_var_params['bank_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( + '/otc/bank/bank_supplement_checklist', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtcBankSupplementChecklistResponse', # 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 submit_otc_bank_personal_supplement(self, bank_id, id_document_front, id_document_back, address_proof, **kwargs): # noqa: E501 + """Submit Bank Card Supplement Materials (Personal) # noqa: E501 + + **Personal professional verification (type=1)** users submit non-same-person/supplementary materials. Must match `user_type=personal` returned by `GET /otc/bank/bank_supplement_checklist?bank_id=`, otherwise the request is rejected. **multipart/form-data** is recommended: each material item is a separate file field, with field names matching the checklist `code` (`id_document_front`, `id_document_back`, `address_proof`). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_otc_bank_personal_supplement(bank_id, id_document_front, id_document_back, address_proof, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str bank_id: (required) + :param str id_document_front: ID document front-side file content (multipart file field, binary/Base64) (required) + :param str id_document_back: ID document back-side file content (multipart file field, binary/Base64) (required) + :param str address_proof: Proof-of-address file content (multipart file field, binary/Base64) (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.OtcActionResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.submit_otc_bank_personal_supplement_with_http_info(bank_id, id_document_front, id_document_back, address_proof, **kwargs) # noqa: E501 + + def submit_otc_bank_personal_supplement_with_http_info(self, bank_id, id_document_front, id_document_back, address_proof, **kwargs): # noqa: E501 + """Submit Bank Card Supplement Materials (Personal) # noqa: E501 + + **Personal professional verification (type=1)** users submit non-same-person/supplementary materials. Must match `user_type=personal` returned by `GET /otc/bank/bank_supplement_checklist?bank_id=`, otherwise the request is rejected. **multipart/form-data** is recommended: each material item is a separate file field, with field names matching the checklist `code` (`id_document_front`, `id_document_back`, `address_proof`). # 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_bank_list_with_http_info(async_req=True) + >>> thread = api.submit_otc_bank_personal_supplement_with_http_info(bank_id, id_document_front, id_document_back, address_proof, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously + :param str bank_id: (required) + :param str id_document_front: ID document front-side file content (multipart file field, binary/Base64) (required) + :param str id_document_back: ID document back-side file content (multipart file field, binary/Base64) (required) + :param str address_proof: Proof-of-address file content (multipart file field, binary/Base64) (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -538,7 +1083,7 @@ def get_bank_list_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.InlineResponse20010, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -546,6 +1091,10 @@ def get_bank_list_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ + 'bank_id', + 'id_document_front', + 'id_document_back', + 'address_proof' ] all_params.extend( [ @@ -560,10 +1109,26 @@ def get_bank_list_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_bank_list" % k + " to method submit_otc_bank_personal_supplement" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'bank_id' is set + if self.api_client.client_side_validation and ('bank_id' not in local_var_params or # noqa: E501 + local_var_params['bank_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bank_id` when calling `submit_otc_bank_personal_supplement`") # noqa: E501 + # verify the required parameter 'id_document_front' is set + if self.api_client.client_side_validation and ('id_document_front' not in local_var_params or # noqa: E501 + local_var_params['id_document_front'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id_document_front` when calling `submit_otc_bank_personal_supplement`") # noqa: E501 + # verify the required parameter 'id_document_back' is set + if self.api_client.client_side_validation and ('id_document_back' not in local_var_params or # noqa: E501 + local_var_params['id_document_back'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id_document_back` when calling `submit_otc_bank_personal_supplement`") # noqa: E501 + # verify the required parameter 'address_proof' is set + if self.api_client.client_side_validation and ('address_proof' not in local_var_params or # noqa: E501 + local_var_params['address_proof'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `address_proof` when calling `submit_otc_bank_personal_supplement`") # noqa: E501 collection_formats = {} @@ -575,24 +1140,205 @@ def get_bank_list_with_http_info(self, **kwargs): # noqa: E501 form_params = [] local_var_files = {} + if 'bank_id' in local_var_params: + form_params.append(('bank_id', local_var_params['bank_id'])) # noqa: E501 + if 'id_document_front' in local_var_params: + form_params.append(('id_document_front', local_var_params['id_document_front'])) # noqa: E501 + if 'id_document_back' in local_var_params: + form_params.append(('id_document_back', local_var_params['id_document_back'])) # noqa: E501 + if 'address_proof' in local_var_params: + form_params.append(('address_proof', local_var_params['address_proof'])) # noqa: E501 body_params = None # 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 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/otc/bank/personal/bank_supplement', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtcActionResponse', # 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 submit_otc_bank_enterprise_supplement(self, bank_id, certificate, share_holders, passport, share_holding_structure, **kwargs): # noqa: E501 + """Submit Bank Card Supplement Materials (Enterprise) # noqa: E501 + + **Enterprise professional verification (type=2)** users submit supplementary materials. Must match `user_type=enterprise` returned by the checklist. **multipart** file field names: `certificate`, `share_holders`, `passport`, `share_holding_structure`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_otc_bank_enterprise_supplement(bank_id, certificate, share_holders, passport, share_holding_structure, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str bank_id: (required) + :param str certificate: Business license / registration certificate file content (multipart file field, binary/Base64) (required) + :param str share_holders: Register of shareholders file content (multipart file field, binary/Base64) (required) + :param str passport: Legal representative / shareholder passport file content (multipart file field, binary/Base64) (required) + :param str share_holding_structure: Ownership structure chart file content (multipart file field, binary/Base64) (required) + :param str uid: + :param str funds_statement: Proof-of-funds file content (multipart file field, binary/Base64, optional) + :param str additional: Other supplementary material file content (multipart file field, binary/Base64, optional) + :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.OtcActionResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.submit_otc_bank_enterprise_supplement_with_http_info(bank_id, certificate, share_holders, passport, share_holding_structure, **kwargs) # noqa: E501 + + def submit_otc_bank_enterprise_supplement_with_http_info(self, bank_id, certificate, share_holders, passport, share_holding_structure, **kwargs): # noqa: E501 + """Submit Bank Card Supplement Materials (Enterprise) # noqa: E501 + + **Enterprise professional verification (type=2)** users submit supplementary materials. Must match `user_type=enterprise` returned by the checklist. **multipart** file field names: `certificate`, `share_holders`, `passport`, `share_holding_structure`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_otc_bank_enterprise_supplement_with_http_info(bank_id, certificate, share_holders, passport, share_holding_structure, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str bank_id: (required) + :param str certificate: Business license / registration certificate file content (multipart file field, binary/Base64) (required) + :param str share_holders: Register of shareholders file content (multipart file field, binary/Base64) (required) + :param str passport: Legal representative / shareholder passport file content (multipart file field, binary/Base64) (required) + :param str share_holding_structure: Ownership structure chart file content (multipart file field, binary/Base64) (required) + :param str uid: + :param str funds_statement: Proof-of-funds file content (multipart file field, binary/Base64, optional) + :param str additional: Other supplementary material file content (multipart file field, binary/Base64, optional) + :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.OtcActionResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'bank_id', + 'certificate', + 'share_holders', + 'passport', + 'share_holding_structure', + 'uid', + 'funds_statement', + 'additional' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method submit_otc_bank_enterprise_supplement" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'bank_id' is set + if self.api_client.client_side_validation and ('bank_id' not in local_var_params or # noqa: E501 + local_var_params['bank_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bank_id` when calling `submit_otc_bank_enterprise_supplement`") # noqa: E501 + # verify the required parameter 'certificate' is set + if self.api_client.client_side_validation and ('certificate' not in local_var_params or # noqa: E501 + local_var_params['certificate'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `certificate` when calling `submit_otc_bank_enterprise_supplement`") # noqa: E501 + # verify the required parameter 'share_holders' is set + if self.api_client.client_side_validation and ('share_holders' not in local_var_params or # noqa: E501 + local_var_params['share_holders'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `share_holders` when calling `submit_otc_bank_enterprise_supplement`") # noqa: E501 + # verify the required parameter 'passport' is set + if self.api_client.client_side_validation and ('passport' not in local_var_params or # noqa: E501 + local_var_params['passport'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `passport` when calling `submit_otc_bank_enterprise_supplement`") # noqa: E501 + # verify the required parameter 'share_holding_structure' is set + if self.api_client.client_side_validation and ('share_holding_structure' not in local_var_params or # noqa: E501 + local_var_params['share_holding_structure'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `share_holding_structure` when calling `submit_otc_bank_enterprise_supplement`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'uid' in local_var_params: + form_params.append(('uid', local_var_params['uid'])) # noqa: E501 + if 'bank_id' in local_var_params: + form_params.append(('bank_id', local_var_params['bank_id'])) # noqa: E501 + if 'certificate' in local_var_params: + form_params.append(('certificate', local_var_params['certificate'])) # noqa: E501 + if 'share_holders' in local_var_params: + form_params.append(('share_holders', local_var_params['share_holders'])) # noqa: E501 + if 'passport' in local_var_params: + form_params.append(('passport', local_var_params['passport'])) # noqa: E501 + if 'share_holding_structure' in local_var_params: + form_params.append(('share_holding_structure', local_var_params['share_holding_structure'])) # noqa: E501 + if 'funds_statement' in local_var_params: + form_params.append(('funds_statement', local_var_params['funds_statement'])) # noqa: E501 + if 'additional' in local_var_params: + form_params.append(('additional', local_var_params['additional'])) # noqa: E501 + + body_params = None + # 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 + ['multipart/form-data']) # noqa: E501 + # Authentication setting auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/otc/bank_list', 'GET', + '/otc/bank/enterprise/bank_supplement', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20010', # noqa: E501 + response_type='OtcActionResponse', # 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 @@ -601,9 +1347,9 @@ def get_bank_list_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def mark_otc_order_paid(self, otc_mark_order_paid_request, **kwargs): # noqa: E501 - """Mark fiat order as paid # noqa: E501 + """Mark fiat order as paid (deposit confirmation) # noqa: E501 - Mark fiat order as paid # noqa: E501 + Mark a fiat buy order as paid (deposit confirmation). **The user's payment receipt must be uploaded**: `payment_receipt_file_key` is required; file format jpg / jpeg / png / pdf, single file no larger than 4MB (jointly validated by the server and gateway). The compatible field name `payment_receipt` is subject to the gateway/production environment. For the persisted field, see `otc_trade_record.payment_receipt_file_key`. The Pay Inner path is `POST .../pay/order_set_paid` (orders are usually associated via `client_order_id`); this OpenAPI path maps to Inner `POST /order/paid` and still uses `order_id` as the primary key—if the gateway unifies it to the merchant order number, the gateway documentation prevails. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_otc_order_paid(otc_mark_order_paid_request, async_req=True) @@ -618,7 +1364,7 @@ def mark_otc_order_paid(self, otc_mark_order_paid_request, **kwargs): # noqa: E number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse2007 + :rtype: gate_api.OtcActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -626,9 +1372,9 @@ def mark_otc_order_paid(self, otc_mark_order_paid_request, **kwargs): # noqa: E return self.mark_otc_order_paid_with_http_info(otc_mark_order_paid_request, **kwargs) # noqa: E501 def mark_otc_order_paid_with_http_info(self, otc_mark_order_paid_request, **kwargs): # noqa: E501 - """Mark fiat order as paid # noqa: E501 + """Mark fiat order as paid (deposit confirmation) # noqa: E501 - Mark fiat order as paid # noqa: E501 + Mark a fiat buy order as paid (deposit confirmation). **The user's payment receipt must be uploaded**: `payment_receipt_file_key` is required; file format jpg / jpeg / png / pdf, single file no larger than 4MB (jointly validated by the server and gateway). The compatible field name `payment_receipt` is subject to the gateway/production environment. For the persisted field, see `otc_trade_record.payment_receipt_file_key`. The Pay Inner path is `POST .../pay/order_set_paid` (orders are usually associated via `client_order_id`); this OpenAPI path maps to Inner `POST /order/paid` and still uses `order_id` as the primary key—if the gateway unifies it to the merchant order number, the gateway documentation prevails. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_otc_order_paid_with_http_info(otc_mark_order_paid_request, async_req=True) @@ -645,7 +1391,7 @@ def mark_otc_order_paid_with_http_info(self, otc_mark_order_paid_request, **kwar number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse2007, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -710,7 +1456,7 @@ def mark_otc_order_paid_with_http_info(self, otc_mark_order_paid_request, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2007', # noqa: E501 + response_type='OtcActionResponse', # 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 @@ -736,7 +1482,7 @@ def cancel_otc_order(self, order_id, **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.InlineResponse2007 + :rtype: gate_api.OtcActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -763,7 +1509,7 @@ def cancel_otc_order_with_http_info(self, order_id, **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.InlineResponse2007, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -824,7 +1570,7 @@ def cancel_otc_order_with_http_info(self, order_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2007', # noqa: E501 + response_type='OtcActionResponse', # 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 @@ -857,7 +1603,7 @@ def list_otc_orders(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.InlineResponse20011 + :rtype: gate_api.OtcOrderListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -891,7 +1637,7 @@ def list_otc_orders_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.InlineResponse20011, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcOrderListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -969,7 +1715,7 @@ def list_otc_orders_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20011', # noqa: E501 + response_type='OtcOrderListResponse', # 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 @@ -1000,7 +1746,7 @@ def list_stable_coin_orders(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.InlineResponse20012 + :rtype: gate_api.OtcStableCoinOrderListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1032,7 +1778,7 @@ def list_stable_coin_orders_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.InlineResponse20012, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcStableCoinOrderListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1104,7 +1850,7 @@ def list_stable_coin_orders_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20012', # noqa: E501 + response_type='OtcStableCoinOrderListResponse', # 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 @@ -1130,7 +1876,7 @@ def get_otc_order_detail(self, order_id, **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.InlineResponse20013 + :rtype: gate_api.OtcOrderDetailResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1157,7 +1903,7 @@ def get_otc_order_detail_with_http_info(self, order_id, **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.InlineResponse20013, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcOrderDetailResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1218,7 +1964,7 @@ def get_otc_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20013', # noqa: E501 + response_type='OtcOrderDetailResponse', # 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 diff --git a/gate_api/api/p2p_api.py b/gate_api/api/p2p_api.py index 505c9531..f3eab2c0 100644 --- a/gate_api/api/p2p_api.py +++ b/gate_api/api/p2p_api.py @@ -52,7 +52,7 @@ def p2p_merchant_account_get_user_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: gate_api.InlineResponse20014 + :rtype: gate_api.P2pMerchantUserInfoResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -77,7 +77,7 @@ def p2p_merchant_account_get_user_info_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(gate_api.InlineResponse20014, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pMerchantUserInfoResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -131,7 +131,7 @@ def p2p_merchant_account_get_user_info_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20014', # noqa: E501 + response_type='P2pMerchantUserInfoResponse', # 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 @@ -156,7 +156,7 @@ def p2p_merchant_account_get_counterparty_user_info(self, get_counterparty_user_ number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20015 + :rtype: gate_api.P2pCounterpartyUserInfoResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -182,7 +182,7 @@ def p2p_merchant_account_get_counterparty_user_info_with_http_info(self, get_cou number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20015, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pCounterpartyUserInfoResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -247,7 +247,7 @@ def p2p_merchant_account_get_counterparty_user_info_with_http_info(self, get_cou body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20015', # noqa: E501 + response_type='P2pCounterpartyUserInfoResponse', # 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 @@ -272,7 +272,7 @@ def p2p_merchant_account_get_myself_payment(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.InlineResponse20016 + :rtype: gate_api.P2pPaymentMethodsResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -298,7 +298,7 @@ def p2p_merchant_account_get_myself_payment_with_http_info(self, **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.InlineResponse20016, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pPaymentMethodsResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -359,7 +359,123 @@ def p2p_merchant_account_get_myself_payment_with_http_info(self, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20016', # noqa: E501 + response_type='P2pPaymentMethodsResponse', # 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 p2p_merchant_account_set_merchant_work_hours(self, set_merchant_work_hours_request, **kwargs): # noqa: E501 + """Set merchant working status and custom working hours # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.p2p_merchant_account_set_merchant_work_hours(set_merchant_work_hours_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SetMerchantWorkHoursRequest set_merchant_work_hours_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.P2pMerchantWorkHoursResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.p2p_merchant_account_set_merchant_work_hours_with_http_info(set_merchant_work_hours_request, **kwargs) # noqa: E501 + + def p2p_merchant_account_set_merchant_work_hours_with_http_info(self, set_merchant_work_hours_request, **kwargs): # noqa: E501 + """Set merchant working status and custom working hours # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.p2p_merchant_account_set_merchant_work_hours_with_http_info(set_merchant_work_hours_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SetMerchantWorkHoursRequest set_merchant_work_hours_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.P2pMerchantWorkHoursResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'set_merchant_work_hours_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 p2p_merchant_account_set_merchant_work_hours" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'set_merchant_work_hours_request' is set + if self.api_client.client_side_validation and ('set_merchant_work_hours_request' not in local_var_params or # noqa: E501 + local_var_params['set_merchant_work_hours_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `set_merchant_work_hours_request` when calling `p2p_merchant_account_set_merchant_work_hours`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'set_merchant_work_hours_request' in local_var_params: + body_params = local_var_params['set_merchant_work_hours_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( + '/p2p/merchant/account/set_merchant_work_hours', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='P2pMerchantWorkHoursResponse', # 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 @@ -384,7 +500,7 @@ def p2p_merchant_transaction_get_pending_transaction_list(self, get_pending_tran number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20017 + :rtype: gate_api.P2pTransactionListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -410,7 +526,7 @@ def p2p_merchant_transaction_get_pending_transaction_list_with_http_info(self, g number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20017, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pTransactionListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -475,7 +591,7 @@ def p2p_merchant_transaction_get_pending_transaction_list_with_http_info(self, g body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20017', # noqa: E501 + response_type='P2pTransactionListResponse', # 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 @@ -500,7 +616,7 @@ def p2p_merchant_transaction_get_completed_transaction_list(self, get_completed_ number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20017 + :rtype: gate_api.P2pTransactionListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -526,7 +642,7 @@ def p2p_merchant_transaction_get_completed_transaction_list_with_http_info(self, number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20017, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pTransactionListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -591,7 +707,7 @@ def p2p_merchant_transaction_get_completed_transaction_list_with_http_info(self, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20017', # noqa: E501 + response_type='P2pTransactionListResponse', # 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 @@ -616,7 +732,7 @@ def p2p_merchant_transaction_get_transaction_details(self, get_transaction_detai number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20018 + :rtype: gate_api.P2pTransactionDetailResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -642,7 +758,7 @@ def p2p_merchant_transaction_get_transaction_details_with_http_info(self, get_tr number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20018, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pTransactionDetailResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -707,7 +823,7 @@ def p2p_merchant_transaction_get_transaction_details_with_http_info(self, get_tr body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20018', # noqa: E501 + response_type='P2pTransactionDetailResponse', # 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 @@ -732,7 +848,7 @@ def p2p_merchant_transaction_confirm_payment(self, confirm_payment, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20019 + :rtype: gate_api.P2pTransactionActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -758,7 +874,7 @@ def p2p_merchant_transaction_confirm_payment_with_http_info(self, confirm_paymen number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20019, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pTransactionActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -823,7 +939,7 @@ def p2p_merchant_transaction_confirm_payment_with_http_info(self, confirm_paymen body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20019', # noqa: E501 + response_type='P2pTransactionActionResponse', # 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 @@ -848,7 +964,7 @@ def p2p_merchant_transaction_confirm_receipt(self, confirm_receipt, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20019 + :rtype: gate_api.P2pTransactionActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -874,7 +990,7 @@ def p2p_merchant_transaction_confirm_receipt_with_http_info(self, confirm_receip number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20019, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pTransactionActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -939,7 +1055,7 @@ def p2p_merchant_transaction_confirm_receipt_with_http_info(self, confirm_receip body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20019', # noqa: E501 + response_type='P2pTransactionActionResponse', # 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 @@ -964,7 +1080,7 @@ def p2p_merchant_transaction_cancel(self, cancel_order, **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.InlineResponse20019 + :rtype: gate_api.P2pTransactionActionResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -990,7 +1106,7 @@ def p2p_merchant_transaction_cancel_with_http_info(self, cancel_order, **kwargs) number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20019, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pTransactionActionResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1055,7 +1171,7 @@ def p2p_merchant_transaction_cancel_with_http_info(self, cancel_order, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20019', # noqa: E501 + response_type='P2pTransactionActionResponse', # 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 @@ -1066,6 +1182,7 @@ def p2p_merchant_transaction_cancel_with_http_info(self, cancel_order, **kwargs) def p2p_merchant_books_place_biz_push_order(self, place_biz_push_order, **kwargs): # noqa: E501 """Publish ad order # noqa: E501 + When publishing or editing an advertisement, trade_tips and auto_reply go through off-platform traffic diversion risk control; when hit, the advertisement is not saved, and code 70305102 with data.risk_event is 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.p2p_merchant_books_place_biz_push_order(place_biz_push_order, async_req=True) @@ -1080,7 +1197,7 @@ def p2p_merchant_books_place_biz_push_order(self, place_biz_push_order, **kwargs number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: object + :rtype: gate_api.P2pMerchantBooksPlaceBizPushOrderResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1090,6 +1207,7 @@ def p2p_merchant_books_place_biz_push_order(self, place_biz_push_order, **kwargs def p2p_merchant_books_place_biz_push_order_with_http_info(self, place_biz_push_order, **kwargs): # noqa: E501 """Publish ad order # noqa: E501 + When publishing or editing an advertisement, trade_tips and auto_reply go through off-platform traffic diversion risk control; when hit, the advertisement is not saved, and code 70305102 with data.risk_event is 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.p2p_merchant_books_place_biz_push_order_with_http_info(place_biz_push_order, async_req=True) @@ -1106,7 +1224,7 @@ def p2p_merchant_books_place_biz_push_order_with_http_info(self, place_biz_push_ number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pMerchantBooksPlaceBizPushOrderResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1171,7 +1289,7 @@ def p2p_merchant_books_place_biz_push_order_with_http_info(self, place_biz_push_ body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='P2pMerchantBooksPlaceBizPushOrderResponse', # 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 @@ -1189,7 +1307,6 @@ def p2p_merchant_books_ads_update_status(self, ads_update_status, **kwargs): # :param bool async_req: execute request asynchronously :param AdsUpdateStatus ads_update_status: (required) - :param str trade_type: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1197,7 +1314,7 @@ def p2p_merchant_books_ads_update_status(self, ads_update_status, **kwargs): # number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20020 + :rtype: gate_api.P2pAdsUpdateStatusResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1214,7 +1331,6 @@ def p2p_merchant_books_ads_update_status_with_http_info(self, ads_update_status, :param bool async_req: execute request asynchronously :param AdsUpdateStatus ads_update_status: (required) - :param str trade_type: Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+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 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1224,7 +1340,7 @@ def p2p_merchant_books_ads_update_status_with_http_info(self, ads_update_status, number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20020, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pAdsUpdateStatusResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1232,8 +1348,7 @@ def p2p_merchant_books_ads_update_status_with_http_info(self, ads_update_status, local_var_params = locals() all_params = [ - 'ads_update_status', - 'trade_type' + 'ads_update_status' ] all_params.extend( [ @@ -1262,8 +1377,6 @@ def p2p_merchant_books_ads_update_status_with_http_info(self, ads_update_status, path_params = {} query_params = [] - if 'trade_type' in local_var_params and local_var_params['trade_type'] is not None: # noqa: E501 - query_params.append(('trade_type', local_var_params['trade_type'])) # noqa: E501 header_params = {} @@ -1292,7 +1405,7 @@ def p2p_merchant_books_ads_update_status_with_http_info(self, ads_update_status, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20020', # noqa: E501 + response_type='P2pAdsUpdateStatusResponse', # 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 @@ -1317,7 +1430,7 @@ def p2p_merchant_books_ads_detail(self, ads_detail_request, **kwargs): # noqa: number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20021 + :rtype: gate_api.P2pAdDetailResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1343,7 +1456,7 @@ def p2p_merchant_books_ads_detail_with_http_info(self, ads_detail_request, **kwa number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20021, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pAdDetailResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1408,7 +1521,7 @@ def p2p_merchant_books_ads_detail_with_http_info(self, ads_detail_request, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20021', # noqa: E501 + response_type='P2pAdDetailResponse', # 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 @@ -1433,7 +1546,7 @@ def p2p_merchant_books_my_ads_list(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.InlineResponse20022 + :rtype: gate_api.P2pMyAdsListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1459,7 +1572,7 @@ def p2p_merchant_books_my_ads_list_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.InlineResponse20022, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pMyAdsListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1520,7 +1633,7 @@ def p2p_merchant_books_my_ads_list_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20022', # noqa: E501 + response_type='P2pMyAdsListResponse', # 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 @@ -1546,7 +1659,7 @@ def p2p_merchant_books_ads_list(self, ads_list_request, **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.InlineResponse20023 + :rtype: gate_api.P2pAdsListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1573,7 +1686,7 @@ def p2p_merchant_books_ads_list_with_http_info(self, ads_list_request, **kwargs) number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20023, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pAdsListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1638,7 +1751,7 @@ def p2p_merchant_books_ads_list_with_http_info(self, ads_list_request, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20023', # noqa: E501 + response_type='P2pAdsListResponse', # 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 @@ -1663,7 +1776,7 @@ def p2p_merchant_chat_get_chats_list(self, get_chats_list_request, **kwargs): # number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20024 + :rtype: gate_api.P2pChatListResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1689,7 +1802,7 @@ def p2p_merchant_chat_get_chats_list_with_http_info(self, get_chats_list_request number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20024, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pChatListResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1754,7 +1867,7 @@ def p2p_merchant_chat_get_chats_list_with_http_info(self, get_chats_list_request body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20024', # noqa: E501 + response_type='P2pChatListResponse', # 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 @@ -1765,6 +1878,7 @@ def p2p_merchant_chat_get_chats_list_with_http_info(self, get_chats_list_request def p2p_merchant_chat_send_chat_message(self, send_chat_message_request, **kwargs): # noqa: E501 """Send text message # noqa: E501 + Text messages go through off-platform traffic diversion risk control. When hit, the API still returns code 0, and data contains risk_type=1 and toast_msg. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.p2p_merchant_chat_send_chat_message(send_chat_message_request, async_req=True) @@ -1779,7 +1893,7 @@ def p2p_merchant_chat_send_chat_message(self, send_chat_message_request, **kwarg number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20025 + :rtype: gate_api.P2pSendChatMessageResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1789,6 +1903,7 @@ def p2p_merchant_chat_send_chat_message(self, send_chat_message_request, **kwarg def p2p_merchant_chat_send_chat_message_with_http_info(self, send_chat_message_request, **kwargs): # noqa: E501 """Send text message # noqa: E501 + Text messages go through off-platform traffic diversion risk control. When hit, the API still returns code 0, and data contains risk_type=1 and toast_msg. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.p2p_merchant_chat_send_chat_message_with_http_info(send_chat_message_request, async_req=True) @@ -1805,7 +1920,7 @@ def p2p_merchant_chat_send_chat_message_with_http_info(self, send_chat_message_r number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20025, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pSendChatMessageResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1870,7 +1985,7 @@ def p2p_merchant_chat_send_chat_message_with_http_info(self, send_chat_message_r body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20025', # noqa: E501 + response_type='P2pSendChatMessageResponse', # 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 @@ -1895,7 +2010,7 @@ def p2p_merchant_chat_upload_chat_file(self, upload_chat_file, **kwargs): # noq number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.InlineResponse20026 + :rtype: gate_api.P2pUploadChatFileResponse :return: If the method is called asynchronously, returns the request thread. """ @@ -1921,7 +2036,7 @@ def p2p_merchant_chat_upload_chat_file_with_http_info(self, upload_chat_file, ** number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.InlineResponse20026, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.P2pUploadChatFileResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1986,7 +2101,7 @@ def p2p_merchant_chat_upload_chat_file_with_http_info(self, upload_chat_file, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20026', # noqa: E501 + response_type='P2pUploadChatFileResponse', # 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 diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index ac2afe21..fdc202f8 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -889,7 +889,7 @@ def rebate_broker_transaction_history(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.BrokerTransaction] + :rtype: list[gate_api.BrokerTransactionHistory] :return: If the method is called asynchronously, returns the request thread. """ @@ -920,7 +920,7 @@ def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E 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)) + :rtype: tuple(list[gate_api.BrokerTransactionHistory], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -995,7 +995,7 @@ def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='list[BrokerTransaction]', # noqa: E501 + response_type='list[BrokerTransactionHistory]', # 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 @@ -1219,3 +1219,337 @@ def user_sub_relation_with_http_info(self, user_id_list, **kwargs): # noqa: E50 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + + def get_partner_application_recent(self, **kwargs): # noqa: E501 + """Get recent partner application records # noqa: E501 + + Get the current user's recent partner application records. This endpoint returns application records within the last 30 days, including application status, review information, application materials, and other 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_partner_application_recent(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.PartnerApplicationResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_partner_application_recent_with_http_info(**kwargs) # noqa: E501 + + def get_partner_application_recent_with_http_info(self, **kwargs): # noqa: E501 + """Get recent partner application records # noqa: E501 + + Get the current user's recent partner application records. This endpoint returns application records within the last 30 days, including application status, review information, application materials, and other 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_partner_application_recent_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.PartnerApplicationResponse, 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_partner_application_recent" % 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/partner/applications/recent', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PartnerApplicationResponse', # 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_partner_eligibility(self, **kwargs): # noqa: E501 + """Check partner application eligibility # noqa: E501 + + Check whether the current user is eligible to apply as a partner. This endpoint checks multiple conditions: account status (banned or not), whether it is a sub-account, whether already a partner, KYC verification status, whether under another agent's referral chain, whether on the blacklist, and other business rule restrictions # 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_partner_eligibility(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.EligibilityResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_partner_eligibility_with_http_info(**kwargs) # noqa: E501 + + def get_partner_eligibility_with_http_info(self, **kwargs): # noqa: E501 + """Check partner application eligibility # noqa: E501 + + Check whether the current user is eligible to apply as a partner. This endpoint checks multiple conditions: account status (banned or not), whether it is a sub-account, whether already a partner, KYC verification status, whether under another agent's referral chain, whether on the blacklist, and other business rule restrictions # 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_partner_eligibility_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.EligibilityResponse, 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_partner_eligibility" % 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/partner/eligibility', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EligibilityResponse', # 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_partner_agent_data_aggregated(self, **kwargs): # noqa: E501 + """Aggregated partner agent statistics # noqa: E501 + + Query aggregated partner-agent statistics for a time range, including rebate amount, trading volume, net fee, customer count, and trading user count. **Notes:** - `trading_user_count` is only returned when `business_type=0` (All). - Time parameters use UTC+8. - If no time range is passed, the last 7 days are queried by default. - Partner agents only; sub-accounts are not allowed. # 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_partner_agent_data_aggregated(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str start_date: Query start time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the start of the last 7 days. + :param str end_date: Query end time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the end of the last 7 days. + :param int business_type: Business type filter: - 0: All (default) - 1: Spot - 2: Futures - 3: Alpha - 4: Web3 - 5: Perps (DEX) - 6: Exchange All - 7: Web3 All - 8: TradFi + :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.PartnerDataAggregatedResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_partner_agent_data_aggregated_with_http_info(**kwargs) # noqa: E501 + + def get_partner_agent_data_aggregated_with_http_info(self, **kwargs): # noqa: E501 + """Aggregated partner agent statistics # noqa: E501 + + Query aggregated partner-agent statistics for a time range, including rebate amount, trading volume, net fee, customer count, and trading user count. **Notes:** - `trading_user_count` is only returned when `business_type=0` (All). - Time parameters use UTC+8. - If no time range is passed, the last 7 days are queried by default. - Partner agents only; sub-accounts are not allowed. # 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_partner_agent_data_aggregated_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str start_date: Query start time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the start of the last 7 days. + :param str end_date: Query end time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the end of the last 7 days. + :param int business_type: Business type filter: - 0: All (default) - 1: Spot - 2: Futures - 3: Alpha - 4: Web3 - 5: Perps (DEX) - 6: Exchange All - 7: Web3 All - 8: TradFi + :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.PartnerDataAggregatedResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'start_date', + 'end_date', + 'business_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 get_partner_agent_data_aggregated" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'start_date' in local_var_params and not re.search(r'^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$', local_var_params['start_date']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `start_date` when calling `get_partner_agent_data_aggregated`, must conform to the pattern `/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/`") # noqa: E501 + if self.api_client.client_side_validation and 'end_date' in local_var_params and not re.search(r'^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$', local_var_params['end_date']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `end_date` when calling `get_partner_agent_data_aggregated`, must conform to the pattern `/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start_date' in local_var_params and local_var_params['start_date'] is not None: # noqa: E501 + query_params.append(('start_date', local_var_params['start_date'])) # noqa: E501 + if 'end_date' in local_var_params and local_var_params['end_date'] is not None: # noqa: E501 + query_params.append(('end_date', local_var_params['end_date'])) # noqa: E501 + if 'business_type' in local_var_params and local_var_params['business_type'] is not None: # noqa: E501 + query_params.append(('business_type', local_var_params['business_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( + '/rebate/partner/data/aggregated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PartnerDataAggregatedResponse', # 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 5ec1e2b7..a66c4afd 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -2789,7 +2789,7 @@ def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: def list_my_trades(self, **kwargs): # noqa: E501 """Query personal trading records # 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 + 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,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_my_trades(async_req=True) @@ -2820,7 +2820,7 @@ def list_my_trades(self, **kwargs): # noqa: E501 def list_my_trades_with_http_info(self, **kwargs): # noqa: E501 """Query personal trading records # 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 + 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,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_my_trades_with_http_info(async_req=True) diff --git a/gate_api/api/square_api.py b/gate_api/api/square_api.py new file mode 100644 index 00000000..0ac823af --- /dev/null +++ b/gate_api/api/square_api.py @@ -0,0 +1,307 @@ +# 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 SquareApi(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_square_ai_search(self, **kwargs): # noqa: E501 + """AI MCP Dynamic Search # noqa: E501 + + Dynamic search endpoint for AI MCP platform. All parameters are passed via query string. Returns simplified fields. Designed for LLM function calling / MCP tool scenarios. # 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_square_ai_search(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str keyword: Search keyword (currency name or content keyword, e.g., BTC, ETH) + :param str currency: Filter by currency (exact currency code, e.g., BTC, ETH, SOL) + :param int time_range: Time range: 0 = unlimited (default), 1 = last day, 2 = last week, 3 = last month + :param int sort: Sort order: 0 = most popular (default), 1 = latest + :param int limit: Return count, 1-50, default 10 + :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. + :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.ListSquareAiSearchResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_square_ai_search_with_http_info(**kwargs) # noqa: E501 + + def list_square_ai_search_with_http_info(self, **kwargs): # noqa: E501 + """AI MCP Dynamic Search # noqa: E501 + + Dynamic search endpoint for AI MCP platform. All parameters are passed via query string. Returns simplified fields. Designed for LLM function calling / MCP tool scenarios. # 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_square_ai_search_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str keyword: Search keyword (currency name or content keyword, e.g., BTC, ETH) + :param str currency: Filter by currency (exact currency code, e.g., BTC, ETH, SOL) + :param int time_range: Time range: 0 = unlimited (default), 1 = last day, 2 = last week, 3 = last month + :param int sort: Sort order: 0 = most popular (default), 1 = latest + :param int limit: Return count, 1-50, default 10 + :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 + 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.ListSquareAiSearchResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'keyword', + 'currency', + 'time_range', + 'sort', + '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_square_ai_search" % 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'] > 50: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_square_ai_search`, 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_square_ai_search`, 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_square_ai_search`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'keyword' in local_var_params and local_var_params['keyword'] is not None: # noqa: E501 + query_params.append(('keyword', local_var_params['keyword'])) # 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 'time_range' in local_var_params and local_var_params['time_range'] is not None: # noqa: E501 + query_params.append(('time_range', local_var_params['time_range'])) # 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 '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 = {} + + 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( + '/social/message/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListSquareAiSearchResponse', # 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_live_replay(self, **kwargs): # noqa: E501 + """Gate AI Assistant live stream data retrieval # noqa: E501 + + AI assistant live stream/replay search endpoint. Filters live rooms or replay videos by business tags and currency. Each record in the returned list is distinguished by content_type: streaming = live broadcast (live field has value), video = replay video (video field has value). The number of results is controlled by the limit parameter (max 10), no additional pagination needed. # 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_live_replay(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str tag: Business type filter. Available values: Market Analysis, Hot Topics, Blockchain, Others + :param str coin: Filter by currency name (e.g., BTC, ETH) + :param str sort: Sort order: hot = most popular (default), new = latest + :param int limit: Return count, 1-10, default 3 + :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.ListLiveReplayResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_live_replay_with_http_info(**kwargs) # noqa: E501 + + def list_live_replay_with_http_info(self, **kwargs): # noqa: E501 + """Gate AI Assistant live stream data retrieval # noqa: E501 + + AI assistant live stream/replay search endpoint. Filters live rooms or replay videos by business tags and currency. Each record in the returned list is distinguished by content_type: streaming = live broadcast (live field has value), video = replay video (video field has value). The number of results is controlled by the limit parameter (max 10), no additional pagination needed. # 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_live_replay_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str tag: Business type filter. Available values: Market Analysis, Hot Topics, Blockchain, Others + :param str coin: Filter by currency name (e.g., BTC, ETH) + :param str sort: Sort order: hot = most popular (default), new = latest + :param int limit: Return count, 1-10, default 3 + :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.ListLiveReplayResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'tag', + 'coin', + 'sort', + '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_live_replay" % 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'] > 10: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_live_replay`, must be a value less than or equal to `10`") # 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_live_replay`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'tag' in local_var_params and local_var_params['tag'] is not None: # noqa: E501 + query_params.append(('tag', local_var_params['tag'])) # noqa: E501 + if 'coin' in local_var_params and local_var_params['coin'] is not None: # noqa: E501 + query_params.append(('coin', local_var_params['coin'])) # 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 '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( + '/social/live/tag_coin_live_replay', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListLiveReplayResponse', # 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/trad_fi_api.py b/gate_api/api/trad_fi_api.py index 3cfc829f..5c3922db 100644 --- a/gate_api/api/trad_fi_api.py +++ b/gate_api/api/trad_fi_api.py @@ -439,7 +439,7 @@ def query_symbol_detail_with_http_info(self, symbols, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( '/tradfi/symbols/detail', 'GET', @@ -614,7 +614,7 @@ def query_symbol_ticker(self, symbol, **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.Ticker2 + :rtype: gate_api.TradFiTicker :return: If the method is called asynchronously, returns the request thread. """ @@ -640,7 +640,7 @@ def query_symbol_ticker_with_http_info(self, symbol, **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.Ticker2, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.TradFiTicker, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -701,7 +701,7 @@ def query_symbol_ticker_with_http_info(self, symbol, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='Ticker2', # noqa: E501 + response_type='TradFiTicker', # 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 @@ -1281,7 +1281,7 @@ def create_trad_fi_order(self, trad_fi_order_request, **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.CreateOrder + :rtype: gate_api.CreateOrder2 :return: If the method is called asynchronously, returns the request thread. """ @@ -1307,7 +1307,7 @@ def create_trad_fi_order_with_http_info(self, trad_fi_order_request, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.CreateOrder, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CreateOrder2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1372,7 +1372,7 @@ def create_trad_fi_order_with_http_info(self, trad_fi_order_request, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='CreateOrder', # noqa: E501 + response_type='CreateOrder2', # 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 @@ -1740,6 +1740,118 @@ def query_order_history_list_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def query_order_log(self, log_id, **kwargs): # noqa: E501 + """Get order details by log 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.query_order_log(log_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int log_id: log_id returned from the order placement API (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.OrderLog + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.query_order_log_with_http_info(log_id, **kwargs) # noqa: E501 + + def query_order_log_with_http_info(self, log_id, **kwargs): # noqa: E501 + """Get order details by log 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.query_order_log_with_http_info(log_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int log_id: log_id returned from the order placement API (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.OrderLog, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'log_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 query_order_log" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'log_id' is set + if self.api_client.client_side_validation and ('log_id' not in local_var_params or # noqa: E501 + local_var_params['log_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `log_id` when calling `query_order_log`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'log_id' in local_var_params: + path_params['log_id'] = local_var_params['log_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( + '/tradfi/orders/log/{log_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrderLog', # 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 query_position_list(self, **kwargs): # noqa: E501 """Query active position list # noqa: E501 @@ -2102,6 +2214,8 @@ def query_position_history_list(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously + :param int page: Page number; defaults to 1 if omitted. + :param int page_size: Page size; defaults to 10 if omitted. Maximum 100. :param int begin_time: Start Time (Unix Timestamp, seconds). The earliest queryable time is one month ago :param int end_time: End time (timestamp in seconds) :param str symbol: Trading symbol (e.g., EURUSD) @@ -2129,6 +2243,8 @@ def query_position_history_list_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously + :param int page: Page number; defaults to 1 if omitted. + :param int page_size: Page size; defaults to 10 if omitted. Maximum 100. :param int begin_time: Start Time (Unix Timestamp, seconds). The earliest queryable time is one month ago :param int end_time: End time (timestamp in seconds) :param str symbol: Trading symbol (e.g., EURUSD) @@ -2150,6 +2266,8 @@ def query_position_history_list_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ + 'page', + 'page_size', 'begin_time', 'end_time', 'symbol', @@ -2178,6 +2296,10 @@ def query_position_history_list_with_http_info(self, **kwargs): # noqa: E501 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 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 if 'begin_time' in local_var_params and local_var_params['begin_time'] is not None: # noqa: E501 query_params.append(('begin_time', local_var_params['begin_time'])) # noqa: E501 if 'end_time' in local_var_params and local_var_params['end_time'] is not None: # noqa: E501 diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index 242809c8..ac0ec7f2 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -504,7 +504,7 @@ def get_unified_borrowable_list(self, currencies, **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.UnifiedBorrowable1] + :rtype: list[gate_api.UnifiedBorrowable] :return: If the method is called asynchronously, returns the request thread. """ @@ -530,7 +530,7 @@ def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # n 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)) + :rtype: tuple(list[gate_api.UnifiedBorrowable], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -598,7 +598,7 @@ def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UnifiedBorrowable1]', # noqa: E501 + response_type='list[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 @@ -2580,3 +2580,447 @@ def set_unified_collateral_with_http_info(self, unified_collateral_req, **kwargs _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + + def get_estimated_quick_repayment(self, **kwargs): # noqa: E501 + """Estimated quick repayment details # noqa: E501 + + Available for unified account cross-currency margin mode and 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_estimated_quick_repayment(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.QuickEstimatedRepayment + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_estimated_quick_repayment_with_http_info(**kwargs) # noqa: E501 + + def get_estimated_quick_repayment_with_http_info(self, **kwargs): # noqa: E501 + """Estimated quick repayment details # noqa: E501 + + Available for unified account cross-currency margin mode and 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_estimated_quick_repayment_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.QuickEstimatedRepayment, 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_estimated_quick_repayment" % 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/estimated_quick_repayment', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='QuickEstimatedRepayment', # 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_quick_repayment(self, quick_repayment_request, **kwargs): # noqa: E501 + """Quick repayment # noqa: E501 + + Available for unified account cross-currency margin mode and portfolio margin mode. Use `GET /unified/estimated_quick_repayment` to query liabilities and pending repayment 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.create_quick_repayment(quick_repayment_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param QuickRepaymentRequest quick_repayment_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.QuickRepaymentResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_quick_repayment_with_http_info(quick_repayment_request, **kwargs) # noqa: E501 + + def create_quick_repayment_with_http_info(self, quick_repayment_request, **kwargs): # noqa: E501 + """Quick repayment # noqa: E501 + + Available for unified account cross-currency margin mode and portfolio margin mode. Use `GET /unified/estimated_quick_repayment` to query liabilities and pending repayment 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.create_quick_repayment_with_http_info(quick_repayment_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param QuickRepaymentRequest quick_repayment_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.QuickRepaymentResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'quick_repayment_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_quick_repayment" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'quick_repayment_request' is set + if self.api_client.client_side_validation and ('quick_repayment_request' not in local_var_params or # noqa: E501 + local_var_params['quick_repayment_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `quick_repayment_request` when calling `create_quick_repayment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'quick_repayment_request' in local_var_params: + body_params = local_var_params['quick_repayment_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( + '/unified/quick_repayment', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='QuickRepaymentResponse', # 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_delta_neutral(self, **kwargs): # noqa: E501 + """Query the account Delta-neutral strategy mode setting # 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_delta_neutral(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.DeltaNeutralEnabled + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unified_delta_neutral_with_http_info(**kwargs) # noqa: E501 + + def get_unified_delta_neutral_with_http_info(self, **kwargs): # noqa: E501 + """Query the account Delta-neutral strategy mode setting # 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_delta_neutral_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.DeltaNeutralEnabled, 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_delta_neutral" % 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/delta_neutral', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeltaNeutralEnabled', # 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_delta_neutral(self, delta_neutral_enabled, **kwargs): # noqa: E501 + """Set the account Delta-neutral strategy mode # noqa: E501 + + Enable or disable the account Delta-neutral strategy mode. Requirements for enabling: VIP level >= 4 and the account is in cross-currency margin mode; otherwise 403 is returned. Returns the enabled status after the setting takes effect. # 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_delta_neutral(delta_neutral_enabled, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param DeltaNeutralEnabled delta_neutral_enabled: (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.DeltaNeutralEnabled + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_unified_delta_neutral_with_http_info(delta_neutral_enabled, **kwargs) # noqa: E501 + + def set_unified_delta_neutral_with_http_info(self, delta_neutral_enabled, **kwargs): # noqa: E501 + """Set the account Delta-neutral strategy mode # noqa: E501 + + Enable or disable the account Delta-neutral strategy mode. Requirements for enabling: VIP level >= 4 and the account is in cross-currency margin mode; otherwise 403 is returned. Returns the enabled status after the setting takes effect. # 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_delta_neutral_with_http_info(delta_neutral_enabled, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param DeltaNeutralEnabled delta_neutral_enabled: (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.DeltaNeutralEnabled, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'delta_neutral_enabled' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_delta_neutral" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'delta_neutral_enabled' is set + if self.api_client.client_side_validation and ('delta_neutral_enabled' not in local_var_params or # noqa: E501 + local_var_params['delta_neutral_enabled'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `delta_neutral_enabled` when calling `set_unified_delta_neutral`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'delta_neutral_enabled' in local_var_params: + body_params = local_var_params['delta_neutral_enabled'] + # 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/delta_neutral', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeltaNeutralEnabled', # 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 27d36e49..ff4f564f 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -1274,6 +1274,8 @@ def list_sub_account_balances(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :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 page: Page number + :param int limit: Maximum number of records returned. Default 20, max 100. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1298,6 +1300,8 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :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 page: Page number + :param int limit: Maximum number of records returned. Default 20, max 100. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1315,7 +1319,9 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'sub_uid' + 'sub_uid', + 'page', + 'limit' ] all_params.extend( [ @@ -1335,6 +1341,12 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 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_sub_account_balances`, 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_sub_account_balances`, 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_sub_account_balances`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} @@ -1342,6 +1354,10 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 query_params = [] 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 + 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 = {} @@ -1701,19 +1717,20 @@ def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # no _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_saved_address(self, currency, **kwargs): # noqa: E501 - """Query withdrawal address whitelist # noqa: E501 + def list_saved_address(self, **kwargs): # noqa: E501 + """Query saved address # 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_saved_address(currency, async_req=True) + >>> thread = api.list_saved_address(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency :param str chain: Chain name + :param str verified: 1 means verified address, 0 means normal address, empty string means no limit :param str limit: Maximum number returned, up to 100 - :param int page: Page number + :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. @@ -1726,21 +1743,22 @@ def list_saved_address(self, currency, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_saved_address_with_http_info(currency, **kwargs) # noqa: E501 + return self.list_saved_address_with_http_info(**kwargs) # noqa: E501 - def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query withdrawal address whitelist # noqa: E501 + def list_saved_address_with_http_info(self, **kwargs): # noqa: E501 + """Query saved address # 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_saved_address_with_http_info(currency, async_req=True) + >>> thread = api.list_saved_address_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency :param str chain: Chain name + :param str verified: 1 means verified address, 0 means normal address, empty string means no limit :param str limit: Maximum number returned, up to 100 - :param int page: Page number + :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 @@ -1760,6 +1778,7 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 all_params = [ 'currency', 'chain', + 'verified', 'limit', 'page' ] @@ -1780,10 +1799,6 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 ) 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 `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 @@ -1796,6 +1811,8 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 query_params.append(('currency', local_var_params['currency'])) # noqa: E501 if 'chain' in local_var_params and local_var_params['chain'] is not None: # noqa: E501 query_params.append(('chain', local_var_params['chain'])) # noqa: E501 + if 'verified' in local_var_params and local_var_params['verified'] is not None: # noqa: E501 + query_params.append(('verified', local_var_params['verified'])) # 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 diff --git a/gate_api/api/welfare_api.py b/gate_api/api/welfare_api.py new file mode 100644 index 00000000..fcfaa782 --- /dev/null +++ b/gate_api/api/welfare_api.py @@ -0,0 +1,483 @@ +# 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 WelfareApi(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 get_user_identity(self, **kwargs): # noqa: E501 + """Get user identity # noqa: E501 + + Validate whether the user is eligible for new user rewards. Returns the corresponding error code on validation failure, data is an empty object on success. # 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_identity(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.ApiResponseExSkillGetUserIdentityResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_identity_with_http_info(**kwargs) # noqa: E501 + + def get_user_identity_with_http_info(self, **kwargs): # noqa: E501 + """Get user identity # noqa: E501 + + Validate whether the user is eligible for new user rewards. Returns the corresponding error code on validation failure, data is an empty object on success. # 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_identity_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.ApiResponseExSkillGetUserIdentityResp, 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_user_identity" % 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( + '/rewards/getUserIdentity', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseExSkillGetUserIdentityResp', # 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_beginner_task_list(self, **kwargs): # noqa: E501 + """Get beginner task list # noqa: E501 + + Get the current user's onboarding task list. By default, the registration tasks (type=10) and guidance tasks (type=11) that have been assigned to the current user are returned. The registration tasks are ranked first and the guidance tasks are ranked behind. When the user does not have a download task and the system determines that the user has not downloaded the app, a \"Download task to be received\" card will be dynamically added. Among them: - `task_type = 23` for download tasks - `status = 0` for download tasks to be collected Results are cached for 60 seconds. Task lists are limited in number (usually no more than 10) and do not require pagination. # 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_beginner_task_list(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.ApiResponseExSkillGetBeginnerTaskListResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_beginner_task_list_with_http_info(**kwargs) # noqa: E501 + + def get_beginner_task_list_with_http_info(self, **kwargs): # noqa: E501 + """Get beginner task list # noqa: E501 + + Get the current user's onboarding task list. By default, the registration tasks (type=10) and guidance tasks (type=11) that have been assigned to the current user are returned. The registration tasks are ranked first and the guidance tasks are ranked behind. When the user does not have a download task and the system determines that the user has not downloaded the app, a \"Download task to be received\" card will be dynamically added. Among them: - `task_type = 23` for download tasks - `status = 0` for download tasks to be collected Results are cached for 60 seconds. Task lists are limited in number (usually no more than 10) and do not require pagination. # 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_beginner_task_list_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.ApiResponseExSkillGetBeginnerTaskListResp, 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_beginner_task_list" % 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( + '/rewards/getBeginnerTaskList', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseExSkillGetBeginnerTaskListResp', # 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 claim_task(self, ex_skill_claim_task_req, **kwargs): # noqa: E501 + """Get the task # noqa: E501 + + Receive a single welfare task. The current main scene is for new customer download tasks to be collected, but the interface itself supports new customer registration, guidance, and advanced task types. Processing flow: 1. Read the logged in user 2. Verify user qualifications 3. Risk control verification (event code `task_center`) 4. Verify task configuration and task center tasks 5. Verify whether there is an ongoing task 6. If it is a download task, verify whether the App has been downloaded 7. Write `welfare_user_tasks_xx` 8. Report to task center Risk control transparent transmission fields: - Old fields: `user_id`, `ip`, `const_id`, `is_async`, `action`, `task_id` - New fields: `req_method`, `traceid` - Among them: - `req_method` from `X-Gate-Request-Source` - `ip` from `X-Gate-Ip` - `traceid` from `X-Gate-Trace-Id` - `const_id` is fixed to 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.claim_task(ex_skill_claim_task_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param ExSkillClaimTaskReq ex_skill_claim_task_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.ApiResponseExSkillClaimTaskResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.claim_task_with_http_info(ex_skill_claim_task_req, **kwargs) # noqa: E501 + + def claim_task_with_http_info(self, ex_skill_claim_task_req, **kwargs): # noqa: E501 + """Get the task # noqa: E501 + + Receive a single welfare task. The current main scene is for new customer download tasks to be collected, but the interface itself supports new customer registration, guidance, and advanced task types. Processing flow: 1. Read the logged in user 2. Verify user qualifications 3. Risk control verification (event code `task_center`) 4. Verify task configuration and task center tasks 5. Verify whether there is an ongoing task 6. If it is a download task, verify whether the App has been downloaded 7. Write `welfare_user_tasks_xx` 8. Report to task center Risk control transparent transmission fields: - Old fields: `user_id`, `ip`, `const_id`, `is_async`, `action`, `task_id` - New fields: `req_method`, `traceid` - Among them: - `req_method` from `X-Gate-Request-Source` - `ip` from `X-Gate-Ip` - `traceid` from `X-Gate-Trace-Id` - `const_id` is fixed to 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.claim_task_with_http_info(ex_skill_claim_task_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param ExSkillClaimTaskReq ex_skill_claim_task_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.ApiResponseExSkillClaimTaskResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'ex_skill_claim_task_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 claim_task" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'ex_skill_claim_task_req' is set + if self.api_client.client_side_validation and ('ex_skill_claim_task_req' not in local_var_params or # noqa: E501 + local_var_params['ex_skill_claim_task_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ex_skill_claim_task_req` when calling `claim_task`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'ex_skill_claim_task_req' in local_var_params: + body_params = local_var_params['ex_skill_claim_task_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( + '/rewards/claimTask', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseExSkillClaimTaskResp', # 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 claim_reward(self, ex_skill_claim_reward_req, **kwargs): # noqa: E501 + """Receive mission rewards # noqa: E501 + + Receive rewards from a single welfare task. Processing flow: 1. Read the logged in user 2. Verify user qualifications 3. Query `welfare_user_tasks_xx` and require the task status to be `StatusDone(2)` 4. Risk control verification (event code `index_page_check`) 5. Query task details and reward information in the task center 6. If the reward is m and n is selected from the prize pool, then `has_m_n_task = true` will be returned and the reward will not be actually issued. 7. Ordinary rewards will enter the original reward collection logic of the Welfare Center Risk control transparent transmission fields: - Old fields: `user_id`, `ip`, `const_id`, `is_async` - New fields: `req_method`, `traceid` - Among them: - `req_method` from `X-Gate-Request-Source` - `ip` from `X-Gate-Ip` - `traceid` from `X-Gate-Trace-Id` - `const_id` is fixed to 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.claim_reward(ex_skill_claim_reward_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param ExSkillClaimRewardReq ex_skill_claim_reward_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.ApiResponseExSkillClaimRewardResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.claim_reward_with_http_info(ex_skill_claim_reward_req, **kwargs) # noqa: E501 + + def claim_reward_with_http_info(self, ex_skill_claim_reward_req, **kwargs): # noqa: E501 + """Receive mission rewards # noqa: E501 + + Receive rewards from a single welfare task. Processing flow: 1. Read the logged in user 2. Verify user qualifications 3. Query `welfare_user_tasks_xx` and require the task status to be `StatusDone(2)` 4. Risk control verification (event code `index_page_check`) 5. Query task details and reward information in the task center 6. If the reward is m and n is selected from the prize pool, then `has_m_n_task = true` will be returned and the reward will not be actually issued. 7. Ordinary rewards will enter the original reward collection logic of the Welfare Center Risk control transparent transmission fields: - Old fields: `user_id`, `ip`, `const_id`, `is_async` - New fields: `req_method`, `traceid` - Among them: - `req_method` from `X-Gate-Request-Source` - `ip` from `X-Gate-Ip` - `traceid` from `X-Gate-Trace-Id` - `const_id` is fixed to 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.claim_reward_with_http_info(ex_skill_claim_reward_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param ExSkillClaimRewardReq ex_skill_claim_reward_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.ApiResponseExSkillClaimRewardResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'ex_skill_claim_reward_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 claim_reward" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'ex_skill_claim_reward_req' is set + if self.api_client.client_side_validation and ('ex_skill_claim_reward_req' not in local_var_params or # noqa: E501 + local_var_params['ex_skill_claim_reward_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ex_skill_claim_reward_req` when calling `claim_reward`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'ex_skill_claim_reward_req' in local_var_params: + body_params = local_var_params['ex_skill_claim_reward_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( + '/rewards/claimReward', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseExSkillClaimRewardResp', # 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_client.py b/gate_api/api_client.py index 06dadb22..8118909a 100644 --- a/gate_api/api_client.py +++ b/gate_api/api_client.py @@ -83,7 +83,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/7.2.39/python' + self.user_agent = 'OpenAPI-Generator/7.2.100/python' # Set default X-Gate-Size-Decimal header for futures API self.default_headers['X-Gate-Size-Decimal'] = '1' self.client_side_validation = configuration.client_side_validation diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 4870d63b..2df3abfc 100644 --- a/gate_api/configuration.py +++ b/gate_api/configuration.py @@ -313,8 +313,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v4.106.39\n"\ - "SDK Package Version: 7.2.39".\ + "Version of the API: v4.106.100\n"\ + "SDK Package Version: 7.2.100".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py index 11c534fd..ef30069f 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -14,6 +14,22 @@ from __future__ import absolute_import # import models into model package +from gate_api.models.ai_hub_create_data import AIHubCreateData +from gate_api.models.ai_hub_create_success_response import AIHubCreateSuccessResponse +from gate_api.models.ai_hub_discover_data import AIHubDiscoverData +from gate_api.models.ai_hub_discover_success_response import AIHubDiscoverSuccessResponse +from gate_api.models.ai_hub_portfolio_base_info import AIHubPortfolioBaseInfo +from gate_api.models.ai_hub_portfolio_detail_data import AIHubPortfolioDetailData +from gate_api.models.ai_hub_portfolio_detail_success_response import AIHubPortfolioDetailSuccessResponse +from gate_api.models.ai_hub_portfolio_metrics import AIHubPortfolioMetrics +from gate_api.models.ai_hub_portfolio_position import AIHubPortfolioPosition +from gate_api.models.ai_hub_portfolio_running_data import AIHubPortfolioRunningData +from gate_api.models.ai_hub_portfolio_running_item import AIHubPortfolioRunningItem +from gate_api.models.ai_hub_portfolio_running_success_response import AIHubPortfolioRunningSuccessResponse +from gate_api.models.ai_hub_portfolio_stop_data import AIHubPortfolioStopData +from gate_api.models.ai_hub_portfolio_stop_request import AIHubPortfolioStopRequest +from gate_api.models.ai_hub_portfolio_stop_success_response import AIHubPortfolioStopSuccessResponse +from gate_api.models.ai_hub_recommendation import AIHubRecommendation from gate_api.models.account_balance import AccountBalance from gate_api.models.account_book_response import AccountBookResponse from gate_api.models.account_detail import AccountDetail @@ -29,10 +45,46 @@ 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.alpha_currency import AlphaCurrency from gate_api.models.alpha_ticker import AlphaTicker +from gate_api.models.amend_options_order_request import AmendOptionsOrderRequest +from gate_api.models.api_response_asset_swap_config import ApiResponseAssetSwapConfig +from gate_api.models.api_response_asset_swap_evaluate import ApiResponseAssetSwapEvaluate +from gate_api.models.api_response_asset_swap_list_assets import ApiResponseAssetSwapListAssets +from gate_api.models.api_response_asset_swap_order_create_v1 import ApiResponseAssetSwapOrderCreateV1 +from gate_api.models.api_response_asset_swap_order_list_v1 import ApiResponseAssetSwapOrderListV1 +from gate_api.models.api_response_asset_swap_order_preview_v1 import ApiResponseAssetSwapOrderPreviewV1 +from gate_api.models.api_response_asset_swap_order_query_v1 import ApiResponseAssetSwapOrderQueryV1 +from gate_api.models.api_response_ex_skill_claim_reward_resp import ApiResponseExSkillClaimRewardResp +from gate_api.models.api_response_ex_skill_claim_reward_resp_data import ApiResponseExSkillClaimRewardRespData +from gate_api.models.api_response_ex_skill_claim_task_resp import ApiResponseExSkillClaimTaskResp +from gate_api.models.api_response_ex_skill_get_beginner_task_list_resp import ApiResponseExSkillGetBeginnerTaskListResp +from gate_api.models.api_response_ex_skill_get_beginner_task_list_resp_data import ApiResponseExSkillGetBeginnerTaskListRespData +from gate_api.models.api_response_ex_skill_get_beginner_task_list_resp_data_tasks import ApiResponseExSkillGetBeginnerTaskListRespDataTasks +from gate_api.models.api_response_ex_skill_get_user_identity_resp import ApiResponseExSkillGetUserIdentityResp +from gate_api.models.asset_list_resp import AssetListResp +from gate_api.models.asset_swap_frontend import AssetSwapFrontend +from gate_api.models.auto_invest_coins_item import AutoInvestCoinsItem +from gate_api.models.auto_invest_config_item import AutoInvestConfigItem +from gate_api.models.auto_invest_min_invest_amount import AutoInvestMinInvestAmount +from gate_api.models.auto_invest_min_invest_amount_items import AutoInvestMinInvestAmountItems +from gate_api.models.auto_invest_min_invest_amount_resp import AutoInvestMinInvestAmountResp +from gate_api.models.auto_invest_order_item import AutoInvestOrderItem +from gate_api.models.auto_invest_plan_add_position import AutoInvestPlanAddPosition +from gate_api.models.auto_invest_plan_create import AutoInvestPlanCreate +from gate_api.models.auto_invest_plan_create_items import AutoInvestPlanCreateItems +from gate_api.models.auto_invest_plan_create_resp import AutoInvestPlanCreateResp +from gate_api.models.auto_invest_plan_detail import AutoInvestPlanDetail +from gate_api.models.auto_invest_plan_list_info_resp import AutoInvestPlanListInfoResp +from gate_api.models.auto_invest_plan_record_item import AutoInvestPlanRecordItem +from gate_api.models.auto_invest_plan_records_resp import AutoInvestPlanRecordsResp +from gate_api.models.auto_invest_plan_stop import AutoInvestPlanStop +from gate_api.models.auto_invest_plan_update import AutoInvestPlanUpdate +from gate_api.models.auto_invest_portfolio_item import AutoInvestPortfolioItem from gate_api.models.auto_repay_setting import AutoRepaySetting from gate_api.models.award_list_struct import AwardListStruct from gate_api.models.award_list_struct_list import AwardListStructList +from gate_api.models.base_response import BaseResponse from gate_api.models.batch_amend_item import BatchAmendItem from gate_api.models.batch_amend_order_req import BatchAmendOrderReq from gate_api.models.batch_funding_rates_request import BatchFundingRatesRequest @@ -41,16 +93,30 @@ 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_item import BrokerCommissionItem 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.broker_transaction_history import BrokerTransactionHistory from gate_api.models.cancel_batch_order import CancelBatchOrder from gate_api.models.cancel_order import CancelOrder from gate_api.models.cancel_order_result import CancelOrderResult +from gate_api.models.candy_drop_v4_activity_cd01 import CandyDropV4ActivityCd01 +from gate_api.models.candy_drop_v4_activity_rules_cd03 import CandyDropV4ActivityRulesCd03 +from gate_api.models.candy_drop_v4_airdrop_record_cd06 import CandyDropV4AirdropRecordCd06 +from gate_api.models.candy_drop_v4_error_cd01 import CandyDropV4ErrorCd01 +from gate_api.models.candy_drop_v4_participation_record_cd05 import CandyDropV4ParticipationRecordCd05 +from gate_api.models.candy_drop_v4_prize_pool_cd03 import CandyDropV4PrizePoolCd03 +from gate_api.models.candy_drop_v4_register_req_cd02 import CandyDropV4RegisterReqCd02 +from gate_api.models.candy_drop_v4_register_resp_cd02 import CandyDropV4RegisterRespCd02 +from gate_api.models.candy_drop_v4_task_cd03 import CandyDropV4TaskCd03 +from gate_api.models.candy_drop_v4_task_progress_cd04 import CandyDropV4TaskProgressCd04 +from gate_api.models.candy_drop_v4_task_progress_item_cd04 import CandyDropV4TaskProgressItemCd04 from gate_api.models.categories import Categories from gate_api.models.categories_data import CategoriesData from gate_api.models.categories_data_list import CategoriesDataList +from gate_api.models.chase_order import ChaseOrder +from gate_api.models.claim_reward_error import ClaimRewardError +from gate_api.models.claim_task_error import ClaimTaskError from gate_api.models.collateral_adjust import CollateralAdjust from gate_api.models.collateral_adjust_res import CollateralAdjustRes from gate_api.models.collateral_currency import CollateralCurrency @@ -65,15 +131,30 @@ from gate_api.models.contract_detail import ContractDetail from gate_api.models.contract_detail_data import ContractDetailData from gate_api.models.contract_detail_data_list import ContractDetailDataList +from gate_api.models.contract_martingale_create_params import ContractMartingaleCreateParams +from gate_api.models.contract_martingale_create_request import ContractMartingaleCreateRequest +from gate_api.models.contract_martingale_direction import ContractMartingaleDirection from gate_api.models.contract_stat import ContractStat +from gate_api.models.convert_currencies_v2_item import ConvertCurrenciesV2Item 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_chase_order_req import CreateChaseOrderReq +from gate_api.models.create_chase_order_resp import CreateChaseOrderResp +from gate_api.models.create_earn_fixed_term_lend_response import CreateEarnFixedTermLendResponse +from gate_api.models.create_earn_fixed_term_lend_response_data import CreateEarnFixedTermLendResponseData +from gate_api.models.create_earn_fixed_term_pre_redeem_response import CreateEarnFixedTermPreRedeemResponse from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder from gate_api.models.create_order import CreateOrder -from gate_api.models.create_order_data import CreateOrderData +from gate_api.models.create_order2 import CreateOrder2 +from gate_api.models.create_order2_data import CreateOrder2Data +from gate_api.models.create_order_detail import CreateOrderDetail +from gate_api.models.create_order_v4 import CreateOrderV4 +from gate_api.models.create_param import CreateParam from gate_api.models.create_trail_order import CreateTrailOrder +from gate_api.models.create_trail_order_response import CreateTrailOrderResponse +from gate_api.models.create_trail_order_result import CreateTrailOrderResult from gate_api.models.create_transaction import CreateTransaction from gate_api.models.create_uni_lend import CreateUniLend from gate_api.models.create_uni_loan import CreateUniLoan @@ -82,17 +163,39 @@ from gate_api.models.cross_margin_balance import CrossMarginBalance from gate_api.models.cross_margin_loan import CrossMarginLoan from gate_api.models.cross_margin_repayment import CrossMarginRepayment +from gate_api.models.crossex_account import CrossexAccount +from gate_api.models.crossex_account_asset import CrossexAccountAsset +from gate_api.models.crossex_account_book_record import CrossexAccountBookRecord from gate_api.models.crossex_account_update_request import CrossexAccountUpdateRequest +from gate_api.models.crossex_account_update_response import CrossexAccountUpdateResponse +from gate_api.models.crossex_adl_rank import CrossexAdlRank from gate_api.models.crossex_close_position_request import CrossexClosePositionRequest +from gate_api.models.crossex_coin_discount_rate import CrossexCoinDiscountRate from gate_api.models.crossex_convert_order_request import CrossexConvertOrderRequest +from gate_api.models.crossex_convert_order_response import CrossexConvertOrderResponse from gate_api.models.crossex_convert_quote_request import CrossexConvertQuoteRequest +from gate_api.models.crossex_convert_quote_response import CrossexConvertQuoteResponse +from gate_api.models.crossex_historical_margin_position import CrossexHistoricalMarginPosition +from gate_api.models.crossex_historical_position import CrossexHistoricalPosition +from gate_api.models.crossex_interest_rate import CrossexInterestRate from gate_api.models.crossex_leverage_request import CrossexLeverageRequest +from gate_api.models.crossex_leverage_response import CrossexLeverageResponse +from gate_api.models.crossex_margin_interest_record import CrossexMarginInterestRecord +from gate_api.models.crossex_margin_position import CrossexMarginPosition +from gate_api.models.crossex_order import CrossexOrder +from gate_api.models.crossex_order_action_response import CrossexOrderActionResponse from gate_api.models.crossex_order_request import CrossexOrderRequest from gate_api.models.crossex_order_update_request import CrossexOrderUpdateRequest -from gate_api.models.crossex_rule_risk_limits_tiers import CrossexRuleRiskLimitsTiers +from gate_api.models.crossex_position import CrossexPosition +from gate_api.models.crossex_risk_limit import CrossexRiskLimit +from gate_api.models.crossex_risk_limit_tier import CrossexRiskLimitTier +from gate_api.models.crossex_special_fee import CrossexSpecialFee +from gate_api.models.crossex_trade import CrossexTrade +from gate_api.models.crossex_transfer_coin import CrossexTransferCoin +from gate_api.models.crossex_transfer_record import CrossexTransferRecord from gate_api.models.crossex_transfer_request import CrossexTransferRequest +from gate_api.models.crossex_transfer_response import CrossexTransferResponse from gate_api.models.currency import Currency -from gate_api.models.currency2 import Currency2 from gate_api.models.currency_chain import CurrencyChain from gate_api.models.currency_pair import CurrencyPair from gate_api.models.currency_quota import CurrencyQuota @@ -108,23 +211,66 @@ from gate_api.models.delivery_my_trade import DeliveryMyTrade from gate_api.models.delivery_order import DeliveryOrder from gate_api.models.delivery_order_book import DeliveryOrderBook +from gate_api.models.delivery_order_book_item import DeliveryOrderBookItem from gate_api.models.delivery_position import DeliveryPosition from gate_api.models.delivery_position_close import DeliveryPositionClose from gate_api.models.delivery_settlement import DeliverySettlement from gate_api.models.delivery_ticker import DeliveryTicker from gate_api.models.delivery_trade import DeliveryTrade +from gate_api.models.delta_neutral_enabled import DeltaNeutralEnabled from gate_api.models.deposit_address import DepositAddress from gate_api.models.deposit_record import DepositRecord +from gate_api.models.discover_scene import DiscoverScene from gate_api.models.dual_get_balance import DualGetBalance from gate_api.models.dual_get_orders import DualGetOrders from gate_api.models.dual_get_plans import DualGetPlans -from gate_api.models.error import Error -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.dual_modify_order_reinvest_params import DualModifyOrderReinvestParams +from gate_api.models.dual_order_refund_params import DualOrderRefundParams +from gate_api.models.dual_order_refund_preview import DualOrderRefundPreview +from gate_api.models.dual_project_recommend import DualProjectRecommend +from gate_api.models.earn_fixed_term_pre_redeem_request import EarnFixedTermPreRedeemRequest +from gate_api.models.eligibility import Eligibility +from gate_api.models.eligibility_response import EligibilityResponse +from gate_api.models.eligibility_response_all_of import EligibilityResponseAllOf +from gate_api.models.err_code_msg import ErrCodeMsg +from gate_api.models.error_response import ErrorResponse +from gate_api.models.evaluate_item import EvaluateItem +from gate_api.models.evaluate_resp import EvaluateResp +from gate_api.models.ex_skill_claim_reward_req import ExSkillClaimRewardReq +from gate_api.models.ex_skill_claim_task_req import ExSkillClaimTaskReq +from gate_api.models.fixed_term_bonus_info import FixedTermBonusInfo +from gate_api.models.fixed_term_coupon_info import FixedTermCouponInfo +from gate_api.models.fixed_term_history_record import FixedTermHistoryRecord +from gate_api.models.fixed_term_lend_order import FixedTermLendOrder +from gate_api.models.fixed_term_lend_request import FixedTermLendRequest +from gate_api.models.fixed_term_product import FixedTermProduct +from gate_api.models.fixed_term_product_info import FixedTermProductInfo +from gate_api.models.fixed_term_product_simple import FixedTermProductSimple from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair +from gate_api.models.flash_swap_error_response import FlashSwapErrorResponse +from gate_api.models.flash_swap_multi_currency_create_param import FlashSwapMultiCurrencyCreateParam +from gate_api.models.flash_swap_multi_currency_many_to_one_order_create_req import FlashSwapMultiCurrencyManyToOneOrderCreateReq +from gate_api.models.flash_swap_multi_currency_many_to_one_order_create_resp import FlashSwapMultiCurrencyManyToOneOrderCreateResp +from gate_api.models.flash_swap_multi_currency_many_to_one_order_create_resp_data import FlashSwapMultiCurrencyManyToOneOrderCreateRespData +from gate_api.models.flash_swap_multi_currency_many_to_one_order_preview_req import FlashSwapMultiCurrencyManyToOneOrderPreviewReq +from gate_api.models.flash_swap_multi_currency_many_to_one_order_preview_resp import FlashSwapMultiCurrencyManyToOneOrderPreviewResp +from gate_api.models.flash_swap_multi_currency_many_to_one_order_preview_resp_data import FlashSwapMultiCurrencyManyToOneOrderPreviewRespData +from gate_api.models.flash_swap_multi_currency_one_to_many_order_create_req import FlashSwapMultiCurrencyOneToManyOrderCreateReq +from gate_api.models.flash_swap_multi_currency_one_to_many_order_create_resp import FlashSwapMultiCurrencyOneToManyOrderCreateResp +from gate_api.models.flash_swap_multi_currency_one_to_many_order_create_resp_data import FlashSwapMultiCurrencyOneToManyOrderCreateRespData +from gate_api.models.flash_swap_multi_currency_one_to_many_order_preview_req import FlashSwapMultiCurrencyOneToManyOrderPreviewReq +from gate_api.models.flash_swap_multi_currency_one_to_many_order_preview_resp import FlashSwapMultiCurrencyOneToManyOrderPreviewResp +from gate_api.models.flash_swap_multi_currency_one_to_many_order_preview_resp_data import FlashSwapMultiCurrencyOneToManyOrderPreviewRespData +from gate_api.models.flash_swap_multi_currency_order import FlashSwapMultiCurrencyOrder +from gate_api.models.flash_swap_multi_currency_preview_order import FlashSwapMultiCurrencyPreviewOrder +from gate_api.models.flash_swap_multi_currency_preview_param import FlashSwapMultiCurrencyPreviewParam from gate_api.models.flash_swap_order import FlashSwapOrder +from gate_api.models.flash_swap_order_create_req import FlashSwapOrderCreateReq +from gate_api.models.flash_swap_order_create_resp import FlashSwapOrderCreateResp +from gate_api.models.flash_swap_order_create_resp_data import FlashSwapOrderCreateRespData from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview +from gate_api.models.flash_swap_order_preview_resp import FlashSwapOrderPreviewResp +from gate_api.models.flash_swap_order_preview_resp_data import FlashSwapOrderPreviewRespData 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 @@ -137,7 +283,10 @@ from gate_api.models.futures_bbo_order import FuturesBBOOrder from gate_api.models.futures_batch_amend_order_request import FuturesBatchAmendOrderRequest from gate_api.models.futures_candlestick import FuturesCandlestick +from gate_api.models.futures_direction import FuturesDirection from gate_api.models.futures_fee import FuturesFee +from gate_api.models.futures_grid_create_params import FuturesGridCreateParams +from gate_api.models.futures_grid_create_request import FuturesGridCreateRequest from gate_api.models.futures_index_constituents import FuturesIndexConstituents from gate_api.models.futures_initial_order import FuturesInitialOrder from gate_api.models.futures_leverage import FuturesLeverage @@ -148,7 +297,7 @@ 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_order_book_item1 import FuturesOrderBookItem1 +from gate_api.models.futures_order_timerange import FuturesOrderTimerange 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 @@ -157,109 +306,80 @@ from gate_api.models.futures_ticker import FuturesTicker from gate_api.models.futures_trade import FuturesTrade from gate_api.models.futures_update_price_triggered_order import FuturesUpdatePriceTriggeredOrder +from gate_api.models.gate_error_response import GateErrorResponse +from gate_api.models.get_beginner_task_list_error import GetBeginnerTaskListError +from gate_api.models.get_chase_order_detail_resp import GetChaseOrderDetailResp +from gate_api.models.get_chase_orders_resp import GetChaseOrdersResp from gate_api.models.get_chats_list_request import GetChatsListRequest from gate_api.models.get_completed_transaction_list_request import GetCompletedTransactionListRequest from gate_api.models.get_counterparty_user_info_request import GetCounterpartyUserInfoRequest +from gate_api.models.get_my_activity_entry_response import GetMyActivityEntryResponse +from gate_api.models.get_my_activity_entry_response_data import GetMyActivityEntryResponseData from gate_api.models.get_myself_payment_request import GetMyselfPaymentRequest from gate_api.models.get_pending_transaction_list_request import GetPendingTransactionListRequest from gate_api.models.get_transaction_details_request import GetTransactionDetailsRequest +from gate_api.models.get_user_coupon_detail_response import GetUserCouponDetailResponse +from gate_api.models.get_user_coupon_detail_response_data import GetUserCouponDetailResponseData +from gate_api.models.get_user_identity_error import GetUserIdentityError +from gate_api.models.hodler_airdrop_v4_error_response import HodlerAirdropV4ErrorResponse +from gate_api.models.hodler_airdrop_v4_order_request import HodlerAirdropV4OrderRequest +from gate_api.models.hodler_airdrop_v4_order_response import HodlerAirdropV4OrderResponse +from gate_api.models.hodler_airdrop_v4_project_item import HodlerAirdropV4ProjectItem +from gate_api.models.hodler_airdrop_v4_user_airdrop_record import HodlerAirdropV4UserAirdropRecord +from gate_api.models.hodler_airdrop_v4_user_order_record import HodlerAirdropV4UserOrderRecord from gate_api.models.index_constituent import IndexConstituent -from gate_api.models.inline_object import InlineObject -from gate_api.models.inline_object1 import InlineObject1 +from gate_api.models.infinite_grid_create_params import InfiniteGridCreateParams +from gate_api.models.infinite_grid_create_request import InfiniteGridCreateRequest from gate_api.models.inline_response200 import InlineResponse200 -from gate_api.models.inline_response2001 import InlineResponse2001 -from gate_api.models.inline_response20010 import InlineResponse20010 -from gate_api.models.inline_response20010_data import InlineResponse20010Data -from gate_api.models.inline_response20010_data_lists import InlineResponse20010DataLists -from gate_api.models.inline_response20011 import InlineResponse20011 -from gate_api.models.inline_response20011_data import InlineResponse20011Data -from gate_api.models.inline_response20011_data_crypto_currency_info import InlineResponse20011DataCryptoCurrencyInfo -from gate_api.models.inline_response20011_data_fiat_currency_info import InlineResponse20011DataFiatCurrencyInfo -from gate_api.models.inline_response20011_data_list import InlineResponse20011DataList -from gate_api.models.inline_response20012 import InlineResponse20012 -from gate_api.models.inline_response20012_data import InlineResponse20012Data -from gate_api.models.inline_response20012_data_list import InlineResponse20012DataList -from gate_api.models.inline_response20013 import InlineResponse20013 -from gate_api.models.inline_response20013_data import InlineResponse20013Data -from gate_api.models.inline_response20014 import InlineResponse20014 -from gate_api.models.inline_response20014_data import InlineResponse20014Data -from gate_api.models.inline_response20014_data_merchant_info import InlineResponse20014DataMerchantInfo -from gate_api.models.inline_response20015 import InlineResponse20015 -from gate_api.models.inline_response20015_data import InlineResponse20015Data -from gate_api.models.inline_response20016 import InlineResponse20016 -from gate_api.models.inline_response20016_data import InlineResponse20016Data -from gate_api.models.inline_response20016_list import InlineResponse20016List -from gate_api.models.inline_response20017 import InlineResponse20017 -from gate_api.models.inline_response20017_data import InlineResponse20017Data -from gate_api.models.inline_response20017_data_convert_info import InlineResponse20017DataConvertInfo -from gate_api.models.inline_response20017_data_list import InlineResponse20017DataList -from gate_api.models.inline_response20017_data_trans_time import InlineResponse20017DataTransTime -from gate_api.models.inline_response20018 import InlineResponse20018 -from gate_api.models.inline_response20018_data import InlineResponse20018Data -from gate_api.models.inline_response20019 import InlineResponse20019 -from gate_api.models.inline_response2002 import InlineResponse2002 -from gate_api.models.inline_response20020 import InlineResponse20020 -from gate_api.models.inline_response20020_data import InlineResponse20020Data -from gate_api.models.inline_response20021 import InlineResponse20021 -from gate_api.models.inline_response20021_data import InlineResponse20021Data -from gate_api.models.inline_response20022 import InlineResponse20022 -from gate_api.models.inline_response20022_data import InlineResponse20022Data -from gate_api.models.inline_response20022_data_lists import InlineResponse20022DataLists -from gate_api.models.inline_response20023 import InlineResponse20023 -from gate_api.models.inline_response20023_data import InlineResponse20023Data -from gate_api.models.inline_response20024 import InlineResponse20024 -from gate_api.models.inline_response20024_data import InlineResponse20024Data -from gate_api.models.inline_response20024_data_messages import InlineResponse20024DataMessages -from gate_api.models.inline_response20024_data_msg_obj import InlineResponse20024DataMsgObj -from gate_api.models.inline_response20025 import InlineResponse20025 -from gate_api.models.inline_response20025_data import InlineResponse20025Data -from gate_api.models.inline_response20026 import InlineResponse20026 -from gate_api.models.inline_response20026_data import InlineResponse20026Data -from gate_api.models.inline_response20027 import InlineResponse20027 -from gate_api.models.inline_response20028 import InlineResponse20028 -from gate_api.models.inline_response20029 import InlineResponse20029 -from gate_api.models.inline_response2003 import InlineResponse2003 -from gate_api.models.inline_response20030 import InlineResponse20030 -from gate_api.models.inline_response20031 import InlineResponse20031 -from gate_api.models.inline_response20032 import InlineResponse20032 -from gate_api.models.inline_response20033 import InlineResponse20033 -from gate_api.models.inline_response20034 import InlineResponse20034 -from gate_api.models.inline_response20035 import InlineResponse20035 -from gate_api.models.inline_response20035_assets import InlineResponse20035Assets -from gate_api.models.inline_response20036 import InlineResponse20036 -from gate_api.models.inline_response20037 import InlineResponse20037 -from gate_api.models.inline_response20037_special_fee_list import InlineResponse20037SpecialFeeList -from gate_api.models.inline_response20038 import InlineResponse20038 -from gate_api.models.inline_response20039 import InlineResponse20039 -from gate_api.models.inline_response2004 import InlineResponse2004 -from gate_api.models.inline_response20040 import InlineResponse20040 -from gate_api.models.inline_response20041 import InlineResponse20041 -from gate_api.models.inline_response20042 import InlineResponse20042 -from gate_api.models.inline_response20043 import InlineResponse20043 -from gate_api.models.inline_response20044 import InlineResponse20044 -from gate_api.models.inline_response20045 import InlineResponse20045 -from gate_api.models.inline_response20046 import InlineResponse20046 -from gate_api.models.inline_response20047 import InlineResponse20047 -from gate_api.models.inline_response2005 import InlineResponse2005 -from gate_api.models.inline_response2006 import InlineResponse2006 -from gate_api.models.inline_response2006_data import InlineResponse2006Data -from gate_api.models.inline_response2007 import InlineResponse2007 -from gate_api.models.inline_response2008 import InlineResponse2008 -from gate_api.models.inline_response2009 import InlineResponse2009 -from gate_api.models.inline_response2009_data import InlineResponse2009Data -from gate_api.models.inline_response201 import InlineResponse201 -from gate_api.models.inline_response201_data import InlineResponse201Data -from gate_api.models.inline_response202 import InlineResponse202 -from gate_api.models.inline_response2021 import InlineResponse2021 from gate_api.models.insurance_record import InsuranceRecord from gate_api.models.klines import Klines from gate_api.models.klines_data import KlinesData from gate_api.models.klines_data_list import KlinesDataList +from gate_api.models.ladder_apr import LadderApr +from gate_api.models.launch_pool_v4_create_order_response import LaunchPoolV4CreateOrderResponse +from gate_api.models.launch_pool_v4_error_response import LaunchPoolV4ErrorResponse +from gate_api.models.launch_pool_v4_pledge_record import LaunchPoolV4PledgeRecord +from gate_api.models.launch_pool_v4_project import LaunchPoolV4Project +from gate_api.models.launch_pool_v4_reward_pool import LaunchPoolV4RewardPool +from gate_api.models.launch_pool_v4_reward_record import LaunchPoolV4RewardRecord from gate_api.models.ledger_record import LedgerRecord from gate_api.models.liquidate_order import LiquidateOrder +from gate_api.models.list_activities_response import ListActivitiesResponse +from gate_api.models.list_activities_response_data import ListActivitiesResponseData +from gate_api.models.list_activities_response_data_list import ListActivitiesResponseDataList +from gate_api.models.list_activity_types_response import ListActivityTypesResponse +from gate_api.models.list_activity_types_response_data import ListActivityTypesResponseData +from gate_api.models.list_activity_types_response_data_list import ListActivityTypesResponseDataList +from gate_api.models.list_earn_fixed_term_history_response import ListEarnFixedTermHistoryResponse +from gate_api.models.list_earn_fixed_term_history_response_data import ListEarnFixedTermHistoryResponseData +from gate_api.models.list_earn_fixed_term_lends_response import ListEarnFixedTermLendsResponse +from gate_api.models.list_earn_fixed_term_lends_response_data import ListEarnFixedTermLendsResponseData +from gate_api.models.list_earn_fixed_term_products_by_asset_response import ListEarnFixedTermProductsByAssetResponse +from gate_api.models.list_earn_fixed_term_products_by_asset_response_data import ListEarnFixedTermProductsByAssetResponseData +from gate_api.models.list_earn_fixed_term_products_response import ListEarnFixedTermProductsResponse +from gate_api.models.list_earn_fixed_term_products_response_data import ListEarnFixedTermProductsResponseData +from gate_api.models.list_live_replay_error import ListLiveReplayError +from gate_api.models.list_live_replay_response import ListLiveReplayResponse +from gate_api.models.list_live_replay_response_data import ListLiveReplayResponseData +from gate_api.models.list_live_replay_response_data_list import ListLiveReplayResponseDataList +from gate_api.models.list_live_replay_response_data_live import ListLiveReplayResponseDataLive +from gate_api.models.list_live_replay_response_data_live_host import ListLiveReplayResponseDataLiveHost +from gate_api.models.list_live_replay_response_data_video import ListLiveReplayResponseDataVideo +from gate_api.models.list_square_ai_search_error import ListSquareAiSearchError +from gate_api.models.list_square_ai_search_response import ListSquareAiSearchResponse +from gate_api.models.list_square_ai_search_response_data import ListSquareAiSearchResponseData +from gate_api.models.list_square_ai_search_response_data_items import ListSquareAiSearchResponseDataItems +from gate_api.models.list_user_coupons_response import ListUserCouponsResponse +from gate_api.models.list_user_coupons_response_data import ListUserCouponsResponseData +from gate_api.models.list_user_coupons_response_data_help_url import ListUserCouponsResponseDataHelpUrl +from gate_api.models.list_user_coupons_response_data_jump_url import ListUserCouponsResponseDataJumpUrl +from gate_api.models.list_user_coupons_response_data_list import ListUserCouponsResponseDataList +from gate_api.models.list_user_coupons_response_data_progress_config import ListUserCouponsResponseDataProgressConfig 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_grid_create_params import MarginGridCreateParams +from gate_api.models.margin_grid_create_request import MarginGridCreateRequest 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 @@ -310,6 +430,8 @@ 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_create_v1_req import OrderCreateV1Req +from gate_api.models.order_create_v1_resp import OrderCreateV1Resp from gate_api.models.order_history_list import OrderHistoryList from gate_api.models.order_history_list_data import OrderHistoryListData from gate_api.models.order_history_list_data_list import OrderHistoryListDataList @@ -318,14 +440,93 @@ from gate_api.models.order_list_data_list import OrderListDataList from gate_api.models.order_list_struct import OrderListStruct from gate_api.models.order_list_struct_list import OrderListStructList +from gate_api.models.order_list_v1_resp import OrderListV1Resp +from gate_api.models.order_log import OrderLog +from gate_api.models.order_log_data import OrderLogData from gate_api.models.order_patch import OrderPatch +from gate_api.models.order_preview_v1_req import OrderPreviewV1Req +from gate_api.models.order_preview_v1_resp import OrderPreviewV1Resp from gate_api.models.order_resp import OrderResp from gate_api.models.order_response import OrderResponse +from gate_api.models.otc_action_response import OtcActionResponse +from gate_api.models.otc_bank_create_multipart_request import OtcBankCreateMultipartRequest +from gate_api.models.otc_bank_create_response import OtcBankCreateResponse +from gate_api.models.otc_bank_create_response_data import OtcBankCreateResponseData +from gate_api.models.otc_bank_enterprise_supplement_multipart_request import OtcBankEnterpriseSupplementMultipartRequest +from gate_api.models.otc_bank_id_request import OtcBankIdRequest +from gate_api.models.otc_bank_list_item import OtcBankListItem +from gate_api.models.otc_bank_list_response import OtcBankListResponse +from gate_api.models.otc_bank_list_result import OtcBankListResult +from gate_api.models.otc_bank_personal_supplement_multipart_request import OtcBankPersonalSupplementMultipartRequest +from gate_api.models.otc_bank_supplement_checklist_item import OtcBankSupplementChecklistItem +from gate_api.models.otc_bank_supplement_checklist_response import OtcBankSupplementChecklistResponse +from gate_api.models.otc_bank_supplement_checklist_response_data import OtcBankSupplementChecklistResponseData from gate_api.models.otc_mark_order_paid_request import OtcMarkOrderPaidRequest +from gate_api.models.otc_order_detail import OtcOrderDetail +from gate_api.models.otc_order_detail_response import OtcOrderDetailResponse +from gate_api.models.otc_order_list_crypto_currency_info import OtcOrderListCryptoCurrencyInfo +from gate_api.models.otc_order_list_fiat_currency_info import OtcOrderListFiatCurrencyInfo +from gate_api.models.otc_order_list_item import OtcOrderListItem +from gate_api.models.otc_order_list_response import OtcOrderListResponse +from gate_api.models.otc_order_list_result import OtcOrderListResult from gate_api.models.otc_order_request import OtcOrderRequest from gate_api.models.otc_quote_request import OtcQuoteRequest +from gate_api.models.otc_quote_response import OtcQuoteResponse +from gate_api.models.otc_quote_result import OtcQuoteResult +from gate_api.models.otc_stable_coin_order_create_response import OtcStableCoinOrderCreateResponse +from gate_api.models.otc_stable_coin_order_list_item import OtcStableCoinOrderListItem +from gate_api.models.otc_stable_coin_order_list_response import OtcStableCoinOrderListResponse +from gate_api.models.otc_stable_coin_order_list_result import OtcStableCoinOrderListResult from gate_api.models.otc_stable_coin_order_request import OtcStableCoinOrderRequest +from gate_api.models.other_contact import OtherContact +from gate_api.models.p2p_ad_detail import P2pAdDetail +from gate_api.models.p2p_ad_detail_response import P2pAdDetailResponse +from gate_api.models.p2p_ads_list_item import P2pAdsListItem +from gate_api.models.p2p_ads_list_response import P2pAdsListResponse +from gate_api.models.p2p_ads_update_status_response import P2pAdsUpdateStatusResponse +from gate_api.models.p2p_ads_update_status_result import P2pAdsUpdateStatusResult +from gate_api.models.p2p_chat_list_response import P2pChatListResponse +from gate_api.models.p2p_chat_list_result import P2pChatListResult +from gate_api.models.p2p_chat_message import P2pChatMessage +from gate_api.models.p2p_chat_message_payload import P2pChatMessagePayload +from gate_api.models.p2p_counterparty_user_info import P2pCounterpartyUserInfo +from gate_api.models.p2p_counterparty_user_info_response import P2pCounterpartyUserInfoResponse +from gate_api.models.p2p_merchant_books_place_biz_push_order_response import P2pMerchantBooksPlaceBizPushOrderResponse +from gate_api.models.p2p_merchant_books_place_biz_push_order_response_data import P2pMerchantBooksPlaceBizPushOrderResponseData +from gate_api.models.p2p_merchant_books_place_biz_push_order_response_data_risk_event import P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent +from gate_api.models.p2p_merchant_books_place_biz_push_order_response_data_risk_event_action import P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction +from gate_api.models.p2p_merchant_market_info import P2pMerchantMarketInfo +from gate_api.models.p2p_merchant_user_info import P2pMerchantUserInfo +from gate_api.models.p2p_merchant_user_info_response import P2pMerchantUserInfoResponse +from gate_api.models.p2p_merchant_work_hours import P2pMerchantWorkHours +from gate_api.models.p2p_merchant_work_hours_response import P2pMerchantWorkHoursResponse +from gate_api.models.p2p_my_ad import P2pMyAd +from gate_api.models.p2p_my_ads_list_response import P2pMyAdsListResponse +from gate_api.models.p2p_my_ads_list_result import P2pMyAdsListResult +from gate_api.models.p2p_payment_method_account import P2pPaymentMethodAccount +from gate_api.models.p2p_payment_method_group import P2pPaymentMethodGroup +from gate_api.models.p2p_payment_methods_response import P2pPaymentMethodsResponse +from gate_api.models.p2p_send_chat_message_response import P2pSendChatMessageResponse +from gate_api.models.p2p_send_chat_message_result import P2pSendChatMessageResult +from gate_api.models.p2p_transaction_action_response import P2pTransactionActionResponse +from gate_api.models.p2p_transaction_convert_info import P2pTransactionConvertInfo +from gate_api.models.p2p_transaction_detail import P2pTransactionDetail +from gate_api.models.p2p_transaction_detail_pay_others import P2pTransactionDetailPayOthers +from gate_api.models.p2p_transaction_detail_response import P2pTransactionDetailResponse +from gate_api.models.p2p_transaction_list_item import P2pTransactionListItem +from gate_api.models.p2p_transaction_list_response import P2pTransactionListResponse +from gate_api.models.p2p_transaction_list_result import P2pTransactionListResult +from gate_api.models.p2p_transaction_list_result_pay_others import P2pTransactionListResultPayOthers +from gate_api.models.p2p_transaction_time_marker import P2pTransactionTimeMarker +from gate_api.models.p2p_upload_chat_file_response import P2pUploadChatFileResponse +from gate_api.models.p2p_upload_chat_file_result import P2pUploadChatFileResult +from gate_api.models.partner_application import PartnerApplication +from gate_api.models.partner_application_response import PartnerApplicationResponse +from gate_api.models.partner_application_response_all_of import PartnerApplicationResponseAllOf from gate_api.models.partner_commission_history import PartnerCommissionHistory +from gate_api.models.partner_data_aggregated import PartnerDataAggregated +from gate_api.models.partner_data_aggregated_response import PartnerDataAggregatedResponse +from gate_api.models.partner_data_aggregated_response_all_of import PartnerDataAggregatedResponseAllOf 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 @@ -347,10 +548,22 @@ from gate_api.models.position_list_data import PositionListData from gate_api.models.position_list_data_list import PositionListDataList from gate_api.models.position_timerange import PositionTimerange +from gate_api.models.preview_from_param import PreviewFromParam +from gate_api.models.preview_order import PreviewOrder +from gate_api.models.preview_order_detail import PreviewOrderDetail +from gate_api.models.preview_to_param import PreviewToParam from gate_api.models.profit_loss_range import ProfitLossRange +from gate_api.models.quick_estimated_repayment import QuickEstimatedRepayment +from gate_api.models.quick_repayment_request import QuickRepaymentRequest +from gate_api.models.quick_repayment_response import QuickRepaymentResponse from gate_api.models.quote_request import QuoteRequest from gate_api.models.quote_response import QuoteResponse from gate_api.models.rebate_user_info import RebateUserInfo +from gate_api.models.recommend import Recommend +from gate_api.models.recommend_v2_scheme import RecommendV2Scheme +from gate_api.models.recommend_v2_strategy import RecommendV2Strategy +from gate_api.models.redeem_launch_pool_response import RedeemLaunchPoolResponse +from gate_api.models.redeem_v4 import RedeemV4 from gate_api.models.repay_currency_res import RepayCurrencyRes from gate_api.models.repay_multi_loan import RepayMultiLoan from gate_api.models.repay_record_currency import RepayRecordCurrency @@ -360,23 +573,32 @@ from gate_api.models.risk_units import RiskUnits from gate_api.models.saved_address import SavedAddress from gate_api.models.send_chat_message_request import SendChatMessageRequest +from gate_api.models.set_merchant_work_hours_request import SetMerchantWorkHoursRequest 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_grid_create_params import SpotGridCreateParams +from gate_api.models.spot_grid_create_request import SpotGridCreateRequest from gate_api.models.spot_insurance_history import SpotInsuranceHistory +from gate_api.models.spot_martingale_create_params import SpotMartingaleCreateParams +from gate_api.models.spot_martingale_create_request import SpotMartingaleCreateRequest +from gate_api.models.spot_order_stop_loss import SpotOrderStopLoss +from gate_api.models.spot_order_stop_profit import SpotOrderStopProfit 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.stop_all_chase_orders_req import StopAllChaseOrdersReq +from gate_api.models.stop_all_chase_orders_resp import StopAllChaseOrdersResp from gate_api.models.stop_all_trail_orders import StopAllTrailOrders +from gate_api.models.stop_chase_order_req import StopChaseOrderReq +from gate_api.models.stop_chase_order_resp import StopChaseOrderResp from gate_api.models.stop_trail_order import StopTrailOrder 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.strategy_type import StrategyType 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 @@ -397,19 +619,25 @@ from gate_api.models.symbols_data_list import SymbolsDataList from gate_api.models.system_time import SystemTime from gate_api.models.ticker import Ticker -from gate_api.models.ticker2 import Ticker2 -from gate_api.models.ticker2_data import Ticker2Data from gate_api.models.tokens import Tokens from gate_api.models.total_balance import TotalBalance from gate_api.models.trad_fi_close_position_request import TradFiClosePositionRequest +from gate_api.models.trad_fi_error import TradFiError from gate_api.models.trad_fi_order_request import TradFiOrderRequest from gate_api.models.trad_fi_order_update_request import TradFiOrderUpdateRequest from gate_api.models.trad_fi_position_update_request import TradFiPositionUpdateRequest +from gate_api.models.trad_fi_ticker import TradFiTicker +from gate_api.models.trad_fi_ticker_data import TradFiTickerData from gate_api.models.trad_fi_transaction_request import TradFiTransactionRequest from gate_api.models.trade import Trade from gate_api.models.trade_fee import TradeFee from gate_api.models.trail_change_log import TrailChangeLog from gate_api.models.trail_order import TrailOrder +from gate_api.models.trail_order_change_log_response import TrailOrderChangeLogResponse +from gate_api.models.trail_order_detail_response import TrailOrderDetailResponse +from gate_api.models.trail_order_list_response import TrailOrderListResponse +from gate_api.models.trail_order_response import TrailOrderResponse +from gate_api.models.transaction_config import TransactionConfig from gate_api.models.transaction_id import TransactionID from gate_api.models.transaction_list import TransactionList from gate_api.models.transaction_list_data import TransactionListData @@ -422,9 +650,11 @@ 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_chart_point import UniChartPoint 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_estimated_rate import UniEstimatedRate from gate_api.models.uni_interest_record import UniInterestRecord from gate_api.models.uni_lend import UniLend from gate_api.models.uni_lend_interest import UniLendInterest @@ -435,7 +665,6 @@ 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 @@ -452,9 +681,14 @@ 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_quick_repay_available_item import UnifiedQuickRepayAvailableItem +from gate_api.models.unified_quick_repay_debt_item import UnifiedQuickRepayDebtItem +from gate_api.models.unified_quick_repay_repaid_info import UnifiedQuickRepayRepaidInfo +from gate_api.models.unified_quick_repay_used_info import UnifiedQuickRepayUsedInfo 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.update_dual_comp_position_cross_mode_request import UpdateDualCompPositionCrossModeRequest from gate_api.models.update_order import UpdateOrder from gate_api.models.update_order_data import UpdateOrderData from gate_api.models.update_position import UpdatePosition diff --git a/gate_api/models/ads_detail_request.py b/gate_api/models/ads_detail_request.py index ba438500..7bee685f 100644 --- a/gate_api/models/ads_detail_request.py +++ b/gate_api/models/ads_detail_request.py @@ -56,6 +56,7 @@ def __init__(self, adv_no=None, local_vars_configuration=None): # noqa: E501 def adv_no(self): """Gets the adv_no of this AdsDetailRequest. # noqa: E501 + Advertisement ID. # noqa: E501 :return: The adv_no of this AdsDetailRequest. # noqa: E501 :rtype: str @@ -66,6 +67,7 @@ def adv_no(self): def adv_no(self, adv_no): """Sets the adv_no of this AdsDetailRequest. + Advertisement ID. # noqa: E501 :param adv_no: The adv_no of this AdsDetailRequest. # noqa: E501 :type: str diff --git a/gate_api/models/ads_list_request.py b/gate_api/models/ads_list_request.py index e3682639..29814ec2 100644 --- a/gate_api/models/ads_list_request.py +++ b/gate_api/models/ads_list_request.py @@ -64,7 +64,7 @@ def __init__(self, asset=None, fiat_unit=None, trade_type=None, local_vars_confi def asset(self): """Gets the asset of this AdsListRequest. # noqa: E501 - Cryptocurrency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 :return: The asset of this AdsListRequest. # noqa: E501 :rtype: str @@ -75,7 +75,7 @@ def asset(self): def asset(self, asset): """Sets the asset of this AdsListRequest. - Cryptocurrency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 :param asset: The asset of this AdsListRequest. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def fiat_unit(self, fiat_unit): def trade_type(self): """Gets the trade_type of this AdsListRequest. # noqa: E501 - Buy/Sell, sell/buy # noqa: E501 + Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. # noqa: E501 :return: The trade_type of this AdsListRequest. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def trade_type(self): def trade_type(self, trade_type): """Sets the trade_type of this AdsListRequest. - Buy/Sell, sell/buy # noqa: E501 + Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. # noqa: E501 :param trade_type: The trade_type of this AdsListRequest. # noqa: E501 :type: str diff --git a/gate_api/models/ads_update_status.py b/gate_api/models/ads_update_status.py index f734d384..25ee0e3e 100644 --- a/gate_api/models/ads_update_status.py +++ b/gate_api/models/ads_update_status.py @@ -60,7 +60,7 @@ def __init__(self, adv_no=None, adv_status=None, local_vars_configuration=None): def adv_no(self): """Gets the adv_no of this AdsUpdateStatus. # noqa: E501 - Ad ID # noqa: E501 + Advertisement ID. # noqa: E501 :return: The adv_no of this AdsUpdateStatus. # noqa: E501 :rtype: int @@ -71,7 +71,7 @@ def adv_no(self): def adv_no(self, adv_no): """Sets the adv_no of this AdsUpdateStatus. - Ad ID # noqa: E501 + Advertisement ID. # noqa: E501 :param adv_no: The adv_no of this AdsUpdateStatus. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def adv_no(self, adv_no): def adv_status(self): """Gets the adv_status of this AdsUpdateStatus. # noqa: E501 - Ad status: 1=Active, 3=Inactive, 4=Closed # noqa: E501 + Ad status. `1`: listed; `3`: delisted; `4`: closed. # noqa: E501 :return: The adv_status of this AdsUpdateStatus. # noqa: E501 :rtype: int @@ -96,13 +96,19 @@ def adv_status(self): def adv_status(self, adv_status): """Sets the adv_status of this AdsUpdateStatus. - Ad status: 1=Active, 3=Inactive, 4=Closed # noqa: E501 + Ad status. `1`: listed; `3`: delisted; `4`: closed. # noqa: E501 :param adv_status: The adv_status of this AdsUpdateStatus. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and adv_status is None: # noqa: E501 raise ValueError("Invalid value for `adv_status`, must not be `None`") # noqa: E501 + allowed_values = [1, 3, 4] # noqa: E501 + if self.local_vars_configuration.client_side_validation and adv_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `adv_status` ({0}), must be one of {1}" # noqa: E501 + .format(adv_status, allowed_values) + ) self._adv_status = adv_status diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py index d843953c..1870abe2 100644 --- a/gate_api/models/agency_commission.py +++ b/gate_api/models/agency_commission.py @@ -151,7 +151,7 @@ def group_name(self, group_name): def commission_amount(self): """Gets the commission_amount of this AgencyCommission. # noqa: E501 - Transaction amount # noqa: E501 + Commission amount # noqa: E501 :return: The commission_amount of this AgencyCommission. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def commission_amount(self): def commission_amount(self, commission_amount): """Sets the commission_amount of this AgencyCommission. - Transaction amount # noqa: E501 + Commission amount # noqa: E501 :param commission_amount: The commission_amount of this AgencyCommission. # noqa: E501 :type: str diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py index abdf1198..93927341 100644 --- a/gate_api/models/agency_transaction.py +++ b/gate_api/models/agency_transaction.py @@ -258,7 +258,7 @@ def amount(self, amount): def amount_asset(self): """Gets the amount_asset of this AgencyTransaction. # noqa: E501 - Commission Asset # noqa: E501 + Transaction amount currency # noqa: E501 :return: The amount_asset of this AgencyTransaction. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def amount_asset(self): def amount_asset(self, amount_asset): """Sets the amount_asset of this AgencyTransaction. - Commission Asset # noqa: E501 + Transaction amount currency # noqa: E501 :param amount_asset: The amount_asset of this AgencyTransaction. # noqa: E501 :type: str diff --git a/gate_api/models/ai_hub_create_data.py b/gate_api/models/ai_hub_create_data.py new file mode 100644 index 00000000..b5c3350d --- /dev/null +++ b/gate_api/models/ai_hub_create_data.py @@ -0,0 +1,231 @@ +# 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 AIHubCreateData(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 = { + 'strategy_id': 'str', + 'strategy_type': 'StrategyType', + 'market': 'str', + 'status': 'str', + 'jump_url': 'str' + } + + attribute_map = { + 'strategy_id': 'strategy_id', + 'strategy_type': 'strategy_type', + 'market': 'market', + 'status': 'status', + 'jump_url': 'jump_url' + } + + def __init__(self, strategy_id=None, strategy_type=None, market=None, status=None, jump_url=None, local_vars_configuration=None): # noqa: E501 + # type: (str, StrategyType, str, str, str, Configuration) -> None + """AIHubCreateData - 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._strategy_id = None + self._strategy_type = None + self._market = None + self._status = None + self._jump_url = None + self.discriminator = None + + self.strategy_id = strategy_id + self.strategy_type = strategy_type + self.market = market + self.status = status + if jump_url is not None: + self.jump_url = jump_url + + @property + def strategy_id(self): + """Gets the strategy_id of this AIHubCreateData. # noqa: E501 + + + :return: The strategy_id of this AIHubCreateData. # noqa: E501 + :rtype: str + """ + return self._strategy_id + + @strategy_id.setter + def strategy_id(self, strategy_id): + """Sets the strategy_id of this AIHubCreateData. + + + :param strategy_id: The strategy_id of this AIHubCreateData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_id is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_id`, must not be `None`") # noqa: E501 + + self._strategy_id = strategy_id + + @property + def strategy_type(self): + """Gets the strategy_type of this AIHubCreateData. # noqa: E501 + + + :return: The strategy_type of this AIHubCreateData. # noqa: E501 + :rtype: StrategyType + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this AIHubCreateData. + + + :param strategy_type: The strategy_type of this AIHubCreateData. # noqa: E501 + :type: StrategyType + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + + self._strategy_type = strategy_type + + @property + def market(self): + """Gets the market of this AIHubCreateData. # noqa: E501 + + + :return: The market of this AIHubCreateData. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this AIHubCreateData. + + + :param market: The market of this AIHubCreateData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def status(self): + """Gets the status of this AIHubCreateData. # noqa: E501 + + The initial state after successful creation, usually `running` # noqa: E501 + + :return: The status of this AIHubCreateData. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AIHubCreateData. + + The initial state after successful creation, usually `running` # noqa: E501 + + :param status: The status of this AIHubCreateData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def jump_url(self): + """Gets the jump_url of this AIHubCreateData. # noqa: E501 + + + :return: The jump_url of this AIHubCreateData. # noqa: E501 + :rtype: str + """ + return self._jump_url + + @jump_url.setter + def jump_url(self, jump_url): + """Sets the jump_url of this AIHubCreateData. + + + :param jump_url: The jump_url of this AIHubCreateData. # noqa: E501 + :type: str + """ + + self._jump_url = jump_url + + 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, AIHubCreateData): + 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, AIHubCreateData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_create_success_response.py b/gate_api/models/ai_hub_create_success_response.py new file mode 100644 index 00000000..becbc495 --- /dev/null +++ b/gate_api/models/ai_hub_create_success_response.py @@ -0,0 +1,203 @@ +# 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 AIHubCreateSuccessResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'AIHubCreateData', + 'trace_id': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'trace_id': 'trace_id' + } + + def __init__(self, code=None, message=None, data=None, trace_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, AIHubCreateData, str, Configuration) -> None + """AIHubCreateSuccessResponse - 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._code = None + self._message = None + self._data = None + self._trace_id = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.trace_id = trace_id + + @property + def code(self): + """Gets the code of this AIHubCreateSuccessResponse. # noqa: E501 + + + :return: The code of this AIHubCreateSuccessResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this AIHubCreateSuccessResponse. + + + :param code: The code of this AIHubCreateSuccessResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this AIHubCreateSuccessResponse. # noqa: E501 + + + :return: The message of this AIHubCreateSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AIHubCreateSuccessResponse. + + + :param message: The message of this AIHubCreateSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this AIHubCreateSuccessResponse. # noqa: E501 + + + :return: The data of this AIHubCreateSuccessResponse. # noqa: E501 + :rtype: AIHubCreateData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AIHubCreateSuccessResponse. + + + :param data: The data of this AIHubCreateSuccessResponse. # noqa: E501 + :type: AIHubCreateData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def trace_id(self): + """Gets the trace_id of this AIHubCreateSuccessResponse. # noqa: E501 + + + :return: The trace_id of this AIHubCreateSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._trace_id + + @trace_id.setter + def trace_id(self, trace_id): + """Sets the trace_id of this AIHubCreateSuccessResponse. + + + :param trace_id: The trace_id of this AIHubCreateSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and trace_id is None: # noqa: E501 + raise ValueError("Invalid value for `trace_id`, must not be `None`") # noqa: E501 + + self._trace_id = trace_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, AIHubCreateSuccessResponse): + 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, AIHubCreateSuccessResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_discover_data.py b/gate_api/models/ai_hub_discover_data.py new file mode 100644 index 00000000..4c521a8b --- /dev/null +++ b/gate_api/models/ai_hub_discover_data.py @@ -0,0 +1,178 @@ +# 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 AIHubDiscoverData(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 = { + 'scene': 'DiscoverScene', + 'recommendations': 'list[AIHubRecommendation]', + 'unsupported_filters': 'list[str]' + } + + attribute_map = { + 'scene': 'scene', + 'recommendations': 'recommendations', + 'unsupported_filters': 'unsupported_filters' + } + + def __init__(self, scene=None, recommendations=None, unsupported_filters=None, local_vars_configuration=None): # noqa: E501 + # type: (DiscoverScene, list[AIHubRecommendation], list[str], Configuration) -> None + """AIHubDiscoverData - 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._scene = None + self._recommendations = None + self._unsupported_filters = None + self.discriminator = None + + self.scene = scene + self.recommendations = recommendations + self.unsupported_filters = unsupported_filters + + @property + def scene(self): + """Gets the scene of this AIHubDiscoverData. # noqa: E501 + + + :return: The scene of this AIHubDiscoverData. # noqa: E501 + :rtype: DiscoverScene + """ + return self._scene + + @scene.setter + def scene(self, scene): + """Sets the scene of this AIHubDiscoverData. + + + :param scene: The scene of this AIHubDiscoverData. # noqa: E501 + :type: DiscoverScene + """ + if self.local_vars_configuration.client_side_validation and scene is None: # noqa: E501 + raise ValueError("Invalid value for `scene`, must not be `None`") # noqa: E501 + + self._scene = scene + + @property + def recommendations(self): + """Gets the recommendations of this AIHubDiscoverData. # noqa: E501 + + + :return: The recommendations of this AIHubDiscoverData. # noqa: E501 + :rtype: list[AIHubRecommendation] + """ + return self._recommendations + + @recommendations.setter + def recommendations(self, recommendations): + """Sets the recommendations of this AIHubDiscoverData. + + + :param recommendations: The recommendations of this AIHubDiscoverData. # noqa: E501 + :type: list[AIHubRecommendation] + """ + if self.local_vars_configuration.client_side_validation and recommendations is None: # noqa: E501 + raise ValueError("Invalid value for `recommendations`, must not be `None`") # noqa: E501 + + self._recommendations = recommendations + + @property + def unsupported_filters(self): + """Gets the unsupported_filters of this AIHubDiscoverData. # noqa: E501 + + Filter conditions not supported in this issue # noqa: E501 + + :return: The unsupported_filters of this AIHubDiscoverData. # noqa: E501 + :rtype: list[str] + """ + return self._unsupported_filters + + @unsupported_filters.setter + def unsupported_filters(self, unsupported_filters): + """Sets the unsupported_filters of this AIHubDiscoverData. + + Filter conditions not supported in this issue # noqa: E501 + + :param unsupported_filters: The unsupported_filters of this AIHubDiscoverData. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and unsupported_filters is None: # noqa: E501 + raise ValueError("Invalid value for `unsupported_filters`, must not be `None`") # noqa: E501 + + self._unsupported_filters = unsupported_filters + + 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, AIHubDiscoverData): + 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, AIHubDiscoverData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_discover_success_response.py b/gate_api/models/ai_hub_discover_success_response.py new file mode 100644 index 00000000..049cd392 --- /dev/null +++ b/gate_api/models/ai_hub_discover_success_response.py @@ -0,0 +1,203 @@ +# 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 AIHubDiscoverSuccessResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'AIHubDiscoverData', + 'trace_id': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'trace_id': 'trace_id' + } + + def __init__(self, code=None, message=None, data=None, trace_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, AIHubDiscoverData, str, Configuration) -> None + """AIHubDiscoverSuccessResponse - 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._code = None + self._message = None + self._data = None + self._trace_id = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.trace_id = trace_id + + @property + def code(self): + """Gets the code of this AIHubDiscoverSuccessResponse. # noqa: E501 + + + :return: The code of this AIHubDiscoverSuccessResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this AIHubDiscoverSuccessResponse. + + + :param code: The code of this AIHubDiscoverSuccessResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this AIHubDiscoverSuccessResponse. # noqa: E501 + + + :return: The message of this AIHubDiscoverSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AIHubDiscoverSuccessResponse. + + + :param message: The message of this AIHubDiscoverSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this AIHubDiscoverSuccessResponse. # noqa: E501 + + + :return: The data of this AIHubDiscoverSuccessResponse. # noqa: E501 + :rtype: AIHubDiscoverData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AIHubDiscoverSuccessResponse. + + + :param data: The data of this AIHubDiscoverSuccessResponse. # noqa: E501 + :type: AIHubDiscoverData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def trace_id(self): + """Gets the trace_id of this AIHubDiscoverSuccessResponse. # noqa: E501 + + + :return: The trace_id of this AIHubDiscoverSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._trace_id + + @trace_id.setter + def trace_id(self, trace_id): + """Sets the trace_id of this AIHubDiscoverSuccessResponse. + + + :param trace_id: The trace_id of this AIHubDiscoverSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and trace_id is None: # noqa: E501 + raise ValueError("Invalid value for `trace_id`, must not be `None`") # noqa: E501 + + self._trace_id = trace_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, AIHubDiscoverSuccessResponse): + 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, AIHubDiscoverSuccessResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_base_info.py b/gate_api/models/ai_hub_portfolio_base_info.py new file mode 100644 index 00000000..36594570 --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_base_info.py @@ -0,0 +1,261 @@ +# 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 AIHubPortfolioBaseInfo(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 = { + 'strategy_name': 'str', + 'created_at': 'str', + 'running_duration': 'int', + 'invest_amount': 'str', + 'total_profit': 'str', + 'profit_rate': 'str' + } + + attribute_map = { + 'strategy_name': 'strategy_name', + 'created_at': 'created_at', + 'running_duration': 'running_duration', + 'invest_amount': 'invest_amount', + 'total_profit': 'total_profit', + 'profit_rate': 'profit_rate' + } + + def __init__(self, strategy_name=None, created_at=None, running_duration=None, invest_amount=None, total_profit=None, profit_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, str, str, str, Configuration) -> None + """AIHubPortfolioBaseInfo - 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._strategy_name = None + self._created_at = None + self._running_duration = None + self._invest_amount = None + self._total_profit = None + self._profit_rate = None + self.discriminator = None + + self.strategy_name = strategy_name + self.created_at = created_at + self.running_duration = running_duration + self.invest_amount = invest_amount + self.total_profit = total_profit + self.profit_rate = profit_rate + + @property + def strategy_name(self): + """Gets the strategy_name of this AIHubPortfolioBaseInfo. # noqa: E501 + + + :return: The strategy_name of this AIHubPortfolioBaseInfo. # noqa: E501 + :rtype: str + """ + return self._strategy_name + + @strategy_name.setter + def strategy_name(self, strategy_name): + """Sets the strategy_name of this AIHubPortfolioBaseInfo. + + + :param strategy_name: The strategy_name of this AIHubPortfolioBaseInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_name is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_name`, must not be `None`") # noqa: E501 + + self._strategy_name = strategy_name + + @property + def created_at(self): + """Gets the created_at of this AIHubPortfolioBaseInfo. # noqa: E501 + + Created time # noqa: E501 + + :return: The created_at of this AIHubPortfolioBaseInfo. # noqa: E501 + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this AIHubPortfolioBaseInfo. + + Created time # noqa: E501 + + :param created_at: The created_at of this AIHubPortfolioBaseInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def running_duration(self): + """Gets the running_duration of this AIHubPortfolioBaseInfo. # noqa: E501 + + Runtime duration in seconds. # noqa: E501 + + :return: The running_duration of this AIHubPortfolioBaseInfo. # noqa: E501 + :rtype: int + """ + return self._running_duration + + @running_duration.setter + def running_duration(self, running_duration): + """Sets the running_duration of this AIHubPortfolioBaseInfo. + + Runtime duration in seconds. # noqa: E501 + + :param running_duration: The running_duration of this AIHubPortfolioBaseInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and running_duration is None: # noqa: E501 + raise ValueError("Invalid value for `running_duration`, must not be `None`") # noqa: E501 + + self._running_duration = running_duration + + @property + def invest_amount(self): + """Gets the invest_amount of this AIHubPortfolioBaseInfo. # noqa: E501 + + + :return: The invest_amount of this AIHubPortfolioBaseInfo. # noqa: E501 + :rtype: str + """ + return self._invest_amount + + @invest_amount.setter + def invest_amount(self, invest_amount): + """Sets the invest_amount of this AIHubPortfolioBaseInfo. + + + :param invest_amount: The invest_amount of this AIHubPortfolioBaseInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and invest_amount is None: # noqa: E501 + raise ValueError("Invalid value for `invest_amount`, must not be `None`") # noqa: E501 + + self._invest_amount = invest_amount + + @property + def total_profit(self): + """Gets the total_profit of this AIHubPortfolioBaseInfo. # noqa: E501 + + + :return: The total_profit of this AIHubPortfolioBaseInfo. # noqa: E501 + :rtype: str + """ + return self._total_profit + + @total_profit.setter + def total_profit(self, total_profit): + """Sets the total_profit of this AIHubPortfolioBaseInfo. + + + :param total_profit: The total_profit of this AIHubPortfolioBaseInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_profit is None: # noqa: E501 + raise ValueError("Invalid value for `total_profit`, must not be `None`") # noqa: E501 + + self._total_profit = total_profit + + @property + def profit_rate(self): + """Gets the profit_rate of this AIHubPortfolioBaseInfo. # noqa: E501 + + + :return: The profit_rate of this AIHubPortfolioBaseInfo. # noqa: E501 + :rtype: str + """ + return self._profit_rate + + @profit_rate.setter + def profit_rate(self, profit_rate): + """Sets the profit_rate of this AIHubPortfolioBaseInfo. + + + :param profit_rate: The profit_rate of this AIHubPortfolioBaseInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and profit_rate is None: # noqa: E501 + raise ValueError("Invalid value for `profit_rate`, must not be `None`") # noqa: E501 + + self._profit_rate = profit_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, AIHubPortfolioBaseInfo): + 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, AIHubPortfolioBaseInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_detail_data.py b/gate_api/models/ai_hub_portfolio_detail_data.py new file mode 100644 index 00000000..707ef93b --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_detail_data.py @@ -0,0 +1,309 @@ +# 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 AIHubPortfolioDetailData(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 = { + 'strategy_id': 'str', + 'strategy_type': 'StrategyType', + 'market': 'str', + 'status': 'str', + 'base_info': 'AIHubPortfolioBaseInfo', + 'metrics': 'AIHubPortfolioMetrics', + 'position': 'AIHubPortfolioPosition', + 'stop_supported': 'bool' + } + + attribute_map = { + 'strategy_id': 'strategy_id', + 'strategy_type': 'strategy_type', + 'market': 'market', + 'status': 'status', + 'base_info': 'base_info', + 'metrics': 'metrics', + 'position': 'position', + 'stop_supported': 'stop_supported' + } + + def __init__(self, strategy_id=None, strategy_type=None, market=None, status=None, base_info=None, metrics=None, position=None, stop_supported=None, local_vars_configuration=None): # noqa: E501 + # type: (str, StrategyType, str, str, AIHubPortfolioBaseInfo, AIHubPortfolioMetrics, AIHubPortfolioPosition, bool, Configuration) -> None + """AIHubPortfolioDetailData - 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._strategy_id = None + self._strategy_type = None + self._market = None + self._status = None + self._base_info = None + self._metrics = None + self._position = None + self._stop_supported = None + self.discriminator = None + + self.strategy_id = strategy_id + self.strategy_type = strategy_type + self.market = market + self.status = status + self.base_info = base_info + self.metrics = metrics + self.position = position + self.stop_supported = stop_supported + + @property + def strategy_id(self): + """Gets the strategy_id of this AIHubPortfolioDetailData. # noqa: E501 + + + :return: The strategy_id of this AIHubPortfolioDetailData. # noqa: E501 + :rtype: str + """ + return self._strategy_id + + @strategy_id.setter + def strategy_id(self, strategy_id): + """Sets the strategy_id of this AIHubPortfolioDetailData. + + + :param strategy_id: The strategy_id of this AIHubPortfolioDetailData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_id is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_id`, must not be `None`") # noqa: E501 + + self._strategy_id = strategy_id + + @property + def strategy_type(self): + """Gets the strategy_type of this AIHubPortfolioDetailData. # noqa: E501 + + + :return: The strategy_type of this AIHubPortfolioDetailData. # noqa: E501 + :rtype: StrategyType + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this AIHubPortfolioDetailData. + + + :param strategy_type: The strategy_type of this AIHubPortfolioDetailData. # noqa: E501 + :type: StrategyType + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + + self._strategy_type = strategy_type + + @property + def market(self): + """Gets the market of this AIHubPortfolioDetailData. # noqa: E501 + + + :return: The market of this AIHubPortfolioDetailData. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this AIHubPortfolioDetailData. + + + :param market: The market of this AIHubPortfolioDetailData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def status(self): + """Gets the status of this AIHubPortfolioDetailData. # noqa: E501 + + + :return: The status of this AIHubPortfolioDetailData. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AIHubPortfolioDetailData. + + + :param status: The status of this AIHubPortfolioDetailData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def base_info(self): + """Gets the base_info of this AIHubPortfolioDetailData. # noqa: E501 + + + :return: The base_info of this AIHubPortfolioDetailData. # noqa: E501 + :rtype: AIHubPortfolioBaseInfo + """ + return self._base_info + + @base_info.setter + def base_info(self, base_info): + """Sets the base_info of this AIHubPortfolioDetailData. + + + :param base_info: The base_info of this AIHubPortfolioDetailData. # noqa: E501 + :type: AIHubPortfolioBaseInfo + """ + if self.local_vars_configuration.client_side_validation and base_info is None: # noqa: E501 + raise ValueError("Invalid value for `base_info`, must not be `None`") # noqa: E501 + + self._base_info = base_info + + @property + def metrics(self): + """Gets the metrics of this AIHubPortfolioDetailData. # noqa: E501 + + + :return: The metrics of this AIHubPortfolioDetailData. # noqa: E501 + :rtype: AIHubPortfolioMetrics + """ + return self._metrics + + @metrics.setter + def metrics(self, metrics): + """Sets the metrics of this AIHubPortfolioDetailData. + + + :param metrics: The metrics of this AIHubPortfolioDetailData. # noqa: E501 + :type: AIHubPortfolioMetrics + """ + if self.local_vars_configuration.client_side_validation and metrics is None: # noqa: E501 + raise ValueError("Invalid value for `metrics`, must not be `None`") # noqa: E501 + + self._metrics = metrics + + @property + def position(self): + """Gets the position of this AIHubPortfolioDetailData. # noqa: E501 + + + :return: The position of this AIHubPortfolioDetailData. # noqa: E501 + :rtype: AIHubPortfolioPosition + """ + return self._position + + @position.setter + def position(self, position): + """Sets the position of this AIHubPortfolioDetailData. + + + :param position: The position of this AIHubPortfolioDetailData. # noqa: E501 + :type: AIHubPortfolioPosition + """ + + self._position = position + + @property + def stop_supported(self): + """Gets the stop_supported of this AIHubPortfolioDetailData. # noqa: E501 + + + :return: The stop_supported of this AIHubPortfolioDetailData. # noqa: E501 + :rtype: bool + """ + return self._stop_supported + + @stop_supported.setter + def stop_supported(self, stop_supported): + """Sets the stop_supported of this AIHubPortfolioDetailData. + + + :param stop_supported: The stop_supported of this AIHubPortfolioDetailData. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and stop_supported is None: # noqa: E501 + raise ValueError("Invalid value for `stop_supported`, must not be `None`") # noqa: E501 + + self._stop_supported = stop_supported + + 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, AIHubPortfolioDetailData): + 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, AIHubPortfolioDetailData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_detail_success_response.py b/gate_api/models/ai_hub_portfolio_detail_success_response.py new file mode 100644 index 00000000..11f44570 --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_detail_success_response.py @@ -0,0 +1,203 @@ +# 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 AIHubPortfolioDetailSuccessResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'AIHubPortfolioDetailData', + 'trace_id': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'trace_id': 'trace_id' + } + + def __init__(self, code=None, message=None, data=None, trace_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, AIHubPortfolioDetailData, str, Configuration) -> None + """AIHubPortfolioDetailSuccessResponse - 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._code = None + self._message = None + self._data = None + self._trace_id = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.trace_id = trace_id + + @property + def code(self): + """Gets the code of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + + + :return: The code of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this AIHubPortfolioDetailSuccessResponse. + + + :param code: The code of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + + + :return: The message of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AIHubPortfolioDetailSuccessResponse. + + + :param message: The message of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + + + :return: The data of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + :rtype: AIHubPortfolioDetailData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AIHubPortfolioDetailSuccessResponse. + + + :param data: The data of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + :type: AIHubPortfolioDetailData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def trace_id(self): + """Gets the trace_id of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + + + :return: The trace_id of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._trace_id + + @trace_id.setter + def trace_id(self, trace_id): + """Sets the trace_id of this AIHubPortfolioDetailSuccessResponse. + + + :param trace_id: The trace_id of this AIHubPortfolioDetailSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and trace_id is None: # noqa: E501 + raise ValueError("Invalid value for `trace_id`, must not be `None`") # noqa: E501 + + self._trace_id = trace_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, AIHubPortfolioDetailSuccessResponse): + 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, AIHubPortfolioDetailSuccessResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_metrics.py b/gate_api/models/ai_hub_portfolio_metrics.py new file mode 100644 index 00000000..e8ad444c --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_metrics.py @@ -0,0 +1,433 @@ +# 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 AIHubPortfolioMetrics(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 = { + 'grid_profit': 'str', + 'floating_pnl': 'str', + 'arbitrage_count': 'int', + 'price_range': 'str', + 'grid_count': 'int', + 'estimated_liquidation_price': 'str', + 'price_floor': 'str', + 'grid_profit_rate': 'str', + 'realized_pnl': 'str', + 'finished_rounds': 'int', + 'avg_cost': 'str', + 'take_profit_price': 'str', + 'maintenance_margin_ratio': 'str' + } + + attribute_map = { + 'grid_profit': 'grid_profit', + 'floating_pnl': 'floating_pnl', + 'arbitrage_count': 'arbitrage_count', + 'price_range': 'price_range', + 'grid_count': 'grid_count', + 'estimated_liquidation_price': 'estimated_liquidation_price', + 'price_floor': 'price_floor', + 'grid_profit_rate': 'grid_profit_rate', + 'realized_pnl': 'realized_pnl', + 'finished_rounds': 'finished_rounds', + 'avg_cost': 'avg_cost', + 'take_profit_price': 'take_profit_price', + 'maintenance_margin_ratio': 'maintenance_margin_ratio' + } + + def __init__(self, grid_profit=None, floating_pnl=None, arbitrage_count=None, price_range=None, grid_count=None, estimated_liquidation_price=None, price_floor=None, grid_profit_rate=None, realized_pnl=None, finished_rounds=None, avg_cost=None, take_profit_price=None, maintenance_margin_ratio=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, str, int, str, str, str, str, int, str, str, str, Configuration) -> None + """AIHubPortfolioMetrics - 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._grid_profit = None + self._floating_pnl = None + self._arbitrage_count = None + self._price_range = None + self._grid_count = None + self._estimated_liquidation_price = None + self._price_floor = None + self._grid_profit_rate = None + self._realized_pnl = None + self._finished_rounds = None + self._avg_cost = None + self._take_profit_price = None + self._maintenance_margin_ratio = None + self.discriminator = None + + if grid_profit is not None: + self.grid_profit = grid_profit + if floating_pnl is not None: + self.floating_pnl = floating_pnl + if arbitrage_count is not None: + self.arbitrage_count = arbitrage_count + if price_range is not None: + self.price_range = price_range + if grid_count is not None: + self.grid_count = grid_count + if estimated_liquidation_price is not None: + self.estimated_liquidation_price = estimated_liquidation_price + if price_floor is not None: + self.price_floor = price_floor + if grid_profit_rate is not None: + self.grid_profit_rate = grid_profit_rate + if realized_pnl is not None: + self.realized_pnl = realized_pnl + if finished_rounds is not None: + self.finished_rounds = finished_rounds + if avg_cost is not None: + self.avg_cost = avg_cost + if take_profit_price is not None: + self.take_profit_price = take_profit_price + if maintenance_margin_ratio is not None: + self.maintenance_margin_ratio = maintenance_margin_ratio + + @property + def grid_profit(self): + """Gets the grid_profit of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The grid_profit of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._grid_profit + + @grid_profit.setter + def grid_profit(self, grid_profit): + """Sets the grid_profit of this AIHubPortfolioMetrics. + + + :param grid_profit: The grid_profit of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._grid_profit = grid_profit + + @property + def floating_pnl(self): + """Gets the floating_pnl of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The floating_pnl of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._floating_pnl + + @floating_pnl.setter + def floating_pnl(self, floating_pnl): + """Sets the floating_pnl of this AIHubPortfolioMetrics. + + + :param floating_pnl: The floating_pnl of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._floating_pnl = floating_pnl + + @property + def arbitrage_count(self): + """Gets the arbitrage_count of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The arbitrage_count of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: int + """ + return self._arbitrage_count + + @arbitrage_count.setter + def arbitrage_count(self, arbitrage_count): + """Sets the arbitrage_count of this AIHubPortfolioMetrics. + + + :param arbitrage_count: The arbitrage_count of this AIHubPortfolioMetrics. # noqa: E501 + :type: int + """ + + self._arbitrage_count = arbitrage_count + + @property + def price_range(self): + """Gets the price_range of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The price_range of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._price_range + + @price_range.setter + def price_range(self, price_range): + """Sets the price_range of this AIHubPortfolioMetrics. + + + :param price_range: The price_range of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._price_range = price_range + + @property + def grid_count(self): + """Gets the grid_count of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The grid_count of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: int + """ + return self._grid_count + + @grid_count.setter + def grid_count(self, grid_count): + """Sets the grid_count of this AIHubPortfolioMetrics. + + + :param grid_count: The grid_count of this AIHubPortfolioMetrics. # noqa: E501 + :type: int + """ + + self._grid_count = grid_count + + @property + def estimated_liquidation_price(self): + """Gets the estimated_liquidation_price of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The estimated_liquidation_price of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._estimated_liquidation_price + + @estimated_liquidation_price.setter + def estimated_liquidation_price(self, estimated_liquidation_price): + """Sets the estimated_liquidation_price of this AIHubPortfolioMetrics. + + + :param estimated_liquidation_price: The estimated_liquidation_price of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._estimated_liquidation_price = estimated_liquidation_price + + @property + def price_floor(self): + """Gets the price_floor of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The price_floor of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._price_floor + + @price_floor.setter + def price_floor(self, price_floor): + """Sets the price_floor of this AIHubPortfolioMetrics. + + + :param price_floor: The price_floor of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._price_floor = price_floor + + @property + def grid_profit_rate(self): + """Gets the grid_profit_rate of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The grid_profit_rate of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._grid_profit_rate + + @grid_profit_rate.setter + def grid_profit_rate(self, grid_profit_rate): + """Sets the grid_profit_rate of this AIHubPortfolioMetrics. + + + :param grid_profit_rate: The grid_profit_rate of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._grid_profit_rate = grid_profit_rate + + @property + def realized_pnl(self): + """Gets the realized_pnl of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The realized_pnl of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._realized_pnl + + @realized_pnl.setter + def realized_pnl(self, realized_pnl): + """Sets the realized_pnl of this AIHubPortfolioMetrics. + + + :param realized_pnl: The realized_pnl of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._realized_pnl = realized_pnl + + @property + def finished_rounds(self): + """Gets the finished_rounds of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The finished_rounds of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: int + """ + return self._finished_rounds + + @finished_rounds.setter + def finished_rounds(self, finished_rounds): + """Sets the finished_rounds of this AIHubPortfolioMetrics. + + + :param finished_rounds: The finished_rounds of this AIHubPortfolioMetrics. # noqa: E501 + :type: int + """ + + self._finished_rounds = finished_rounds + + @property + def avg_cost(self): + """Gets the avg_cost of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The avg_cost of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._avg_cost + + @avg_cost.setter + def avg_cost(self, avg_cost): + """Sets the avg_cost of this AIHubPortfolioMetrics. + + + :param avg_cost: The avg_cost of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._avg_cost = avg_cost + + @property + def take_profit_price(self): + """Gets the take_profit_price of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The take_profit_price of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._take_profit_price + + @take_profit_price.setter + def take_profit_price(self, take_profit_price): + """Sets the take_profit_price of this AIHubPortfolioMetrics. + + + :param take_profit_price: The take_profit_price of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._take_profit_price = take_profit_price + + @property + def maintenance_margin_ratio(self): + """Gets the maintenance_margin_ratio of this AIHubPortfolioMetrics. # noqa: E501 + + + :return: The maintenance_margin_ratio of this AIHubPortfolioMetrics. # noqa: E501 + :rtype: str + """ + return self._maintenance_margin_ratio + + @maintenance_margin_ratio.setter + def maintenance_margin_ratio(self, maintenance_margin_ratio): + """Sets the maintenance_margin_ratio of this AIHubPortfolioMetrics. + + + :param maintenance_margin_ratio: The maintenance_margin_ratio of this AIHubPortfolioMetrics. # noqa: E501 + :type: str + """ + + self._maintenance_margin_ratio = maintenance_margin_ratio + + 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, AIHubPortfolioMetrics): + 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, AIHubPortfolioMetrics): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_position.py b/gate_api/models/ai_hub_portfolio_position.py new file mode 100644 index 00000000..5a749494 --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_position.py @@ -0,0 +1,251 @@ +# 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 AIHubPortfolioPosition(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 = { + 'amount': 'str', + 'entry_price': 'str', + 'quote_amount': 'str', + 'position_value': 'str', + 'margin': 'str', + 'side': 'str' + } + + attribute_map = { + 'amount': 'amount', + 'entry_price': 'entry_price', + 'quote_amount': 'quote_amount', + 'position_value': 'position_value', + 'margin': 'margin', + 'side': 'side' + } + + def __init__(self, amount=None, entry_price=None, quote_amount=None, position_value=None, margin=None, side=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """AIHubPortfolioPosition - 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._amount = None + self._entry_price = None + self._quote_amount = None + self._position_value = None + self._margin = None + self._side = None + self.discriminator = None + + if amount is not None: + self.amount = amount + if entry_price is not None: + self.entry_price = entry_price + if quote_amount is not None: + self.quote_amount = quote_amount + if position_value is not None: + self.position_value = position_value + if margin is not None: + self.margin = margin + if side is not None: + self.side = side + + @property + def amount(self): + """Gets the amount of this AIHubPortfolioPosition. # noqa: E501 + + + :return: The amount of this AIHubPortfolioPosition. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AIHubPortfolioPosition. + + + :param amount: The amount of this AIHubPortfolioPosition. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def entry_price(self): + """Gets the entry_price of this AIHubPortfolioPosition. # noqa: E501 + + + :return: The entry_price of this AIHubPortfolioPosition. # noqa: E501 + :rtype: str + """ + return self._entry_price + + @entry_price.setter + def entry_price(self, entry_price): + """Sets the entry_price of this AIHubPortfolioPosition. + + + :param entry_price: The entry_price of this AIHubPortfolioPosition. # noqa: E501 + :type: str + """ + + self._entry_price = entry_price + + @property + def quote_amount(self): + """Gets the quote_amount of this AIHubPortfolioPosition. # noqa: E501 + + + :return: The quote_amount of this AIHubPortfolioPosition. # noqa: E501 + :rtype: str + """ + return self._quote_amount + + @quote_amount.setter + def quote_amount(self, quote_amount): + """Sets the quote_amount of this AIHubPortfolioPosition. + + + :param quote_amount: The quote_amount of this AIHubPortfolioPosition. # noqa: E501 + :type: str + """ + + self._quote_amount = quote_amount + + @property + def position_value(self): + """Gets the position_value of this AIHubPortfolioPosition. # noqa: E501 + + + :return: The position_value of this AIHubPortfolioPosition. # noqa: E501 + :rtype: str + """ + return self._position_value + + @position_value.setter + def position_value(self, position_value): + """Sets the position_value of this AIHubPortfolioPosition. + + + :param position_value: The position_value of this AIHubPortfolioPosition. # noqa: E501 + :type: str + """ + + self._position_value = position_value + + @property + def margin(self): + """Gets the margin of this AIHubPortfolioPosition. # noqa: E501 + + + :return: The margin of this AIHubPortfolioPosition. # noqa: E501 + :rtype: str + """ + return self._margin + + @margin.setter + def margin(self, margin): + """Sets the margin of this AIHubPortfolioPosition. + + + :param margin: The margin of this AIHubPortfolioPosition. # noqa: E501 + :type: str + """ + + self._margin = margin + + @property + def side(self): + """Gets the side of this AIHubPortfolioPosition. # noqa: E501 + + + :return: The side of this AIHubPortfolioPosition. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this AIHubPortfolioPosition. + + + :param side: The side of this AIHubPortfolioPosition. # noqa: E501 + :type: str + """ + + self._side = side + + 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, AIHubPortfolioPosition): + 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, AIHubPortfolioPosition): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_running_data.py b/gate_api/models/ai_hub_portfolio_running_data.py new file mode 100644 index 00000000..40e279f0 --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_running_data.py @@ -0,0 +1,203 @@ +# 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 AIHubPortfolioRunningData(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 = { + 'items': 'list[AIHubPortfolioRunningItem]', + 'page': 'int', + 'page_size': 'int', + 'total': 'int' + } + + attribute_map = { + 'items': 'items', + 'page': 'page', + 'page_size': 'page_size', + 'total': 'total' + } + + def __init__(self, items=None, page=None, page_size=None, total=None, local_vars_configuration=None): # noqa: E501 + # type: (list[AIHubPortfolioRunningItem], int, int, int, Configuration) -> None + """AIHubPortfolioRunningData - 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._items = None + self._page = None + self._page_size = None + self._total = None + self.discriminator = None + + self.items = items + self.page = page + self.page_size = page_size + self.total = total + + @property + def items(self): + """Gets the items of this AIHubPortfolioRunningData. # noqa: E501 + + + :return: The items of this AIHubPortfolioRunningData. # noqa: E501 + :rtype: list[AIHubPortfolioRunningItem] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this AIHubPortfolioRunningData. + + + :param items: The items of this AIHubPortfolioRunningData. # noqa: E501 + :type: list[AIHubPortfolioRunningItem] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def page(self): + """Gets the page of this AIHubPortfolioRunningData. # noqa: E501 + + + :return: The page of this AIHubPortfolioRunningData. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this AIHubPortfolioRunningData. + + + :param page: The page of this AIHubPortfolioRunningData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page is None: # noqa: E501 + raise ValueError("Invalid value for `page`, must not be `None`") # noqa: E501 + + self._page = page + + @property + def page_size(self): + """Gets the page_size of this AIHubPortfolioRunningData. # noqa: E501 + + + :return: The page_size of this AIHubPortfolioRunningData. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this AIHubPortfolioRunningData. + + + :param page_size: The page_size of this AIHubPortfolioRunningData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page_size is None: # noqa: E501 + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + @property + def total(self): + """Gets the total of this AIHubPortfolioRunningData. # noqa: E501 + + + :return: The total of this AIHubPortfolioRunningData. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this AIHubPortfolioRunningData. + + + :param total: The total of this AIHubPortfolioRunningData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 + raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 + + self._total = total + + 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, AIHubPortfolioRunningData): + 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, AIHubPortfolioRunningData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_running_item.py b/gate_api/models/ai_hub_portfolio_running_item.py new file mode 100644 index 00000000..9d7d214b --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_running_item.py @@ -0,0 +1,336 @@ +# 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 AIHubPortfolioRunningItem(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 = { + 'strategy_id': 'str', + 'strategy_type': 'StrategyType', + 'strategy_name': 'str', + 'market': 'str', + 'status': 'str', + 'pnl': 'str', + 'pnl_rate': 'str', + 'invest_amount': 'str', + 'created_at': 'str' + } + + attribute_map = { + 'strategy_id': 'strategy_id', + 'strategy_type': 'strategy_type', + 'strategy_name': 'strategy_name', + 'market': 'market', + 'status': 'status', + 'pnl': 'pnl', + 'pnl_rate': 'pnl_rate', + 'invest_amount': 'invest_amount', + 'created_at': 'created_at' + } + + def __init__(self, strategy_id=None, strategy_type=None, strategy_name=None, market=None, status=None, pnl=None, pnl_rate=None, invest_amount=None, created_at=None, local_vars_configuration=None): # noqa: E501 + # type: (str, StrategyType, str, str, str, str, str, str, str, Configuration) -> None + """AIHubPortfolioRunningItem - 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._strategy_id = None + self._strategy_type = None + self._strategy_name = None + self._market = None + self._status = None + self._pnl = None + self._pnl_rate = None + self._invest_amount = None + self._created_at = None + self.discriminator = None + + self.strategy_id = strategy_id + self.strategy_type = strategy_type + self.strategy_name = strategy_name + self.market = market + self.status = status + if pnl is not None: + self.pnl = pnl + if pnl_rate is not None: + self.pnl_rate = pnl_rate + if invest_amount is not None: + self.invest_amount = invest_amount + if created_at is not None: + self.created_at = created_at + + @property + def strategy_id(self): + """Gets the strategy_id of this AIHubPortfolioRunningItem. # noqa: E501 + + + :return: The strategy_id of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: str + """ + return self._strategy_id + + @strategy_id.setter + def strategy_id(self, strategy_id): + """Sets the strategy_id of this AIHubPortfolioRunningItem. + + + :param strategy_id: The strategy_id of this AIHubPortfolioRunningItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_id is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_id`, must not be `None`") # noqa: E501 + + self._strategy_id = strategy_id + + @property + def strategy_type(self): + """Gets the strategy_type of this AIHubPortfolioRunningItem. # noqa: E501 + + + :return: The strategy_type of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: StrategyType + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this AIHubPortfolioRunningItem. + + + :param strategy_type: The strategy_type of this AIHubPortfolioRunningItem. # noqa: E501 + :type: StrategyType + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + + self._strategy_type = strategy_type + + @property + def strategy_name(self): + """Gets the strategy_name of this AIHubPortfolioRunningItem. # noqa: E501 + + + :return: The strategy_name of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: str + """ + return self._strategy_name + + @strategy_name.setter + def strategy_name(self, strategy_name): + """Sets the strategy_name of this AIHubPortfolioRunningItem. + + + :param strategy_name: The strategy_name of this AIHubPortfolioRunningItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_name is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_name`, must not be `None`") # noqa: E501 + + self._strategy_name = strategy_name + + @property + def market(self): + """Gets the market of this AIHubPortfolioRunningItem. # noqa: E501 + + + :return: The market of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this AIHubPortfolioRunningItem. + + + :param market: The market of this AIHubPortfolioRunningItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def status(self): + """Gets the status of this AIHubPortfolioRunningItem. # noqa: E501 + + + :return: The status of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AIHubPortfolioRunningItem. + + + :param status: The status of this AIHubPortfolioRunningItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def pnl(self): + """Gets the pnl of this AIHubPortfolioRunningItem. # noqa: E501 + + + :return: The pnl of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: str + """ + return self._pnl + + @pnl.setter + def pnl(self, pnl): + """Sets the pnl of this AIHubPortfolioRunningItem. + + + :param pnl: The pnl of this AIHubPortfolioRunningItem. # noqa: E501 + :type: str + """ + + self._pnl = pnl + + @property + def pnl_rate(self): + """Gets the pnl_rate of this AIHubPortfolioRunningItem. # noqa: E501 + + + :return: The pnl_rate of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: str + """ + return self._pnl_rate + + @pnl_rate.setter + def pnl_rate(self, pnl_rate): + """Sets the pnl_rate of this AIHubPortfolioRunningItem. + + + :param pnl_rate: The pnl_rate of this AIHubPortfolioRunningItem. # noqa: E501 + :type: str + """ + + self._pnl_rate = pnl_rate + + @property + def invest_amount(self): + """Gets the invest_amount of this AIHubPortfolioRunningItem. # noqa: E501 + + + :return: The invest_amount of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: str + """ + return self._invest_amount + + @invest_amount.setter + def invest_amount(self, invest_amount): + """Sets the invest_amount of this AIHubPortfolioRunningItem. + + + :param invest_amount: The invest_amount of this AIHubPortfolioRunningItem. # noqa: E501 + :type: str + """ + + self._invest_amount = invest_amount + + @property + def created_at(self): + """Gets the created_at of this AIHubPortfolioRunningItem. # noqa: E501 + + Created time # noqa: E501 + + :return: The created_at of this AIHubPortfolioRunningItem. # noqa: E501 + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this AIHubPortfolioRunningItem. + + Created time # noqa: E501 + + :param created_at: The created_at of this AIHubPortfolioRunningItem. # noqa: E501 + :type: str + """ + + self._created_at = created_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, AIHubPortfolioRunningItem): + 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, AIHubPortfolioRunningItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_running_success_response.py b/gate_api/models/ai_hub_portfolio_running_success_response.py new file mode 100644 index 00000000..4cf146e2 --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_running_success_response.py @@ -0,0 +1,203 @@ +# 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 AIHubPortfolioRunningSuccessResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'AIHubPortfolioRunningData', + 'trace_id': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'trace_id': 'trace_id' + } + + def __init__(self, code=None, message=None, data=None, trace_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, AIHubPortfolioRunningData, str, Configuration) -> None + """AIHubPortfolioRunningSuccessResponse - 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._code = None + self._message = None + self._data = None + self._trace_id = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.trace_id = trace_id + + @property + def code(self): + """Gets the code of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + + + :return: The code of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this AIHubPortfolioRunningSuccessResponse. + + + :param code: The code of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + + + :return: The message of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AIHubPortfolioRunningSuccessResponse. + + + :param message: The message of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + + + :return: The data of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + :rtype: AIHubPortfolioRunningData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AIHubPortfolioRunningSuccessResponse. + + + :param data: The data of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + :type: AIHubPortfolioRunningData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def trace_id(self): + """Gets the trace_id of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + + + :return: The trace_id of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._trace_id + + @trace_id.setter + def trace_id(self, trace_id): + """Sets the trace_id of this AIHubPortfolioRunningSuccessResponse. + + + :param trace_id: The trace_id of this AIHubPortfolioRunningSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and trace_id is None: # noqa: E501 + raise ValueError("Invalid value for `trace_id`, must not be `None`") # noqa: E501 + + self._trace_id = trace_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, AIHubPortfolioRunningSuccessResponse): + 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, AIHubPortfolioRunningSuccessResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_stop_data.py b/gate_api/models/ai_hub_portfolio_stop_data.py new file mode 100644 index 00000000..ad57364d --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_stop_data.py @@ -0,0 +1,205 @@ +# 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 AIHubPortfolioStopData(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 = { + 'strategy_id': 'str', + 'strategy_type': 'StrategyType', + 'status': 'str', + 'result_message': 'str' + } + + attribute_map = { + 'strategy_id': 'strategy_id', + 'strategy_type': 'strategy_type', + 'status': 'status', + 'result_message': 'result_message' + } + + def __init__(self, strategy_id=None, strategy_type=None, status=None, result_message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, StrategyType, str, str, Configuration) -> None + """AIHubPortfolioStopData - 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._strategy_id = None + self._strategy_type = None + self._status = None + self._result_message = None + self.discriminator = None + + self.strategy_id = strategy_id + self.strategy_type = strategy_type + self.status = status + self.result_message = result_message + + @property + def strategy_id(self): + """Gets the strategy_id of this AIHubPortfolioStopData. # noqa: E501 + + + :return: The strategy_id of this AIHubPortfolioStopData. # noqa: E501 + :rtype: str + """ + return self._strategy_id + + @strategy_id.setter + def strategy_id(self, strategy_id): + """Sets the strategy_id of this AIHubPortfolioStopData. + + + :param strategy_id: The strategy_id of this AIHubPortfolioStopData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_id is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_id`, must not be `None`") # noqa: E501 + + self._strategy_id = strategy_id + + @property + def strategy_type(self): + """Gets the strategy_type of this AIHubPortfolioStopData. # noqa: E501 + + + :return: The strategy_type of this AIHubPortfolioStopData. # noqa: E501 + :rtype: StrategyType + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this AIHubPortfolioStopData. + + + :param strategy_type: The strategy_type of this AIHubPortfolioStopData. # noqa: E501 + :type: StrategyType + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + + self._strategy_type = strategy_type + + @property + def status(self): + """Gets the status of this AIHubPortfolioStopData. # noqa: E501 + + The current implementation returns `stopping` # noqa: E501 + + :return: The status of this AIHubPortfolioStopData. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AIHubPortfolioStopData. + + The current implementation returns `stopping` # noqa: E501 + + :param status: The status of this AIHubPortfolioStopData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def result_message(self): + """Gets the result_message of this AIHubPortfolioStopData. # noqa: E501 + + + :return: The result_message of this AIHubPortfolioStopData. # noqa: E501 + :rtype: str + """ + return self._result_message + + @result_message.setter + def result_message(self, result_message): + """Sets the result_message of this AIHubPortfolioStopData. + + + :param result_message: The result_message of this AIHubPortfolioStopData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and result_message is None: # noqa: E501 + raise ValueError("Invalid value for `result_message`, must not be `None`") # noqa: E501 + + self._result_message = result_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, AIHubPortfolioStopData): + 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, AIHubPortfolioStopData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_stop_request.py b/gate_api/models/ai_hub_portfolio_stop_request.py new file mode 100644 index 00000000..e39c103a --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_stop_request.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 AIHubPortfolioStopRequest(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 = { + 'strategy_id': 'str', + 'strategy_type': 'StrategyType' + } + + attribute_map = { + 'strategy_id': 'strategy_id', + 'strategy_type': 'strategy_type' + } + + def __init__(self, strategy_id=None, strategy_type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, StrategyType, Configuration) -> None + """AIHubPortfolioStopRequest - 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._strategy_id = None + self._strategy_type = None + self.discriminator = None + + self.strategy_id = strategy_id + self.strategy_type = strategy_type + + @property + def strategy_id(self): + """Gets the strategy_id of this AIHubPortfolioStopRequest. # noqa: E501 + + + :return: The strategy_id of this AIHubPortfolioStopRequest. # noqa: E501 + :rtype: str + """ + return self._strategy_id + + @strategy_id.setter + def strategy_id(self, strategy_id): + """Sets the strategy_id of this AIHubPortfolioStopRequest. + + + :param strategy_id: The strategy_id of this AIHubPortfolioStopRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_id is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_id`, must not be `None`") # noqa: E501 + + self._strategy_id = strategy_id + + @property + def strategy_type(self): + """Gets the strategy_type of this AIHubPortfolioStopRequest. # noqa: E501 + + + :return: The strategy_type of this AIHubPortfolioStopRequest. # noqa: E501 + :rtype: StrategyType + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this AIHubPortfolioStopRequest. + + + :param strategy_type: The strategy_type of this AIHubPortfolioStopRequest. # noqa: E501 + :type: StrategyType + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + + self._strategy_type = strategy_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, AIHubPortfolioStopRequest): + 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, AIHubPortfolioStopRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_portfolio_stop_success_response.py b/gate_api/models/ai_hub_portfolio_stop_success_response.py new file mode 100644 index 00000000..1917fe64 --- /dev/null +++ b/gate_api/models/ai_hub_portfolio_stop_success_response.py @@ -0,0 +1,203 @@ +# 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 AIHubPortfolioStopSuccessResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'AIHubPortfolioStopData', + 'trace_id': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'trace_id': 'trace_id' + } + + def __init__(self, code=None, message=None, data=None, trace_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, AIHubPortfolioStopData, str, Configuration) -> None + """AIHubPortfolioStopSuccessResponse - 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._code = None + self._message = None + self._data = None + self._trace_id = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.trace_id = trace_id + + @property + def code(self): + """Gets the code of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + + + :return: The code of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this AIHubPortfolioStopSuccessResponse. + + + :param code: The code of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + + + :return: The message of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AIHubPortfolioStopSuccessResponse. + + + :param message: The message of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + + + :return: The data of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + :rtype: AIHubPortfolioStopData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AIHubPortfolioStopSuccessResponse. + + + :param data: The data of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + :type: AIHubPortfolioStopData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def trace_id(self): + """Gets the trace_id of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + + + :return: The trace_id of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._trace_id + + @trace_id.setter + def trace_id(self, trace_id): + """Sets the trace_id of this AIHubPortfolioStopSuccessResponse. + + + :param trace_id: The trace_id of this AIHubPortfolioStopSuccessResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and trace_id is None: # noqa: E501 + raise ValueError("Invalid value for `trace_id`, must not be `None`") # noqa: E501 + + self._trace_id = trace_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, AIHubPortfolioStopSuccessResponse): + 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, AIHubPortfolioStopSuccessResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ai_hub_recommendation.py b/gate_api/models/ai_hub_recommendation.py new file mode 100644 index 00000000..1d23c1b6 --- /dev/null +++ b/gate_api/models/ai_hub_recommendation.py @@ -0,0 +1,310 @@ +# 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 AIHubRecommendation(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 = { + 'recommendation_id': 'str', + 'market': 'str', + 'strategy_type': 'StrategyType', + 'strategy_name': 'str', + 'backtest_apr': 'str', + 'max_drawdown': 'str', + 'summary': 'str', + 'strategy_params_preview': 'str' + } + + attribute_map = { + 'recommendation_id': 'recommendation_id', + 'market': 'market', + 'strategy_type': 'strategy_type', + 'strategy_name': 'strategy_name', + 'backtest_apr': 'backtest_apr', + 'max_drawdown': 'max_drawdown', + 'summary': 'summary', + 'strategy_params_preview': 'strategy_params_preview' + } + + def __init__(self, recommendation_id=None, market=None, strategy_type=None, strategy_name=None, backtest_apr=None, max_drawdown=None, summary=None, strategy_params_preview=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, StrategyType, str, str, str, str, str, Configuration) -> None + """AIHubRecommendation - 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._recommendation_id = None + self._market = None + self._strategy_type = None + self._strategy_name = None + self._backtest_apr = None + self._max_drawdown = None + self._summary = None + self._strategy_params_preview = None + self.discriminator = None + + self.recommendation_id = recommendation_id + self.market = market + self.strategy_type = strategy_type + self.strategy_name = strategy_name + if backtest_apr is not None: + self.backtest_apr = backtest_apr + if max_drawdown is not None: + self.max_drawdown = max_drawdown + self.summary = summary + if strategy_params_preview is not None: + self.strategy_params_preview = strategy_params_preview + + @property + def recommendation_id(self): + """Gets the recommendation_id of this AIHubRecommendation. # noqa: E501 + + + :return: The recommendation_id of this AIHubRecommendation. # noqa: E501 + :rtype: str + """ + return self._recommendation_id + + @recommendation_id.setter + def recommendation_id(self, recommendation_id): + """Sets the recommendation_id of this AIHubRecommendation. + + + :param recommendation_id: The recommendation_id of this AIHubRecommendation. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and recommendation_id is None: # noqa: E501 + raise ValueError("Invalid value for `recommendation_id`, must not be `None`") # noqa: E501 + + self._recommendation_id = recommendation_id + + @property + def market(self): + """Gets the market of this AIHubRecommendation. # noqa: E501 + + + :return: The market of this AIHubRecommendation. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this AIHubRecommendation. + + + :param market: The market of this AIHubRecommendation. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def strategy_type(self): + """Gets the strategy_type of this AIHubRecommendation. # noqa: E501 + + + :return: The strategy_type of this AIHubRecommendation. # noqa: E501 + :rtype: StrategyType + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this AIHubRecommendation. + + + :param strategy_type: The strategy_type of this AIHubRecommendation. # noqa: E501 + :type: StrategyType + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + + self._strategy_type = strategy_type + + @property + def strategy_name(self): + """Gets the strategy_name of this AIHubRecommendation. # noqa: E501 + + + :return: The strategy_name of this AIHubRecommendation. # noqa: E501 + :rtype: str + """ + return self._strategy_name + + @strategy_name.setter + def strategy_name(self, strategy_name): + """Sets the strategy_name of this AIHubRecommendation. + + + :param strategy_name: The strategy_name of this AIHubRecommendation. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_name is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_name`, must not be `None`") # noqa: E501 + + self._strategy_name = strategy_name + + @property + def backtest_apr(self): + """Gets the backtest_apr of this AIHubRecommendation. # noqa: E501 + + + :return: The backtest_apr of this AIHubRecommendation. # noqa: E501 + :rtype: str + """ + return self._backtest_apr + + @backtest_apr.setter + def backtest_apr(self, backtest_apr): + """Sets the backtest_apr of this AIHubRecommendation. + + + :param backtest_apr: The backtest_apr of this AIHubRecommendation. # noqa: E501 + :type: str + """ + + self._backtest_apr = backtest_apr + + @property + def max_drawdown(self): + """Gets the max_drawdown of this AIHubRecommendation. # noqa: E501 + + + :return: The max_drawdown of this AIHubRecommendation. # noqa: E501 + :rtype: str + """ + return self._max_drawdown + + @max_drawdown.setter + def max_drawdown(self, max_drawdown): + """Sets the max_drawdown of this AIHubRecommendation. + + + :param max_drawdown: The max_drawdown of this AIHubRecommendation. # noqa: E501 + :type: str + """ + + self._max_drawdown = max_drawdown + + @property + def summary(self): + """Gets the summary of this AIHubRecommendation. # noqa: E501 + + + :return: The summary of this AIHubRecommendation. # noqa: E501 + :rtype: str + """ + return self._summary + + @summary.setter + def summary(self, summary): + """Sets the summary of this AIHubRecommendation. + + + :param summary: The summary of this AIHubRecommendation. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and summary is None: # noqa: E501 + raise ValueError("Invalid value for `summary`, must not be `None`") # noqa: E501 + + self._summary = summary + + @property + def strategy_params_preview(self): + """Gets the strategy_params_preview of this AIHubRecommendation. # noqa: E501 + + Recommended-parameter preview as JSON text (string-encoded so clients deserialize it consistently). The value is a serialized JSON object whose structure varies by strategy type; callers or upper-layer models must parse it. # noqa: E501 + + :return: The strategy_params_preview of this AIHubRecommendation. # noqa: E501 + :rtype: str + """ + return self._strategy_params_preview + + @strategy_params_preview.setter + def strategy_params_preview(self, strategy_params_preview): + """Sets the strategy_params_preview of this AIHubRecommendation. + + Recommended-parameter preview as JSON text (string-encoded so clients deserialize it consistently). The value is a serialized JSON object whose structure varies by strategy type; callers or upper-layer models must parse it. # noqa: E501 + + :param strategy_params_preview: The strategy_params_preview of this AIHubRecommendation. # noqa: E501 + :type: str + """ + + self._strategy_params_preview = strategy_params_preview + + 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, AIHubRecommendation): + 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, AIHubRecommendation): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency2.py b/gate_api/models/alpha_currency.py similarity index 75% rename from gate_api/models/currency2.py rename to gate_api/models/alpha_currency.py index a7265fe4..9abb3799 100644 --- a/gate_api/models/currency2.py +++ b/gate_api/models/alpha_currency.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class Currency2(object): +class AlphaCurrency(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,7 +54,7 @@ class Currency2(object): def __init__(self, currency=None, name=None, chain=None, address=None, amount_precision=None, precision=None, status=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, int, int, int, Configuration) -> None - """Currency2 - a model defined in OpenAPI""" # noqa: E501 + """AlphaCurrency - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -85,22 +85,22 @@ def __init__(self, currency=None, name=None, chain=None, address=None, amount_pr @property def currency(self): - """Gets the currency of this Currency2. # noqa: E501 + """Gets the currency of this AlphaCurrency. # noqa: E501 Currency symbol # noqa: E501 - :return: The currency of this Currency2. # noqa: E501 + :return: The currency of this AlphaCurrency. # noqa: E501 :rtype: str """ return self._currency @currency.setter def currency(self, currency): - """Sets the currency of this Currency2. + """Sets the currency of this AlphaCurrency. Currency symbol # noqa: E501 - :param currency: The currency of this Currency2. # noqa: E501 + :param currency: The currency of this AlphaCurrency. # noqa: E501 :type: str """ @@ -108,22 +108,22 @@ def currency(self, currency): @property def name(self): - """Gets the name of this Currency2. # noqa: E501 + """Gets the name of this AlphaCurrency. # noqa: E501 Currency name # noqa: E501 - :return: The name of this Currency2. # noqa: E501 + :return: The name of this AlphaCurrency. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this Currency2. + """Sets the name of this AlphaCurrency. Currency name # noqa: E501 - :param name: The name of this Currency2. # noqa: E501 + :param name: The name of this AlphaCurrency. # noqa: E501 :type: str """ @@ -131,22 +131,22 @@ def name(self, name): @property def chain(self): - """Gets the chain of this Currency2. # noqa: E501 + """Gets the chain of this AlphaCurrency. # noqa: E501 The main chain corresponding to the coin # noqa: E501 - :return: The chain of this Currency2. # noqa: E501 + :return: The chain of this AlphaCurrency. # noqa: E501 :rtype: str """ return self._chain @chain.setter def chain(self, chain): - """Sets the chain of this Currency2. + """Sets the chain of this AlphaCurrency. The main chain corresponding to the coin # noqa: E501 - :param chain: The chain of this Currency2. # noqa: E501 + :param chain: The chain of this AlphaCurrency. # noqa: E501 :type: str """ @@ -154,22 +154,22 @@ def chain(self, chain): @property def address(self): - """Gets the address of this Currency2. # noqa: E501 + """Gets the address of this AlphaCurrency. # noqa: E501 Contract Address # noqa: E501 - :return: The address of this Currency2. # noqa: E501 + :return: The address of this AlphaCurrency. # noqa: E501 :rtype: str """ return self._address @address.setter def address(self, address): - """Sets the address of this Currency2. + """Sets the address of this AlphaCurrency. Contract Address # noqa: E501 - :param address: The address of this Currency2. # noqa: E501 + :param address: The address of this AlphaCurrency. # noqa: E501 :type: str """ @@ -177,22 +177,22 @@ def address(self, address): @property def amount_precision(self): - """Gets the amount_precision of this Currency2. # noqa: E501 + """Gets the amount_precision of this AlphaCurrency. # noqa: E501 Amount scale # noqa: E501 - :return: The amount_precision of this Currency2. # noqa: E501 + :return: The amount_precision of this AlphaCurrency. # noqa: E501 :rtype: int """ return self._amount_precision @amount_precision.setter def amount_precision(self, amount_precision): - """Sets the amount_precision of this Currency2. + """Sets the amount_precision of this AlphaCurrency. Amount scale # noqa: E501 - :param amount_precision: The amount_precision of this Currency2. # noqa: E501 + :param amount_precision: The amount_precision of this AlphaCurrency. # noqa: E501 :type: int """ @@ -200,22 +200,22 @@ def amount_precision(self, amount_precision): @property def precision(self): - """Gets the precision of this Currency2. # noqa: E501 + """Gets the precision of this AlphaCurrency. # noqa: E501 Price scale # noqa: E501 - :return: The precision of this Currency2. # noqa: E501 + :return: The precision of this AlphaCurrency. # noqa: E501 :rtype: int """ return self._precision @precision.setter def precision(self, precision): - """Sets the precision of this Currency2. + """Sets the precision of this AlphaCurrency. Price scale # noqa: E501 - :param precision: The precision of this Currency2. # noqa: E501 + :param precision: The precision of this AlphaCurrency. # noqa: E501 :type: int """ @@ -223,22 +223,22 @@ def precision(self, precision): @property def status(self): - """Gets the status of this Currency2. # noqa: E501 + """Gets the status of this AlphaCurrency. # noqa: E501 Currency Trading Status - `1` : Normal trading - `2` : Suspended trading - `3` : Delisted # noqa: E501 - :return: The status of this Currency2. # noqa: E501 + :return: The status of this AlphaCurrency. # noqa: E501 :rtype: int """ return self._status @status.setter def status(self, status): - """Sets the status of this Currency2. + """Sets the status of this AlphaCurrency. Currency Trading Status - `1` : Normal trading - `2` : Suspended trading - `3` : Delisted # noqa: E501 - :param status: The status of this Currency2. # noqa: E501 + :param status: The status of this AlphaCurrency. # noqa: E501 :type: int """ @@ -278,14 +278,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, Currency2): + if not isinstance(other, AlphaCurrency): 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, Currency2): + if not isinstance(other, AlphaCurrency): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_object1.py b/gate_api/models/amend_options_order_request.py similarity index 80% rename from gate_api/models/inline_object1.py rename to gate_api/models/amend_options_order_request.py index 3ae568c0..5b57d56d 100644 --- a/gate_api/models/inline_object1.py +++ b/gate_api/models/amend_options_order_request.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineObject1(object): +class AmendOptionsOrderRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -46,7 +46,7 @@ class InlineObject1(object): def __init__(self, contract=None, price=None, size=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, int, Configuration) -> None - """InlineObject1 - a model defined in OpenAPI""" # noqa: E501 + """AmendOptionsOrderRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -62,22 +62,22 @@ def __init__(self, contract=None, price=None, size=None, local_vars_configuratio @property def contract(self): - """Gets the contract of this InlineObject1. # noqa: E501 + """Gets the contract of this AmendOptionsOrderRequest. # noqa: E501 Options contract name # noqa: E501 - :return: The contract of this InlineObject1. # noqa: E501 + :return: The contract of this AmendOptionsOrderRequest. # noqa: E501 :rtype: str """ return self._contract @contract.setter def contract(self, contract): - """Sets the contract of this InlineObject1. + """Sets the contract of this AmendOptionsOrderRequest. Options contract name # noqa: E501 - :param contract: The contract of this InlineObject1. # noqa: E501 + :param contract: The contract of this AmendOptionsOrderRequest. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 @@ -87,22 +87,22 @@ def contract(self, contract): @property def price(self): - """Gets the price of this InlineObject1. # noqa: E501 + """Gets the price of this AmendOptionsOrderRequest. # noqa: E501 Order Price # noqa: E501 - :return: The price of this InlineObject1. # noqa: E501 + :return: The price of this AmendOptionsOrderRequest. # noqa: E501 :rtype: str """ return self._price @price.setter def price(self, price): - """Sets the price of this InlineObject1. + """Sets the price of this AmendOptionsOrderRequest. Order Price # noqa: E501 - :param price: The price of this InlineObject1. # noqa: E501 + :param price: The price of this AmendOptionsOrderRequest. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 @@ -112,22 +112,22 @@ def price(self, price): @property def size(self): - """Gets the size of this InlineObject1. # noqa: E501 + """Gets the size of this AmendOptionsOrderRequest. # noqa: E501 Trade amount # noqa: E501 - :return: The size of this InlineObject1. # noqa: E501 + :return: The size of this AmendOptionsOrderRequest. # noqa: E501 :rtype: int """ return self._size @size.setter def size(self, size): - """Sets the size of this InlineObject1. + """Sets the size of this AmendOptionsOrderRequest. Trade amount # noqa: E501 - :param size: The size of this InlineObject1. # noqa: E501 + :param size: The size of this AmendOptionsOrderRequest. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 @@ -169,14 +169,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineObject1): + if not isinstance(other, AmendOptionsOrderRequest): 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, InlineObject1): + if not isinstance(other, AmendOptionsOrderRequest): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_asset_swap_config.py b/gate_api/models/api_response_asset_swap_config.py new file mode 100644 index 00000000..5a6a6fac --- /dev/null +++ b/gate_api/models/api_response_asset_swap_config.py @@ -0,0 +1,237 @@ +# 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 ApiResponseAssetSwapConfig(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseAssetSwapConfig - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + if label is not None: + self.label = label + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseAssetSwapConfig. # noqa: E501 + + Business error code, 0 means success # noqa: E501 + + :return: The code of this ApiResponseAssetSwapConfig. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseAssetSwapConfig. + + Business error code, 0 means success # noqa: E501 + + :param code: The code of this ApiResponseAssetSwapConfig. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseAssetSwapConfig. # noqa: E501 + + Error identification code, empty string on success # noqa: E501 + + :return: The label of this ApiResponseAssetSwapConfig. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseAssetSwapConfig. + + Error identification code, empty string on success # noqa: E501 + + :param label: The label of this ApiResponseAssetSwapConfig. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseAssetSwapConfig. # noqa: E501 + + Description information # noqa: E501 + + :return: The message of this ApiResponseAssetSwapConfig. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseAssetSwapConfig. + + Description information # noqa: E501 + + :param message: The message of this ApiResponseAssetSwapConfig. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseAssetSwapConfig. # noqa: E501 + + Front-end configuration on success, null on failure # noqa: E501 + + :return: The data of this ApiResponseAssetSwapConfig. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseAssetSwapConfig. + + Front-end configuration on success, null on failure # noqa: E501 + + :param data: The data of this ApiResponseAssetSwapConfig. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseAssetSwapConfig. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseAssetSwapConfig. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseAssetSwapConfig. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseAssetSwapConfig. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ApiResponseAssetSwapConfig): + 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, ApiResponseAssetSwapConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_asset_swap_evaluate.py b/gate_api/models/api_response_asset_swap_evaluate.py new file mode 100644 index 00000000..dd44ba76 --- /dev/null +++ b/gate_api/models/api_response_asset_swap_evaluate.py @@ -0,0 +1,237 @@ +# 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 ApiResponseAssetSwapEvaluate(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseAssetSwapEvaluate - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + if label is not None: + self.label = label + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseAssetSwapEvaluate. # noqa: E501 + + Business error code, 0 means success # noqa: E501 + + :return: The code of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseAssetSwapEvaluate. + + Business error code, 0 means success # noqa: E501 + + :param code: The code of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseAssetSwapEvaluate. # noqa: E501 + + Error identification code, empty string on success # noqa: E501 + + :return: The label of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseAssetSwapEvaluate. + + Error identification code, empty string on success # noqa: E501 + + :param label: The label of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseAssetSwapEvaluate. # noqa: E501 + + Description information # noqa: E501 + + :return: The message of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseAssetSwapEvaluate. + + Description information # noqa: E501 + + :param message: The message of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseAssetSwapEvaluate. # noqa: E501 + + Estimated paginated data on success, null on failure # noqa: E501 + + :return: The data of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseAssetSwapEvaluate. + + Estimated paginated data on success, null on failure # noqa: E501 + + :param data: The data of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseAssetSwapEvaluate. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseAssetSwapEvaluate. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseAssetSwapEvaluate. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ApiResponseAssetSwapEvaluate): + 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, ApiResponseAssetSwapEvaluate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_asset_swap_list_assets.py b/gate_api/models/api_response_asset_swap_list_assets.py new file mode 100644 index 00000000..166d5b3b --- /dev/null +++ b/gate_api/models/api_response_asset_swap_list_assets.py @@ -0,0 +1,237 @@ +# 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 ApiResponseAssetSwapListAssets(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseAssetSwapListAssets - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + if label is not None: + self.label = label + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseAssetSwapListAssets. # noqa: E501 + + Business error code, 0 means success # noqa: E501 + + :return: The code of this ApiResponseAssetSwapListAssets. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseAssetSwapListAssets. + + Business error code, 0 means success # noqa: E501 + + :param code: The code of this ApiResponseAssetSwapListAssets. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseAssetSwapListAssets. # noqa: E501 + + Error identification code, empty string on success # noqa: E501 + + :return: The label of this ApiResponseAssetSwapListAssets. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseAssetSwapListAssets. + + Error identification code, empty string on success # noqa: E501 + + :param label: The label of this ApiResponseAssetSwapListAssets. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseAssetSwapListAssets. # noqa: E501 + + Description information # noqa: E501 + + :return: The message of this ApiResponseAssetSwapListAssets. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseAssetSwapListAssets. + + Description information # noqa: E501 + + :param message: The message of this ApiResponseAssetSwapListAssets. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseAssetSwapListAssets. # noqa: E501 + + Currency list data on success, null on failure # noqa: E501 + + :return: The data of this ApiResponseAssetSwapListAssets. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseAssetSwapListAssets. + + Currency list data on success, null on failure # noqa: E501 + + :param data: The data of this ApiResponseAssetSwapListAssets. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseAssetSwapListAssets. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseAssetSwapListAssets. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseAssetSwapListAssets. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseAssetSwapListAssets. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ApiResponseAssetSwapListAssets): + 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, ApiResponseAssetSwapListAssets): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_asset_swap_order_create_v1.py b/gate_api/models/api_response_asset_swap_order_create_v1.py new file mode 100644 index 00000000..b7e1ed22 --- /dev/null +++ b/gate_api/models/api_response_asset_swap_order_create_v1.py @@ -0,0 +1,237 @@ +# 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 ApiResponseAssetSwapOrderCreateV1(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseAssetSwapOrderCreateV1 - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + if label is not None: + self.label = label + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + + Business error code, 0 means success # noqa: E501 + + :return: The code of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseAssetSwapOrderCreateV1. + + Business error code, 0 means success # noqa: E501 + + :param code: The code of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + + Error identification code, empty string on success # noqa: E501 + + :return: The label of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseAssetSwapOrderCreateV1. + + Error identification code, empty string on success # noqa: E501 + + :param label: The label of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + + Description information # noqa: E501 + + :return: The message of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseAssetSwapOrderCreateV1. + + Description information # noqa: E501 + + :param message: The message of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + + It is the order result when successful, and null when it fails. # noqa: E501 + + :return: The data of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseAssetSwapOrderCreateV1. + + It is the order result when successful, and null when it fails. # noqa: E501 + + :param data: The data of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseAssetSwapOrderCreateV1. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseAssetSwapOrderCreateV1. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ApiResponseAssetSwapOrderCreateV1): + 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, ApiResponseAssetSwapOrderCreateV1): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_asset_swap_order_list_v1.py b/gate_api/models/api_response_asset_swap_order_list_v1.py new file mode 100644 index 00000000..246b4b79 --- /dev/null +++ b/gate_api/models/api_response_asset_swap_order_list_v1.py @@ -0,0 +1,237 @@ +# 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 ApiResponseAssetSwapOrderListV1(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseAssetSwapOrderListV1 - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + if label is not None: + self.label = label + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + + Business error code, 0 means success # noqa: E501 + + :return: The code of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseAssetSwapOrderListV1. + + Business error code, 0 means success # noqa: E501 + + :param code: The code of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + + Error identification code, empty string on success # noqa: E501 + + :return: The label of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseAssetSwapOrderListV1. + + Error identification code, empty string on success # noqa: E501 + + :param label: The label of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + + Description information # noqa: E501 + + :return: The message of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseAssetSwapOrderListV1. + + Description information # noqa: E501 + + :param message: The message of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + + Order list data on success, null on failure # noqa: E501 + + :return: The data of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseAssetSwapOrderListV1. + + Order list data on success, null on failure # noqa: E501 + + :param data: The data of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseAssetSwapOrderListV1. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseAssetSwapOrderListV1. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ApiResponseAssetSwapOrderListV1): + 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, ApiResponseAssetSwapOrderListV1): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_asset_swap_order_preview_v1.py b/gate_api/models/api_response_asset_swap_order_preview_v1.py new file mode 100644 index 00000000..24533878 --- /dev/null +++ b/gate_api/models/api_response_asset_swap_order_preview_v1.py @@ -0,0 +1,237 @@ +# 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 ApiResponseAssetSwapOrderPreviewV1(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseAssetSwapOrderPreviewV1 - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + if label is not None: + self.label = label + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + + Business error code, 0 means success # noqa: E501 + + :return: The code of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseAssetSwapOrderPreviewV1. + + Business error code, 0 means success # noqa: E501 + + :param code: The code of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + + Error identification code, empty string on success # noqa: E501 + + :return: The label of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseAssetSwapOrderPreviewV1. + + Error identification code, empty string on success # noqa: E501 + + :param label: The label of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + + Description information # noqa: E501 + + :return: The message of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseAssetSwapOrderPreviewV1. + + Description information # noqa: E501 + + :param message: The message of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + + Preview result when successful, null when failed # noqa: E501 + + :return: The data of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseAssetSwapOrderPreviewV1. + + Preview result when successful, null when failed # noqa: E501 + + :param data: The data of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseAssetSwapOrderPreviewV1. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseAssetSwapOrderPreviewV1. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ApiResponseAssetSwapOrderPreviewV1): + 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, ApiResponseAssetSwapOrderPreviewV1): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_asset_swap_order_query_v1.py b/gate_api/models/api_response_asset_swap_order_query_v1.py new file mode 100644 index 00000000..0c39b171 --- /dev/null +++ b/gate_api/models/api_response_asset_swap_order_query_v1.py @@ -0,0 +1,237 @@ +# 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 ApiResponseAssetSwapOrderQueryV1(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseAssetSwapOrderQueryV1 - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + if label is not None: + self.label = label + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + + Business error code, 0 means success # noqa: E501 + + :return: The code of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseAssetSwapOrderQueryV1. + + Business error code, 0 means success # noqa: E501 + + :param code: The code of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + + Error identification code, empty string on success # noqa: E501 + + :return: The label of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseAssetSwapOrderQueryV1. + + Error identification code, empty string on success # noqa: E501 + + :param label: The label of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + + Description information # noqa: E501 + + :return: The message of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseAssetSwapOrderQueryV1. + + Description information # noqa: E501 + + :param message: The message of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + + Order details on success, null on failure # noqa: E501 + + :return: The data of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseAssetSwapOrderQueryV1. + + Order details on success, null on failure # noqa: E501 + + :param data: The data of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseAssetSwapOrderQueryV1. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseAssetSwapOrderQueryV1. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ApiResponseAssetSwapOrderQueryV1): + 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, ApiResponseAssetSwapOrderQueryV1): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_ex_skill_claim_reward_resp.py b/gate_api/models/api_response_ex_skill_claim_reward_resp.py new file mode 100644 index 00000000..dce5f741 --- /dev/null +++ b/gate_api/models/api_response_ex_skill_claim_reward_resp.py @@ -0,0 +1,233 @@ +# 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 ApiResponseExSkillClaimRewardResp(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'ApiResponseExSkillClaimRewardRespData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, ApiResponseExSkillClaimRewardRespData, int, Configuration) -> None + """ApiResponseExSkillClaimRewardResp - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + if code is not None: + self.code = code + if label is not None: + self.label = label + if message is not None: + self.message = message + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + + Business error code, 0 means success # noqa: E501 + + :return: The code of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseExSkillClaimRewardResp. + + Business error code, 0 means success # noqa: E501 + + :param code: The code of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :return: The label of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseExSkillClaimRewardResp. + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :param label: The label of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + + Error description # noqa: E501 + + :return: The message of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseExSkillClaimRewardResp. + + Error description # noqa: E501 + + :param message: The message of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + + + :return: The data of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :rtype: ApiResponseExSkillClaimRewardRespData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseExSkillClaimRewardResp. + + + :param data: The data of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :type: ApiResponseExSkillClaimRewardRespData + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseExSkillClaimRewardResp. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseExSkillClaimRewardResp. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, ApiResponseExSkillClaimRewardResp): + 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, ApiResponseExSkillClaimRewardResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_ex_skill_claim_reward_resp_data.py b/gate_api/models/api_response_ex_skill_claim_reward_resp_data.py new file mode 100644 index 00000000..f9bdc714 --- /dev/null +++ b/gate_api/models/api_response_ex_skill_claim_reward_resp_data.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 ApiResponseExSkillClaimRewardRespData(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 = { + 'has_m_n_task': 'bool', + 'coupon_full_name': 'str' + } + + attribute_map = { + 'has_m_n_task': 'has_m_n_task', + 'coupon_full_name': 'coupon_full_name' + } + + def __init__(self, has_m_n_task=None, coupon_full_name=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, str, Configuration) -> None + """ApiResponseExSkillClaimRewardRespData - 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._has_m_n_task = None + self._coupon_full_name = None + self.discriminator = None + + if has_m_n_task is not None: + self.has_m_n_task = has_m_n_task + if coupon_full_name is not None: + self.coupon_full_name = coupon_full_name + + @property + def has_m_n_task(self): + """Gets the has_m_n_task of this ApiResponseExSkillClaimRewardRespData. # noqa: E501 + + Whether to choose n prize pool tasks for m. When it is true, it only prompts a jump and does not actually issue prizes. # noqa: E501 + + :return: The has_m_n_task of this ApiResponseExSkillClaimRewardRespData. # noqa: E501 + :rtype: bool + """ + return self._has_m_n_task + + @has_m_n_task.setter + def has_m_n_task(self, has_m_n_task): + """Sets the has_m_n_task of this ApiResponseExSkillClaimRewardRespData. + + Whether to choose n prize pool tasks for m. When it is true, it only prompts a jump and does not actually issue prizes. # noqa: E501 + + :param has_m_n_task: The has_m_n_task of this ApiResponseExSkillClaimRewardRespData. # noqa: E501 + :type: bool + """ + + self._has_m_n_task = has_m_n_task + + @property + def coupon_full_name(self): + """Gets the coupon_full_name of this ApiResponseExSkillClaimRewardRespData. # noqa: E501 + + The full name of the card reward. It is an empty string when it is not a coupon reward or cannot be parsed. # noqa: E501 + + :return: The coupon_full_name of this ApiResponseExSkillClaimRewardRespData. # noqa: E501 + :rtype: str + """ + return self._coupon_full_name + + @coupon_full_name.setter + def coupon_full_name(self, coupon_full_name): + """Sets the coupon_full_name of this ApiResponseExSkillClaimRewardRespData. + + The full name of the card reward. It is an empty string when it is not a coupon reward or cannot be parsed. # noqa: E501 + + :param coupon_full_name: The coupon_full_name of this ApiResponseExSkillClaimRewardRespData. # noqa: E501 + :type: str + """ + + self._coupon_full_name = coupon_full_name + + 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, ApiResponseExSkillClaimRewardRespData): + 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, ApiResponseExSkillClaimRewardRespData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20021.py b/gate_api/models/api_response_ex_skill_claim_task_resp.py similarity index 56% rename from gate_api/models/inline_response20021.py rename to gate_api/models/api_response_ex_skill_claim_task_resp.py index f58d386f..66115115 100644 --- a/gate_api/models/inline_response20021.py +++ b/gate_api/models/api_response_ex_skill_claim_task_resp.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20021(object): +class ApiResponseExSkillClaimTaskResp(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,130 +33,110 @@ class InlineResponse20021(object): and the value is json key in definition. """ openapi_types = { - 'timestamp': 'float', - 'method': 'str', 'code': 'int', + 'label': 'str', 'message': 'str', - 'data': 'InlineResponse20021Data', - 'version': 'str' + 'data': 'object', + 'timestamp': 'int' } attribute_map = { - 'timestamp': 'timestamp', - 'method': 'method', 'code': 'code', + 'label': 'label', 'message': 'message', 'data': 'data', - 'version': 'version' + 'timestamp': 'timestamp' } - def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20021Data, str, Configuration) -> None - """InlineResponse20021 - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseExSkillClaimTaskResp - 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._timestamp = None - self._method = None self._code = None + self._label = None self._message = None self._data = None - self._version = None + self._timestamp = None self.discriminator = None - if timestamp is not None: - self.timestamp = timestamp - if method is not None: - self.method = method if code is not None: self.code = code + if label is not None: + self.label = label if message is not None: self.message = message if data is not None: self.data = data - if version is not None: - self.version = version + if timestamp is not None: + self.timestamp = timestamp @property - def timestamp(self): - """Gets the timestamp of this InlineResponse20021. # noqa: E501 + def code(self): + """Gets the code of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + Business error code, 0 means success # noqa: E501 - :return: The timestamp of this InlineResponse20021. # noqa: E501 - :rtype: float + :return: The code of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + :rtype: int """ - return self._timestamp + return self._code - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20021. + @code.setter + def code(self, code): + """Sets the code of this ApiResponseExSkillClaimTaskResp. + Business error code, 0 means success # noqa: E501 - :param timestamp: The timestamp of this InlineResponse20021. # noqa: E501 - :type: float + :param code: The code of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + :type: int """ - self._timestamp = timestamp + self._code = code @property - def method(self): - """Gets the method of this InlineResponse20021. # noqa: E501 + def label(self): + """Gets the label of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 - :return: The method of this InlineResponse20021. # noqa: E501 + :return: The label of this ApiResponseExSkillClaimTaskResp. # noqa: E501 :rtype: str """ - return self._method + return self._label - @method.setter - def method(self, method): - """Sets the method of this InlineResponse20021. + @label.setter + def label(self, label): + """Sets the label of this ApiResponseExSkillClaimTaskResp. + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 - :param method: The method of this InlineResponse20021. # noqa: E501 + :param label: The label of this ApiResponseExSkillClaimTaskResp. # noqa: E501 :type: str """ - self._method = method - - @property - def code(self): - """Gets the code of this InlineResponse20021. # noqa: E501 - - - :return: The code of this InlineResponse20021. # noqa: E501 - :rtype: int - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this InlineResponse20021. - - - :param code: The code of this InlineResponse20021. # noqa: E501 - :type: int - """ - - self._code = code + self._label = label @property def message(self): - """Gets the message of this InlineResponse20021. # noqa: E501 + """Gets the message of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + Error description # noqa: E501 - :return: The message of this InlineResponse20021. # noqa: E501 + :return: The message of this ApiResponseExSkillClaimTaskResp. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20021. + """Sets the message of this ApiResponseExSkillClaimTaskResp. + Error description # noqa: E501 - :param message: The message of this InlineResponse20021. # noqa: E501 + :param message: The message of this ApiResponseExSkillClaimTaskResp. # noqa: E501 :type: str """ @@ -164,45 +144,49 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20021. # noqa: E501 + """Gets the data of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + Empty object {} on success # noqa: E501 - :return: The data of this InlineResponse20021. # noqa: E501 - :rtype: InlineResponse20021Data + :return: The data of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + :rtype: object """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20021. + """Sets the data of this ApiResponseExSkillClaimTaskResp. + Empty object {} on success # noqa: E501 - :param data: The data of this InlineResponse20021. # noqa: E501 - :type: InlineResponse20021Data + :param data: The data of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + :type: object """ self._data = data @property - def version(self): - """Gets the version of this InlineResponse20021. # noqa: E501 + def timestamp(self): + """Gets the timestamp of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + Server timestamp (milliseconds) # noqa: E501 - :return: The version of this InlineResponse20021. # noqa: E501 - :rtype: str + :return: The timestamp of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + :rtype: int """ - return self._version + return self._timestamp - @version.setter - def version(self, version): - """Sets the version of this InlineResponse20021. + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseExSkillClaimTaskResp. + Server timestamp (milliseconds) # noqa: E501 - :param version: The version of this InlineResponse20021. # noqa: E501 - :type: str + :param timestamp: The timestamp of this ApiResponseExSkillClaimTaskResp. # noqa: E501 + :type: int """ - self._version = version + self._timestamp = timestamp def to_dict(self): """Returns the model properties as a dict""" @@ -238,14 +222,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20021): + if not isinstance(other, ApiResponseExSkillClaimTaskResp): 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, InlineResponse20021): + if not isinstance(other, ApiResponseExSkillClaimTaskResp): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp.py b/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp.py new file mode 100644 index 00000000..f9d7685b --- /dev/null +++ b/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp.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 ApiResponseExSkillGetBeginnerTaskListResp(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'ApiResponseExSkillGetBeginnerTaskListRespData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, ApiResponseExSkillGetBeginnerTaskListRespData, int, Configuration) -> None + """ApiResponseExSkillGetBeginnerTaskListResp - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + if label is not None: + self.label = label + if message is not None: + self.message = message + if data is not None: + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + + Business error code: 0 = success, 1007 = no task data, 1008 = not logged in # noqa: E501 + + :return: The code of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseExSkillGetBeginnerTaskListResp. + + Business error code: 0 = success, 1007 = no task data, 1008 = not logged in # noqa: E501 + + :param code: The code of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :return: The label of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseExSkillGetBeginnerTaskListResp. + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :param label: The label of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + + Error description # noqa: E501 + + :return: The message of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseExSkillGetBeginnerTaskListResp. + + Error description # noqa: E501 + + :param message: The message of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + + + :return: The data of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :rtype: ApiResponseExSkillGetBeginnerTaskListRespData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseExSkillGetBeginnerTaskListResp. + + + :param data: The data of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :type: ApiResponseExSkillGetBeginnerTaskListRespData + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseExSkillGetBeginnerTaskListResp. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseExSkillGetBeginnerTaskListResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ApiResponseExSkillGetBeginnerTaskListResp): + 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, ApiResponseExSkillGetBeginnerTaskListResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp_data.py b/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp_data.py new file mode 100644 index 00000000..152d6274 --- /dev/null +++ b/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp_data.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 ApiResponseExSkillGetBeginnerTaskListRespData(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 = { + 'tasks': 'list[ApiResponseExSkillGetBeginnerTaskListRespDataTasks]' + } + + attribute_map = { + 'tasks': 'tasks' + } + + def __init__(self, tasks=None, local_vars_configuration=None): # noqa: E501 + # type: (list[ApiResponseExSkillGetBeginnerTaskListRespDataTasks], Configuration) -> None + """ApiResponseExSkillGetBeginnerTaskListRespData - 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._tasks = None + self.discriminator = None + + if tasks is not None: + self.tasks = tasks + + @property + def tasks(self): + """Gets the tasks of this ApiResponseExSkillGetBeginnerTaskListRespData. # noqa: E501 + + Getting started task list (registration tasks come first, guidance tasks follow; when conditions are met, an additional download task to be collected will be returned) # noqa: E501 + + :return: The tasks of this ApiResponseExSkillGetBeginnerTaskListRespData. # noqa: E501 + :rtype: list[ApiResponseExSkillGetBeginnerTaskListRespDataTasks] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this ApiResponseExSkillGetBeginnerTaskListRespData. + + Getting started task list (registration tasks come first, guidance tasks follow; when conditions are met, an additional download task to be collected will be returned) # noqa: E501 + + :param tasks: The tasks of this ApiResponseExSkillGetBeginnerTaskListRespData. # noqa: E501 + :type: list[ApiResponseExSkillGetBeginnerTaskListRespDataTasks] + """ + + self._tasks = tasks + + 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, ApiResponseExSkillGetBeginnerTaskListRespData): + 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, ApiResponseExSkillGetBeginnerTaskListRespData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp_data_tasks.py b/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp_data_tasks.py new file mode 100644 index 00000000..2828dbfe --- /dev/null +++ b/gate_api/models/api_response_ex_skill_get_beginner_task_list_resp_data_tasks.py @@ -0,0 +1,361 @@ +# 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 ApiResponseExSkillGetBeginnerTaskListRespDataTasks(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 = { + 'welfare_task_id': 'int', + 'task_center_id': 'int', + 'task_type': 'int', + 'task_name': 'str', + 'task_desc': 'str', + 'reward_num': 'str', + 'reward_unit': 'str', + 'prize_type': 'int', + 'status': 'int' + } + + attribute_map = { + 'welfare_task_id': 'welfare_task_id', + 'task_center_id': 'task_center_id', + 'task_type': 'task_type', + 'task_name': 'task_name', + 'task_desc': 'task_desc', + 'reward_num': 'reward_num', + 'reward_unit': 'reward_unit', + 'prize_type': 'prize_type', + 'status': 'status' + } + + def __init__(self, welfare_task_id=None, task_center_id=None, task_type=None, task_name=None, task_desc=None, reward_num=None, reward_unit=None, prize_type=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, str, str, str, str, int, int, Configuration) -> None + """ApiResponseExSkillGetBeginnerTaskListRespDataTasks - 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._welfare_task_id = None + self._task_center_id = None + self._task_type = None + self._task_name = None + self._task_desc = None + self._reward_num = None + self._reward_unit = None + self._prize_type = None + self._status = None + self.discriminator = None + + if welfare_task_id is not None: + self.welfare_task_id = welfare_task_id + self.task_center_id = task_center_id + if task_type is not None: + self.task_type = task_type + if task_name is not None: + self.task_name = task_name + if task_desc is not None: + self.task_desc = task_desc + if reward_num is not None: + self.reward_num = reward_num + if reward_unit is not None: + self.reward_unit = reward_unit + if prize_type is not None: + self.prize_type = prize_type + self.status = status + + @property + def welfare_task_id(self): + """Gets the welfare_task_id of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Rewards Center task ID # noqa: E501 + + :return: The welfare_task_id of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: int + """ + return self._welfare_task_id + + @welfare_task_id.setter + def welfare_task_id(self, welfare_task_id): + """Sets the welfare_task_id of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Rewards Center task ID # noqa: E501 + + :param welfare_task_id: The welfare_task_id of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: int + """ + + self._welfare_task_id = welfare_task_id + + @property + def task_center_id(self): + """Gets the task_center_id of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Task center task ID (fixed at 0 for registration tasks) # noqa: E501 + + :return: The task_center_id of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: int + """ + return self._task_center_id + + @task_center_id.setter + def task_center_id(self, task_center_id): + """Sets the task_center_id of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Task center task ID (fixed at 0 for registration tasks) # noqa: E501 + + :param task_center_id: The task_center_id of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and task_center_id is None: # noqa: E501 + raise ValueError("Invalid value for `task_center_id`, must not be `None`") # noqa: E501 + + self._task_center_id = task_center_id + + @property + def task_type(self): + """Gets the task_type of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Task type: 1=KYC secondary certification 2=Spot 3=Contract 4=Invitation 5=Quantification 6=Yu Bibao 7=startup 8=First deposit 10=Registration task 11=Guide task 23=Download task # noqa: E501 + + :return: The task_type of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: int + """ + return self._task_type + + @task_type.setter + def task_type(self, task_type): + """Sets the task_type of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Task type: 1=KYC secondary certification 2=Spot 3=Contract 4=Invitation 5=Quantification 6=Yu Bibao 7=startup 8=First deposit 10=Registration task 11=Guide task 23=Download task # noqa: E501 + + :param task_type: The task_type of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: int + """ + + self._task_type = task_type + + @property + def task_name(self): + """Gets the task_name of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Task name # noqa: E501 + + :return: The task_name of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Task name # noqa: E501 + + :param task_name: The task_name of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: str + """ + + self._task_name = task_name + + @property + def task_desc(self): + """Gets the task_desc of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Task description, may contain highlight tags # noqa: E501 + + :return: The task_desc of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: str + """ + return self._task_desc + + @task_desc.setter + def task_desc(self, task_desc): + """Sets the task_desc of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Task description, may contain highlight tags # noqa: E501 + + :param task_desc: The task_desc of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: str + """ + + self._task_desc = task_desc + + @property + def reward_num(self): + """Gets the reward_num of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Reward value # noqa: E501 + + :return: The reward_num of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: str + """ + return self._reward_num + + @reward_num.setter + def reward_num(self, reward_num): + """Sets the reward_num of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Reward value # noqa: E501 + + :param reward_num: The reward_num of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: str + """ + + self._reward_num = reward_num + + @property + def reward_unit(self): + """Gets the reward_unit of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Reward unit (e.g., USDT, BTC) # noqa: E501 + + :return: The reward_unit of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: str + """ + return self._reward_unit + + @reward_unit.setter + def reward_unit(self, reward_unit): + """Sets the reward_unit of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Reward unit (e.g., USDT, BTC) # noqa: E501 + + :param reward_unit: The reward_unit of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: str + """ + + self._reward_unit = reward_unit + + @property + def prize_type(self): + """Gets the prize_type of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Reward type: 1 = points, 2 = regular coupon, 3 = VIP coupon # noqa: E501 + + :return: The prize_type of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: int + """ + return self._prize_type + + @prize_type.setter + def prize_type(self, prize_type): + """Sets the prize_type of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Reward type: 1 = points, 2 = regular coupon, 3 = VIP coupon # noqa: E501 + + :param prize_type: The prize_type of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: int + """ + allowed_values = [1, 2, 3] # noqa: E501 + if self.local_vars_configuration.client_side_validation and prize_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `prize_type` ({0}), must be one of {1}" # noqa: E501 + .format(prize_type, allowed_values) + ) + + self._prize_type = prize_type + + @property + def status(self): + """Gets the status of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + + Task status: 0=Not claimed (typically a download task waiting to be claimed) 1=Received/in progress 2=Completed and waiting to be claimed 3=Rewards in progress 4=Completed/settled 5=Expired # noqa: E501 + + :return: The status of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. + + Task status: 0=Not claimed (typically a download task waiting to be claimed) 1=Received/in progress 2=Completed and waiting to be claimed 3=Rewards in progress 4=Completed/settled 5=Expired # noqa: E501 + + :param status: The status of this ApiResponseExSkillGetBeginnerTaskListRespDataTasks. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = [0, 1, 2, 3, 4, 5] # 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}" # noqa: E501 + .format(status, allowed_values) + ) + + 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, ApiResponseExSkillGetBeginnerTaskListRespDataTasks): + 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, ApiResponseExSkillGetBeginnerTaskListRespDataTasks): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/api_response_ex_skill_get_user_identity_resp.py b/gate_api/models/api_response_ex_skill_get_user_identity_resp.py new file mode 100644 index 00000000..a8fb8943 --- /dev/null +++ b/gate_api/models/api_response_ex_skill_get_user_identity_resp.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 ApiResponseExSkillGetUserIdentityResp(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, object, int, Configuration) -> None + """ApiResponseExSkillGetUserIdentityResp - 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._code = None + self._label = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + if code is not None: + self.code = code + if label is not None: + self.label = label + if message is not None: + self.message = message + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + + Business error code: 0 = success, 1001 = existing user, 1002 = risk-controlled user, 1003 = sub-account, 1004 = agent, 1005 = market maker, 1006 = enterprise account, 1008 = not logged in # noqa: E501 + + :return: The code of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiResponseExSkillGetUserIdentityResp. + + Business error code: 0 = success, 1001 = existing user, 1002 = risk-controlled user, 1003 = sub-account, 1004 = agent, 1005 = market maker, 1006 = enterprise account, 1008 = not logged in # noqa: E501 + + :param code: The code of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def label(self): + """Gets the label of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :return: The label of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApiResponseExSkillGetUserIdentityResp. + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :param label: The label of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + + Error description # noqa: E501 + + :return: The message of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseExSkillGetUserIdentityResp. + + Error description # noqa: E501 + + :param message: The message of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + + Empty object {} on success, null on failure # noqa: E501 + + :return: The data of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseExSkillGetUserIdentityResp. + + Empty object {} on success, null on failure # noqa: E501 + + :param data: The data of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ApiResponseExSkillGetUserIdentityResp. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ApiResponseExSkillGetUserIdentityResp. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, ApiResponseExSkillGetUserIdentityResp): + 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, ApiResponseExSkillGetUserIdentityResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/asset_list_resp.py b/gate_api/models/asset_list_resp.py new file mode 100644 index 00000000..5f40fc79 --- /dev/null +++ b/gate_api/models/asset_list_resp.py @@ -0,0 +1,122 @@ +# 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 AssetListResp(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[str]' + } + + attribute_map = { + 'list': 'list' + } + + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[str], Configuration) -> None + """AssetListResp - 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 + + self.list = list + + @property + def list(self): + """Gets the list of this AssetListResp. # noqa: E501 + + + :return: The list of this AssetListResp. # noqa: E501 + :rtype: list[str] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this AssetListResp. + + + :param list: The list of this AssetListResp. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + 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, AssetListResp): + 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, AssetListResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/asset_swap_frontend.py b/gate_api/models/asset_swap_frontend.py new file mode 100644 index 00000000..00ffbfad --- /dev/null +++ b/gate_api/models/asset_swap_frontend.py @@ -0,0 +1,369 @@ +# 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 AssetSwapFrontend(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 = { + 'asset_evaluate_range': 'list[int]', + 'banner_reappear_interval_hours': 'int', + 'convert_currencies': 'list[str]', + 'convert_currencies_v2': 'list[ConvertCurrenciesV2Item]', + 'default': 'dict(str, str)', + 'max_select_currencies': 'int', + 'min_evaluate_value': 'str', + 'recommend': 'Recommend', + 'recommend_v2': 'dict(str, list[RecommendV2Strategy])', + 'title_tips': 'str' + } + + attribute_map = { + 'asset_evaluate_range': 'asset_evaluate_range', + 'banner_reappear_interval_hours': 'banner_reappear_interval_hours', + 'convert_currencies': 'convert_currencies', + 'convert_currencies_v2': 'convert_currencies_v2', + 'default': 'default', + 'max_select_currencies': 'max_select_currencies', + 'min_evaluate_value': 'min_evaluate_value', + 'recommend': 'recommend', + 'recommend_v2': 'recommend_v2', + 'title_tips': 'title_tips' + } + + def __init__(self, asset_evaluate_range=None, banner_reappear_interval_hours=None, convert_currencies=None, convert_currencies_v2=None, default=None, max_select_currencies=None, min_evaluate_value=None, recommend=None, recommend_v2=None, title_tips=None, local_vars_configuration=None): # noqa: E501 + # type: (list[int], int, list[str], list[ConvertCurrenciesV2Item], dict(str, str), int, str, Recommend, dict(str, list[RecommendV2Strategy]), str, Configuration) -> None + """AssetSwapFrontend - 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._asset_evaluate_range = None + self._banner_reappear_interval_hours = None + self._convert_currencies = None + self._convert_currencies_v2 = None + self._default = None + self._max_select_currencies = None + self._min_evaluate_value = None + self._recommend = None + self._recommend_v2 = None + self._title_tips = None + self.discriminator = None + + self.asset_evaluate_range = asset_evaluate_range + self.banner_reappear_interval_hours = banner_reappear_interval_hours + self.convert_currencies = convert_currencies + self.convert_currencies_v2 = convert_currencies_v2 + self.default = default + self.max_select_currencies = max_select_currencies + self.min_evaluate_value = min_evaluate_value + self.recommend = recommend + self.recommend_v2 = recommend_v2 + self.title_tips = title_tips + + @property + def asset_evaluate_range(self): + """Gets the asset_evaluate_range of this AssetSwapFrontend. # noqa: E501 + + + :return: The asset_evaluate_range of this AssetSwapFrontend. # noqa: E501 + :rtype: list[int] + """ + return self._asset_evaluate_range + + @asset_evaluate_range.setter + def asset_evaluate_range(self, asset_evaluate_range): + """Sets the asset_evaluate_range of this AssetSwapFrontend. + + + :param asset_evaluate_range: The asset_evaluate_range of this AssetSwapFrontend. # noqa: E501 + :type: list[int] + """ + if self.local_vars_configuration.client_side_validation and asset_evaluate_range is None: # noqa: E501 + raise ValueError("Invalid value for `asset_evaluate_range`, must not be `None`") # noqa: E501 + + self._asset_evaluate_range = asset_evaluate_range + + @property + def banner_reappear_interval_hours(self): + """Gets the banner_reappear_interval_hours of this AssetSwapFrontend. # noqa: E501 + + + :return: The banner_reappear_interval_hours of this AssetSwapFrontend. # noqa: E501 + :rtype: int + """ + return self._banner_reappear_interval_hours + + @banner_reappear_interval_hours.setter + def banner_reappear_interval_hours(self, banner_reappear_interval_hours): + """Sets the banner_reappear_interval_hours of this AssetSwapFrontend. + + + :param banner_reappear_interval_hours: The banner_reappear_interval_hours of this AssetSwapFrontend. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and banner_reappear_interval_hours is None: # noqa: E501 + raise ValueError("Invalid value for `banner_reappear_interval_hours`, must not be `None`") # noqa: E501 + + self._banner_reappear_interval_hours = banner_reappear_interval_hours + + @property + def convert_currencies(self): + """Gets the convert_currencies of this AssetSwapFrontend. # noqa: E501 + + + :return: The convert_currencies of this AssetSwapFrontend. # noqa: E501 + :rtype: list[str] + """ + return self._convert_currencies + + @convert_currencies.setter + def convert_currencies(self, convert_currencies): + """Sets the convert_currencies of this AssetSwapFrontend. + + + :param convert_currencies: The convert_currencies of this AssetSwapFrontend. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and convert_currencies is None: # noqa: E501 + raise ValueError("Invalid value for `convert_currencies`, must not be `None`") # noqa: E501 + + self._convert_currencies = convert_currencies + + @property + def convert_currencies_v2(self): + """Gets the convert_currencies_v2 of this AssetSwapFrontend. # noqa: E501 + + + :return: The convert_currencies_v2 of this AssetSwapFrontend. # noqa: E501 + :rtype: list[ConvertCurrenciesV2Item] + """ + return self._convert_currencies_v2 + + @convert_currencies_v2.setter + def convert_currencies_v2(self, convert_currencies_v2): + """Sets the convert_currencies_v2 of this AssetSwapFrontend. + + + :param convert_currencies_v2: The convert_currencies_v2 of this AssetSwapFrontend. # noqa: E501 + :type: list[ConvertCurrenciesV2Item] + """ + if self.local_vars_configuration.client_side_validation and convert_currencies_v2 is None: # noqa: E501 + raise ValueError("Invalid value for `convert_currencies_v2`, must not be `None`") # noqa: E501 + + self._convert_currencies_v2 = convert_currencies_v2 + + @property + def default(self): + """Gets the default of this AssetSwapFrontend. # noqa: E501 + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :return: The default of this AssetSwapFrontend. # noqa: E501 + :rtype: dict(str, str) + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this AssetSwapFrontend. + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :param default: The default of this AssetSwapFrontend. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and default is None: # noqa: E501 + raise ValueError("Invalid value for `default`, must not be `None`") # noqa: E501 + + self._default = default + + @property + def max_select_currencies(self): + """Gets the max_select_currencies of this AssetSwapFrontend. # noqa: E501 + + + :return: The max_select_currencies of this AssetSwapFrontend. # noqa: E501 + :rtype: int + """ + return self._max_select_currencies + + @max_select_currencies.setter + def max_select_currencies(self, max_select_currencies): + """Sets the max_select_currencies of this AssetSwapFrontend. + + + :param max_select_currencies: The max_select_currencies of this AssetSwapFrontend. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and max_select_currencies is None: # noqa: E501 + raise ValueError("Invalid value for `max_select_currencies`, must not be `None`") # noqa: E501 + + self._max_select_currencies = max_select_currencies + + @property + def min_evaluate_value(self): + """Gets the min_evaluate_value of this AssetSwapFrontend. # noqa: E501 + + + :return: The min_evaluate_value of this AssetSwapFrontend. # noqa: E501 + :rtype: str + """ + return self._min_evaluate_value + + @min_evaluate_value.setter + def min_evaluate_value(self, min_evaluate_value): + """Sets the min_evaluate_value of this AssetSwapFrontend. + + + :param min_evaluate_value: The min_evaluate_value of this AssetSwapFrontend. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and min_evaluate_value is None: # noqa: E501 + raise ValueError("Invalid value for `min_evaluate_value`, must not be `None`") # noqa: E501 + + self._min_evaluate_value = min_evaluate_value + + @property + def recommend(self): + """Gets the recommend of this AssetSwapFrontend. # noqa: E501 + + + :return: The recommend of this AssetSwapFrontend. # noqa: E501 + :rtype: Recommend + """ + return self._recommend + + @recommend.setter + def recommend(self, recommend): + """Sets the recommend of this AssetSwapFrontend. + + + :param recommend: The recommend of this AssetSwapFrontend. # noqa: E501 + :type: Recommend + """ + if self.local_vars_configuration.client_side_validation and recommend is None: # noqa: E501 + raise ValueError("Invalid value for `recommend`, must not be `None`") # noqa: E501 + + self._recommend = recommend + + @property + def recommend_v2(self): + """Gets the recommend_v2 of this AssetSwapFrontend. # noqa: E501 + + Mapping of strategy grouping keys to RecommendV2Strategy lists. # noqa: E501 + + :return: The recommend_v2 of this AssetSwapFrontend. # noqa: E501 + :rtype: dict(str, list[RecommendV2Strategy]) + """ + return self._recommend_v2 + + @recommend_v2.setter + def recommend_v2(self, recommend_v2): + """Sets the recommend_v2 of this AssetSwapFrontend. + + Mapping of strategy grouping keys to RecommendV2Strategy lists. # noqa: E501 + + :param recommend_v2: The recommend_v2 of this AssetSwapFrontend. # noqa: E501 + :type: dict(str, list[RecommendV2Strategy]) + """ + if self.local_vars_configuration.client_side_validation and recommend_v2 is None: # noqa: E501 + raise ValueError("Invalid value for `recommend_v2`, must not be `None`") # noqa: E501 + + self._recommend_v2 = recommend_v2 + + @property + def title_tips(self): + """Gets the title_tips of this AssetSwapFrontend. # noqa: E501 + + + :return: The title_tips of this AssetSwapFrontend. # noqa: E501 + :rtype: str + """ + return self._title_tips + + @title_tips.setter + def title_tips(self, title_tips): + """Sets the title_tips of this AssetSwapFrontend. + + + :param title_tips: The title_tips of this AssetSwapFrontend. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and title_tips is None: # noqa: E501 + raise ValueError("Invalid value for `title_tips`, must not be `None`") # noqa: E501 + + self._title_tips = title_tips + + 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, AssetSwapFrontend): + 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, AssetSwapFrontend): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_coins_item.py b/gate_api/models/auto_invest_coins_item.py new file mode 100644 index 00000000..61b5bb90 --- /dev/null +++ b/gate_api/models/auto_invest_coins_item.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 AutoInvestCoinsItem(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 = { + 'key': 'str', + 'value': 'str', + 'asset_icon_url': 'str', + 'sort': 'int' + } + + attribute_map = { + 'key': 'key', + 'value': 'value', + 'asset_icon_url': 'asset_icon_url', + 'sort': 'sort' + } + + def __init__(self, key=None, value=None, asset_icon_url=None, sort=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, Configuration) -> None + """AutoInvestCoinsItem - 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._key = None + self._value = None + self._asset_icon_url = None + self._sort = None + self.discriminator = None + + self.key = key + self.value = value + self.asset_icon_url = asset_icon_url + if sort is not None: + self.sort = sort + + @property + def key(self): + """Gets the key of this AutoInvestCoinsItem. # noqa: E501 + + Currency code # noqa: E501 + + :return: The key of this AutoInvestCoinsItem. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this AutoInvestCoinsItem. + + Currency code # noqa: E501 + + :param key: The key of this AutoInvestCoinsItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501 + raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 + + self._key = key + + @property + def value(self): + """Gets the value of this AutoInvestCoinsItem. # noqa: E501 + + Currency name # noqa: E501 + + :return: The value of this AutoInvestCoinsItem. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this AutoInvestCoinsItem. + + Currency name # noqa: E501 + + :param value: The value of this AutoInvestCoinsItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + @property + def asset_icon_url(self): + """Gets the asset_icon_url of this AutoInvestCoinsItem. # noqa: E501 + + Currency icon URL # noqa: E501 + + :return: The asset_icon_url of this AutoInvestCoinsItem. # noqa: E501 + :rtype: str + """ + return self._asset_icon_url + + @asset_icon_url.setter + def asset_icon_url(self, asset_icon_url): + """Sets the asset_icon_url of this AutoInvestCoinsItem. + + Currency icon URL # noqa: E501 + + :param asset_icon_url: The asset_icon_url of this AutoInvestCoinsItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset_icon_url is None: # noqa: E501 + raise ValueError("Invalid value for `asset_icon_url`, must not be `None`") # noqa: E501 + + self._asset_icon_url = asset_icon_url + + @property + def sort(self): + """Gets the sort of this AutoInvestCoinsItem. # noqa: E501 + + Sort # noqa: E501 + + :return: The sort of this AutoInvestCoinsItem. # noqa: E501 + :rtype: int + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this AutoInvestCoinsItem. + + Sort # noqa: E501 + + :param sort: The sort of this AutoInvestCoinsItem. # noqa: E501 + :type: int + """ + + self._sort = sort + + 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, AutoInvestCoinsItem): + 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, AutoInvestCoinsItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_config_item.py b/gate_api/models/auto_invest_config_item.py new file mode 100644 index 00000000..ce57fe7a --- /dev/null +++ b/gate_api/models/auto_invest_config_item.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 AutoInvestConfigItem(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', + 'max_limit': 'str' + } + + attribute_map = { + 'coin': 'coin', + 'max_limit': 'max_limit' + } + + def __init__(self, coin=None, max_limit=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """AutoInvestConfigItem - 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._max_limit = None + self.discriminator = None + + self.coin = coin + self.max_limit = max_limit + + @property + def coin(self): + """Gets the coin of this AutoInvestConfigItem. # noqa: E501 + + Currency # noqa: E501 + + :return: The coin of this AutoInvestConfigItem. # noqa: E501 + :rtype: str + """ + return self._coin + + @coin.setter + def coin(self, coin): + """Sets the coin of this AutoInvestConfigItem. + + Currency # noqa: E501 + + :param coin: The coin of this AutoInvestConfigItem. # 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 max_limit(self): + """Gets the max_limit of this AutoInvestConfigItem. # noqa: E501 + + InvestmentLimit # noqa: E501 + + :return: The max_limit of this AutoInvestConfigItem. # noqa: E501 + :rtype: str + """ + return self._max_limit + + @max_limit.setter + def max_limit(self, max_limit): + """Sets the max_limit of this AutoInvestConfigItem. + + InvestmentLimit # noqa: E501 + + :param max_limit: The max_limit of this AutoInvestConfigItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and max_limit is None: # noqa: E501 + raise ValueError("Invalid value for `max_limit`, must not be `None`") # noqa: E501 + + self._max_limit = max_limit + + 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, AutoInvestConfigItem): + 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, AutoInvestConfigItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_min_invest_amount.py b/gate_api/models/auto_invest_min_invest_amount.py new file mode 100644 index 00000000..a43122e9 --- /dev/null +++ b/gate_api/models/auto_invest_min_invest_amount.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 AutoInvestMinInvestAmount(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 = { + 'money': 'str', + 'items': 'list[AutoInvestMinInvestAmountItems]' + } + + attribute_map = { + 'money': 'money', + 'items': 'items' + } + + def __init__(self, money=None, items=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[AutoInvestMinInvestAmountItems], Configuration) -> None + """AutoInvestMinInvestAmount - 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._money = None + self._items = None + self.discriminator = None + + self.money = money + self.items = items + + @property + def money(self): + """Gets the money of this AutoInvestMinInvestAmount. # noqa: E501 + + Currency, optional: USDT or BTC # noqa: E501 + + :return: The money of this AutoInvestMinInvestAmount. # noqa: E501 + :rtype: str + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this AutoInvestMinInvestAmount. + + Currency, optional: USDT or BTC # noqa: E501 + + :param money: The money of this AutoInvestMinInvestAmount. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and money is None: # noqa: E501 + raise ValueError("Invalid value for `money`, must not be `None`") # noqa: E501 + + self._money = money + + @property + def items(self): + """Gets the items of this AutoInvestMinInvestAmount. # noqa: E501 + + + :return: The items of this AutoInvestMinInvestAmount. # noqa: E501 + :rtype: list[AutoInvestMinInvestAmountItems] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this AutoInvestMinInvestAmount. + + + :param items: The items of this AutoInvestMinInvestAmount. # noqa: E501 + :type: list[AutoInvestMinInvestAmountItems] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = 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, AutoInvestMinInvestAmount): + 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, AutoInvestMinInvestAmount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_min_invest_amount_items.py b/gate_api/models/auto_invest_min_invest_amount_items.py new file mode 100644 index 00000000..26a05f56 --- /dev/null +++ b/gate_api/models/auto_invest_min_invest_amount_items.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 AutoInvestMinInvestAmountItems(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 = { + 'asset': 'str', + 'ratio': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'ratio': 'ratio' + } + + def __init__(self, asset=None, ratio=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """AutoInvestMinInvestAmountItems - 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._asset = None + self._ratio = None + self.discriminator = None + + self.asset = asset + self.ratio = ratio + + @property + def asset(self): + """Gets the asset of this AutoInvestMinInvestAmountItems. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this AutoInvestMinInvestAmountItems. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this AutoInvestMinInvestAmountItems. + + Currency # noqa: E501 + + :param asset: The asset of this AutoInvestMinInvestAmountItems. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def ratio(self): + """Gets the ratio of this AutoInvestMinInvestAmountItems. # noqa: E501 + + Ratio,e.g.100 # noqa: E501 + + :return: The ratio of this AutoInvestMinInvestAmountItems. # noqa: E501 + :rtype: str + """ + return self._ratio + + @ratio.setter + def ratio(self, ratio): + """Sets the ratio of this AutoInvestMinInvestAmountItems. + + Ratio,e.g.100 # noqa: E501 + + :param ratio: The ratio of this AutoInvestMinInvestAmountItems. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and ratio is None: # noqa: E501 + raise ValueError("Invalid value for `ratio`, must not be `None`") # noqa: E501 + + self._ratio = ratio + + 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, AutoInvestMinInvestAmountItems): + 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, AutoInvestMinInvestAmountItems): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_min_invest_amount_resp.py b/gate_api/models/auto_invest_min_invest_amount_resp.py new file mode 100644 index 00000000..07c98cf8 --- /dev/null +++ b/gate_api/models/auto_invest_min_invest_amount_resp.py @@ -0,0 +1,124 @@ +# 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 AutoInvestMinInvestAmountResp(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 = { + 'min_amount': 'str' + } + + attribute_map = { + 'min_amount': 'min_amount' + } + + def __init__(self, min_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, Configuration) -> None + """AutoInvestMinInvestAmountResp - 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._min_amount = None + self.discriminator = None + + self.min_amount = min_amount + + @property + def min_amount(self): + """Gets the min_amount of this AutoInvestMinInvestAmountResp. # noqa: E501 + + MinimumAmount # noqa: E501 + + :return: The min_amount of this AutoInvestMinInvestAmountResp. # noqa: E501 + :rtype: str + """ + return self._min_amount + + @min_amount.setter + def min_amount(self, min_amount): + """Sets the min_amount of this AutoInvestMinInvestAmountResp. + + MinimumAmount # noqa: E501 + + :param min_amount: The min_amount of this AutoInvestMinInvestAmountResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and min_amount is None: # noqa: E501 + raise ValueError("Invalid value for `min_amount`, must not be `None`") # noqa: E501 + + self._min_amount = min_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, AutoInvestMinInvestAmountResp): + 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, AutoInvestMinInvestAmountResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_order_item.py b/gate_api/models/auto_invest_order_item.py new file mode 100644 index 00000000..48edf0d8 --- /dev/null +++ b/gate_api/models/auto_invest_order_item.py @@ -0,0 +1,559 @@ +# 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 AutoInvestOrderItem(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', + 'amount': 'str', + 'plan_id': 'int', + 'side': 'int', + 'asset': 'str', + 'record_id': 'int', + 'total_money': 'str', + 'market': 'str', + 'price': 'str', + 'create_time': 'int', + 'total': 'str', + 'fund_flow': 'str', + 'error_code': 'int', + 'error_msg': 'str', + 'status': 'int' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'amount': 'amount', + 'plan_id': 'plan_id', + 'side': 'side', + 'asset': 'asset', + 'record_id': 'record_id', + 'total_money': 'total_money', + 'market': 'market', + 'price': 'price', + 'create_time': 'create_time', + 'total': 'total', + 'fund_flow': 'fund_flow', + 'error_code': 'error_code', + 'error_msg': 'error_msg', + 'status': 'status' + } + + def __init__(self, id=None, type=None, amount=None, plan_id=None, side=None, asset=None, record_id=None, total_money=None, market=None, price=None, create_time=None, total=None, fund_flow=None, error_code=None, error_msg=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, int, str, int, str, str, str, int, str, str, int, str, int, Configuration) -> None + """AutoInvestOrderItem - 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._amount = None + self._plan_id = None + self._side = None + self._asset = None + self._record_id = None + self._total_money = None + self._market = None + self._price = None + self._create_time = None + self._total = None + self._fund_flow = None + self._error_code = None + self._error_msg = None + self._status = None + self.discriminator = None + + self.id = id + self.type = type + self.amount = amount + self.plan_id = plan_id + self.side = side + self.asset = asset + self.record_id = record_id + self.total_money = total_money + self.market = market + self.price = price + self.create_time = create_time + self.total = total + self.fund_flow = fund_flow + self.error_code = error_code + self.error_msg = error_msg + self.status = status + + @property + def id(self): + """Gets the id of this AutoInvestOrderItem. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this AutoInvestOrderItem. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AutoInvestOrderItem. + + Order ID # noqa: E501 + + :param id: The id of this AutoInvestOrderItem. # noqa: E501 + :type: int + """ + 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 type(self): + """Gets the type of this AutoInvestOrderItem. # noqa: E501 + + type # noqa: E501 + + :return: The type of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AutoInvestOrderItem. + + type # noqa: E501 + + :param type: The type of this AutoInvestOrderItem. # 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 amount(self): + """Gets the amount of this AutoInvestOrderItem. # noqa: E501 + + Size # noqa: E501 + + :return: The amount of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AutoInvestOrderItem. + + Size # noqa: E501 + + :param amount: The amount of this AutoInvestOrderItem. # 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 plan_id(self): + """Gets the plan_id of this AutoInvestOrderItem. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The plan_id of this AutoInvestOrderItem. # noqa: E501 + :rtype: int + """ + return self._plan_id + + @plan_id.setter + def plan_id(self, plan_id): + """Sets the plan_id of this AutoInvestOrderItem. + + Plan ID # noqa: E501 + + :param plan_id: The plan_id of this AutoInvestOrderItem. # noqa: E501 + :type: int + """ + 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 side(self): + """Gets the side of this AutoInvestOrderItem. # noqa: E501 + + direction # noqa: E501 + + :return: The side of this AutoInvestOrderItem. # noqa: E501 + :rtype: int + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this AutoInvestOrderItem. + + direction # noqa: E501 + + :param side: The side of this AutoInvestOrderItem. # noqa: E501 + :type: int + """ + 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 asset(self): + """Gets the asset of this AutoInvestOrderItem. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this AutoInvestOrderItem. + + Currency # noqa: E501 + + :param asset: The asset of this AutoInvestOrderItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def record_id(self): + """Gets the record_id of this AutoInvestOrderItem. # noqa: E501 + + Record ID # noqa: E501 + + :return: The record_id of this AutoInvestOrderItem. # noqa: E501 + :rtype: int + """ + return self._record_id + + @record_id.setter + def record_id(self, record_id): + """Sets the record_id of this AutoInvestOrderItem. + + Record ID # noqa: E501 + + :param record_id: The record_id of this AutoInvestOrderItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and record_id is None: # noqa: E501 + raise ValueError("Invalid value for `record_id`, must not be `None`") # noqa: E501 + + self._record_id = record_id + + @property + def total_money(self): + """Gets the total_money of this AutoInvestOrderItem. # noqa: E501 + + TotalAmount # noqa: E501 + + :return: The total_money of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._total_money + + @total_money.setter + def total_money(self, total_money): + """Sets the total_money of this AutoInvestOrderItem. + + TotalAmount # noqa: E501 + + :param total_money: The total_money of this AutoInvestOrderItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_money is None: # noqa: E501 + raise ValueError("Invalid value for `total_money`, must not be `None`") # noqa: E501 + + self._total_money = total_money + + @property + def market(self): + """Gets the market of this AutoInvestOrderItem. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The market of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this AutoInvestOrderItem. + + Currency pair # noqa: E501 + + :param market: The market of this AutoInvestOrderItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def price(self): + """Gets the price of this AutoInvestOrderItem. # noqa: E501 + + Price # noqa: E501 + + :return: The price of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this AutoInvestOrderItem. + + Price # noqa: E501 + + :param price: The price of this AutoInvestOrderItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 + raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 + + self._price = price + + @property + def create_time(self): + """Gets the create_time of this AutoInvestOrderItem. # noqa: E501 + + Creation time (Unix timestamp) # noqa: E501 + + :return: The create_time of this AutoInvestOrderItem. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this AutoInvestOrderItem. + + Creation time (Unix timestamp) # noqa: E501 + + :param create_time: The create_time of this AutoInvestOrderItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + @property + def total(self): + """Gets the total of this AutoInvestOrderItem. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this AutoInvestOrderItem. + + Total # noqa: E501 + + :param total: The total of this AutoInvestOrderItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 + raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 + + self._total = total + + @property + def fund_flow(self): + """Gets the fund_flow of this AutoInvestOrderItem. # noqa: E501 + + Fund Flow Direction # noqa: E501 + + :return: The fund_flow of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._fund_flow + + @fund_flow.setter + def fund_flow(self, fund_flow): + """Sets the fund_flow of this AutoInvestOrderItem. + + Fund Flow Direction # noqa: E501 + + :param fund_flow: The fund_flow of this AutoInvestOrderItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and fund_flow is None: # noqa: E501 + raise ValueError("Invalid value for `fund_flow`, must not be `None`") # noqa: E501 + + self._fund_flow = fund_flow + + @property + def error_code(self): + """Gets the error_code of this AutoInvestOrderItem. # noqa: E501 + + Error code # noqa: E501 + + :return: The error_code of this AutoInvestOrderItem. # noqa: E501 + :rtype: int + """ + return self._error_code + + @error_code.setter + def error_code(self, error_code): + """Sets the error_code of this AutoInvestOrderItem. + + Error code # noqa: E501 + + :param error_code: The error_code of this AutoInvestOrderItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and error_code is None: # noqa: E501 + raise ValueError("Invalid value for `error_code`, must not be `None`") # noqa: E501 + + self._error_code = error_code + + @property + def error_msg(self): + """Gets the error_msg of this AutoInvestOrderItem. # noqa: E501 + + Error message # noqa: E501 + + :return: The error_msg of this AutoInvestOrderItem. # noqa: E501 + :rtype: str + """ + return self._error_msg + + @error_msg.setter + def error_msg(self, error_msg): + """Sets the error_msg of this AutoInvestOrderItem. + + Error message # noqa: E501 + + :param error_msg: The error_msg of this AutoInvestOrderItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and error_msg is None: # noqa: E501 + raise ValueError("Invalid value for `error_msg`, must not be `None`") # noqa: E501 + + self._error_msg = error_msg + + @property + def status(self): + """Gets the status of this AutoInvestOrderItem. # noqa: E501 + + Status # noqa: E501 + + :return: The status of this AutoInvestOrderItem. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AutoInvestOrderItem. + + Status # noqa: E501 + + :param status: The status of this AutoInvestOrderItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + 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, AutoInvestOrderItem): + 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, AutoInvestOrderItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_add_position.py b/gate_api/models/auto_invest_plan_add_position.py new file mode 100644 index 00000000..35a249a8 --- /dev/null +++ b/gate_api/models/auto_invest_plan_add_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 AutoInvestPlanAddPosition(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': 'int', + 'amount': 'str' + } + + attribute_map = { + 'plan_id': 'plan_id', + 'amount': 'amount' + } + + def __init__(self, plan_id=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """AutoInvestPlanAddPosition - 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.discriminator = None + + self.plan_id = plan_id + self.amount = amount + + @property + def plan_id(self): + """Gets the plan_id of this AutoInvestPlanAddPosition. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The plan_id of this AutoInvestPlanAddPosition. # noqa: E501 + :rtype: int + """ + return self._plan_id + + @plan_id.setter + def plan_id(self, plan_id): + """Sets the plan_id of this AutoInvestPlanAddPosition. + + Plan ID # noqa: E501 + + :param plan_id: The plan_id of this AutoInvestPlanAddPosition. # noqa: E501 + :type: int + """ + 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 AutoInvestPlanAddPosition. # noqa: E501 + + Amount # noqa: E501 + + :return: The amount of this AutoInvestPlanAddPosition. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AutoInvestPlanAddPosition. + + Amount # noqa: E501 + + :param amount: The amount of this AutoInvestPlanAddPosition. # 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, AutoInvestPlanAddPosition): + 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, AutoInvestPlanAddPosition): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_create.py b/gate_api/models/auto_invest_plan_create.py new file mode 100644 index 00000000..0eb31937 --- /dev/null +++ b/gate_api/models/auto_invest_plan_create.py @@ -0,0 +1,409 @@ +# 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 AutoInvestPlanCreate(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_name': 'str', + 'plan_des': 'str', + 'plan_money': 'str', + 'plan_amount': 'str', + 'plan_period_type': 'str', + 'plan_period_day': 'int', + 'plan_period_hour': 'int', + 'items': 'list[AutoInvestPlanCreateItems]', + 'fund_source': 'str', + 'fund_flow': 'str', + 'type': 'int' + } + + attribute_map = { + 'plan_name': 'plan_name', + 'plan_des': 'plan_des', + 'plan_money': 'plan_money', + 'plan_amount': 'plan_amount', + 'plan_period_type': 'plan_period_type', + 'plan_period_day': 'plan_period_day', + 'plan_period_hour': 'plan_period_hour', + 'items': 'items', + 'fund_source': 'fund_source', + 'fund_flow': 'fund_flow', + 'type': 'type' + } + + def __init__(self, plan_name=None, plan_des=None, plan_money=None, plan_amount=None, plan_period_type=None, plan_period_day=None, plan_period_hour=None, items=None, fund_source=None, fund_flow=None, type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, int, int, list[AutoInvestPlanCreateItems], str, str, int, Configuration) -> None + """AutoInvestPlanCreate - 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_name = None + self._plan_des = None + self._plan_money = None + self._plan_amount = None + self._plan_period_type = None + self._plan_period_day = None + self._plan_period_hour = None + self._items = None + self._fund_source = None + self._fund_flow = None + self._type = None + self.discriminator = None + + if plan_name is not None: + self.plan_name = plan_name + if plan_des is not None: + self.plan_des = plan_des + self.plan_money = plan_money + self.plan_amount = plan_amount + self.plan_period_type = plan_period_type + self.plan_period_day = plan_period_day + self.plan_period_hour = plan_period_hour + self.items = items + if fund_source is not None: + self.fund_source = fund_source + if fund_flow is not None: + self.fund_flow = fund_flow + if type is not None: + self.type = type + + @property + def plan_name(self): + """Gets the plan_name of this AutoInvestPlanCreate. # noqa: E501 + + Plan name。Length: 0-50 characters # noqa: E501 + + :return: The plan_name of this AutoInvestPlanCreate. # noqa: E501 + :rtype: str + """ + return self._plan_name + + @plan_name.setter + def plan_name(self, plan_name): + """Sets the plan_name of this AutoInvestPlanCreate. + + Plan name。Length: 0-50 characters # noqa: E501 + + :param plan_name: The plan_name of this AutoInvestPlanCreate. # noqa: E501 + :type: str + """ + + self._plan_name = plan_name + + @property + def plan_des(self): + """Gets the plan_des of this AutoInvestPlanCreate. # noqa: E501 + + Plan description # noqa: E501 + + :return: The plan_des of this AutoInvestPlanCreate. # noqa: E501 + :rtype: str + """ + return self._plan_des + + @plan_des.setter + def plan_des(self, plan_des): + """Sets the plan_des of this AutoInvestPlanCreate. + + Plan description # noqa: E501 + + :param plan_des: The plan_des of this AutoInvestPlanCreate. # noqa: E501 + :type: str + """ + + self._plan_des = plan_des + + @property + def plan_money(self): + """Gets the plan_money of this AutoInvestPlanCreate. # noqa: E501 + + Pricing currency,SupportUSDT,BTC # noqa: E501 + + :return: The plan_money of this AutoInvestPlanCreate. # noqa: E501 + :rtype: str + """ + return self._plan_money + + @plan_money.setter + def plan_money(self, plan_money): + """Sets the plan_money of this AutoInvestPlanCreate. + + Pricing currency,SupportUSDT,BTC # noqa: E501 + + :param plan_money: The plan_money of this AutoInvestPlanCreate. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and plan_money is None: # noqa: E501 + raise ValueError("Invalid value for `plan_money`, must not be `None`") # noqa: E501 + + self._plan_money = plan_money + + @property + def plan_amount(self): + """Gets the plan_amount of this AutoInvestPlanCreate. # noqa: E501 + + Per PeriodAuto InvestAmount,Must > 0,and not exceedThePricing currencyConfigurationSingleMaximumAmount # noqa: E501 + + :return: The plan_amount of this AutoInvestPlanCreate. # noqa: E501 + :rtype: str + """ + return self._plan_amount + + @plan_amount.setter + def plan_amount(self, plan_amount): + """Sets the plan_amount of this AutoInvestPlanCreate. + + Per PeriodAuto InvestAmount,Must > 0,and not exceedThePricing currencyConfigurationSingleMaximumAmount # noqa: E501 + + :param plan_amount: The plan_amount of this AutoInvestPlanCreate. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and plan_amount is None: # noqa: E501 + raise ValueError("Invalid value for `plan_amount`, must not be `None`") # noqa: E501 + + self._plan_amount = plan_amount + + @property + def plan_period_type(self): + """Gets the plan_period_type of this AutoInvestPlanCreate. # noqa: E501 + + Enum: daily, weekly, biweekly, monthly, hourly, 4-hourly # noqa: E501 + + :return: The plan_period_type of this AutoInvestPlanCreate. # noqa: E501 + :rtype: str + """ + return self._plan_period_type + + @plan_period_type.setter + def plan_period_type(self, plan_period_type): + """Sets the plan_period_type of this AutoInvestPlanCreate. + + Enum: daily, weekly, biweekly, monthly, hourly, 4-hourly # noqa: E501 + + :param plan_period_type: The plan_period_type of this AutoInvestPlanCreate. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and plan_period_type is None: # noqa: E501 + raise ValueError("Invalid value for `plan_period_type`, must not be `None`") # noqa: E501 + + self._plan_period_type = plan_period_type + + @property + def plan_period_day(self): + """Gets the plan_period_day of this AutoInvestPlanCreate. # noqa: E501 + + Cycle day. For monthly: day of month (1-30); For weekly/biweekly: day of week (1-7, 1=Monday); For daily/hourly/4-hourly: ignored # noqa: E501 + + :return: The plan_period_day of this AutoInvestPlanCreate. # noqa: E501 + :rtype: int + """ + return self._plan_period_day + + @plan_period_day.setter + def plan_period_day(self, plan_period_day): + """Sets the plan_period_day of this AutoInvestPlanCreate. + + Cycle day. For monthly: day of month (1-30); For weekly/biweekly: day of week (1-7, 1=Monday); For daily/hourly/4-hourly: ignored # noqa: E501 + + :param plan_period_day: The plan_period_day of this AutoInvestPlanCreate. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and plan_period_day is None: # noqa: E501 + raise ValueError("Invalid value for `plan_period_day`, must not be `None`") # noqa: E501 + + self._plan_period_day = plan_period_day + + @property + def plan_period_hour(self): + """Gets the plan_period_hour of this AutoInvestPlanCreate. # noqa: E501 + + Execution hourAuto Invest 0-23 # noqa: E501 + + :return: The plan_period_hour of this AutoInvestPlanCreate. # noqa: E501 + :rtype: int + """ + return self._plan_period_hour + + @plan_period_hour.setter + def plan_period_hour(self, plan_period_hour): + """Sets the plan_period_hour of this AutoInvestPlanCreate. + + Execution hourAuto Invest 0-23 # noqa: E501 + + :param plan_period_hour: The plan_period_hour of this AutoInvestPlanCreate. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and plan_period_hour is None: # noqa: E501 + raise ValueError("Invalid value for `plan_period_hour`, must not be `None`") # noqa: E501 + + self._plan_period_hour = plan_period_hour + + @property + def items(self): + """Gets the items of this AutoInvestPlanCreate. # noqa: E501 + + Investment portfolio, asset cannot be repeated; Sum of all items' ratios must be 100 # noqa: E501 + + :return: The items of this AutoInvestPlanCreate. # noqa: E501 + :rtype: list[AutoInvestPlanCreateItems] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this AutoInvestPlanCreate. + + Investment portfolio, asset cannot be repeated; Sum of all items' ratios must be 100 # noqa: E501 + + :param items: The items of this AutoInvestPlanCreate. # noqa: E501 + :type: list[AutoInvestPlanCreateItems] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def fund_source(self): + """Gets the fund_source of this AutoInvestPlanCreate. # noqa: E501 + + Fund source: spot or earn, default: spot # noqa: E501 + + :return: The fund_source of this AutoInvestPlanCreate. # noqa: E501 + :rtype: str + """ + return self._fund_source + + @fund_source.setter + def fund_source(self, fund_source): + """Sets the fund_source of this AutoInvestPlanCreate. + + Fund source: spot or earn, default: spot # noqa: E501 + + :param fund_source: The fund_source of this AutoInvestPlanCreate. # noqa: E501 + :type: str + """ + + self._fund_source = fund_source + + @property + def fund_flow(self): + """Gets the fund_flow of this AutoInvestPlanCreate. # noqa: E501 + + Fund flow direction: auto_invest or earn, default: auto_invest # noqa: E501 + + :return: The fund_flow of this AutoInvestPlanCreate. # noqa: E501 + :rtype: str + """ + return self._fund_flow + + @fund_flow.setter + def fund_flow(self, fund_flow): + """Sets the fund_flow of this AutoInvestPlanCreate. + + Fund flow direction: auto_invest or earn, default: auto_invest # noqa: E501 + + :param fund_flow: The fund_flow of this AutoInvestPlanCreate. # noqa: E501 + :type: str + """ + + self._fund_flow = fund_flow + + @property + def type(self): + """Gets the type of this AutoInvestPlanCreate. # noqa: E501 + + 0 Normal creation, 1 QuickInvestment # noqa: E501 + + :return: The type of this AutoInvestPlanCreate. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AutoInvestPlanCreate. + + 0 Normal creation, 1 QuickInvestment # noqa: E501 + + :param type: The type of this AutoInvestPlanCreate. # 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, AutoInvestPlanCreate): + 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, AutoInvestPlanCreate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_create_items.py b/gate_api/models/auto_invest_plan_create_items.py new file mode 100644 index 00000000..b748c4a8 --- /dev/null +++ b/gate_api/models/auto_invest_plan_create_items.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 AutoInvestPlanCreateItems(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 = { + 'asset': 'str', + 'ratio': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'ratio': 'ratio' + } + + def __init__(self, asset=None, ratio=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """AutoInvestPlanCreateItems - 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._asset = None + self._ratio = None + self.discriminator = None + + self.asset = asset + self.ratio = ratio + + @property + def asset(self): + """Gets the asset of this AutoInvestPlanCreateItems. # noqa: E501 + + Investment currency, e.g., BTC; Must be enabled and market exists; Cannot be repeated within the same plan # noqa: E501 + + :return: The asset of this AutoInvestPlanCreateItems. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this AutoInvestPlanCreateItems. + + Investment currency, e.g., BTC; Must be enabled and market exists; Cannot be repeated within the same plan # noqa: E501 + + :param asset: The asset of this AutoInvestPlanCreateItems. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def ratio(self): + """Gets the ratio of this AutoInvestPlanCreateItems. # noqa: E501 + + The proportion of this currency in the portfolio,The sum of all items' ratios must be 100 # noqa: E501 + + :return: The ratio of this AutoInvestPlanCreateItems. # noqa: E501 + :rtype: str + """ + return self._ratio + + @ratio.setter + def ratio(self, ratio): + """Sets the ratio of this AutoInvestPlanCreateItems. + + The proportion of this currency in the portfolio,The sum of all items' ratios must be 100 # noqa: E501 + + :param ratio: The ratio of this AutoInvestPlanCreateItems. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and ratio is None: # noqa: E501 + raise ValueError("Invalid value for `ratio`, must not be `None`") # noqa: E501 + + self._ratio = ratio + + 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, AutoInvestPlanCreateItems): + 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, AutoInvestPlanCreateItems): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_create_resp.py b/gate_api/models/auto_invest_plan_create_resp.py new file mode 100644 index 00000000..3a04a3e7 --- /dev/null +++ b/gate_api/models/auto_invest_plan_create_resp.py @@ -0,0 +1,348 @@ +# 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 AutoInvestPlanCreateResp(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', + 'amount': 'str', + 'money': 'str', + 'next_time': 'int', + 'period_type': 'str', + 'period_day': 'int', + 'period_hour': 'int', + 'fund_flow': 'str', + 'fund_source': 'str' + } + + attribute_map = { + 'id': 'id', + 'amount': 'amount', + 'money': 'money', + 'next_time': 'next_time', + 'period_type': 'period_type', + 'period_day': 'period_day', + 'period_hour': 'period_hour', + 'fund_flow': 'fund_flow', + 'fund_source': 'fund_source' + } + + def __init__(self, id=None, amount=None, money=None, next_time=None, period_type=None, period_day=None, period_hour=None, fund_flow=None, fund_source=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, str, int, int, str, str, Configuration) -> None + """AutoInvestPlanCreateResp - 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._amount = None + self._money = None + self._next_time = None + self._period_type = None + self._period_day = None + self._period_hour = None + self._fund_flow = None + self._fund_source = None + self.discriminator = None + + self.id = id + if amount is not None: + self.amount = amount + if money is not None: + self.money = money + if next_time is not None: + self.next_time = next_time + if period_type is not None: + self.period_type = period_type + if period_day is not None: + self.period_day = period_day + if period_hour is not None: + self.period_hour = period_hour + if fund_flow is not None: + self.fund_flow = fund_flow + if fund_source is not None: + self.fund_source = fund_source + + @property + def id(self): + """Gets the id of this AutoInvestPlanCreateResp. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The id of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AutoInvestPlanCreateResp. + + Plan ID # noqa: E501 + + :param id: The id of this AutoInvestPlanCreateResp. # noqa: E501 + :type: int + """ + 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 amount(self): + """Gets the amount of this AutoInvestPlanCreateResp. # noqa: E501 + + Per PeriodAuto InvestAmount # noqa: E501 + + :return: The amount of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AutoInvestPlanCreateResp. + + Per PeriodAuto InvestAmount # noqa: E501 + + :param amount: The amount of this AutoInvestPlanCreateResp. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def money(self): + """Gets the money of this AutoInvestPlanCreateResp. # noqa: E501 + + Quote currency # noqa: E501 + + :return: The money of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: str + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this AutoInvestPlanCreateResp. + + Quote currency # noqa: E501 + + :param money: The money of this AutoInvestPlanCreateResp. # noqa: E501 + :type: str + """ + + self._money = money + + @property + def next_time(self): + """Gets the next_time of this AutoInvestPlanCreateResp. # noqa: E501 + + Next execution time # noqa: E501 + + :return: The next_time of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: int + """ + return self._next_time + + @next_time.setter + def next_time(self, next_time): + """Sets the next_time of this AutoInvestPlanCreateResp. + + Next execution time # noqa: E501 + + :param next_time: The next_time of this AutoInvestPlanCreateResp. # noqa: E501 + :type: int + """ + + self._next_time = next_time + + @property + def period_type(self): + """Gets the period_type of this AutoInvestPlanCreateResp. # noqa: E501 + + Cycle type # noqa: E501 + + :return: The period_type of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: str + """ + return self._period_type + + @period_type.setter + def period_type(self, period_type): + """Sets the period_type of this AutoInvestPlanCreateResp. + + Cycle type # noqa: E501 + + :param period_type: The period_type of this AutoInvestPlanCreateResp. # noqa: E501 + :type: str + """ + + self._period_type = period_type + + @property + def period_day(self): + """Gets the period_day of this AutoInvestPlanCreateResp. # noqa: E501 + + Cycle day # noqa: E501 + + :return: The period_day of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: int + """ + return self._period_day + + @period_day.setter + def period_day(self, period_day): + """Sets the period_day of this AutoInvestPlanCreateResp. + + Cycle day # noqa: E501 + + :param period_day: The period_day of this AutoInvestPlanCreateResp. # noqa: E501 + :type: int + """ + + self._period_day = period_day + + @property + def period_hour(self): + """Gets the period_hour of this AutoInvestPlanCreateResp. # noqa: E501 + + CycleHours # noqa: E501 + + :return: The period_hour of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: int + """ + return self._period_hour + + @period_hour.setter + def period_hour(self, period_hour): + """Sets the period_hour of this AutoInvestPlanCreateResp. + + CycleHours # noqa: E501 + + :param period_hour: The period_hour of this AutoInvestPlanCreateResp. # noqa: E501 + :type: int + """ + + self._period_hour = period_hour + + @property + def fund_flow(self): + """Gets the fund_flow of this AutoInvestPlanCreateResp. # noqa: E501 + + Fund Flow Direction # noqa: E501 + + :return: The fund_flow of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: str + """ + return self._fund_flow + + @fund_flow.setter + def fund_flow(self, fund_flow): + """Sets the fund_flow of this AutoInvestPlanCreateResp. + + Fund Flow Direction # noqa: E501 + + :param fund_flow: The fund_flow of this AutoInvestPlanCreateResp. # noqa: E501 + :type: str + """ + + self._fund_flow = fund_flow + + @property + def fund_source(self): + """Gets the fund_source of this AutoInvestPlanCreateResp. # noqa: E501 + + Fund source # noqa: E501 + + :return: The fund_source of this AutoInvestPlanCreateResp. # noqa: E501 + :rtype: str + """ + return self._fund_source + + @fund_source.setter + def fund_source(self, fund_source): + """Sets the fund_source of this AutoInvestPlanCreateResp. + + Fund source # noqa: E501 + + :param fund_source: The fund_source of this AutoInvestPlanCreateResp. # noqa: E501 + :type: str + """ + + self._fund_source = fund_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, AutoInvestPlanCreateResp): + 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, AutoInvestPlanCreateResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_detail.py b/gate_api/models/auto_invest_plan_detail.py new file mode 100644 index 00000000..2bc9387d --- /dev/null +++ b/gate_api/models/auto_invest_plan_detail.py @@ -0,0 +1,558 @@ +# 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 AutoInvestPlanDetail(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', + 'version': 'int', + 'name': 'str', + 'create_time': 'int', + 'update_time': 'int', + 'user_id': 'int', + 'money': 'str', + 'amount': 'str', + 'period_type': 'str', + 'period_day': 'int', + 'period_hour': 'int', + 'portfolio': 'list[AutoInvestPortfolioItem]', + 'next_time': 'int', + 'period': 'int', + 'fund_source': 'str', + 'fund_flow': 'str' + } + + attribute_map = { + 'id': 'id', + 'version': 'version', + 'name': 'name', + 'create_time': 'create_time', + 'update_time': 'update_time', + 'user_id': 'user_id', + 'money': 'money', + 'amount': 'amount', + 'period_type': 'period_type', + 'period_day': 'period_day', + 'period_hour': 'period_hour', + 'portfolio': 'portfolio', + 'next_time': 'next_time', + 'period': 'period', + 'fund_source': 'fund_source', + 'fund_flow': 'fund_flow' + } + + def __init__(self, id=None, version=None, name=None, create_time=None, update_time=None, user_id=None, money=None, amount=None, period_type=None, period_day=None, period_hour=None, portfolio=None, next_time=None, period=None, fund_source=None, fund_flow=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, int, int, int, str, str, str, int, int, list[AutoInvestPortfolioItem], int, int, str, str, Configuration) -> None + """AutoInvestPlanDetail - 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._version = None + self._name = None + self._create_time = None + self._update_time = None + self._user_id = None + self._money = None + self._amount = None + self._period_type = None + self._period_day = None + self._period_hour = None + self._portfolio = None + self._next_time = None + self._period = None + self._fund_source = None + self._fund_flow = None + self.discriminator = None + + self.id = id + if version is not None: + self.version = version + self.name = name + self.create_time = create_time + self.update_time = update_time + self.user_id = user_id + self.money = money + self.amount = amount + self.period_type = period_type + self.period_day = period_day + self.period_hour = period_hour + self.portfolio = portfolio + self.next_time = next_time + self.period = period + self.fund_source = fund_source + self.fund_flow = fund_flow + + @property + def id(self): + """Gets the id of this AutoInvestPlanDetail. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The id of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AutoInvestPlanDetail. + + Plan ID # noqa: E501 + + :param id: The id of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + 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 version(self): + """Gets the version of this AutoInvestPlanDetail. # noqa: E501 + + PlanVersion # noqa: E501 + + :return: The version of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this AutoInvestPlanDetail. + + PlanVersion # noqa: E501 + + :param version: The version of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + + self._version = version + + @property + def name(self): + """Gets the name of this AutoInvestPlanDetail. # noqa: E501 + + Plan name # noqa: E501 + + :return: The name of this AutoInvestPlanDetail. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AutoInvestPlanDetail. + + Plan name # noqa: E501 + + :param name: The name of this AutoInvestPlanDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def create_time(self): + """Gets the create_time of this AutoInvestPlanDetail. # noqa: E501 + + Creation time (Unix timestamp) # noqa: E501 + + :return: The create_time of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this AutoInvestPlanDetail. + + Creation time (Unix timestamp) # noqa: E501 + + :param create_time: The create_time of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this AutoInvestPlanDetail. # noqa: E501 + + Update time (Unix timestamp) # noqa: E501 + + :return: The update_time of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this AutoInvestPlanDetail. + + Update time (Unix timestamp) # noqa: E501 + + :param update_time: The update_time of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and update_time is None: # noqa: E501 + raise ValueError("Invalid value for `update_time`, must not be `None`") # noqa: E501 + + self._update_time = update_time + + @property + def user_id(self): + """Gets the user_id of this AutoInvestPlanDetail. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AutoInvestPlanDetail. + + User ID # noqa: E501 + + :param user_id: The user_id of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def money(self): + """Gets the money of this AutoInvestPlanDetail. # noqa: E501 + + Quote Currency # noqa: E501 + + :return: The money of this AutoInvestPlanDetail. # noqa: E501 + :rtype: str + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this AutoInvestPlanDetail. + + Quote Currency # noqa: E501 + + :param money: The money of this AutoInvestPlanDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and money is None: # noqa: E501 + raise ValueError("Invalid value for `money`, must not be `None`") # noqa: E501 + + self._money = money + + @property + def amount(self): + """Gets the amount of this AutoInvestPlanDetail. # noqa: E501 + + Per PeriodInvestment amount # noqa: E501 + + :return: The amount of this AutoInvestPlanDetail. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AutoInvestPlanDetail. + + Per PeriodInvestment amount # noqa: E501 + + :param amount: The amount of this AutoInvestPlanDetail. # 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 period_type(self): + """Gets the period_type of this AutoInvestPlanDetail. # noqa: E501 + + Cycle type(e.g., monthly) # noqa: E501 + + :return: The period_type of this AutoInvestPlanDetail. # noqa: E501 + :rtype: str + """ + return self._period_type + + @period_type.setter + def period_type(self, period_type): + """Sets the period_type of this AutoInvestPlanDetail. + + Cycle type(e.g., monthly) # noqa: E501 + + :param period_type: The period_type of this AutoInvestPlanDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and period_type is None: # noqa: E501 + raise ValueError("Invalid value for `period_type`, must not be `None`") # noqa: E501 + + self._period_type = period_type + + @property + def period_day(self): + """Gets the period_day of this AutoInvestPlanDetail. # noqa: E501 + + Cycle day # noqa: E501 + + :return: The period_day of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._period_day + + @period_day.setter + def period_day(self, period_day): + """Sets the period_day of this AutoInvestPlanDetail. + + Cycle day # noqa: E501 + + :param period_day: The period_day of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and period_day is None: # noqa: E501 + raise ValueError("Invalid value for `period_day`, must not be `None`") # noqa: E501 + + self._period_day = period_day + + @property + def period_hour(self): + """Gets the period_hour of this AutoInvestPlanDetail. # noqa: E501 + + CycleHours # noqa: E501 + + :return: The period_hour of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._period_hour + + @period_hour.setter + def period_hour(self, period_hour): + """Sets the period_hour of this AutoInvestPlanDetail. + + CycleHours # noqa: E501 + + :param period_hour: The period_hour of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and period_hour is None: # noqa: E501 + raise ValueError("Invalid value for `period_hour`, must not be `None`") # noqa: E501 + + self._period_hour = period_hour + + @property + def portfolio(self): + """Gets the portfolio of this AutoInvestPlanDetail. # noqa: E501 + + InvestmentPortfolio # noqa: E501 + + :return: The portfolio of this AutoInvestPlanDetail. # noqa: E501 + :rtype: list[AutoInvestPortfolioItem] + """ + return self._portfolio + + @portfolio.setter + def portfolio(self, portfolio): + """Sets the portfolio of this AutoInvestPlanDetail. + + InvestmentPortfolio # noqa: E501 + + :param portfolio: The portfolio of this AutoInvestPlanDetail. # noqa: E501 + :type: list[AutoInvestPortfolioItem] + """ + if self.local_vars_configuration.client_side_validation and portfolio is None: # noqa: E501 + raise ValueError("Invalid value for `portfolio`, must not be `None`") # noqa: E501 + + self._portfolio = portfolio + + @property + def next_time(self): + """Gets the next_time of this AutoInvestPlanDetail. # noqa: E501 + + Next execution time (Unix timestamp) # noqa: E501 + + :return: The next_time of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._next_time + + @next_time.setter + def next_time(self, next_time): + """Sets the next_time of this AutoInvestPlanDetail. + + Next execution time (Unix timestamp) # noqa: E501 + + :param next_time: The next_time of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and next_time is None: # noqa: E501 + raise ValueError("Invalid value for `next_time`, must not be `None`") # noqa: E501 + + self._next_time = next_time + + @property + def period(self): + """Gets the period of this AutoInvestPlanDetail. # noqa: E501 + + Executed periods # noqa: E501 + + :return: The period of this AutoInvestPlanDetail. # noqa: E501 + :rtype: int + """ + return self._period + + @period.setter + def period(self, period): + """Sets the period of this AutoInvestPlanDetail. + + Executed periods # noqa: E501 + + :param period: The period of this AutoInvestPlanDetail. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and period is None: # noqa: E501 + raise ValueError("Invalid value for `period`, must not be `None`") # noqa: E501 + + self._period = period + + @property + def fund_source(self): + """Gets the fund_source of this AutoInvestPlanDetail. # noqa: E501 + + Fund source(spot/earn) # noqa: E501 + + :return: The fund_source of this AutoInvestPlanDetail. # noqa: E501 + :rtype: str + """ + return self._fund_source + + @fund_source.setter + def fund_source(self, fund_source): + """Sets the fund_source of this AutoInvestPlanDetail. + + Fund source(spot/earn) # noqa: E501 + + :param fund_source: The fund_source of this AutoInvestPlanDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and fund_source is None: # noqa: E501 + raise ValueError("Invalid value for `fund_source`, must not be `None`") # noqa: E501 + + self._fund_source = fund_source + + @property + def fund_flow(self): + """Gets the fund_flow of this AutoInvestPlanDetail. # noqa: E501 + + Fund flow direction (auto_invest/earn) # noqa: E501 + + :return: The fund_flow of this AutoInvestPlanDetail. # noqa: E501 + :rtype: str + """ + return self._fund_flow + + @fund_flow.setter + def fund_flow(self, fund_flow): + """Sets the fund_flow of this AutoInvestPlanDetail. + + Fund flow direction (auto_invest/earn) # noqa: E501 + + :param fund_flow: The fund_flow of this AutoInvestPlanDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and fund_flow is None: # noqa: E501 + raise ValueError("Invalid value for `fund_flow`, must not be `None`") # noqa: E501 + + self._fund_flow = fund_flow + + 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, AutoInvestPlanDetail): + 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, AutoInvestPlanDetail): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_list_info_resp.py b/gate_api/models/auto_invest_plan_list_info_resp.py new file mode 100644 index 00000000..48aa5192 --- /dev/null +++ b/gate_api/models/auto_invest_plan_list_info_resp.py @@ -0,0 +1,240 @@ +# 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 AutoInvestPlanListInfoResp(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 = { + 'page': 'int', + 'page_size': 'int', + 'page_count': 'int', + 'total_count': 'int', + 'list': 'list[AutoInvestPlanDetail]' + } + + attribute_map = { + 'page': 'page', + 'page_size': 'page_size', + 'page_count': 'page_count', + 'total_count': 'total_count', + 'list': 'list' + } + + def __init__(self, page=None, page_size=None, page_count=None, total_count=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, int, list[AutoInvestPlanDetail], Configuration) -> None + """AutoInvestPlanListInfoResp - 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._page = None + self._page_size = None + self._page_count = None + self._total_count = None + self._list = None + self.discriminator = None + + self.page = page + self.page_size = page_size + self.page_count = page_count + self.total_count = total_count + self.list = list + + @property + def page(self): + """Gets the page of this AutoInvestPlanListInfoResp. # noqa: E501 + + page number # noqa: E501 + + :return: The page of this AutoInvestPlanListInfoResp. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this AutoInvestPlanListInfoResp. + + page number # noqa: E501 + + :param page: The page of this AutoInvestPlanListInfoResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page is None: # noqa: E501 + raise ValueError("Invalid value for `page`, must not be `None`") # noqa: E501 + + self._page = page + + @property + def page_size(self): + """Gets the page_size of this AutoInvestPlanListInfoResp. # noqa: E501 + + Items per page # noqa: E501 + + :return: The page_size of this AutoInvestPlanListInfoResp. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this AutoInvestPlanListInfoResp. + + Items per page # noqa: E501 + + :param page_size: The page_size of this AutoInvestPlanListInfoResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page_size is None: # noqa: E501 + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + @property + def page_count(self): + """Gets the page_count of this AutoInvestPlanListInfoResp. # noqa: E501 + + Total pages # noqa: E501 + + :return: The page_count of this AutoInvestPlanListInfoResp. # noqa: E501 + :rtype: int + """ + return self._page_count + + @page_count.setter + def page_count(self, page_count): + """Sets the page_count of this AutoInvestPlanListInfoResp. + + Total pages # noqa: E501 + + :param page_count: The page_count of this AutoInvestPlanListInfoResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page_count is None: # noqa: E501 + raise ValueError("Invalid value for `page_count`, must not be `None`") # noqa: E501 + + self._page_count = page_count + + @property + def total_count(self): + """Gets the total_count of this AutoInvestPlanListInfoResp. # noqa: E501 + + Total entries # noqa: E501 + + :return: The total_count of this AutoInvestPlanListInfoResp. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this AutoInvestPlanListInfoResp. + + Total entries # noqa: E501 + + :param total_count: The total_count of this AutoInvestPlanListInfoResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total_count is None: # noqa: E501 + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def list(self): + """Gets the list of this AutoInvestPlanListInfoResp. # noqa: E501 + + PlanList # noqa: E501 + + :return: The list of this AutoInvestPlanListInfoResp. # noqa: E501 + :rtype: list[AutoInvestPlanDetail] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this AutoInvestPlanListInfoResp. + + PlanList # noqa: E501 + + :param list: The list of this AutoInvestPlanListInfoResp. # noqa: E501 + :type: list[AutoInvestPlanDetail] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + 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, AutoInvestPlanListInfoResp): + 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, AutoInvestPlanListInfoResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_record_item.py b/gate_api/models/auto_invest_plan_record_item.py new file mode 100644 index 00000000..f8af5c6c --- /dev/null +++ b/gate_api/models/auto_invest_plan_record_item.py @@ -0,0 +1,528 @@ +# 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 AutoInvestPlanRecordItem(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', + 'money': 'str', + 'user_id': 'int', + 'plan_id': 'int', + 'plan_version': 'int', + 'amount': 'str', + 'create_time': 'int', + 'update_time': 'int', + 'status': 'str', + 'status_type': 'int', + 'side': 'int', + 'status_message': 'str', + 'detail': 'str', + 'asset': 'str' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'money': 'money', + 'user_id': 'user_id', + 'plan_id': 'plan_id', + 'plan_version': 'plan_version', + 'amount': 'amount', + 'create_time': 'create_time', + 'update_time': 'update_time', + 'status': 'status', + 'status_type': 'status_type', + 'side': 'side', + 'status_message': 'status_message', + 'detail': 'detail', + 'asset': 'asset' + } + + def __init__(self, id=None, type=None, money=None, user_id=None, plan_id=None, plan_version=None, amount=None, create_time=None, update_time=None, status=None, status_type=None, side=None, status_message=None, detail=None, asset=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, int, int, str, int, int, str, int, int, str, str, str, Configuration) -> None + """AutoInvestPlanRecordItem - 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._money = None + self._user_id = None + self._plan_id = None + self._plan_version = None + self._amount = None + self._create_time = None + self._update_time = None + self._status = None + self._status_type = None + self._side = None + self._status_message = None + self._detail = None + self._asset = None + self.discriminator = None + + self.id = id + self.type = type + self.money = money + self.user_id = user_id + self.plan_id = plan_id + self.plan_version = plan_version + self.amount = amount + self.create_time = create_time + self.update_time = update_time + self.status = status + self.status_type = status_type + self.side = side + self.status_message = status_message + if detail is not None: + self.detail = detail + if asset is not None: + self.asset = asset + + @property + def id(self): + """Gets the id of this AutoInvestPlanRecordItem. # noqa: E501 + + Record ID # noqa: E501 + + :return: The id of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AutoInvestPlanRecordItem. + + Record ID # noqa: E501 + + :param id: The id of this AutoInvestPlanRecordItem. # noqa: E501 + :type: int + """ + 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 type(self): + """Gets the type of this AutoInvestPlanRecordItem. # noqa: E501 + + type # noqa: E501 + + :return: The type of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AutoInvestPlanRecordItem. + + type # noqa: E501 + + :param type: The type of this AutoInvestPlanRecordItem. # 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 money(self): + """Gets the money of this AutoInvestPlanRecordItem. # noqa: E501 + + SourceCurrency # noqa: E501 + + :return: The money of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: str + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this AutoInvestPlanRecordItem. + + SourceCurrency # noqa: E501 + + :param money: The money of this AutoInvestPlanRecordItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and money is None: # noqa: E501 + raise ValueError("Invalid value for `money`, must not be `None`") # noqa: E501 + + self._money = money + + @property + def user_id(self): + """Gets the user_id of this AutoInvestPlanRecordItem. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AutoInvestPlanRecordItem. + + User ID # noqa: E501 + + :param user_id: The user_id of this AutoInvestPlanRecordItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def plan_id(self): + """Gets the plan_id of this AutoInvestPlanRecordItem. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The plan_id of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: int + """ + return self._plan_id + + @plan_id.setter + def plan_id(self, plan_id): + """Sets the plan_id of this AutoInvestPlanRecordItem. + + Plan ID # noqa: E501 + + :param plan_id: The plan_id of this AutoInvestPlanRecordItem. # noqa: E501 + :type: int + """ + 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 plan_version(self): + """Gets the plan_version of this AutoInvestPlanRecordItem. # noqa: E501 + + PlanVersion # noqa: E501 + + :return: The plan_version of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: int + """ + return self._plan_version + + @plan_version.setter + def plan_version(self, plan_version): + """Sets the plan_version of this AutoInvestPlanRecordItem. + + PlanVersion # noqa: E501 + + :param plan_version: The plan_version of this AutoInvestPlanRecordItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and plan_version is None: # noqa: E501 + raise ValueError("Invalid value for `plan_version`, must not be `None`") # noqa: E501 + + self._plan_version = plan_version + + @property + def amount(self): + """Gets the amount of this AutoInvestPlanRecordItem. # noqa: E501 + + Investment amount # noqa: E501 + + :return: The amount of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AutoInvestPlanRecordItem. + + Investment amount # noqa: E501 + + :param amount: The amount of this AutoInvestPlanRecordItem. # 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 create_time(self): + """Gets the create_time of this AutoInvestPlanRecordItem. # noqa: E501 + + Investment time # noqa: E501 + + :return: The create_time of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this AutoInvestPlanRecordItem. + + Investment time # noqa: E501 + + :param create_time: The create_time of this AutoInvestPlanRecordItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this AutoInvestPlanRecordItem. # noqa: E501 + + Update time # noqa: E501 + + :return: The update_time of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: int + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this AutoInvestPlanRecordItem. + + Update time # noqa: E501 + + :param update_time: The update_time of this AutoInvestPlanRecordItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and update_time is None: # noqa: E501 + raise ValueError("Invalid value for `update_time`, must not be `None`") # noqa: E501 + + self._update_time = update_time + + @property + def status(self): + """Gets the status of this AutoInvestPlanRecordItem. # noqa: E501 + + Status # noqa: E501 + + :return: The status of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AutoInvestPlanRecordItem. + + Status # noqa: E501 + + :param status: The status of this AutoInvestPlanRecordItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def status_type(self): + """Gets the status_type of this AutoInvestPlanRecordItem. # noqa: E501 + + Status enum # noqa: E501 + + :return: The status_type of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: int + """ + return self._status_type + + @status_type.setter + def status_type(self, status_type): + """Sets the status_type of this AutoInvestPlanRecordItem. + + Status enum # noqa: E501 + + :param status_type: The status_type of this AutoInvestPlanRecordItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and status_type is None: # noqa: E501 + raise ValueError("Invalid value for `status_type`, must not be `None`") # noqa: E501 + + self._status_type = status_type + + @property + def side(self): + """Gets the side of this AutoInvestPlanRecordItem. # noqa: E501 + + 2 = Buy, Other = Sell # noqa: E501 + + :return: The side of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: int + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this AutoInvestPlanRecordItem. + + 2 = Buy, Other = Sell # noqa: E501 + + :param side: The side of this AutoInvestPlanRecordItem. # noqa: E501 + :type: int + """ + 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 status_message(self): + """Gets the status_message of this AutoInvestPlanRecordItem. # noqa: E501 + + Status description # noqa: E501 + + :return: The status_message of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: str + """ + return self._status_message + + @status_message.setter + def status_message(self, status_message): + """Sets the status_message of this AutoInvestPlanRecordItem. + + Status description # noqa: E501 + + :param status_message: The status_message of this AutoInvestPlanRecordItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and status_message is None: # noqa: E501 + raise ValueError("Invalid value for `status_message`, must not be `None`") # noqa: E501 + + self._status_message = status_message + + @property + def detail(self): + """Gets the detail of this AutoInvestPlanRecordItem. # noqa: E501 + + Details # noqa: E501 + + :return: The detail of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this AutoInvestPlanRecordItem. + + Details # noqa: E501 + + :param detail: The detail of this AutoInvestPlanRecordItem. # noqa: E501 + :type: str + """ + + self._detail = detail + + @property + def asset(self): + """Gets the asset of this AutoInvestPlanRecordItem. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this AutoInvestPlanRecordItem. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this AutoInvestPlanRecordItem. + + Currency # noqa: E501 + + :param asset: The asset of this AutoInvestPlanRecordItem. # noqa: E501 + :type: str + """ + + self._asset = asset + + 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, AutoInvestPlanRecordItem): + 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, AutoInvestPlanRecordItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_records_resp.py b/gate_api/models/auto_invest_plan_records_resp.py new file mode 100644 index 00000000..df79781b --- /dev/null +++ b/gate_api/models/auto_invest_plan_records_resp.py @@ -0,0 +1,238 @@ +# 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 AutoInvestPlanRecordsResp(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 = { + 'page': 'int', + 'page_size': 'int', + 'total_page': 'int', + 'total': 'int', + 'list': 'list[AutoInvestPlanRecordItem]' + } + + attribute_map = { + 'page': 'page', + 'page_size': 'page_size', + 'total_page': 'total_page', + 'total': 'total', + 'list': 'list' + } + + def __init__(self, page=None, page_size=None, total_page=None, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, int, list[AutoInvestPlanRecordItem], Configuration) -> None + """AutoInvestPlanRecordsResp - 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._page = None + self._page_size = None + self._total_page = None + self._total = None + self._list = None + self.discriminator = None + + self.page = page + self.page_size = page_size + self.total_page = total_page + self.total = total + self.list = list + + @property + def page(self): + """Gets the page of this AutoInvestPlanRecordsResp. # noqa: E501 + + page number # noqa: E501 + + :return: The page of this AutoInvestPlanRecordsResp. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this AutoInvestPlanRecordsResp. + + page number # noqa: E501 + + :param page: The page of this AutoInvestPlanRecordsResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page is None: # noqa: E501 + raise ValueError("Invalid value for `page`, must not be `None`") # noqa: E501 + + self._page = page + + @property + def page_size(self): + """Gets the page_size of this AutoInvestPlanRecordsResp. # noqa: E501 + + Items per page # noqa: E501 + + :return: The page_size of this AutoInvestPlanRecordsResp. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this AutoInvestPlanRecordsResp. + + Items per page # noqa: E501 + + :param page_size: The page_size of this AutoInvestPlanRecordsResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page_size is None: # noqa: E501 + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + @property + def total_page(self): + """Gets the total_page of this AutoInvestPlanRecordsResp. # noqa: E501 + + TotalPage number # noqa: E501 + + :return: The total_page of this AutoInvestPlanRecordsResp. # noqa: E501 + :rtype: int + """ + return self._total_page + + @total_page.setter + def total_page(self, total_page): + """Sets the total_page of this AutoInvestPlanRecordsResp. + + TotalPage number # noqa: E501 + + :param total_page: The total_page of this AutoInvestPlanRecordsResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total_page is None: # noqa: E501 + raise ValueError("Invalid value for `total_page`, must not be `None`") # noqa: E501 + + self._total_page = total_page + + @property + def total(self): + """Gets the total of this AutoInvestPlanRecordsResp. # noqa: E501 + + Total entries # noqa: E501 + + :return: The total of this AutoInvestPlanRecordsResp. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this AutoInvestPlanRecordsResp. + + Total entries # noqa: E501 + + :param total: The total of this AutoInvestPlanRecordsResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 + raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 + + self._total = total + + @property + def list(self): + """Gets the list of this AutoInvestPlanRecordsResp. # noqa: E501 + + + :return: The list of this AutoInvestPlanRecordsResp. # noqa: E501 + :rtype: list[AutoInvestPlanRecordItem] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this AutoInvestPlanRecordsResp. + + + :param list: The list of this AutoInvestPlanRecordsResp. # noqa: E501 + :type: list[AutoInvestPlanRecordItem] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + 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, AutoInvestPlanRecordsResp): + 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, AutoInvestPlanRecordsResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20025_data.py b/gate_api/models/auto_invest_plan_stop.py similarity index 71% rename from gate_api/models/inline_response20025_data.py rename to gate_api/models/auto_invest_plan_stop.py index 73874493..e5cdcbbc 100644 --- a/gate_api/models/inline_response20025_data.py +++ b/gate_api/models/auto_invest_plan_stop.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20025Data(object): +class AutoInvestPlanStop(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,48 +33,49 @@ class InlineResponse20025Data(object): and the value is json key in definition. """ openapi_types = { - 'srvtm': 'int' + 'plan_id': 'int' } attribute_map = { - 'srvtm': 'SRVTM' + 'plan_id': 'plan_id' } - def __init__(self, srvtm=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, plan_id=None, local_vars_configuration=None): # noqa: E501 # type: (int, Configuration) -> None - """InlineResponse20025Data - a model defined in OpenAPI""" # noqa: E501 + """AutoInvestPlanStop - 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._srvtm = None + self._plan_id = None self.discriminator = None - if srvtm is not None: - self.srvtm = srvtm + self.plan_id = plan_id @property - def srvtm(self): - """Gets the srvtm of this InlineResponse20025Data. # noqa: E501 + def plan_id(self): + """Gets the plan_id of this AutoInvestPlanStop. # noqa: E501 - Timestamp when message was successfully sent (current timestamp) # noqa: E501 + Plan ID # noqa: E501 - :return: The srvtm of this InlineResponse20025Data. # noqa: E501 + :return: The plan_id of this AutoInvestPlanStop. # noqa: E501 :rtype: int """ - return self._srvtm + return self._plan_id - @srvtm.setter - def srvtm(self, srvtm): - """Sets the srvtm of this InlineResponse20025Data. + @plan_id.setter + def plan_id(self, plan_id): + """Sets the plan_id of this AutoInvestPlanStop. - Timestamp when message was successfully sent (current timestamp) # noqa: E501 + Plan ID # noqa: E501 - :param srvtm: The srvtm of this InlineResponse20025Data. # noqa: E501 + :param plan_id: The plan_id of this AutoInvestPlanStop. # noqa: E501 :type: int """ + 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._srvtm = srvtm + self._plan_id = plan_id def to_dict(self): """Returns the model properties as a dict""" @@ -110,14 +111,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20025Data): + if not isinstance(other, AutoInvestPlanStop): 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, InlineResponse20025Data): + if not isinstance(other, AutoInvestPlanStop): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_plan_update.py b/gate_api/models/auto_invest_plan_update.py new file mode 100644 index 00000000..244e60db --- /dev/null +++ b/gate_api/models/auto_invest_plan_update.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 AutoInvestPlanUpdate(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': 'int', + 'fund_source': 'str', + 'fund_flow': 'str' + } + + attribute_map = { + 'plan_id': 'plan_id', + 'fund_source': 'fund_source', + 'fund_flow': 'fund_flow' + } + + def __init__(self, plan_id=None, fund_source=None, fund_flow=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, Configuration) -> None + """AutoInvestPlanUpdate - 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._fund_source = None + self._fund_flow = None + self.discriminator = None + + self.plan_id = plan_id + if fund_source is not None: + self.fund_source = fund_source + if fund_flow is not None: + self.fund_flow = fund_flow + + @property + def plan_id(self): + """Gets the plan_id of this AutoInvestPlanUpdate. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The plan_id of this AutoInvestPlanUpdate. # noqa: E501 + :rtype: int + """ + return self._plan_id + + @plan_id.setter + def plan_id(self, plan_id): + """Sets the plan_id of this AutoInvestPlanUpdate. + + Plan ID # noqa: E501 + + :param plan_id: The plan_id of this AutoInvestPlanUpdate. # noqa: E501 + :type: int + """ + 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 fund_source(self): + """Gets the fund_source of this AutoInvestPlanUpdate. # noqa: E501 + + Fund source Spotspot or Flexible Savingsearn,Default spot # noqa: E501 + + :return: The fund_source of this AutoInvestPlanUpdate. # noqa: E501 + :rtype: str + """ + return self._fund_source + + @fund_source.setter + def fund_source(self, fund_source): + """Sets the fund_source of this AutoInvestPlanUpdate. + + Fund source Spotspot or Flexible Savingsearn,Default spot # noqa: E501 + + :param fund_source: The fund_source of this AutoInvestPlanUpdate. # noqa: E501 + :type: str + """ + + self._fund_source = fund_source + + @property + def fund_flow(self): + """Gets the fund_flow of this AutoInvestPlanUpdate. # noqa: E501 + + Fund Flow Direction Spotauto_invest or Flexible Savingsearn,Default auto_invest # noqa: E501 + + :return: The fund_flow of this AutoInvestPlanUpdate. # noqa: E501 + :rtype: str + """ + return self._fund_flow + + @fund_flow.setter + def fund_flow(self, fund_flow): + """Sets the fund_flow of this AutoInvestPlanUpdate. + + Fund Flow Direction Spotauto_invest or Flexible Savingsearn,Default auto_invest # noqa: E501 + + :param fund_flow: The fund_flow of this AutoInvestPlanUpdate. # noqa: E501 + :type: str + """ + + self._fund_flow = fund_flow + + 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, AutoInvestPlanUpdate): + 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, AutoInvestPlanUpdate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_invest_portfolio_item.py b/gate_api/models/auto_invest_portfolio_item.py new file mode 100644 index 00000000..25110d73 --- /dev/null +++ b/gate_api/models/auto_invest_portfolio_item.py @@ -0,0 +1,327 @@ +# 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 AutoInvestPortfolioItem(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 = { + 'asset': 'str', + 'ratio': 'str', + 'cum_invest': 'str', + 'cum_hold': 'str', + 'cum_redeem': 'str', + 'avg_price': 'str', + 'redeem_status': 'int', + 'lend_amount': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'ratio': 'ratio', + 'cum_invest': 'cum_invest', + 'cum_hold': 'cum_hold', + 'cum_redeem': 'cum_redeem', + 'avg_price': 'avg_price', + 'redeem_status': 'redeem_status', + 'lend_amount': 'lend_amount' + } + + def __init__(self, asset=None, ratio=None, cum_invest=None, cum_hold=None, cum_redeem=None, avg_price=None, redeem_status=None, lend_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, int, str, Configuration) -> None + """AutoInvestPortfolioItem - 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._asset = None + self._ratio = None + self._cum_invest = None + self._cum_hold = None + self._cum_redeem = None + self._avg_price = None + self._redeem_status = None + self._lend_amount = None + self.discriminator = None + + self.asset = asset + self.ratio = ratio + self.cum_invest = cum_invest + self.cum_hold = cum_hold + self.cum_redeem = cum_redeem + self.avg_price = avg_price + self.redeem_status = redeem_status + self.lend_amount = lend_amount + + @property + def asset(self): + """Gets the asset of this AutoInvestPortfolioItem. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this AutoInvestPortfolioItem. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this AutoInvestPortfolioItem. + + Currency # noqa: E501 + + :param asset: The asset of this AutoInvestPortfolioItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def ratio(self): + """Gets the ratio of this AutoInvestPortfolioItem. # noqa: E501 + + Ratio # noqa: E501 + + :return: The ratio of this AutoInvestPortfolioItem. # noqa: E501 + :rtype: str + """ + return self._ratio + + @ratio.setter + def ratio(self, ratio): + """Sets the ratio of this AutoInvestPortfolioItem. + + Ratio # noqa: E501 + + :param ratio: The ratio of this AutoInvestPortfolioItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and ratio is None: # noqa: E501 + raise ValueError("Invalid value for `ratio`, must not be `None`") # noqa: E501 + + self._ratio = ratio + + @property + def cum_invest(self): + """Gets the cum_invest of this AutoInvestPortfolioItem. # noqa: E501 + + Accumulated investment # noqa: E501 + + :return: The cum_invest of this AutoInvestPortfolioItem. # noqa: E501 + :rtype: str + """ + return self._cum_invest + + @cum_invest.setter + def cum_invest(self, cum_invest): + """Sets the cum_invest of this AutoInvestPortfolioItem. + + Accumulated investment # noqa: E501 + + :param cum_invest: The cum_invest of this AutoInvestPortfolioItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and cum_invest is None: # noqa: E501 + raise ValueError("Invalid value for `cum_invest`, must not be `None`") # noqa: E501 + + self._cum_invest = cum_invest + + @property + def cum_hold(self): + """Gets the cum_hold of this AutoInvestPortfolioItem. # noqa: E501 + + AccumulatedPosition # noqa: E501 + + :return: The cum_hold of this AutoInvestPortfolioItem. # noqa: E501 + :rtype: str + """ + return self._cum_hold + + @cum_hold.setter + def cum_hold(self, cum_hold): + """Sets the cum_hold of this AutoInvestPortfolioItem. + + AccumulatedPosition # noqa: E501 + + :param cum_hold: The cum_hold of this AutoInvestPortfolioItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and cum_hold is None: # noqa: E501 + raise ValueError("Invalid value for `cum_hold`, must not be `None`") # noqa: E501 + + self._cum_hold = cum_hold + + @property + def cum_redeem(self): + """Gets the cum_redeem of this AutoInvestPortfolioItem. # noqa: E501 + + Accumulated redemption # noqa: E501 + + :return: The cum_redeem of this AutoInvestPortfolioItem. # noqa: E501 + :rtype: str + """ + return self._cum_redeem + + @cum_redeem.setter + def cum_redeem(self, cum_redeem): + """Sets the cum_redeem of this AutoInvestPortfolioItem. + + Accumulated redemption # noqa: E501 + + :param cum_redeem: The cum_redeem of this AutoInvestPortfolioItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and cum_redeem is None: # noqa: E501 + raise ValueError("Invalid value for `cum_redeem`, must not be `None`") # noqa: E501 + + self._cum_redeem = cum_redeem + + @property + def avg_price(self): + """Gets the avg_price of this AutoInvestPortfolioItem. # noqa: E501 + + Average Cost Price # noqa: E501 + + :return: The avg_price of this AutoInvestPortfolioItem. # noqa: E501 + :rtype: str + """ + return self._avg_price + + @avg_price.setter + def avg_price(self, avg_price): + """Sets the avg_price of this AutoInvestPortfolioItem. + + Average Cost Price # noqa: E501 + + :param avg_price: The avg_price of this AutoInvestPortfolioItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and avg_price is None: # noqa: E501 + raise ValueError("Invalid value for `avg_price`, must not be `None`") # noqa: E501 + + self._avg_price = avg_price + + @property + def redeem_status(self): + """Gets the redeem_status of this AutoInvestPortfolioItem. # noqa: E501 + + Redemption status # noqa: E501 + + :return: The redeem_status of this AutoInvestPortfolioItem. # noqa: E501 + :rtype: int + """ + return self._redeem_status + + @redeem_status.setter + def redeem_status(self, redeem_status): + """Sets the redeem_status of this AutoInvestPortfolioItem. + + Redemption status # noqa: E501 + + :param redeem_status: The redeem_status of this AutoInvestPortfolioItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and redeem_status is None: # noqa: E501 + raise ValueError("Invalid value for `redeem_status`, must not be `None`") # noqa: E501 + + self._redeem_status = redeem_status + + @property + def lend_amount(self): + """Gets the lend_amount of this AutoInvestPortfolioItem. # noqa: E501 + + LendingQuantity # noqa: E501 + + :return: The lend_amount of this AutoInvestPortfolioItem. # noqa: E501 + :rtype: str + """ + return self._lend_amount + + @lend_amount.setter + def lend_amount(self, lend_amount): + """Sets the lend_amount of this AutoInvestPortfolioItem. + + LendingQuantity # noqa: E501 + + :param lend_amount: The lend_amount of this AutoInvestPortfolioItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and lend_amount is None: # noqa: E501 + raise ValueError("Invalid value for `lend_amount`, must not be `None`") # noqa: E501 + + self._lend_amount = lend_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, AutoInvestPortfolioItem): + 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, AutoInvestPortfolioItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/award_list_struct_list.py b/gate_api/models/award_list_struct_list.py index b911f6dd..1d689116 100644 --- a/gate_api/models/award_list_struct_list.py +++ b/gate_api/models/award_list_struct_list.py @@ -238,7 +238,7 @@ def fee(self, fee): def status(self): """Gets the status of this AwardListStructList. # noqa: E501 - Status # noqa: E501 + Status. 4 - success # noqa: E501 :return: The status of this AwardListStructList. # noqa: E501 :rtype: int @@ -249,7 +249,7 @@ def status(self): def status(self, status): """Sets the status of this AwardListStructList. - Status # noqa: E501 + Status. 4 - success # noqa: E501 :param status: The status of this AwardListStructList. # noqa: E501 :type: int diff --git a/gate_api/models/base_response.py b/gate_api/models/base_response.py new file mode 100644 index 00000000..3419d245 --- /dev/null +++ b/gate_api/models/base_response.py @@ -0,0 +1,211 @@ +# 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 BaseResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, object, int, Configuration) -> None + """BaseResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this BaseResponse. # noqa: E501 + + Error Code, 0 Indicates Success # noqa: E501 + + :return: The code of this BaseResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this BaseResponse. + + Error Code, 0 Indicates Success # noqa: E501 + + :param code: The code of this BaseResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this BaseResponse. # noqa: E501 + + Error message description # noqa: E501 + + :return: The message of this BaseResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BaseResponse. + + Error message description # noqa: E501 + + :param message: The message of this BaseResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this BaseResponse. # noqa: E501 + + Response data # noqa: E501 + + :return: The data of this BaseResponse. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this BaseResponse. + + Response data # noqa: E501 + + :param data: The data of this BaseResponse. # noqa: E501 + :type: object + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this BaseResponse. # noqa: E501 + + Unix timestamp # noqa: E501 + + :return: The timestamp of this BaseResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this BaseResponse. + + Unix timestamp # noqa: E501 + + :param timestamp: The timestamp of this BaseResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, BaseResponse): + 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, BaseResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py index 7125ac04..995a64b3 100644 --- a/gate_api/models/batch_amend_item.py +++ b/gate_api/models/batch_amend_item.py @@ -39,7 +39,9 @@ class BatchAmendItem(object): 'amount': 'str', 'price': 'str', 'amend_text': 'str', - 'action_mode': 'str' + 'action_mode': 'str', + 'stop_profit': 'SpotOrderStopProfit', + 'stop_loss': 'SpotOrderStopLoss' } attribute_map = { @@ -49,11 +51,13 @@ class BatchAmendItem(object): 'amount': 'amount', 'price': 'price', 'amend_text': 'amend_text', - 'action_mode': 'action_mode' + 'action_mode': 'action_mode', + 'stop_profit': 'stop_profit', + 'stop_loss': 'stop_loss' } - 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 + def __init__(self, order_id=None, currency_pair=None, account=None, amount=None, price=None, amend_text=None, action_mode=None, stop_profit=None, stop_loss=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, SpotOrderStopProfit, SpotOrderStopLoss, Configuration) -> None """BatchAmendItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -66,6 +70,8 @@ def __init__(self, order_id=None, currency_pair=None, account=None, amount=None, self._price = None self._amend_text = None self._action_mode = None + self._stop_profit = None + self._stop_loss = None self.discriminator = None self.order_id = order_id @@ -80,6 +86,10 @@ def __init__(self, order_id=None, currency_pair=None, account=None, amount=None, self.amend_text = amend_text if action_mode is not None: self.action_mode = action_mode + if stop_profit is not None: + self.stop_profit = stop_profit + if stop_loss is not None: + self.stop_loss = stop_loss @property def order_id(self): @@ -249,6 +259,48 @@ def action_mode(self, action_mode): self._action_mode = action_mode + @property + def stop_profit(self): + """Gets the stop_profit of this BatchAmendItem. # noqa: E501 + + + :return: The stop_profit of this BatchAmendItem. # noqa: E501 + :rtype: SpotOrderStopProfit + """ + return self._stop_profit + + @stop_profit.setter + def stop_profit(self, stop_profit): + """Sets the stop_profit of this BatchAmendItem. + + + :param stop_profit: The stop_profit of this BatchAmendItem. # noqa: E501 + :type: SpotOrderStopProfit + """ + + self._stop_profit = stop_profit + + @property + def stop_loss(self): + """Gets the stop_loss of this BatchAmendItem. # noqa: E501 + + + :return: The stop_loss of this BatchAmendItem. # noqa: E501 + :rtype: SpotOrderStopLoss + """ + return self._stop_loss + + @stop_loss.setter + def stop_loss(self, stop_loss): + """Sets the stop_loss of this BatchAmendItem. + + + :param stop_loss: The stop_loss of this BatchAmendItem. # noqa: E501 + :type: SpotOrderStopLoss + """ + + self._stop_loss = stop_loss + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py index 26a4662a..faa5efa1 100644 --- a/gate_api/models/batch_amend_order_req.py +++ b/gate_api/models/batch_amend_order_req.py @@ -37,7 +37,8 @@ class BatchAmendOrderReq(object): 'text': 'str', 'size': 'str', 'price': 'str', - 'amend_text': 'str' + 'amend_text': 'str', + 'action_mode': 'str' } attribute_map = { @@ -45,11 +46,12 @@ class BatchAmendOrderReq(object): 'text': 'text', 'size': 'size', 'price': 'price', - 'amend_text': 'amend_text' + 'amend_text': 'amend_text', + 'action_mode': 'action_mode' } - def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, Configuration) -> None + def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, Configuration) -> None """BatchAmendOrderReq - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -60,6 +62,7 @@ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=N self._size = None self._price = None self._amend_text = None + self._action_mode = None self.discriminator = None if order_id is not None: @@ -72,6 +75,8 @@ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=N 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): @@ -188,6 +193,29 @@ def amend_text(self, amend_text): self._amend_text = amend_text + @property + def action_mode(self): + """Gets the action_mode of this BatchAmendOrderReq. # noqa: E501 + + 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) # noqa: E501 + + :return: The action_mode of this BatchAmendOrderReq. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this BatchAmendOrderReq. + + 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) # noqa: E501 + + :param action_mode: The action_mode of this BatchAmendOrderReq. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py index 4633c456..50a0b037 100644 --- a/gate_api/models/batch_order.py +++ b/gate_api/models/batch_order.py @@ -70,7 +70,9 @@ class BatchOrder(object): 'stp_id': 'int', 'stp_act': 'str', 'finish_as': 'str', - 'slippage': 'str' + 'slippage': 'str', + 'stop_profit': 'SpotOrderStopProfit', + 'stop_loss': 'SpotOrderStopLoss' } attribute_map = { @@ -111,11 +113,13 @@ class BatchOrder(object): 'stp_id': 'stp_id', 'stp_act': 'stp_act', 'finish_as': 'finish_as', - 'slippage': 'slippage' + 'slippage': 'slippage', + 'stop_profit': 'stop_profit', + 'stop_loss': 'stop_loss' } - 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, slippage=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, 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, slippage=None, stop_profit=None, stop_loss=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, str, SpotOrderStopProfit, SpotOrderStopLoss, Configuration) -> None """BatchOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -159,6 +163,8 @@ def __init__(self, order_id=None, amend_text=None, text=None, succeeded=None, la self._stp_act = None self._finish_as = None self._slippage = None + self._stop_profit = None + self._stop_loss = None self.discriminator = None if order_id is not None: @@ -237,6 +243,10 @@ def __init__(self, order_id=None, amend_text=None, text=None, succeeded=None, la self.finish_as = finish_as if slippage is not None: self.slippage = slippage + if stop_profit is not None: + self.stop_profit = stop_profit + if stop_loss is not None: + self.stop_loss = stop_loss @property def order_id(self): @@ -1106,7 +1116,7 @@ def stp_act(self, stp_act): def finish_as(self): """Gets the finish_as of this BatchOrder. # noqa: E501 - 订单结束方式,包括: - open: 等待处理 - filled: 完全成交 - cancelled: 用户撤销 - liquidate_cancelled: 爆仓撤销 - small: 订单数量太小 - depth_not_enough: 深度不足导致撤单 - trader_not_enough: 对手方不足导致撤单 - ioc: 未立即成交,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - poc: 未满足挂单策略,因为 tif 设置为 poc - fok: 未立即完全成交,因为 tif 设置为 fok - stp: 订单发生自成交限制而被撤销 - price_protect_cancelled: 价格保护导致撤单 - unknown: 未知 # noqa: E501 + How the order finished: - open: Pending processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled by liquidation - small: Order size too small - depth_not_enough: Cancelled due to insufficient order book depth - trader_not_enough: Cancelled due to insufficient counterparty liquidity - ioc: Not filled immediately because time-in-force is IOC - poc: Post-only requirement not met because time-in-force is set to poc (maker-only); rejected after being detected as taker - fok: Not fully filled immediately because time-in-force is FOK - stp: Cancelled due to self-trade prevention - price_protect_cancelled: Cancelled due to price protection - unknown: Unknown # noqa: E501 :return: The finish_as of this BatchOrder. # noqa: E501 :rtype: str @@ -1117,7 +1127,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this BatchOrder. - 订单结束方式,包括: - open: 等待处理 - filled: 完全成交 - cancelled: 用户撤销 - liquidate_cancelled: 爆仓撤销 - small: 订单数量太小 - depth_not_enough: 深度不足导致撤单 - trader_not_enough: 对手方不足导致撤单 - ioc: 未立即成交,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - poc: 未满足挂单策略,因为 tif 设置为 poc - fok: 未立即完全成交,因为 tif 设置为 fok - stp: 订单发生自成交限制而被撤销 - price_protect_cancelled: 价格保护导致撤单 - unknown: 未知 # noqa: E501 + How the order finished: - open: Pending processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled by liquidation - small: Order size too small - depth_not_enough: Cancelled due to insufficient order book depth - trader_not_enough: Cancelled due to insufficient counterparty liquidity - ioc: Not filled immediately because time-in-force is IOC - poc: Post-only requirement not met because time-in-force is set to poc (maker-only); rejected after being detected as taker - fok: Not fully filled immediately because time-in-force is FOK - stp: Cancelled due to self-trade prevention - price_protect_cancelled: Cancelled due to price protection - unknown: Unknown # noqa: E501 :param finish_as: The finish_as of this BatchOrder. # noqa: E501 :type: str @@ -1154,6 +1164,48 @@ def slippage(self, slippage): self._slippage = slippage + @property + def stop_profit(self): + """Gets the stop_profit of this BatchOrder. # noqa: E501 + + + :return: The stop_profit of this BatchOrder. # noqa: E501 + :rtype: SpotOrderStopProfit + """ + return self._stop_profit + + @stop_profit.setter + def stop_profit(self, stop_profit): + """Sets the stop_profit of this BatchOrder. + + + :param stop_profit: The stop_profit of this BatchOrder. # noqa: E501 + :type: SpotOrderStopProfit + """ + + self._stop_profit = stop_profit + + @property + def stop_loss(self): + """Gets the stop_loss of this BatchOrder. # noqa: E501 + + + :return: The stop_loss of this BatchOrder. # noqa: E501 + :rtype: SpotOrderStopLoss + """ + return self._stop_loss + + @stop_loss.setter + def stop_loss(self, stop_loss): + """Sets the stop_loss of this BatchOrder. + + + :param stop_loss: The stop_loss of this BatchOrder. # noqa: E501 + :type: SpotOrderStopLoss + """ + + self._stop_loss = stop_loss + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py index cc6e70ab..3b0147be 100644 --- a/gate_api/models/broker_commission.py +++ b/gate_api/models/broker_commission.py @@ -34,7 +34,7 @@ class BrokerCommission(object): """ openapi_types = { 'total': 'int', - 'list': 'list[BrokerCommission1]' + 'list': 'list[BrokerCommissionItem]' } attribute_map = { @@ -43,7 +43,7 @@ class BrokerCommission(object): } def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[BrokerCommission1], Configuration) -> None + # type: (int, list[BrokerCommissionItem], Configuration) -> None """BrokerCommission - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -88,7 +88,7 @@ def list(self): List of commission history # noqa: E501 :return: The list of this BrokerCommission. # noqa: E501 - :rtype: list[BrokerCommission1] + :rtype: list[BrokerCommissionItem] """ return self._list @@ -99,7 +99,7 @@ def list(self, list): List of commission history # noqa: E501 :param list: The list of this BrokerCommission. # noqa: E501 - :type: list[BrokerCommission1] + :type: list[BrokerCommissionItem] """ self._list = list diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission_item.py similarity index 77% rename from gate_api/models/broker_commission1.py rename to gate_api/models/broker_commission_item.py index 7c51b8a8..d7178c2c 100644 --- a/gate_api/models/broker_commission1.py +++ b/gate_api/models/broker_commission_item.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class BrokerCommission1(object): +class BrokerCommissionItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -62,7 +62,7 @@ class BrokerCommission1(object): 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 + """BrokerCommissionItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -105,22 +105,22 @@ def __init__(self, commission_time=None, user_id=None, group_name=None, amount=N @property def commission_time(self): - """Gets the commission_time of this BrokerCommission1. # noqa: E501 + """Gets the commission_time of this BrokerCommissionItem. # noqa: E501 Commission time (Unix timestamp in seconds) # noqa: E501 - :return: The commission_time of this BrokerCommission1. # noqa: E501 + :return: The commission_time of this BrokerCommissionItem. # noqa: E501 :rtype: int """ return self._commission_time @commission_time.setter def commission_time(self, commission_time): - """Sets the commission_time of this BrokerCommission1. + """Sets the commission_time of this BrokerCommissionItem. Commission time (Unix timestamp in seconds) # noqa: E501 - :param commission_time: The commission_time of this BrokerCommission1. # noqa: E501 + :param commission_time: The commission_time of this BrokerCommissionItem. # noqa: E501 :type: int """ @@ -128,22 +128,22 @@ def commission_time(self, commission_time): @property def user_id(self): - """Gets the user_id of this BrokerCommission1. # noqa: E501 + """Gets the user_id of this BrokerCommissionItem. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this BrokerCommission1. # noqa: E501 + :return: The user_id of this BrokerCommissionItem. # noqa: E501 :rtype: int """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this BrokerCommission1. + """Sets the user_id of this BrokerCommissionItem. User ID # noqa: E501 - :param user_id: The user_id of this BrokerCommission1. # noqa: E501 + :param user_id: The user_id of this BrokerCommissionItem. # noqa: E501 :type: int """ @@ -151,22 +151,22 @@ def user_id(self, user_id): @property def group_name(self): - """Gets the group_name of this BrokerCommission1. # noqa: E501 + """Gets the group_name of this BrokerCommissionItem. # noqa: E501 Group name # noqa: E501 - :return: The group_name of this BrokerCommission1. # noqa: E501 + :return: The group_name of this BrokerCommissionItem. # noqa: E501 :rtype: str """ return self._group_name @group_name.setter def group_name(self, group_name): - """Sets the group_name of this BrokerCommission1. + """Sets the group_name of this BrokerCommissionItem. Group name # noqa: E501 - :param group_name: The group_name of this BrokerCommission1. # noqa: E501 + :param group_name: The group_name of this BrokerCommissionItem. # noqa: E501 :type: str """ @@ -174,22 +174,22 @@ def group_name(self, group_name): @property def amount(self): - """Gets the amount of this BrokerCommission1. # noqa: E501 + """Gets the amount of this BrokerCommissionItem. # noqa: E501 The amount of commission rebates # noqa: E501 - :return: The amount of this BrokerCommission1. # noqa: E501 + :return: The amount of this BrokerCommissionItem. # noqa: E501 :rtype: str """ return self._amount @amount.setter def amount(self, amount): - """Sets the amount of this BrokerCommission1. + """Sets the amount of this BrokerCommissionItem. The amount of commission rebates # noqa: E501 - :param amount: The amount of this BrokerCommission1. # noqa: E501 + :param amount: The amount of this BrokerCommissionItem. # noqa: E501 :type: str """ @@ -197,22 +197,22 @@ def amount(self, amount): @property def fee(self): - """Gets the fee of this BrokerCommission1. # noqa: E501 + """Gets the fee of this BrokerCommissionItem. # noqa: E501 Fee # noqa: E501 - :return: The fee of this BrokerCommission1. # noqa: E501 + :return: The fee of this BrokerCommissionItem. # noqa: E501 :rtype: str """ return self._fee @fee.setter def fee(self, fee): - """Sets the fee of this BrokerCommission1. + """Sets the fee of this BrokerCommissionItem. Fee # noqa: E501 - :param fee: The fee of this BrokerCommission1. # noqa: E501 + :param fee: The fee of this BrokerCommissionItem. # noqa: E501 :type: str """ @@ -220,22 +220,22 @@ def fee(self, fee): @property def fee_asset(self): - """Gets the fee_asset of this BrokerCommission1. # noqa: E501 + """Gets the fee_asset of this BrokerCommissionItem. # noqa: E501 Fee currency # noqa: E501 - :return: The fee_asset of this BrokerCommission1. # noqa: E501 + :return: The fee_asset of this BrokerCommissionItem. # noqa: E501 :rtype: str """ return self._fee_asset @fee_asset.setter def fee_asset(self, fee_asset): - """Sets the fee_asset of this BrokerCommission1. + """Sets the fee_asset of this BrokerCommissionItem. Fee currency # noqa: E501 - :param fee_asset: The fee_asset of this BrokerCommission1. # noqa: E501 + :param fee_asset: The fee_asset of this BrokerCommissionItem. # noqa: E501 :type: str """ @@ -243,22 +243,22 @@ def fee_asset(self, fee_asset): @property def rebate_fee(self): - """Gets the rebate_fee of this BrokerCommission1. # noqa: E501 + """Gets the rebate_fee of this BrokerCommissionItem. # noqa: E501 The income from rebates, converted to USDT # noqa: E501 - :return: The rebate_fee of this BrokerCommission1. # noqa: E501 + :return: The rebate_fee of this BrokerCommissionItem. # noqa: E501 :rtype: str """ return self._rebate_fee @rebate_fee.setter def rebate_fee(self, rebate_fee): - """Sets the rebate_fee of this BrokerCommission1. + """Sets the rebate_fee of this BrokerCommissionItem. The income from rebates, converted to USDT # noqa: E501 - :param rebate_fee: The rebate_fee of this BrokerCommission1. # noqa: E501 + :param rebate_fee: The rebate_fee of this BrokerCommissionItem. # noqa: E501 :type: str """ @@ -266,22 +266,22 @@ def rebate_fee(self, rebate_fee): @property def source(self): - """Gets the source of this BrokerCommission1. # noqa: E501 + """Gets the source of this BrokerCommissionItem. # noqa: E501 Commission transaction type: Spot, Futures, Options, Alpha、TradFi # noqa: E501 - :return: The source of this BrokerCommission1. # noqa: E501 + :return: The source of this BrokerCommissionItem. # noqa: E501 :rtype: str """ return self._source @source.setter def source(self, source): - """Sets the source of this BrokerCommission1. + """Sets the source of this BrokerCommissionItem. Commission transaction type: Spot, Futures, Options, Alpha、TradFi # noqa: E501 - :param source: The source of this BrokerCommission1. # noqa: E501 + :param source: The source of this BrokerCommissionItem. # noqa: E501 :type: str """ @@ -289,22 +289,22 @@ def source(self, source): @property def currency_pair(self): - """Gets the currency_pair of this BrokerCommission1. # noqa: E501 + """Gets the currency_pair of this BrokerCommissionItem. # noqa: E501 Currency pair # noqa: E501 - :return: The currency_pair of this BrokerCommission1. # noqa: E501 + :return: The currency_pair of this BrokerCommissionItem. # noqa: E501 :rtype: str """ return self._currency_pair @currency_pair.setter def currency_pair(self, currency_pair): - """Sets the currency_pair of this BrokerCommission1. + """Sets the currency_pair of this BrokerCommissionItem. Currency pair # noqa: E501 - :param currency_pair: The currency_pair of this BrokerCommission1. # noqa: E501 + :param currency_pair: The currency_pair of this BrokerCommissionItem. # noqa: E501 :type: str """ @@ -312,20 +312,20 @@ def currency_pair(self, currency_pair): @property def sub_broker_info(self): - """Gets the sub_broker_info of this BrokerCommission1. # noqa: E501 + """Gets the sub_broker_info of this BrokerCommissionItem. # noqa: E501 - :return: The sub_broker_info of this BrokerCommission1. # noqa: E501 + :return: The sub_broker_info of this BrokerCommissionItem. # 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. + """Sets the sub_broker_info of this BrokerCommissionItem. - :param sub_broker_info: The sub_broker_info of this BrokerCommission1. # noqa: E501 + :param sub_broker_info: The sub_broker_info of this BrokerCommissionItem. # noqa: E501 :type: BrokerCommissionSubBrokerInfo """ @@ -333,22 +333,22 @@ def sub_broker_info(self, sub_broker_info): @property def alpha_contract_addr(self): - """Gets the alpha_contract_addr of this BrokerCommission1. # noqa: E501 + """Gets the alpha_contract_addr of this BrokerCommissionItem. # noqa: E501 Alpha contract address # noqa: E501 - :return: The alpha_contract_addr of this BrokerCommission1. # noqa: E501 + :return: The alpha_contract_addr of this BrokerCommissionItem. # 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. + """Sets the alpha_contract_addr of this BrokerCommissionItem. Alpha contract address # noqa: E501 - :param alpha_contract_addr: The alpha_contract_addr of this BrokerCommission1. # noqa: E501 + :param alpha_contract_addr: The alpha_contract_addr of this BrokerCommissionItem. # noqa: E501 :type: str """ @@ -388,14 +388,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, BrokerCommission1): + if not isinstance(other, BrokerCommissionItem): 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): + if not isinstance(other, BrokerCommissionItem): 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 index 0a85977d..42d5020d 100644 --- a/gate_api/models/broker_transaction.py +++ b/gate_api/models/broker_transaction.py @@ -33,76 +33,298 @@ class BrokerTransaction(object): and the value is json key in definition. """ openapi_types = { - 'total': 'int', - 'list': 'list[BrokerTransaction1]' + '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 = { - 'total': 'total', - 'list': 'list' + '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, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[BrokerTransaction1], Configuration) -> None + 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 """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._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 total is not None: - self.total = total - if list is not None: - self.list = list + 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 total(self): - """Gets the total of this BrokerTransaction. # noqa: E501 + def transaction_time(self): + """Gets the transaction_time of this BrokerTransaction. # noqa: E501 - Total # noqa: E501 + Transaction Time. (unix timestamp) # noqa: E501 - :return: The total of this BrokerTransaction. # noqa: E501 + :return: The transaction_time of this BrokerTransaction. # noqa: E501 :rtype: int """ - return self._total + return self._transaction_time - @total.setter - def total(self, total): - """Sets the total of this BrokerTransaction. + @transaction_time.setter + def transaction_time(self, transaction_time): + """Sets the transaction_time of this BrokerTransaction. - Total # noqa: E501 + Transaction Time. (unix timestamp) # noqa: E501 - :param total: The total of this BrokerTransaction. # noqa: E501 + :param transaction_time: The transaction_time of this BrokerTransaction. # noqa: E501 :type: int """ - self._total = total + self._transaction_time = transaction_time @property - def list(self): - """Gets the list of this BrokerTransaction. # noqa: E501 + def user_id(self): + """Gets the user_id of this BrokerTransaction. # noqa: E501 - List of transaction history # noqa: E501 + User ID # noqa: E501 - :return: The list of this BrokerTransaction. # noqa: E501 - :rtype: list[BrokerTransaction1] + :return: The user_id of this BrokerTransaction. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this BrokerTransaction. + + User ID # noqa: E501 + + :param user_id: The user_id of this BrokerTransaction. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def group_name(self): + """Gets the group_name of this BrokerTransaction. # noqa: E501 + + Group name # noqa: E501 + + :return: The group_name of this BrokerTransaction. # noqa: E501 + :rtype: str + """ + return self._group_name + + @group_name.setter + def group_name(self, group_name): + """Sets the group_name of this BrokerTransaction. + + Group name # noqa: E501 + + :param group_name: The group_name of this BrokerTransaction. # noqa: E501 + :type: str + """ + + self._group_name = group_name + + @property + def fee(self): + """Gets the fee of this BrokerTransaction. # noqa: E501 + + Fee amount (USDT) # noqa: E501 + + :return: The fee of this BrokerTransaction. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this BrokerTransaction. + + Fee amount (USDT) # noqa: E501 + + :param fee: The fee of this BrokerTransaction. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def currency_pair(self): + """Gets the currency_pair of this BrokerTransaction. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this BrokerTransaction. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this BrokerTransaction. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this BrokerTransaction. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def amount(self): + """Gets the amount of this BrokerTransaction. # noqa: E501 + + Transaction amount # noqa: E501 + + :return: The amount of this BrokerTransaction. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this BrokerTransaction. + + Transaction amount # noqa: E501 + + :param amount: The amount of this BrokerTransaction. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def fee_asset(self): + """Gets the fee_asset of this BrokerTransaction. # noqa: E501 + + Fee currency # noqa: E501 + + :return: The fee_asset of this BrokerTransaction. # noqa: E501 + :rtype: str + """ + return self._fee_asset + + @fee_asset.setter + def fee_asset(self, fee_asset): + """Sets the fee_asset of this BrokerTransaction. + + Fee currency # noqa: E501 + + :param fee_asset: The fee_asset of this BrokerTransaction. # noqa: E501 + :type: str + """ + + self._fee_asset = fee_asset + + @property + def source(self): + """Gets the source of this BrokerTransaction. # noqa: E501 + + Commission transaction type: Spot, Futures, Options, Alpha、TradFi # noqa: E501 + + :return: The source of this BrokerTransaction. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this BrokerTransaction. + + Commission transaction type: Spot, Futures, Options, Alpha、TradFi # noqa: E501 + + :param source: The source of this BrokerTransaction. # noqa: E501 + :type: str + """ + + self._source = source + + @property + def sub_broker_info(self): + """Gets the sub_broker_info of this BrokerTransaction. # noqa: E501 + + + :return: The sub_broker_info of this BrokerTransaction. # 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 BrokerTransaction. + + + :param sub_broker_info: The sub_broker_info of this BrokerTransaction. # noqa: E501 + :type: BrokerCommissionSubBrokerInfo + """ + + self._sub_broker_info = sub_broker_info + + @property + def alpha_contract_addr(self): + """Gets the alpha_contract_addr of this BrokerTransaction. # noqa: E501 + + Alpha contract address # noqa: E501 + + :return: The alpha_contract_addr of this BrokerTransaction. # noqa: E501 + :rtype: str """ - return self._list + return self._alpha_contract_addr - @list.setter - def list(self, list): - """Sets the list of this BrokerTransaction. + @alpha_contract_addr.setter + def alpha_contract_addr(self, alpha_contract_addr): + """Sets the alpha_contract_addr of this BrokerTransaction. - List of transaction history # noqa: E501 + Alpha contract address # noqa: E501 - :param list: The list of this BrokerTransaction. # noqa: E501 - :type: list[BrokerTransaction1] + :param alpha_contract_addr: The alpha_contract_addr of this BrokerTransaction. # noqa: E501 + :type: str """ - self._list = list + self._alpha_contract_addr = alpha_contract_addr def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py deleted file mode 100644 index 7ad63d90..00000000 --- a/gate_api/models/broker_transaction1.py +++ /dev/null @@ -1,373 +0,0 @@ -# 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、TradFi # 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、TradFi # 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/broker_transaction_history.py b/gate_api/models/broker_transaction_history.py new file mode 100644 index 00000000..e9136236 --- /dev/null +++ b/gate_api/models/broker_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 BrokerTransactionHistory(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[BrokerTransaction]' + } + + attribute_map = { + 'total': 'total', + 'list': 'list' + } + + def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[BrokerTransaction], Configuration) -> None + """BrokerTransactionHistory - 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 BrokerTransactionHistory. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this BrokerTransactionHistory. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this BrokerTransactionHistory. + + Total # noqa: E501 + + :param total: The total of this BrokerTransactionHistory. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def list(self): + """Gets the list of this BrokerTransactionHistory. # noqa: E501 + + List of transaction history # noqa: E501 + + :return: The list of this BrokerTransactionHistory. # noqa: E501 + :rtype: list[BrokerTransaction] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this BrokerTransactionHistory. + + List of transaction history # noqa: E501 + + :param list: The list of this BrokerTransactionHistory. # noqa: E501 + :type: list[BrokerTransaction] + """ + + 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, BrokerTransactionHistory): + 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, BrokerTransactionHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cancel_order.py b/gate_api/models/cancel_order.py index 37459329..215f0f7f 100644 --- a/gate_api/models/cancel_order.py +++ b/gate_api/models/cancel_order.py @@ -33,62 +33,65 @@ class CancelOrder(object): and the value is json key in definition. """ openapi_types = { - 'trade_id': 'str', + 'txid': 'str', 'reason_id': 'str', 'reason_memo': 'str' } attribute_map = { - 'trade_id': 'trade_id', + 'txid': 'txid', 'reason_id': 'reason_id', 'reason_memo': 'reason_memo' } - def __init__(self, trade_id=None, reason_id=None, reason_memo=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, txid=None, reason_id=None, reason_memo=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._trade_id = None + self._txid = None self._reason_id = None self._reason_memo = None self.discriminator = None - self.trade_id = trade_id + self.txid = txid if reason_id is not None: self.reason_id = reason_id if reason_memo is not None: self.reason_memo = reason_memo @property - def trade_id(self): - """Gets the trade_id of this CancelOrder. # noqa: E501 + def txid(self): + """Gets the txid of this CancelOrder. # noqa: E501 + Order ID # noqa: E501 - :return: The trade_id of this CancelOrder. # noqa: E501 + :return: The txid of this CancelOrder. # noqa: E501 :rtype: str """ - return self._trade_id + return self._txid - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this CancelOrder. + @txid.setter + def txid(self, txid): + """Sets the txid of this CancelOrder. + Order ID # noqa: E501 - :param trade_id: The trade_id of this CancelOrder. # noqa: E501 + :param txid: The txid of this CancelOrder. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and trade_id is None: # noqa: E501 - raise ValueError("Invalid value for `trade_id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and txid is None: # noqa: E501 + raise ValueError("Invalid value for `txid`, must not be `None`") # noqa: E501 - self._trade_id = trade_id + self._txid = txid @property def reason_id(self): """Gets the reason_id of this CancelOrder. # noqa: E501 + Cancel reason ID. `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller account not real; `5` payout account issue; `6` price mismatch; `7` mutually agreed cancel; `8` poor communication; `9` other; `10` seller cannot release with refund; `11` terms not met; `12` seller payout risk-controlled. # noqa: E501 :return: The reason_id of this CancelOrder. # noqa: E501 :rtype: str @@ -99,6 +102,7 @@ def reason_id(self): def reason_id(self, reason_id): """Sets the reason_id of this CancelOrder. + Cancel reason ID. `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller account not real; `5` payout account issue; `6` price mismatch; `7` mutually agreed cancel; `8` poor communication; `9` other; `10` seller cannot release with refund; `11` terms not met; `12` seller payout risk-controlled. # noqa: E501 :param reason_id: The reason_id of this CancelOrder. # noqa: E501 :type: str @@ -110,6 +114,7 @@ def reason_id(self, reason_id): def reason_memo(self): """Gets the reason_memo of this CancelOrder. # noqa: E501 + Extra cancel notes when `reason_id` is `9` or explanation is required. # noqa: E501 :return: The reason_memo of this CancelOrder. # noqa: E501 :rtype: str @@ -120,6 +125,7 @@ def reason_memo(self): def reason_memo(self, reason_memo): """Sets the reason_memo of this CancelOrder. + Extra cancel notes when `reason_id` is `9` or explanation is required. # noqa: E501 :param reason_memo: The reason_memo of this CancelOrder. # noqa: E501 :type: str diff --git a/gate_api/models/candy_drop_v4_activity_cd01.py b/gate_api/models/candy_drop_v4_activity_cd01.py new file mode 100644 index 00000000..8fcf3ba9 --- /dev/null +++ b/gate_api/models/candy_drop_v4_activity_cd01.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 CandyDropV4ActivityCd01(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', + 'currency': 'str', + 'total_rewards': 'str', + 'start_time': 'str', + 'end_time': 'str', + 'rule_name': 'list[str]', + 'participants': 'int', + 'user_max_rewards': 'str' + } + + attribute_map = { + 'id': 'id', + 'currency': 'currency', + 'total_rewards': 'total_rewards', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'rule_name': 'rule_name', + 'participants': 'participants', + 'user_max_rewards': 'user_max_rewards' + } + + def __init__(self, id=None, currency=None, total_rewards=None, start_time=None, end_time=None, rule_name=None, participants=None, user_max_rewards=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, list[str], int, str, Configuration) -> None + """CandyDropV4ActivityCd01 - 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._total_rewards = None + self._start_time = None + self._end_time = None + self._rule_name = None + self._participants = None + self._user_max_rewards = None + self.discriminator = None + + if id is not None: + self.id = id + if currency is not None: + self.currency = currency + if total_rewards is not None: + self.total_rewards = total_rewards + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if rule_name is not None: + self.rule_name = rule_name + if participants is not None: + self.participants = participants + if user_max_rewards is not None: + self.user_max_rewards = user_max_rewards + + @property + def id(self): + """Gets the id of this CandyDropV4ActivityCd01. # noqa: E501 + + Activity ID # noqa: E501 + + :return: The id of this CandyDropV4ActivityCd01. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CandyDropV4ActivityCd01. + + Activity ID # noqa: E501 + + :param id: The id of this CandyDropV4ActivityCd01. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def currency(self): + """Gets the currency of this CandyDropV4ActivityCd01. # noqa: E501 + + Project/currency name # noqa: E501 + + :return: The currency of this CandyDropV4ActivityCd01. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CandyDropV4ActivityCd01. + + Project/currency name # noqa: E501 + + :param currency: The currency of this CandyDropV4ActivityCd01. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def total_rewards(self): + """Gets the total_rewards of this CandyDropV4ActivityCd01. # noqa: E501 + + total prize pool # noqa: E501 + + :return: The total_rewards of this CandyDropV4ActivityCd01. # noqa: E501 + :rtype: str + """ + return self._total_rewards + + @total_rewards.setter + def total_rewards(self, total_rewards): + """Sets the total_rewards of this CandyDropV4ActivityCd01. + + total prize pool # noqa: E501 + + :param total_rewards: The total_rewards of this CandyDropV4ActivityCd01. # noqa: E501 + :type: str + """ + + self._total_rewards = total_rewards + + @property + def start_time(self): + """Gets the start_time of this CandyDropV4ActivityCd01. # noqa: E501 + + Event start time (UTC formatted) # noqa: E501 + + :return: The start_time of this CandyDropV4ActivityCd01. # noqa: E501 + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this CandyDropV4ActivityCd01. + + Event start time (UTC formatted) # noqa: E501 + + :param start_time: The start_time of this CandyDropV4ActivityCd01. # noqa: E501 + :type: str + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this CandyDropV4ActivityCd01. # noqa: E501 + + Event end time (UTC format) # noqa: E501 + + :return: The end_time of this CandyDropV4ActivityCd01. # noqa: E501 + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this CandyDropV4ActivityCd01. + + Event end time (UTC format) # noqa: E501 + + :param end_time: The end_time of this CandyDropV4ActivityCd01. # noqa: E501 + :type: str + """ + + self._end_time = end_time + + @property + def rule_name(self): + """Gets the rule_name of this CandyDropV4ActivityCd01. # noqa: E501 + + Task type list # noqa: E501 + + :return: The rule_name of this CandyDropV4ActivityCd01. # noqa: E501 + :rtype: list[str] + """ + return self._rule_name + + @rule_name.setter + def rule_name(self, rule_name): + """Sets the rule_name of this CandyDropV4ActivityCd01. + + Task type list # noqa: E501 + + :param rule_name: The rule_name of this CandyDropV4ActivityCd01. # noqa: E501 + :type: list[str] + """ + + self._rule_name = rule_name + + @property + def participants(self): + """Gets the participants of this CandyDropV4ActivityCd01. # noqa: E501 + + Number of participants # noqa: E501 + + :return: The participants of this CandyDropV4ActivityCd01. # noqa: E501 + :rtype: int + """ + return self._participants + + @participants.setter + def participants(self, participants): + """Sets the participants of this CandyDropV4ActivityCd01. + + Number of participants # noqa: E501 + + :param participants: The participants of this CandyDropV4ActivityCd01. # noqa: E501 + :type: int + """ + + self._participants = participants + + @property + def user_max_rewards(self): + """Gets the user_max_rewards of this CandyDropV4ActivityCd01. # noqa: E501 + + Maximum reward available # noqa: E501 + + :return: The user_max_rewards of this CandyDropV4ActivityCd01. # noqa: E501 + :rtype: str + """ + return self._user_max_rewards + + @user_max_rewards.setter + def user_max_rewards(self, user_max_rewards): + """Sets the user_max_rewards of this CandyDropV4ActivityCd01. + + Maximum reward available # noqa: E501 + + :param user_max_rewards: The user_max_rewards of this CandyDropV4ActivityCd01. # noqa: E501 + :type: str + """ + + self._user_max_rewards = user_max_rewards + + 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, CandyDropV4ActivityCd01): + 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, CandyDropV4ActivityCd01): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_activity_rules_cd03.py b/gate_api/models/candy_drop_v4_activity_rules_cd03.py new file mode 100644 index 00000000..d5bc9370 --- /dev/null +++ b/gate_api/models/candy_drop_v4_activity_rules_cd03.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 CandyDropV4ActivityRulesCd03(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', + 'total_rewards': 'str', + 'start_time': 'str', + 'end_time': 'str', + 'prize_pools': 'list[CandyDropV4PrizePoolCd03]' + } + + attribute_map = { + 'currency': 'currency', + 'total_rewards': 'total_rewards', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'prize_pools': 'prize_pools' + } + + def __init__(self, currency=None, total_rewards=None, start_time=None, end_time=None, prize_pools=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, list[CandyDropV4PrizePoolCd03], Configuration) -> None + """CandyDropV4ActivityRulesCd03 - 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._total_rewards = None + self._start_time = None + self._end_time = None + self._prize_pools = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if total_rewards is not None: + self.total_rewards = total_rewards + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if prize_pools is not None: + self.prize_pools = prize_pools + + @property + def currency(self): + """Gets the currency of this CandyDropV4ActivityRulesCd03. # noqa: E501 + + Project/currency name # noqa: E501 + + :return: The currency of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CandyDropV4ActivityRulesCd03. + + Project/currency name # noqa: E501 + + :param currency: The currency of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def total_rewards(self): + """Gets the total_rewards of this CandyDropV4ActivityRulesCd03. # noqa: E501 + + total prize pool # noqa: E501 + + :return: The total_rewards of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :rtype: str + """ + return self._total_rewards + + @total_rewards.setter + def total_rewards(self, total_rewards): + """Sets the total_rewards of this CandyDropV4ActivityRulesCd03. + + total prize pool # noqa: E501 + + :param total_rewards: The total_rewards of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :type: str + """ + + self._total_rewards = total_rewards + + @property + def start_time(self): + """Gets the start_time of this CandyDropV4ActivityRulesCd03. # noqa: E501 + + Event start time (UTC formatted) # noqa: E501 + + :return: The start_time of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this CandyDropV4ActivityRulesCd03. + + Event start time (UTC formatted) # noqa: E501 + + :param start_time: The start_time of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :type: str + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this CandyDropV4ActivityRulesCd03. # noqa: E501 + + Event end time (UTC format) # noqa: E501 + + :return: The end_time of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this CandyDropV4ActivityRulesCd03. + + Event end time (UTC format) # noqa: E501 + + :param end_time: The end_time of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :type: str + """ + + self._end_time = end_time + + @property + def prize_pools(self): + """Gets the prize_pools of this CandyDropV4ActivityRulesCd03. # noqa: E501 + + Prize pool list # noqa: E501 + + :return: The prize_pools of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :rtype: list[CandyDropV4PrizePoolCd03] + """ + return self._prize_pools + + @prize_pools.setter + def prize_pools(self, prize_pools): + """Sets the prize_pools of this CandyDropV4ActivityRulesCd03. + + Prize pool list # noqa: E501 + + :param prize_pools: The prize_pools of this CandyDropV4ActivityRulesCd03. # noqa: E501 + :type: list[CandyDropV4PrizePoolCd03] + """ + + self._prize_pools = prize_pools + + 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, CandyDropV4ActivityRulesCd03): + 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, CandyDropV4ActivityRulesCd03): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_airdrop_record_cd06.py b/gate_api/models/candy_drop_v4_airdrop_record_cd06.py new file mode 100644 index 00000000..a1af2011 --- /dev/null +++ b/gate_api/models/candy_drop_v4_airdrop_record_cd06.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 CandyDropV4AirdropRecordCd06(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', + 'airdrop_time': 'str', + 'rewards': 'str', + 'convert_amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'airdrop_time': 'airdrop_time', + 'rewards': 'rewards', + 'convert_amount': 'convert_amount' + } + + def __init__(self, currency=None, airdrop_time=None, rewards=None, convert_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """CandyDropV4AirdropRecordCd06 - 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._airdrop_time = None + self._rewards = None + self._convert_amount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if airdrop_time is not None: + self.airdrop_time = airdrop_time + if rewards is not None: + self.rewards = rewards + if convert_amount is not None: + self.convert_amount = convert_amount + + @property + def currency(self): + """Gets the currency of this CandyDropV4AirdropRecordCd06. # noqa: E501 + + Product Name # noqa: E501 + + :return: The currency of this CandyDropV4AirdropRecordCd06. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CandyDropV4AirdropRecordCd06. + + Product Name # noqa: E501 + + :param currency: The currency of this CandyDropV4AirdropRecordCd06. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def airdrop_time(self): + """Gets the airdrop_time of this CandyDropV4AirdropRecordCd06. # noqa: E501 + + Airdrop time (UTC format) # noqa: E501 + + :return: The airdrop_time of this CandyDropV4AirdropRecordCd06. # noqa: E501 + :rtype: str + """ + return self._airdrop_time + + @airdrop_time.setter + def airdrop_time(self, airdrop_time): + """Sets the airdrop_time of this CandyDropV4AirdropRecordCd06. + + Airdrop time (UTC format) # noqa: E501 + + :param airdrop_time: The airdrop_time of this CandyDropV4AirdropRecordCd06. # noqa: E501 + :type: str + """ + + self._airdrop_time = airdrop_time + + @property + def rewards(self): + """Gets the rewards of this CandyDropV4AirdropRecordCd06. # noqa: E501 + + Airdrop rewards # noqa: E501 + + :return: The rewards of this CandyDropV4AirdropRecordCd06. # noqa: E501 + :rtype: str + """ + return self._rewards + + @rewards.setter + def rewards(self, rewards): + """Sets the rewards of this CandyDropV4AirdropRecordCd06. + + Airdrop rewards # noqa: E501 + + :param rewards: The rewards of this CandyDropV4AirdropRecordCd06. # noqa: E501 + :type: str + """ + + self._rewards = rewards + + @property + def convert_amount(self): + """Gets the convert_amount of this CandyDropV4AirdropRecordCd06. # noqa: E501 + + Automatic exchange amount # noqa: E501 + + :return: The convert_amount of this CandyDropV4AirdropRecordCd06. # noqa: E501 + :rtype: str + """ + return self._convert_amount + + @convert_amount.setter + def convert_amount(self, convert_amount): + """Sets the convert_amount of this CandyDropV4AirdropRecordCd06. + + Automatic exchange amount # noqa: E501 + + :param convert_amount: The convert_amount of this CandyDropV4AirdropRecordCd06. # noqa: E501 + :type: str + """ + + self._convert_amount = convert_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, CandyDropV4AirdropRecordCd06): + 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, CandyDropV4AirdropRecordCd06): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_borrowable1.py b/gate_api/models/candy_drop_v4_error_cd01.py similarity index 64% rename from gate_api/models/unified_borrowable1.py rename to gate_api/models/candy_drop_v4_error_cd01.py index 626d1afa..16506757 100644 --- a/gate_api/models/unified_borrowable1.py +++ b/gate_api/models/candy_drop_v4_error_cd01.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class UnifiedBorrowable1(object): +class CandyDropV4ErrorCd01(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,76 +33,76 @@ class UnifiedBorrowable1(object): and the value is json key in definition. """ openapi_types = { - 'currency': 'str', - 'amount': 'str' + 'label': 'str', + 'message': 'str' } attribute_map = { - 'currency': 'currency', - 'amount': 'amount' + 'label': 'label', + 'message': 'message' } - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """UnifiedBorrowable1 - a model defined in OpenAPI""" # noqa: E501 + """CandyDropV4ErrorCd01 - 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._label = None + self._message = None self.discriminator = None - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount + if label is not None: + self.label = label + if message is not None: + self.message = message @property - def currency(self): - """Gets the currency of this UnifiedBorrowable1. # noqa: E501 + def label(self): + """Gets the label of this CandyDropV4ErrorCd01. # noqa: E501 - Currency detail # noqa: E501 + Error label # noqa: E501 - :return: The currency of this UnifiedBorrowable1. # noqa: E501 + :return: The label of this CandyDropV4ErrorCd01. # noqa: E501 :rtype: str """ - return self._currency + return self._label - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedBorrowable1. + @label.setter + def label(self, label): + """Sets the label of this CandyDropV4ErrorCd01. - Currency detail # noqa: E501 + Error label # noqa: E501 - :param currency: The currency of this UnifiedBorrowable1. # noqa: E501 + :param label: The label of this CandyDropV4ErrorCd01. # noqa: E501 :type: str """ - self._currency = currency + self._label = label @property - def amount(self): - """Gets the amount of this UnifiedBorrowable1. # noqa: E501 + def message(self): + """Gets the message of this CandyDropV4ErrorCd01. # noqa: E501 - Maximum borrowable amount # noqa: E501 + Error message # noqa: E501 - :return: The amount of this UnifiedBorrowable1. # noqa: E501 + :return: The message of this CandyDropV4ErrorCd01. # noqa: E501 :rtype: str """ - return self._amount + return self._message - @amount.setter - def amount(self, amount): - """Sets the amount of this UnifiedBorrowable1. + @message.setter + def message(self, message): + """Sets the message of this CandyDropV4ErrorCd01. - Maximum borrowable amount # noqa: E501 + Error message # noqa: E501 - :param amount: The amount of this UnifiedBorrowable1. # noqa: E501 + :param message: The message of this CandyDropV4ErrorCd01. # noqa: E501 :type: str """ - self._amount = amount + self._message = message def to_dict(self): """Returns the model properties as a dict""" @@ -138,14 +138,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, UnifiedBorrowable1): + if not isinstance(other, CandyDropV4ErrorCd01): 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, UnifiedBorrowable1): + if not isinstance(other, CandyDropV4ErrorCd01): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_participation_record_cd05.py b/gate_api/models/candy_drop_v4_participation_record_cd05.py new file mode 100644 index 00000000..513665c6 --- /dev/null +++ b/gate_api/models/candy_drop_v4_participation_record_cd05.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 CandyDropV4ParticipationRecordCd05(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', + 'currency': 'str', + 'status': 'str', + 'register_time': 'str' + } + + attribute_map = { + 'id': 'id', + 'currency': 'currency', + 'status': 'status', + 'register_time': 'register_time' + } + + def __init__(self, id=None, currency=None, status=None, register_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, Configuration) -> None + """CandyDropV4ParticipationRecordCd05 - 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._status = None + self._register_time = None + self.discriminator = None + + if id is not None: + self.id = id + if currency is not None: + self.currency = currency + if status is not None: + self.status = status + if register_time is not None: + self.register_time = register_time + + @property + def id(self): + """Gets the id of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + + Activity ID # noqa: E501 + + :return: The id of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CandyDropV4ParticipationRecordCd05. + + Activity ID # noqa: E501 + + :param id: The id of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def currency(self): + """Gets the currency of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + + Product Name # noqa: E501 + + :return: The currency of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CandyDropV4ParticipationRecordCd05. + + Product Name # noqa: E501 + + :param currency: The currency of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def status(self): + """Gets the status of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + + Project status: ongoing/awaiting_draw/won/not_win # noqa: E501 + + :return: The status of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CandyDropV4ParticipationRecordCd05. + + Project status: ongoing/awaiting_draw/won/not_win # noqa: E501 + + :param status: The status of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def register_time(self): + """Gets the register_time of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + + Participation time (UTC formatted) # noqa: E501 + + :return: The register_time of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + :rtype: str + """ + return self._register_time + + @register_time.setter + def register_time(self, register_time): + """Sets the register_time of this CandyDropV4ParticipationRecordCd05. + + Participation time (UTC formatted) # noqa: E501 + + :param register_time: The register_time of this CandyDropV4ParticipationRecordCd05. # noqa: E501 + :type: str + """ + + self._register_time = register_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, CandyDropV4ParticipationRecordCd05): + 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, CandyDropV4ParticipationRecordCd05): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_prize_pool_cd03.py b/gate_api/models/candy_drop_v4_prize_pool_cd03.py new file mode 100644 index 00000000..ac4c9953 --- /dev/null +++ b/gate_api/models/candy_drop_v4_prize_pool_cd03.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 CandyDropV4PrizePoolCd03(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 = { + 'prize_pool_type': 'int', + 'prize_all': 'str', + 'prize_limit': 'str', + 'tasks': 'list[CandyDropV4TaskCd03]' + } + + attribute_map = { + 'prize_pool_type': 'prize_pool_type', + 'prize_all': 'prize_all', + 'prize_limit': 'prize_limit', + 'tasks': 'tasks' + } + + def __init__(self, prize_pool_type=None, prize_all=None, prize_limit=None, tasks=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, list[CandyDropV4TaskCd03], Configuration) -> None + """CandyDropV4PrizePoolCd03 - 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._prize_pool_type = None + self._prize_all = None + self._prize_limit = None + self._tasks = None + self.discriminator = None + + if prize_pool_type is not None: + self.prize_pool_type = prize_pool_type + if prize_all is not None: + self.prize_all = prize_all + if prize_limit is not None: + self.prize_limit = prize_limit + if tasks is not None: + self.tasks = tasks + + @property + def prize_pool_type(self): + """Gets the prize_pool_type of this CandyDropV4PrizePoolCd03. # noqa: E501 + + Prize pool type # noqa: E501 + + :return: The prize_pool_type of this CandyDropV4PrizePoolCd03. # noqa: E501 + :rtype: int + """ + return self._prize_pool_type + + @prize_pool_type.setter + def prize_pool_type(self, prize_pool_type): + """Sets the prize_pool_type of this CandyDropV4PrizePoolCd03. + + Prize pool type # noqa: E501 + + :param prize_pool_type: The prize_pool_type of this CandyDropV4PrizePoolCd03. # noqa: E501 + :type: int + """ + + self._prize_pool_type = prize_pool_type + + @property + def prize_all(self): + """Gets the prize_all of this CandyDropV4PrizePoolCd03. # noqa: E501 + + Total prize pool amount # noqa: E501 + + :return: The prize_all of this CandyDropV4PrizePoolCd03. # noqa: E501 + :rtype: str + """ + return self._prize_all + + @prize_all.setter + def prize_all(self, prize_all): + """Sets the prize_all of this CandyDropV4PrizePoolCd03. + + Total prize pool amount # noqa: E501 + + :param prize_all: The prize_all of this CandyDropV4PrizePoolCd03. # noqa: E501 + :type: str + """ + + self._prize_all = prize_all + + @property + def prize_limit(self): + """Gets the prize_limit of this CandyDropV4PrizePoolCd03. # noqa: E501 + + Maximum share per person # noqa: E501 + + :return: The prize_limit of this CandyDropV4PrizePoolCd03. # noqa: E501 + :rtype: str + """ + return self._prize_limit + + @prize_limit.setter + def prize_limit(self, prize_limit): + """Sets the prize_limit of this CandyDropV4PrizePoolCd03. + + Maximum share per person # noqa: E501 + + :param prize_limit: The prize_limit of this CandyDropV4PrizePoolCd03. # noqa: E501 + :type: str + """ + + self._prize_limit = prize_limit + + @property + def tasks(self): + """Gets the tasks of this CandyDropV4PrizePoolCd03. # noqa: E501 + + task list # noqa: E501 + + :return: The tasks of this CandyDropV4PrizePoolCd03. # noqa: E501 + :rtype: list[CandyDropV4TaskCd03] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this CandyDropV4PrizePoolCd03. + + task list # noqa: E501 + + :param tasks: The tasks of this CandyDropV4PrizePoolCd03. # noqa: E501 + :type: list[CandyDropV4TaskCd03] + """ + + self._tasks = tasks + + 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, CandyDropV4PrizePoolCd03): + 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, CandyDropV4PrizePoolCd03): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_register_req_cd02.py b/gate_api/models/candy_drop_v4_register_req_cd02.py new file mode 100644 index 00000000..cf99cee7 --- /dev/null +++ b/gate_api/models/candy_drop_v4_register_req_cd02.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 CandyDropV4RegisterReqCd02(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 = { + 'activity_id': 'int', + 'currency': 'str' + } + + attribute_map = { + 'activity_id': 'activity_id', + 'currency': 'currency' + } + + def __init__(self, activity_id=None, currency=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """CandyDropV4RegisterReqCd02 - 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._activity_id = None + self._currency = None + self.discriminator = None + + if activity_id is not None: + self.activity_id = activity_id + self.currency = currency + + @property + def activity_id(self): + """Gets the activity_id of this CandyDropV4RegisterReqCd02. # noqa: E501 + + Activity ID (optional, used with currency) # noqa: E501 + + :return: The activity_id of this CandyDropV4RegisterReqCd02. # noqa: E501 + :rtype: int + """ + return self._activity_id + + @activity_id.setter + def activity_id(self, activity_id): + """Sets the activity_id of this CandyDropV4RegisterReqCd02. + + Activity ID (optional, used with currency) # noqa: E501 + + :param activity_id: The activity_id of this CandyDropV4RegisterReqCd02. # noqa: E501 + :type: int + """ + + self._activity_id = activity_id + + @property + def currency(self): + """Gets the currency of this CandyDropV4RegisterReqCd02. # noqa: E501 + + Project/currency name (required) # noqa: E501 + + :return: The currency of this CandyDropV4RegisterReqCd02. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CandyDropV4RegisterReqCd02. + + Project/currency name (required) # noqa: E501 + + :param currency: The currency of this CandyDropV4RegisterReqCd02. # 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 + + 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, CandyDropV4RegisterReqCd02): + 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, CandyDropV4RegisterReqCd02): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_register_resp_cd02.py b/gate_api/models/candy_drop_v4_register_resp_cd02.py new file mode 100644 index 00000000..506d8e15 --- /dev/null +++ b/gate_api/models/candy_drop_v4_register_resp_cd02.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 CandyDropV4RegisterRespCd02(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 = { + 'success': 'bool' + } + + attribute_map = { + 'success': 'success' + } + + def __init__(self, success=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, Configuration) -> None + """CandyDropV4RegisterRespCd02 - 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._success = None + self.discriminator = None + + if success is not None: + self.success = success + + @property + def success(self): + """Gets the success of this CandyDropV4RegisterRespCd02. # noqa: E501 + + Whether the registration is successful # noqa: E501 + + :return: The success of this CandyDropV4RegisterRespCd02. # noqa: E501 + :rtype: bool + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this CandyDropV4RegisterRespCd02. + + Whether the registration is successful # noqa: E501 + + :param success: The success of this CandyDropV4RegisterRespCd02. # noqa: E501 + :type: bool + """ + + self._success = 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, CandyDropV4RegisterRespCd02): + 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, CandyDropV4RegisterRespCd02): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_task_cd03.py b/gate_api/models/candy_drop_v4_task_cd03.py new file mode 100644 index 00000000..a47f7f07 --- /dev/null +++ b/gate_api/models/candy_drop_v4_task_cd03.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 CandyDropV4TaskCd03(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 = { + 'task_name': 'str', + 'task_desc': 'str', + 'exclusive_label': 'str' + } + + attribute_map = { + 'task_name': 'task_name', + 'task_desc': 'task_desc', + 'exclusive_label': 'exclusive_label' + } + + def __init__(self, task_name=None, task_desc=None, exclusive_label=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """CandyDropV4TaskCd03 - 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._task_name = None + self._task_desc = None + self._exclusive_label = None + self.discriminator = None + + if task_name is not None: + self.task_name = task_name + if task_desc is not None: + self.task_desc = task_desc + if exclusive_label is not None: + self.exclusive_label = exclusive_label + + @property + def task_name(self): + """Gets the task_name of this CandyDropV4TaskCd03. # noqa: E501 + + Task main title # noqa: E501 + + :return: The task_name of this CandyDropV4TaskCd03. # noqa: E501 + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this CandyDropV4TaskCd03. + + Task main title # noqa: E501 + + :param task_name: The task_name of this CandyDropV4TaskCd03. # noqa: E501 + :type: str + """ + + self._task_name = task_name + + @property + def task_desc(self): + """Gets the task_desc of this CandyDropV4TaskCd03. # noqa: E501 + + Task subtitle, if none is returned - # noqa: E501 + + :return: The task_desc of this CandyDropV4TaskCd03. # noqa: E501 + :rtype: str + """ + return self._task_desc + + @task_desc.setter + def task_desc(self, task_desc): + """Sets the task_desc of this CandyDropV4TaskCd03. + + Task subtitle, if none is returned - # noqa: E501 + + :param task_desc: The task_desc of this CandyDropV4TaskCd03. # noqa: E501 + :type: str + """ + + self._task_desc = task_desc + + @property + def exclusive_label(self): + """Gets the exclusive_label of this CandyDropV4TaskCd03. # noqa: E501 + + Exclusive task label copywriting, if not configured, it will return - # noqa: E501 + + :return: The exclusive_label of this CandyDropV4TaskCd03. # noqa: E501 + :rtype: str + """ + return self._exclusive_label + + @exclusive_label.setter + def exclusive_label(self, exclusive_label): + """Sets the exclusive_label of this CandyDropV4TaskCd03. + + Exclusive task label copywriting, if not configured, it will return - # noqa: E501 + + :param exclusive_label: The exclusive_label of this CandyDropV4TaskCd03. # noqa: E501 + :type: str + """ + + self._exclusive_label = exclusive_label + + 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, CandyDropV4TaskCd03): + 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, CandyDropV4TaskCd03): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_task_progress_cd04.py b/gate_api/models/candy_drop_v4_task_progress_cd04.py new file mode 100644 index 00000000..dd78e4fe --- /dev/null +++ b/gate_api/models/candy_drop_v4_task_progress_cd04.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 CandyDropV4TaskProgressCd04(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', + 'total_rewards': 'str', + 'start_time': 'str', + 'end_time': 'str', + 'tasks': 'list[CandyDropV4TaskProgressItemCd04]' + } + + attribute_map = { + 'currency': 'currency', + 'total_rewards': 'total_rewards', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'tasks': 'tasks' + } + + def __init__(self, currency=None, total_rewards=None, start_time=None, end_time=None, tasks=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, list[CandyDropV4TaskProgressItemCd04], Configuration) -> None + """CandyDropV4TaskProgressCd04 - 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._total_rewards = None + self._start_time = None + self._end_time = None + self._tasks = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if total_rewards is not None: + self.total_rewards = total_rewards + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if tasks is not None: + self.tasks = tasks + + @property + def currency(self): + """Gets the currency of this CandyDropV4TaskProgressCd04. # noqa: E501 + + Project/currency name # noqa: E501 + + :return: The currency of this CandyDropV4TaskProgressCd04. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CandyDropV4TaskProgressCd04. + + Project/currency name # noqa: E501 + + :param currency: The currency of this CandyDropV4TaskProgressCd04. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def total_rewards(self): + """Gets the total_rewards of this CandyDropV4TaskProgressCd04. # noqa: E501 + + total prize pool # noqa: E501 + + :return: The total_rewards of this CandyDropV4TaskProgressCd04. # noqa: E501 + :rtype: str + """ + return self._total_rewards + + @total_rewards.setter + def total_rewards(self, total_rewards): + """Sets the total_rewards of this CandyDropV4TaskProgressCd04. + + total prize pool # noqa: E501 + + :param total_rewards: The total_rewards of this CandyDropV4TaskProgressCd04. # noqa: E501 + :type: str + """ + + self._total_rewards = total_rewards + + @property + def start_time(self): + """Gets the start_time of this CandyDropV4TaskProgressCd04. # noqa: E501 + + Event start time (UTC formatted) # noqa: E501 + + :return: The start_time of this CandyDropV4TaskProgressCd04. # noqa: E501 + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this CandyDropV4TaskProgressCd04. + + Event start time (UTC formatted) # noqa: E501 + + :param start_time: The start_time of this CandyDropV4TaskProgressCd04. # noqa: E501 + :type: str + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this CandyDropV4TaskProgressCd04. # noqa: E501 + + Event end time (UTC format) # noqa: E501 + + :return: The end_time of this CandyDropV4TaskProgressCd04. # noqa: E501 + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this CandyDropV4TaskProgressCd04. + + Event end time (UTC format) # noqa: E501 + + :param end_time: The end_time of this CandyDropV4TaskProgressCd04. # noqa: E501 + :type: str + """ + + self._end_time = end_time + + @property + def tasks(self): + """Gets the tasks of this CandyDropV4TaskProgressCd04. # noqa: E501 + + Progress list of tasks received # noqa: E501 + + :return: The tasks of this CandyDropV4TaskProgressCd04. # noqa: E501 + :rtype: list[CandyDropV4TaskProgressItemCd04] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this CandyDropV4TaskProgressCd04. + + Progress list of tasks received # noqa: E501 + + :param tasks: The tasks of this CandyDropV4TaskProgressCd04. # noqa: E501 + :type: list[CandyDropV4TaskProgressItemCd04] + """ + + self._tasks = tasks + + 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, CandyDropV4TaskProgressCd04): + 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, CandyDropV4TaskProgressCd04): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_task_progress_item_cd04.py b/gate_api/models/candy_drop_v4_task_progress_item_cd04.py new file mode 100644 index 00000000..debbf6a8 --- /dev/null +++ b/gate_api/models/candy_drop_v4_task_progress_item_cd04.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 CandyDropV4TaskProgressItemCd04(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 = { + 'task_name': 'str', + 'task_desc': 'str', + 'value': 'str' + } + + attribute_map = { + 'task_name': 'task_name', + 'task_desc': 'task_desc', + 'value': 'value' + } + + def __init__(self, task_name=None, task_desc=None, value=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """CandyDropV4TaskProgressItemCd04 - 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._task_name = None + self._task_desc = None + self._value = None + self.discriminator = None + + if task_name is not None: + self.task_name = task_name + if task_desc is not None: + self.task_desc = task_desc + if value is not None: + self.value = value + + @property + def task_name(self): + """Gets the task_name of this CandyDropV4TaskProgressItemCd04. # noqa: E501 + + Task main title # noqa: E501 + + :return: The task_name of this CandyDropV4TaskProgressItemCd04. # noqa: E501 + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this CandyDropV4TaskProgressItemCd04. + + Task main title # noqa: E501 + + :param task_name: The task_name of this CandyDropV4TaskProgressItemCd04. # noqa: E501 + :type: str + """ + + self._task_name = task_name + + @property + def task_desc(self): + """Gets the task_desc of this CandyDropV4TaskProgressItemCd04. # noqa: E501 + + Task subtitle # noqa: E501 + + :return: The task_desc of this CandyDropV4TaskProgressItemCd04. # noqa: E501 + :rtype: str + """ + return self._task_desc + + @task_desc.setter + def task_desc(self, task_desc): + """Sets the task_desc of this CandyDropV4TaskProgressItemCd04. + + Task subtitle # noqa: E501 + + :param task_desc: The task_desc of this CandyDropV4TaskProgressItemCd04. # noqa: E501 + :type: str + """ + + self._task_desc = task_desc + + @property + def value(self): + """Gets the value of this CandyDropV4TaskProgressItemCd04. # noqa: E501 + + Task progress data (transaction volume/recharge volume, etc.) # noqa: E501 + + :return: The value of this CandyDropV4TaskProgressItemCd04. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this CandyDropV4TaskProgressItemCd04. + + Task progress data (transaction volume/recharge volume, etc.) # noqa: E501 + + :param value: The value of this CandyDropV4TaskProgressItemCd04. # 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, CandyDropV4TaskProgressItemCd04): + 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, CandyDropV4TaskProgressItemCd04): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/chase_order.py b/gate_api/models/chase_order.py new file mode 100644 index 00000000..6630afb3 --- /dev/null +++ b/gate_api/models/chase_order.py @@ -0,0 +1,1015 @@ +# 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 ChaseOrder(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': 'str', + 'contract': 'str', + 'settle': 'str', + 'amount': 'str', + 'price_limit': 'str', + 'reduce_only': 'bool', + 'text': 'str', + 'create_time': 'int', + 'finish_time': 'int', + 'original_status': 'int', + 'status': 'str', + 'reason': 'str', + 'fill_amount': 'str', + 'average_fill_price': 'str', + 'suborder_id': 'str', + 'is_dual_mode': 'bool', + 'side_label': 'str', + 'position_side_output': 'str', + 'chase_price': 'str', + 'interval_sec': 'int', + 'updated_at': 'int', + 'suborder_price': 'str', + 'suborder_ongoing': 'bool', + 'suborder_finish_as': 'str', + 'price_type': 'int', + 'price_gap_type': 'str', + 'price_gap_value': 'str', + 'status_code': 'str', + 'create_time_precise': 'str', + 'finish_time_precise': 'str', + 'pos_margin_mode': 'str', + 'position_mode': 'str', + 'leverage': 'str', + 'error_label': 'str' + } + + attribute_map = { + 'id': 'id', + 'user': 'user', + 'contract': 'contract', + 'settle': 'settle', + 'amount': 'amount', + 'price_limit': 'price_limit', + 'reduce_only': 'reduce_only', + 'text': 'text', + 'create_time': 'create_time', + 'finish_time': 'finish_time', + 'original_status': 'original_status', + 'status': 'status', + 'reason': 'reason', + 'fill_amount': 'fill_amount', + 'average_fill_price': 'average_fill_price', + 'suborder_id': 'suborder_id', + 'is_dual_mode': 'is_dual_mode', + 'side_label': 'side_label', + 'position_side_output': 'position_side_output', + 'chase_price': 'chase_price', + 'interval_sec': 'interval_sec', + 'updated_at': 'updated_at', + 'suborder_price': 'suborder_price', + 'suborder_ongoing': 'suborder_ongoing', + 'suborder_finish_as': 'suborder_finish_as', + 'price_type': 'price_type', + 'price_gap_type': 'price_gap_type', + 'price_gap_value': 'price_gap_value', + 'status_code': 'status_code', + 'create_time_precise': 'create_time_precise', + 'finish_time_precise': 'finish_time_precise', + 'pos_margin_mode': 'pos_margin_mode', + 'position_mode': 'position_mode', + 'leverage': 'leverage', + 'error_label': 'error_label' + } + + def __init__(self, id=None, user=None, contract=None, settle=None, amount=None, price_limit=None, reduce_only=None, text=None, create_time=None, finish_time=None, original_status=None, status=None, reason=None, fill_amount=None, average_fill_price=None, suborder_id=None, is_dual_mode=None, side_label=None, position_side_output=None, chase_price=None, interval_sec=None, updated_at=None, suborder_price=None, suborder_ongoing=None, suborder_finish_as=None, price_type=None, price_gap_type=None, price_gap_value=None, status_code=None, create_time_precise=None, finish_time_precise=None, pos_margin_mode=None, position_mode=None, leverage=None, error_label=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, bool, str, int, int, int, str, str, str, str, str, bool, str, str, str, int, int, str, bool, str, int, str, str, str, str, str, str, str, str, str, Configuration) -> None + """ChaseOrder - 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 = None + self._contract = None + self._settle = None + self._amount = None + self._price_limit = None + self._reduce_only = None + self._text = None + self._create_time = None + self._finish_time = None + self._original_status = None + self._status = None + self._reason = None + self._fill_amount = None + self._average_fill_price = None + self._suborder_id = None + self._is_dual_mode = None + self._side_label = None + self._position_side_output = None + self._chase_price = None + self._interval_sec = None + self._updated_at = None + self._suborder_price = None + self._suborder_ongoing = None + self._suborder_finish_as = None + self._price_type = None + self._price_gap_type = None + self._price_gap_value = None + self._status_code = None + self._create_time_precise = None + self._finish_time_precise = None + self._pos_margin_mode = None + self._position_mode = None + self._leverage = None + self._error_label = None + self.discriminator = None + + if id is not None: + self.id = id + if user is not None: + self.user = user + if contract is not None: + self.contract = contract + if settle is not None: + self.settle = settle + if amount is not None: + self.amount = amount + if price_limit is not None: + self.price_limit = price_limit + if reduce_only is not None: + self.reduce_only = reduce_only + if text is not None: + self.text = text + if create_time is not None: + self.create_time = create_time + if finish_time is not None: + self.finish_time = finish_time + if original_status is not None: + self.original_status = original_status + if status is not None: + self.status = status + if reason is not None: + self.reason = reason + if fill_amount is not None: + self.fill_amount = fill_amount + if average_fill_price is not None: + self.average_fill_price = average_fill_price + if suborder_id is not None: + self.suborder_id = suborder_id + if is_dual_mode is not None: + self.is_dual_mode = is_dual_mode + if side_label is not None: + self.side_label = side_label + if position_side_output is not None: + self.position_side_output = position_side_output + if chase_price is not None: + self.chase_price = chase_price + if interval_sec is not None: + self.interval_sec = interval_sec + if updated_at is not None: + self.updated_at = updated_at + if suborder_price is not None: + self.suborder_price = suborder_price + if suborder_ongoing is not None: + self.suborder_ongoing = suborder_ongoing + if suborder_finish_as is not None: + self.suborder_finish_as = suborder_finish_as + if price_type is not None: + self.price_type = price_type + if price_gap_type is not None: + self.price_gap_type = price_gap_type + if price_gap_value is not None: + self.price_gap_value = price_gap_value + if status_code is not None: + self.status_code = status_code + if create_time_precise is not None: + self.create_time_precise = create_time_precise + if finish_time_precise is not None: + self.finish_time_precise = finish_time_precise + if pos_margin_mode is not None: + self.pos_margin_mode = pos_margin_mode + if position_mode is not None: + self.position_mode = position_mode + if leverage is not None: + self.leverage = leverage + if error_label is not None: + self.error_label = error_label + + @property + def id(self): + """Gets the id of this ChaseOrder. # noqa: E501 + + + :return: The id of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ChaseOrder. + + + :param id: The id of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user(self): + """Gets the user of this ChaseOrder. # noqa: E501 + + + :return: The user of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this ChaseOrder. + + + :param user: The user of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._user = user + + @property + def contract(self): + """Gets the contract of this ChaseOrder. # noqa: E501 + + + :return: The contract of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this ChaseOrder. + + + :param contract: The contract of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def settle(self): + """Gets the settle of this ChaseOrder. # noqa: E501 + + + :return: The settle of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._settle + + @settle.setter + def settle(self, settle): + """Sets the settle of this ChaseOrder. + + + :param settle: The settle of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._settle = settle + + @property + def amount(self): + """Gets the amount of this ChaseOrder. # noqa: E501 + + Total size in contracts; positive for buy, negative for sell # noqa: E501 + + :return: The amount of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this ChaseOrder. + + Total size in contracts; positive for buy, negative for sell # noqa: E501 + + :param amount: The amount of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def price_limit(self): + """Gets the price_limit of this ChaseOrder. # noqa: E501 + + + :return: The price_limit of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._price_limit + + @price_limit.setter + def price_limit(self, price_limit): + """Sets the price_limit of this ChaseOrder. + + + :param price_limit: The price_limit of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._price_limit = price_limit + + @property + def reduce_only(self): + """Gets the reduce_only of this ChaseOrder. # noqa: E501 + + + :return: The reduce_only of this ChaseOrder. # noqa: E501 + :rtype: bool + """ + return self._reduce_only + + @reduce_only.setter + def reduce_only(self, reduce_only): + """Sets the reduce_only of this ChaseOrder. + + + :param reduce_only: The reduce_only of this ChaseOrder. # noqa: E501 + :type: bool + """ + + self._reduce_only = reduce_only + + @property + def text(self): + """Gets the text of this ChaseOrder. # noqa: E501 + + + :return: The text of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this ChaseOrder. + + + :param text: The text of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def create_time(self): + """Gets the create_time of this ChaseOrder. # noqa: E501 + + + :return: The create_time of this ChaseOrder. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this ChaseOrder. + + + :param create_time: The create_time of this ChaseOrder. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def finish_time(self): + """Gets the finish_time of this ChaseOrder. # noqa: E501 + + + :return: The finish_time of this ChaseOrder. # noqa: E501 + :rtype: int + """ + return self._finish_time + + @finish_time.setter + def finish_time(self, finish_time): + """Sets the finish_time of this ChaseOrder. + + + :param finish_time: The finish_time of this ChaseOrder. # noqa: E501 + :type: int + """ + + self._finish_time = finish_time + + @property + def original_status(self): + """Gets the original_status of this ChaseOrder. # noqa: E501 + + Raw status enum # noqa: E501 + + :return: The original_status of this ChaseOrder. # noqa: E501 + :rtype: int + """ + return self._original_status + + @original_status.setter + def original_status(self, original_status): + """Sets the original_status of this ChaseOrder. + + Raw status enum # noqa: E501 + + :param original_status: The original_status of this ChaseOrder. # noqa: E501 + :type: int + """ + + self._original_status = original_status + + @property + def status(self): + """Gets the status of this ChaseOrder. # noqa: E501 + + Simplified status, e.g. open / finished # noqa: E501 + + :return: The status of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ChaseOrder. + + Simplified status, e.g. open / finished # noqa: E501 + + :param status: The status of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def reason(self): + """Gets the reason of this ChaseOrder. # noqa: E501 + + + :return: The reason of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this ChaseOrder. + + + :param reason: The reason of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def fill_amount(self): + """Gets the fill_amount of this ChaseOrder. # noqa: E501 + + + :return: The fill_amount of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._fill_amount + + @fill_amount.setter + def fill_amount(self, fill_amount): + """Sets the fill_amount of this ChaseOrder. + + + :param fill_amount: The fill_amount of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._fill_amount = fill_amount + + @property + def average_fill_price(self): + """Gets the average_fill_price of this ChaseOrder. # noqa: E501 + + + :return: The average_fill_price of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._average_fill_price + + @average_fill_price.setter + def average_fill_price(self, average_fill_price): + """Sets the average_fill_price of this ChaseOrder. + + + :param average_fill_price: The average_fill_price of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._average_fill_price = average_fill_price + + @property + def suborder_id(self): + """Gets the suborder_id of this ChaseOrder. # noqa: E501 + + + :return: The suborder_id of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._suborder_id + + @suborder_id.setter + def suborder_id(self, suborder_id): + """Sets the suborder_id of this ChaseOrder. + + + :param suborder_id: The suborder_id of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._suborder_id = suborder_id + + @property + def is_dual_mode(self): + """Gets the is_dual_mode of this ChaseOrder. # noqa: E501 + + + :return: The is_dual_mode of this ChaseOrder. # noqa: E501 + :rtype: bool + """ + return self._is_dual_mode + + @is_dual_mode.setter + def is_dual_mode(self, is_dual_mode): + """Sets the is_dual_mode of this ChaseOrder. + + + :param is_dual_mode: The is_dual_mode of this ChaseOrder. # noqa: E501 + :type: bool + """ + + self._is_dual_mode = is_dual_mode + + @property + def side_label(self): + """Gets the side_label of this ChaseOrder. # noqa: E501 + + + :return: The side_label of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._side_label + + @side_label.setter + def side_label(self, side_label): + """Sets the side_label of this ChaseOrder. + + + :param side_label: The side_label of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._side_label = side_label + + @property + def position_side_output(self): + """Gets the position_side_output of this ChaseOrder. # noqa: E501 + + + :return: The position_side_output of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._position_side_output + + @position_side_output.setter + def position_side_output(self, position_side_output): + """Sets the position_side_output of this ChaseOrder. + + + :param position_side_output: The position_side_output of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._position_side_output = position_side_output + + @property + def chase_price(self): + """Gets the chase_price of this ChaseOrder. # noqa: E501 + + + :return: The chase_price of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._chase_price + + @chase_price.setter + def chase_price(self, chase_price): + """Sets the chase_price of this ChaseOrder. + + + :param chase_price: The chase_price of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._chase_price = chase_price + + @property + def interval_sec(self): + """Gets the interval_sec of this ChaseOrder. # noqa: E501 + + + :return: The interval_sec of this ChaseOrder. # noqa: E501 + :rtype: int + """ + return self._interval_sec + + @interval_sec.setter + def interval_sec(self, interval_sec): + """Sets the interval_sec of this ChaseOrder. + + + :param interval_sec: The interval_sec of this ChaseOrder. # noqa: E501 + :type: int + """ + + self._interval_sec = interval_sec + + @property + def updated_at(self): + """Gets the updated_at of this ChaseOrder. # noqa: E501 + + + :return: The updated_at of this ChaseOrder. # noqa: E501 + :rtype: int + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ChaseOrder. + + + :param updated_at: The updated_at of this ChaseOrder. # noqa: E501 + :type: int + """ + + self._updated_at = updated_at + + @property + def suborder_price(self): + """Gets the suborder_price of this ChaseOrder. # noqa: E501 + + + :return: The suborder_price of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._suborder_price + + @suborder_price.setter + def suborder_price(self, suborder_price): + """Sets the suborder_price of this ChaseOrder. + + + :param suborder_price: The suborder_price of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._suborder_price = suborder_price + + @property + def suborder_ongoing(self): + """Gets the suborder_ongoing of this ChaseOrder. # noqa: E501 + + + :return: The suborder_ongoing of this ChaseOrder. # noqa: E501 + :rtype: bool + """ + return self._suborder_ongoing + + @suborder_ongoing.setter + def suborder_ongoing(self, suborder_ongoing): + """Sets the suborder_ongoing of this ChaseOrder. + + + :param suborder_ongoing: The suborder_ongoing of this ChaseOrder. # noqa: E501 + :type: bool + """ + + self._suborder_ongoing = suborder_ongoing + + @property + def suborder_finish_as(self): + """Gets the suborder_finish_as of this ChaseOrder. # noqa: E501 + + + :return: The suborder_finish_as of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._suborder_finish_as + + @suborder_finish_as.setter + def suborder_finish_as(self, suborder_finish_as): + """Sets the suborder_finish_as of this ChaseOrder. + + + :param suborder_finish_as: The suborder_finish_as of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._suborder_finish_as = suborder_finish_as + + @property + def price_type(self): + """Gets the price_type of this ChaseOrder. # noqa: E501 + + PriceType enum: 1 latest, 2 index, 3 mark # noqa: E501 + + :return: The price_type of this ChaseOrder. # noqa: E501 + :rtype: int + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this ChaseOrder. + + PriceType enum: 1 latest, 2 index, 3 mark # noqa: E501 + + :param price_type: The price_type of this ChaseOrder. # noqa: E501 + :type: int + """ + + self._price_type = price_type + + @property + def price_gap_type(self): + """Gets the price_gap_type of this ChaseOrder. # noqa: E501 + + + :return: The price_gap_type of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._price_gap_type + + @price_gap_type.setter + def price_gap_type(self, price_gap_type): + """Sets the price_gap_type of this ChaseOrder. + + + :param price_gap_type: The price_gap_type of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._price_gap_type = price_gap_type + + @property + def price_gap_value(self): + """Gets the price_gap_value of this ChaseOrder. # noqa: E501 + + + :return: The price_gap_value of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._price_gap_value + + @price_gap_value.setter + def price_gap_value(self, price_gap_value): + """Sets the price_gap_value of this ChaseOrder. + + + :param price_gap_value: The price_gap_value of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._price_gap_value = price_gap_value + + @property + def status_code(self): + """Gets the status_code of this ChaseOrder. # noqa: E501 + + + :return: The status_code of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._status_code + + @status_code.setter + def status_code(self, status_code): + """Sets the status_code of this ChaseOrder. + + + :param status_code: The status_code of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._status_code = status_code + + @property + def create_time_precise(self): + """Gets the create_time_precise of this ChaseOrder. # noqa: E501 + + Creation time (seconds.microseconds) # noqa: E501 + + :return: The create_time_precise of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._create_time_precise + + @create_time_precise.setter + def create_time_precise(self, create_time_precise): + """Sets the create_time_precise of this ChaseOrder. + + Creation time (seconds.microseconds) # noqa: E501 + + :param create_time_precise: The create_time_precise of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._create_time_precise = create_time_precise + + @property + def finish_time_precise(self): + """Gets the finish_time_precise of this ChaseOrder. # noqa: E501 + + + :return: The finish_time_precise of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._finish_time_precise + + @finish_time_precise.setter + def finish_time_precise(self, finish_time_precise): + """Sets the finish_time_precise of this ChaseOrder. + + + :param finish_time_precise: The finish_time_precise of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._finish_time_precise = finish_time_precise + + @property + def pos_margin_mode(self): + """Gets the pos_margin_mode of this ChaseOrder. # noqa: E501 + + + :return: The pos_margin_mode of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._pos_margin_mode + + @pos_margin_mode.setter + def pos_margin_mode(self, pos_margin_mode): + """Sets the pos_margin_mode of this ChaseOrder. + + + :param pos_margin_mode: The pos_margin_mode of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._pos_margin_mode = pos_margin_mode + + @property + def position_mode(self): + """Gets the position_mode of this ChaseOrder. # noqa: E501 + + + :return: The position_mode of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._position_mode + + @position_mode.setter + def position_mode(self, position_mode): + """Sets the position_mode of this ChaseOrder. + + + :param position_mode: The position_mode of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._position_mode = position_mode + + @property + def leverage(self): + """Gets the leverage of this ChaseOrder. # noqa: E501 + + + :return: The leverage of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this ChaseOrder. + + + :param leverage: The leverage of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def error_label(self): + """Gets the error_label of this ChaseOrder. # noqa: E501 + + + :return: The error_label of this ChaseOrder. # noqa: E501 + :rtype: str + """ + return self._error_label + + @error_label.setter + def error_label(self, error_label): + """Sets the error_label of this ChaseOrder. + + + :param error_label: The error_label of this ChaseOrder. # noqa: E501 + :type: str + """ + + self._error_label = error_label + + 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, ChaseOrder): + 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, ChaseOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/claim_reward_error.py b/gate_api/models/claim_reward_error.py new file mode 100644 index 00000000..8ec448d3 --- /dev/null +++ b/gate_api/models/claim_reward_error.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 ClaimRewardError(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 = { + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'label': 'label', + 'message': 'message' + } + + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """ClaimRewardError - 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._label = None + self._message = None + self.discriminator = None + + if label is not None: + self.label = label + if message is not None: + self.message = message + + @property + def label(self): + """Gets the label of this ClaimRewardError. # noqa: E501 + + Error identifier code # noqa: E501 + + :return: The label of this ClaimRewardError. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ClaimRewardError. + + Error identifier code # noqa: E501 + + :param label: The label of this ClaimRewardError. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ClaimRewardError. # noqa: E501 + + Error details # noqa: E501 + + :return: The message of this ClaimRewardError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ClaimRewardError. + + Error details # noqa: E501 + + :param message: The message of this ClaimRewardError. # 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, ClaimRewardError): + 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, ClaimRewardError): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/structured_buy.py b/gate_api/models/claim_task_error.py similarity index 64% rename from gate_api/models/structured_buy.py rename to gate_api/models/claim_task_error.py index 285adf7d..2392fe7e 100644 --- a/gate_api/models/structured_buy.py +++ b/gate_api/models/claim_task_error.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class StructuredBuy(object): +class ClaimTaskError(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,76 +33,76 @@ class StructuredBuy(object): and the value is json key in definition. """ openapi_types = { - 'pid': 'str', - 'amount': 'str' + 'label': 'str', + 'message': 'str' } attribute_map = { - 'pid': 'pid', - 'amount': 'amount' + 'label': 'label', + 'message': 'message' } - def __init__(self, pid=None, amount=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """StructuredBuy - a model defined in OpenAPI""" # noqa: E501 + """ClaimTaskError - 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._label = None + self._message = None self.discriminator = None - if pid is not None: - self.pid = pid - if amount is not None: - self.amount = amount + if label is not None: + self.label = label + if message is not None: + self.message = message @property - def pid(self): - """Gets the pid of this StructuredBuy. # noqa: E501 + def label(self): + """Gets the label of this ClaimTaskError. # noqa: E501 - Product ID # noqa: E501 + Error identifier code # noqa: E501 - :return: The pid of this StructuredBuy. # noqa: E501 + :return: The label of this ClaimTaskError. # noqa: E501 :rtype: str """ - return self._pid + return self._label - @pid.setter - def pid(self, pid): - """Sets the pid of this StructuredBuy. + @label.setter + def label(self, label): + """Sets the label of this ClaimTaskError. - Product ID # noqa: E501 + Error identifier code # noqa: E501 - :param pid: The pid of this StructuredBuy. # noqa: E501 + :param label: The label of this ClaimTaskError. # noqa: E501 :type: str """ - self._pid = pid + self._label = label @property - def amount(self): - """Gets the amount of this StructuredBuy. # noqa: E501 + def message(self): + """Gets the message of this ClaimTaskError. # noqa: E501 - Buy Quantity # noqa: E501 + Error details # noqa: E501 - :return: The amount of this StructuredBuy. # noqa: E501 + :return: The message of this ClaimTaskError. # noqa: E501 :rtype: str """ - return self._amount + return self._message - @amount.setter - def amount(self, amount): - """Sets the amount of this StructuredBuy. + @message.setter + def message(self, message): + """Sets the message of this ClaimTaskError. - Buy Quantity # noqa: E501 + Error details # noqa: E501 - :param amount: The amount of this StructuredBuy. # noqa: E501 + :param message: The message of this ClaimTaskError. # noqa: E501 :type: str """ - self._amount = amount + self._message = message def to_dict(self): """Returns the model properties as a dict""" @@ -138,14 +138,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, StructuredBuy): + if not isinstance(other, ClaimTaskError): 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): + if not isinstance(other, ClaimTaskError): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/confirm_payment.py b/gate_api/models/confirm_payment.py index 2056464b..9f0d48c6 100644 --- a/gate_api/models/confirm_payment.py +++ b/gate_api/models/confirm_payment.py @@ -33,56 +33,60 @@ class ConfirmPayment(object): and the value is json key in definition. """ openapi_types = { - 'trade_id': 'str', + 'txid': 'str', 'payment_method': 'str' } attribute_map = { - 'trade_id': 'trade_id', + 'txid': 'txid', 'payment_method': 'payment_method' } - def __init__(self, trade_id=None, payment_method=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, txid=None, payment_method=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None """ConfirmPayment - 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._trade_id = None + self._txid = None self._payment_method = None self.discriminator = None - self.trade_id = trade_id - self.payment_method = payment_method + self.txid = txid + if payment_method is not None: + self.payment_method = payment_method @property - def trade_id(self): - """Gets the trade_id of this ConfirmPayment. # noqa: E501 + def txid(self): + """Gets the txid of this ConfirmPayment. # noqa: E501 + Order ID # noqa: E501 - :return: The trade_id of this ConfirmPayment. # noqa: E501 + :return: The txid of this ConfirmPayment. # noqa: E501 :rtype: str """ - return self._trade_id + return self._txid - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this ConfirmPayment. + @txid.setter + def txid(self, txid): + """Sets the txid of this ConfirmPayment. + Order ID # noqa: E501 - :param trade_id: The trade_id of this ConfirmPayment. # noqa: E501 + :param txid: The txid of this ConfirmPayment. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and trade_id is None: # noqa: E501 - raise ValueError("Invalid value for `trade_id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and txid is None: # noqa: E501 + raise ValueError("Invalid value for `txid`, must not be `None`") # noqa: E501 - self._trade_id = trade_id + self._txid = txid @property def payment_method(self): """Gets the payment_method of this ConfirmPayment. # noqa: E501 + Payment type used for this payment; optional but must be among order-supported types. Use `supported_pay_types` on the order or `pay_type` list, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 :return: The payment_method of this ConfirmPayment. # noqa: E501 :rtype: str @@ -93,12 +97,11 @@ def payment_method(self): def payment_method(self, payment_method): """Sets the payment_method of this ConfirmPayment. + Payment type used for this payment; optional but must be among order-supported types. Use `supported_pay_types` on the order or `pay_type` list, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 :param payment_method: The payment_method of this ConfirmPayment. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and payment_method is None: # noqa: E501 - raise ValueError("Invalid value for `payment_method`, must not be `None`") # noqa: E501 self._payment_method = payment_method diff --git a/gate_api/models/confirm_receipt.py b/gate_api/models/confirm_receipt.py index 061507ff..6b486cc4 100644 --- a/gate_api/models/confirm_receipt.py +++ b/gate_api/models/confirm_receipt.py @@ -33,47 +33,49 @@ class ConfirmReceipt(object): and the value is json key in definition. """ openapi_types = { - 'trade_id': 'str' + 'txid': 'str' } attribute_map = { - 'trade_id': 'trade_id' + 'txid': 'txid' } - def __init__(self, trade_id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, txid=None, local_vars_configuration=None): # noqa: E501 # type: (str, Configuration) -> None """ConfirmReceipt - 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._trade_id = None + self._txid = None self.discriminator = None - self.trade_id = trade_id + self.txid = txid @property - def trade_id(self): - """Gets the trade_id of this ConfirmReceipt. # noqa: E501 + def txid(self): + """Gets the txid of this ConfirmReceipt. # noqa: E501 + Order ID # noqa: E501 - :return: The trade_id of this ConfirmReceipt. # noqa: E501 + :return: The txid of this ConfirmReceipt. # noqa: E501 :rtype: str """ - return self._trade_id + return self._txid - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this ConfirmReceipt. + @txid.setter + def txid(self, txid): + """Sets the txid of this ConfirmReceipt. + Order ID # noqa: E501 - :param trade_id: The trade_id of this ConfirmReceipt. # noqa: E501 + :param txid: The txid of this ConfirmReceipt. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and trade_id is None: # noqa: E501 - raise ValueError("Invalid value for `trade_id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and txid is None: # noqa: E501 + raise ValueError("Invalid value for `txid`, must not be `None`") # noqa: E501 - self._trade_id = trade_id + self._txid = txid def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index 207fe994..c770abd6 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -51,6 +51,7 @@ class Contract(object): 'funding_interval': 'int', 'funding_next_apply': 'float', 'risk_limit_base': 'str', + 'interest_rate': 'str', 'risk_limit_step': 'str', 'risk_limit_max': 'str', 'order_size_min': 'str', @@ -77,7 +78,9 @@ class Contract(object): 'market_order_slip_ratio': 'str', 'market_order_size_max': 'str', 'funding_rate_limit': 'str', - 'funding_impact_value': 'str' + 'contract_type': 'str', + 'funding_impact_value': 'str', + 'enable_circuit_breaker': 'bool' } attribute_map = { @@ -99,6 +102,7 @@ class Contract(object): 'funding_interval': 'funding_interval', 'funding_next_apply': 'funding_next_apply', 'risk_limit_base': 'risk_limit_base', + 'interest_rate': 'interest_rate', 'risk_limit_step': 'risk_limit_step', 'risk_limit_max': 'risk_limit_max', 'order_size_min': 'order_size_min', @@ -125,11 +129,13 @@ class Contract(object): 'market_order_slip_ratio': 'market_order_slip_ratio', 'market_order_size_max': 'market_order_size_max', 'funding_rate_limit': 'funding_rate_limit', - 'funding_impact_value': 'funding_impact_value' + 'contract_type': 'contract_type', + 'funding_impact_value': 'funding_impact_value', + 'enable_circuit_breaker': 'enable_circuit_breaker' } - 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, enable_decimal=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, market_order_slip_ratio=None, market_order_size_max=None, funding_rate_limit=None, funding_impact_value=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, str, bool, str, str, str, str, int, int, str, str, float, bool, int, bool, bool, float, str, str, int, int, int, str, str, str, str, 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, interest_rate=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, enable_decimal=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, market_order_slip_ratio=None, market_order_size_max=None, funding_rate_limit=None, contract_type=None, funding_impact_value=None, enable_circuit_breaker=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, str, str, bool, str, str, str, str, int, int, str, str, float, bool, int, bool, bool, float, str, str, int, int, int, str, str, str, str, str, bool, Configuration) -> None """Contract - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -153,6 +159,7 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No self._funding_interval = None self._funding_next_apply = None self._risk_limit_base = None + self._interest_rate = None self._risk_limit_step = None self._risk_limit_max = None self._order_size_min = None @@ -179,7 +186,9 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No self._market_order_slip_ratio = None self._market_order_size_max = None self._funding_rate_limit = None + self._contract_type = None self._funding_impact_value = None + self._enable_circuit_breaker = None self.discriminator = None if name is not None: @@ -218,6 +227,8 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No self.funding_next_apply = funding_next_apply if risk_limit_base is not None: self.risk_limit_base = risk_limit_base + if interest_rate is not None: + self.interest_rate = interest_rate if risk_limit_step is not None: self.risk_limit_step = risk_limit_step if risk_limit_max is not None: @@ -270,8 +281,12 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No self.market_order_size_max = market_order_size_max if funding_rate_limit is not None: self.funding_rate_limit = funding_rate_limit + if contract_type is not None: + self.contract_type = contract_type if funding_impact_value is not None: self.funding_impact_value = funding_impact_value + if enable_circuit_breaker is not None: + self.enable_circuit_breaker = enable_circuit_breaker @property def name(self): @@ -699,6 +714,29 @@ def risk_limit_base(self, risk_limit_base): self._risk_limit_base = risk_limit_base + @property + def interest_rate(self): + """Gets the interest_rate of this Contract. # noqa: E501 + + Interest rate parameter used in funding rate and premium-related calculations for perpetual contracts. Returned as a string decimal ratio (e.g. `0.0003`), same convention as `funding_rate` (ratio, not percent). # noqa: E501 + + :return: The interest_rate of this Contract. # noqa: E501 + :rtype: str + """ + return self._interest_rate + + @interest_rate.setter + def interest_rate(self, interest_rate): + """Sets the interest_rate of this Contract. + + Interest rate parameter used in funding rate and premium-related calculations for perpetual contracts. Returned as a string decimal ratio (e.g. `0.0003`), same convention as `funding_rate` (ratio, not percent). # noqa: E501 + + :param interest_rate: The interest_rate of this Contract. # noqa: E501 + :type: str + """ + + self._interest_rate = interest_rate + @property def risk_limit_step(self): """Gets the risk_limit_step of this Contract. # noqa: E501 @@ -1297,6 +1335,29 @@ def funding_rate_limit(self, funding_rate_limit): self._funding_rate_limit = funding_rate_limit + @property + def contract_type(self): + """Gets the contract_type of this Contract. # noqa: E501 + + Contract classification type, e.g. stocks, metals, indices, forex, commodities, etc. # noqa: E501 + + :return: The contract_type of this Contract. # noqa: E501 + :rtype: str + """ + return self._contract_type + + @contract_type.setter + def contract_type(self, contract_type): + """Sets the contract_type of this Contract. + + Contract classification type, e.g. stocks, metals, indices, forex, commodities, etc. # noqa: E501 + + :param contract_type: The contract_type of this Contract. # noqa: E501 + :type: str + """ + + self._contract_type = contract_type + @property def funding_impact_value(self): """Gets the funding_impact_value of this Contract. # noqa: E501 @@ -1320,6 +1381,29 @@ def funding_impact_value(self, funding_impact_value): self._funding_impact_value = funding_impact_value + @property + def enable_circuit_breaker(self): + """Gets the enable_circuit_breaker of this Contract. # noqa: E501 + + Whether the newly launched contract activates mark price circuit breaker (If the platform intends to activate this mechanism for a newly launched contract market to prevent significant price fluctuations and excessive liquidations after launch, an advance announcement will be made). # noqa: E501 + + :return: The enable_circuit_breaker of this Contract. # noqa: E501 + :rtype: bool + """ + return self._enable_circuit_breaker + + @enable_circuit_breaker.setter + def enable_circuit_breaker(self, enable_circuit_breaker): + """Sets the enable_circuit_breaker of this Contract. + + Whether the newly launched contract activates mark price circuit breaker (If the platform intends to activate this mechanism for a newly launched contract market to prevent significant price fluctuations and excessive liquidations after launch, an advance announcement will be made). # noqa: E501 + + :param enable_circuit_breaker: The enable_circuit_breaker of this Contract. # noqa: E501 + :type: bool + """ + + self._enable_circuit_breaker = enable_circuit_breaker + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/contract_martingale_create_params.py b/gate_api/models/contract_martingale_create_params.py new file mode 100644 index 00000000..61745acb --- /dev/null +++ b/gate_api/models/contract_martingale_create_params.py @@ -0,0 +1,316 @@ +# 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 ContractMartingaleCreateParams(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 = { + 'invest_amount': 'str', + 'price_deviation': 'str', + 'max_orders': 'int', + 'take_profit_ratio': 'str', + 'direction': 'ContractMartingaleDirection', + 'leverage': 'str', + 'stop_loss_price': 'str', + 'profit_sharing_ratio': 'str' + } + + attribute_map = { + 'invest_amount': 'invest_amount', + 'price_deviation': 'price_deviation', + 'max_orders': 'max_orders', + 'take_profit_ratio': 'take_profit_ratio', + 'direction': 'direction', + 'leverage': 'leverage', + 'stop_loss_price': 'stop_loss_price', + 'profit_sharing_ratio': 'profit_sharing_ratio' + } + + def __init__(self, invest_amount=None, price_deviation=None, max_orders=None, take_profit_ratio=None, direction=None, leverage=None, stop_loss_price=None, profit_sharing_ratio=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, str, ContractMartingaleDirection, str, str, str, Configuration) -> None + """ContractMartingaleCreateParams - 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._invest_amount = None + self._price_deviation = None + self._max_orders = None + self._take_profit_ratio = None + self._direction = None + self._leverage = None + self._stop_loss_price = None + self._profit_sharing_ratio = None + self.discriminator = None + + self.invest_amount = invest_amount + self.price_deviation = price_deviation + self.max_orders = max_orders + self.take_profit_ratio = take_profit_ratio + self.direction = direction + self.leverage = leverage + if stop_loss_price is not None: + self.stop_loss_price = stop_loss_price + if profit_sharing_ratio is not None: + self.profit_sharing_ratio = profit_sharing_ratio + + @property + def invest_amount(self): + """Gets the invest_amount of this ContractMartingaleCreateParams. # noqa: E501 + + Margin allocated; the server converts it to initial contract size using live contract price, contract multiplier, and minimum lot size. # noqa: E501 + + :return: The invest_amount of this ContractMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._invest_amount + + @invest_amount.setter + def invest_amount(self, invest_amount): + """Sets the invest_amount of this ContractMartingaleCreateParams. + + Margin allocated; the server converts it to initial contract size using live contract price, contract multiplier, and minimum lot size. # noqa: E501 + + :param invest_amount: The invest_amount of this ContractMartingaleCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and invest_amount is None: # noqa: E501 + raise ValueError("Invalid value for `invest_amount`, must not be `None`") # noqa: E501 + + self._invest_amount = invest_amount + + @property + def price_deviation(self): + """Gets the price_deviation of this ContractMartingaleCreateParams. # noqa: E501 + + + :return: The price_deviation of this ContractMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._price_deviation + + @price_deviation.setter + def price_deviation(self, price_deviation): + """Sets the price_deviation of this ContractMartingaleCreateParams. + + + :param price_deviation: The price_deviation of this ContractMartingaleCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price_deviation is None: # noqa: E501 + raise ValueError("Invalid value for `price_deviation`, must not be `None`") # noqa: E501 + + self._price_deviation = price_deviation + + @property + def max_orders(self): + """Gets the max_orders of this ContractMartingaleCreateParams. # noqa: E501 + + + :return: The max_orders of this ContractMartingaleCreateParams. # noqa: E501 + :rtype: int + """ + return self._max_orders + + @max_orders.setter + def max_orders(self, max_orders): + """Sets the max_orders of this ContractMartingaleCreateParams. + + + :param max_orders: The max_orders of this ContractMartingaleCreateParams. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and max_orders is None: # noqa: E501 + raise ValueError("Invalid value for `max_orders`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + max_orders is not None and max_orders < 1): # noqa: E501 + raise ValueError("Invalid value for `max_orders`, must be a value greater than or equal to `1`") # noqa: E501 + + self._max_orders = max_orders + + @property + def take_profit_ratio(self): + """Gets the take_profit_ratio of this ContractMartingaleCreateParams. # noqa: E501 + + + :return: The take_profit_ratio of this ContractMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._take_profit_ratio + + @take_profit_ratio.setter + def take_profit_ratio(self, take_profit_ratio): + """Sets the take_profit_ratio of this ContractMartingaleCreateParams. + + + :param take_profit_ratio: The take_profit_ratio of this ContractMartingaleCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and take_profit_ratio is None: # noqa: E501 + raise ValueError("Invalid value for `take_profit_ratio`, must not be `None`") # noqa: E501 + + self._take_profit_ratio = take_profit_ratio + + @property + def direction(self): + """Gets the direction of this ContractMartingaleCreateParams. # noqa: E501 + + + :return: The direction of this ContractMartingaleCreateParams. # noqa: E501 + :rtype: ContractMartingaleDirection + """ + return self._direction + + @direction.setter + def direction(self, direction): + """Sets the direction of this ContractMartingaleCreateParams. + + + :param direction: The direction of this ContractMartingaleCreateParams. # noqa: E501 + :type: ContractMartingaleDirection + """ + 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 leverage(self): + """Gets the leverage of this ContractMartingaleCreateParams. # noqa: E501 + + + :return: The leverage of this ContractMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this ContractMartingaleCreateParams. + + + :param leverage: The leverage of this ContractMartingaleCreateParams. # 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 + + @property + def stop_loss_price(self): + """Gets the stop_loss_price of this ContractMartingaleCreateParams. # noqa: E501 + + Legacy field name. The AIHub `contract_martingale` creation path does not map this field today; follow contract martingale rules from the underlying API. MCP tooling must match bot-service behavior. # noqa: E501 + + :return: The stop_loss_price of this ContractMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_loss_price + + @stop_loss_price.setter + def stop_loss_price(self, stop_loss_price): + """Sets the stop_loss_price of this ContractMartingaleCreateParams. + + Legacy field name. The AIHub `contract_martingale` creation path does not map this field today; follow contract martingale rules from the underlying API. MCP tooling must match bot-service behavior. # noqa: E501 + + :param stop_loss_price: The stop_loss_price of this ContractMartingaleCreateParams. # noqa: E501 + :type: str + """ + + self._stop_loss_price = stop_loss_price + + @property + def profit_sharing_ratio(self): + """Gets the profit_sharing_ratio of this ContractMartingaleCreateParams. # noqa: E501 + + + :return: The profit_sharing_ratio of this ContractMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._profit_sharing_ratio + + @profit_sharing_ratio.setter + def profit_sharing_ratio(self, profit_sharing_ratio): + """Sets the profit_sharing_ratio of this ContractMartingaleCreateParams. + + + :param profit_sharing_ratio: The profit_sharing_ratio of this ContractMartingaleCreateParams. # noqa: E501 + :type: str + """ + + self._profit_sharing_ratio = profit_sharing_ratio + + 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, ContractMartingaleCreateParams): + 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, ContractMartingaleCreateParams): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/contract_martingale_create_request.py b/gate_api/models/contract_martingale_create_request.py new file mode 100644 index 00000000..2a7ed095 --- /dev/null +++ b/gate_api/models/contract_martingale_create_request.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 ContractMartingaleCreateRequest(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 = { + 'strategy_type': 'str', + 'market': 'str', + 'create_params': 'ContractMartingaleCreateParams' + } + + attribute_map = { + 'strategy_type': 'strategy_type', + 'market': 'market', + 'create_params': 'create_params' + } + + def __init__(self, strategy_type=None, market=None, create_params=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, ContractMartingaleCreateParams, Configuration) -> None + """ContractMartingaleCreateRequest - 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._strategy_type = None + self._market = None + self._create_params = None + self.discriminator = None + + self.strategy_type = strategy_type + self.market = market + self.create_params = create_params + + @property + def strategy_type(self): + """Gets the strategy_type of this ContractMartingaleCreateRequest. # noqa: E501 + + + :return: The strategy_type of this ContractMartingaleCreateRequest. # noqa: E501 + :rtype: str + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this ContractMartingaleCreateRequest. + + + :param strategy_type: The strategy_type of this ContractMartingaleCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + allowed_values = ["contract_martingale"] # 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}" # noqa: E501 + .format(strategy_type, allowed_values) + ) + + self._strategy_type = strategy_type + + @property + def market(self): + """Gets the market of this ContractMartingaleCreateRequest. # noqa: E501 + + + :return: The market of this ContractMartingaleCreateRequest. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this ContractMartingaleCreateRequest. + + + :param market: The market of this ContractMartingaleCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def create_params(self): + """Gets the create_params of this ContractMartingaleCreateRequest. # noqa: E501 + + + :return: The create_params of this ContractMartingaleCreateRequest. # noqa: E501 + :rtype: ContractMartingaleCreateParams + """ + return self._create_params + + @create_params.setter + def create_params(self, create_params): + """Sets the create_params of this ContractMartingaleCreateRequest. + + + :param create_params: The create_params of this ContractMartingaleCreateRequest. # noqa: E501 + :type: ContractMartingaleCreateParams + """ + if self.local_vars_configuration.client_side_validation and create_params is None: # noqa: E501 + raise ValueError("Invalid value for `create_params`, must not be `None`") # noqa: E501 + + self._create_params = create_params + + 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, ContractMartingaleCreateRequest): + 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, ContractMartingaleCreateRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/contract_martingale_direction.py b/gate_api/models/contract_martingale_direction.py new file mode 100644 index 00000000..7dcc56e8 --- /dev/null +++ b/gate_api/models/contract_martingale_direction.py @@ -0,0 +1,101 @@ +# 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 ContractMartingaleDirection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + BUY = "buy" + SELL = "sell" + + allowable_values = [BUY, SELL] # noqa: E501 + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + # type: (Configuration) -> None + """ContractMartingaleDirection - 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.discriminator = None + + 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, ContractMartingaleDirection): + 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, ContractMartingaleDirection): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py index 11d37d04..6c2adfb8 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -39,14 +39,24 @@ class ContractStat(object): 'long_liq_size': 'str', 'long_liq_amount': 'float', 'long_liq_usd': 'float', + 'long_liq_usd_new': 'float', 'short_liq_size': 'str', 'short_liq_amount': 'float', 'short_liq_usd': 'float', + 'short_liq_usd_new': 'float', 'open_interest': 'str', 'open_interest_usd': 'float', 'top_lsr_account': 'float', 'top_lsr_size': 'str', - 'mark_price': 'float' + 'mark_price': 'float', + 'top_long_size': 'str', + 'top_short_size': 'str', + 'long_taker_size': 'str', + 'short_taker_size': 'str', + 'top_long_account': 'int', + 'top_short_account': 'int', + 'long_users': 'str', + 'short_users': 'str' } attribute_map = { @@ -56,18 +66,28 @@ class ContractStat(object): 'long_liq_size': 'long_liq_size', 'long_liq_amount': 'long_liq_amount', 'long_liq_usd': 'long_liq_usd', + 'long_liq_usd_new': 'long_liq_usd_new', 'short_liq_size': 'short_liq_size', 'short_liq_amount': 'short_liq_amount', 'short_liq_usd': 'short_liq_usd', + 'short_liq_usd_new': 'short_liq_usd_new', 'open_interest': 'open_interest', 'open_interest_usd': 'open_interest_usd', 'top_lsr_account': 'top_lsr_account', 'top_lsr_size': 'top_lsr_size', - 'mark_price': 'mark_price' + 'mark_price': 'mark_price', + 'top_long_size': 'top_long_size', + 'top_short_size': 'top_short_size', + 'long_taker_size': 'long_taker_size', + 'short_taker_size': 'short_taker_size', + 'top_long_account': 'top_long_account', + 'top_short_account': 'top_short_account', + 'long_users': 'long_users', + 'short_users': 'short_users' } - 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, str, float, float, str, float, float, str, float, float, str, 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, long_liq_usd_new=None, short_liq_size=None, short_liq_amount=None, short_liq_usd=None, short_liq_usd_new=None, open_interest=None, open_interest_usd=None, top_lsr_account=None, top_lsr_size=None, mark_price=None, top_long_size=None, top_short_size=None, long_taker_size=None, short_taker_size=None, top_long_account=None, top_short_account=None, long_users=None, short_users=None, local_vars_configuration=None): # noqa: E501 + # type: (int, float, float, str, float, float, float, str, float, float, float, str, float, float, str, float, str, str, str, str, int, int, str, str, Configuration) -> None """ContractStat - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -79,14 +99,24 @@ def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=No self._long_liq_size = None self._long_liq_amount = None self._long_liq_usd = None + self._long_liq_usd_new = None self._short_liq_size = None self._short_liq_amount = None self._short_liq_usd = None + self._short_liq_usd_new = None self._open_interest = None self._open_interest_usd = None self._top_lsr_account = None self._top_lsr_size = None self._mark_price = None + self._top_long_size = None + self._top_short_size = None + self._long_taker_size = None + self._short_taker_size = None + self._top_long_account = None + self._top_short_account = None + self._long_users = None + self._short_users = None self.discriminator = None if time is not None: @@ -101,12 +131,16 @@ def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=No self.long_liq_amount = long_liq_amount if long_liq_usd is not None: self.long_liq_usd = long_liq_usd + if long_liq_usd_new is not None: + self.long_liq_usd_new = long_liq_usd_new if short_liq_size is not None: self.short_liq_size = short_liq_size if short_liq_amount is not None: self.short_liq_amount = short_liq_amount if short_liq_usd is not None: self.short_liq_usd = short_liq_usd + if short_liq_usd_new is not None: + self.short_liq_usd_new = short_liq_usd_new if open_interest is not None: self.open_interest = open_interest if open_interest_usd is not None: @@ -117,6 +151,22 @@ def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=No self.top_lsr_size = top_lsr_size if mark_price is not None: self.mark_price = mark_price + if top_long_size is not None: + self.top_long_size = top_long_size + if top_short_size is not None: + self.top_short_size = top_short_size + if long_taker_size is not None: + self.long_taker_size = long_taker_size + if short_taker_size is not None: + self.short_taker_size = short_taker_size + if top_long_account is not None: + self.top_long_account = top_long_account + if top_short_account is not None: + self.top_short_account = top_short_account + if long_users is not None: + self.long_users = long_users + if short_users is not None: + self.short_users = short_users @property def time(self): @@ -256,6 +306,29 @@ def long_liq_usd(self, long_liq_usd): self._long_liq_usd = long_liq_usd + @property + def long_liq_usd_new(self): + """Gets the long_liq_usd_new of this ContractStat. # noqa: E501 + + Long liquidations in quote currency; USDT settlement: long_liq_size × multiplier × mark price # noqa: E501 + + :return: The long_liq_usd_new of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._long_liq_usd_new + + @long_liq_usd_new.setter + def long_liq_usd_new(self, long_liq_usd_new): + """Sets the long_liq_usd_new of this ContractStat. + + Long liquidations in quote currency; USDT settlement: long_liq_size × multiplier × mark price # noqa: E501 + + :param long_liq_usd_new: The long_liq_usd_new of this ContractStat. # noqa: E501 + :type: float + """ + + self._long_liq_usd_new = long_liq_usd_new + @property def short_liq_size(self): """Gets the short_liq_size of this ContractStat. # noqa: E501 @@ -325,6 +398,29 @@ def short_liq_usd(self, short_liq_usd): self._short_liq_usd = short_liq_usd + @property + def short_liq_usd_new(self): + """Gets the short_liq_usd_new of this ContractStat. # noqa: E501 + + Short liquidations in quote currency; USDT settlement: short_liq_size × multiplier × mark price # noqa: E501 + + :return: The short_liq_usd_new of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._short_liq_usd_new + + @short_liq_usd_new.setter + def short_liq_usd_new(self, short_liq_usd_new): + """Sets the short_liq_usd_new of this ContractStat. + + Short liquidations in quote currency; USDT settlement: short_liq_size × multiplier × mark price # noqa: E501 + + :param short_liq_usd_new: The short_liq_usd_new of this ContractStat. # noqa: E501 + :type: float + """ + + self._short_liq_usd_new = short_liq_usd_new + @property def open_interest(self): """Gets the open_interest of this ContractStat. # noqa: E501 @@ -440,6 +536,190 @@ def mark_price(self, mark_price): self._mark_price = mark_price + @property + def top_long_size(self): + """Gets the top_long_size of this ContractStat. # noqa: E501 + + Top long open interest (contracts) # noqa: E501 + + :return: The top_long_size of this ContractStat. # noqa: E501 + :rtype: str + """ + return self._top_long_size + + @top_long_size.setter + def top_long_size(self, top_long_size): + """Sets the top_long_size of this ContractStat. + + Top long open interest (contracts) # noqa: E501 + + :param top_long_size: The top_long_size of this ContractStat. # noqa: E501 + :type: str + """ + + self._top_long_size = top_long_size + + @property + def top_short_size(self): + """Gets the top_short_size of this ContractStat. # noqa: E501 + + Top short open interest (contracts) # noqa: E501 + + :return: The top_short_size of this ContractStat. # noqa: E501 + :rtype: str + """ + return self._top_short_size + + @top_short_size.setter + def top_short_size(self, top_short_size): + """Sets the top_short_size of this ContractStat. + + Top short open interest (contracts) # noqa: E501 + + :param top_short_size: The top_short_size of this ContractStat. # noqa: E501 + :type: str + """ + + self._top_short_size = top_short_size + + @property + def long_taker_size(self): + """Gets the long_taker_size of this ContractStat. # noqa: E501 + + Long taker trade volume (contracts) # noqa: E501 + + :return: The long_taker_size of this ContractStat. # noqa: E501 + :rtype: str + """ + return self._long_taker_size + + @long_taker_size.setter + def long_taker_size(self, long_taker_size): + """Sets the long_taker_size of this ContractStat. + + Long taker trade volume (contracts) # noqa: E501 + + :param long_taker_size: The long_taker_size of this ContractStat. # noqa: E501 + :type: str + """ + + self._long_taker_size = long_taker_size + + @property + def short_taker_size(self): + """Gets the short_taker_size of this ContractStat. # noqa: E501 + + Short taker trade volume (contracts) # noqa: E501 + + :return: The short_taker_size of this ContractStat. # noqa: E501 + :rtype: str + """ + return self._short_taker_size + + @short_taker_size.setter + def short_taker_size(self, short_taker_size): + """Sets the short_taker_size of this ContractStat. + + Short taker trade volume (contracts) # noqa: E501 + + :param short_taker_size: The short_taker_size of this ContractStat. # noqa: E501 + :type: str + """ + + self._short_taker_size = short_taker_size + + @property + def top_long_account(self): + """Gets the top_long_account of this ContractStat. # noqa: E501 + + Number of top long accounts (large holders) # noqa: E501 + + :return: The top_long_account of this ContractStat. # noqa: E501 + :rtype: int + """ + return self._top_long_account + + @top_long_account.setter + def top_long_account(self, top_long_account): + """Sets the top_long_account of this ContractStat. + + Number of top long accounts (large holders) # noqa: E501 + + :param top_long_account: The top_long_account of this ContractStat. # noqa: E501 + :type: int + """ + + self._top_long_account = top_long_account + + @property + def top_short_account(self): + """Gets the top_short_account of this ContractStat. # noqa: E501 + + Number of top short accounts (large holders) # noqa: E501 + + :return: The top_short_account of this ContractStat. # noqa: E501 + :rtype: int + """ + return self._top_short_account + + @top_short_account.setter + def top_short_account(self, top_short_account): + """Sets the top_short_account of this ContractStat. + + Number of top short accounts (large holders) # noqa: E501 + + :param top_short_account: The top_short_account of this ContractStat. # noqa: E501 + :type: int + """ + + self._top_short_account = top_short_account + + @property + def long_users(self): + """Gets the long_users of this ContractStat. # noqa: E501 + + Number of users holding long positions # noqa: E501 + + :return: The long_users of this ContractStat. # noqa: E501 + :rtype: str + """ + return self._long_users + + @long_users.setter + def long_users(self, long_users): + """Sets the long_users of this ContractStat. + + Number of users holding long positions # noqa: E501 + + :param long_users: The long_users of this ContractStat. # noqa: E501 + :type: str + """ + + self._long_users = long_users + + @property + def short_users(self): + """Gets the short_users of this ContractStat. # noqa: E501 + + Number of users holding short positions # noqa: E501 + + :return: The short_users of this ContractStat. # noqa: E501 + :rtype: str + """ + return self._short_users + + @short_users.setter + def short_users(self, short_users): + """Sets the short_users of this ContractStat. + + Number of users holding short positions # noqa: E501 + + :param short_users: The short_users of this ContractStat. # noqa: E501 + :type: str + """ + + self._short_users = short_users + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/convert_currencies_v2_item.py b/gate_api/models/convert_currencies_v2_item.py new file mode 100644 index 00000000..117f454f --- /dev/null +++ b/gate_api/models/convert_currencies_v2_item.py @@ -0,0 +1,175 @@ +# 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 ConvertCurrenciesV2Item(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 = { + 'icon_url': 'str', + 'name': 'str', + 'priority': 'int' + } + + attribute_map = { + 'icon_url': 'icon_url', + 'name': 'name', + 'priority': 'priority' + } + + def __init__(self, icon_url=None, name=None, priority=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, Configuration) -> None + """ConvertCurrenciesV2Item - 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._icon_url = None + self._name = None + self._priority = None + self.discriminator = None + + if icon_url is not None: + self.icon_url = icon_url + self.name = name + self.priority = priority + + @property + def icon_url(self): + """Gets the icon_url of this ConvertCurrenciesV2Item. # noqa: E501 + + + :return: The icon_url of this ConvertCurrenciesV2Item. # noqa: E501 + :rtype: str + """ + return self._icon_url + + @icon_url.setter + def icon_url(self, icon_url): + """Sets the icon_url of this ConvertCurrenciesV2Item. + + + :param icon_url: The icon_url of this ConvertCurrenciesV2Item. # noqa: E501 + :type: str + """ + + self._icon_url = icon_url + + @property + def name(self): + """Gets the name of this ConvertCurrenciesV2Item. # noqa: E501 + + + :return: The name of this ConvertCurrenciesV2Item. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ConvertCurrenciesV2Item. + + + :param name: The name of this ConvertCurrenciesV2Item. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def priority(self): + """Gets the priority of this ConvertCurrenciesV2Item. # noqa: E501 + + + :return: The priority of this ConvertCurrenciesV2Item. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this ConvertCurrenciesV2Item. + + + :param priority: The priority of this ConvertCurrenciesV2Item. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and priority is None: # noqa: E501 + raise ValueError("Invalid value for `priority`, must not be `None`") # noqa: E501 + + self._priority = priority + + 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, ConvertCurrenciesV2Item): + 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, ConvertCurrenciesV2Item): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_chase_order_req.py b/gate_api/models/create_chase_order_req.py new file mode 100644 index 00000000..ead8008a --- /dev/null +++ b/gate_api/models/create_chase_order_req.py @@ -0,0 +1,462 @@ +# 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 CreateChaseOrderReq(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', + 'settle': 'str', + 'amount': 'str', + 'price_limit': 'str', + 'offset_limit': 'str', + 'reduce_only': 'bool', + 'text': 'str', + 'is_dual_mode': 'bool', + 'price_type': 'int', + 'price_gap_type': 'int', + 'price_gap_value': 'str', + 'pos_margin_mode': 'str', + 'position_mode': 'str' + } + + attribute_map = { + 'contract': 'contract', + 'settle': 'settle', + 'amount': 'amount', + 'price_limit': 'price_limit', + 'offset_limit': 'offset_limit', + 'reduce_only': 'reduce_only', + 'text': 'text', + 'is_dual_mode': 'is_dual_mode', + 'price_type': 'price_type', + 'price_gap_type': 'price_gap_type', + 'price_gap_value': 'price_gap_value', + 'pos_margin_mode': 'pos_margin_mode', + 'position_mode': 'position_mode' + } + + def __init__(self, contract=None, settle=None, amount=None, price_limit=None, offset_limit=None, reduce_only=None, text=None, is_dual_mode=None, price_type=None, price_gap_type=None, price_gap_value=None, pos_margin_mode=None, position_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, bool, str, bool, int, int, str, str, str, Configuration) -> None + """CreateChaseOrderReq - 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._settle = None + self._amount = None + self._price_limit = None + self._offset_limit = None + self._reduce_only = None + self._text = None + self._is_dual_mode = None + self._price_type = None + self._price_gap_type = None + self._price_gap_value = None + self._pos_margin_mode = None + self._position_mode = None + self.discriminator = None + + self.contract = contract + if settle is not None: + self.settle = settle + self.amount = amount + self.price_limit = price_limit + if offset_limit is not None: + self.offset_limit = offset_limit + if reduce_only is not None: + self.reduce_only = reduce_only + if text is not None: + self.text = text + if is_dual_mode is not None: + self.is_dual_mode = is_dual_mode + if price_type is not None: + self.price_type = price_type + if price_gap_type is not None: + self.price_gap_type = price_gap_type + if price_gap_value is not None: + self.price_gap_value = price_gap_value + if pos_margin_mode is not None: + self.pos_margin_mode = pos_margin_mode + if position_mode is not None: + self.position_mode = position_mode + + @property + def contract(self): + """Gets the contract of this CreateChaseOrderReq. # noqa: E501 + + Contract name; server-side converted to uppercase # noqa: E501 + + :return: The contract of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this CreateChaseOrderReq. + + Contract name; server-side converted to uppercase # noqa: E501 + + :param contract: The contract of this CreateChaseOrderReq. # 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 settle(self): + """Gets the settle of this CreateChaseOrderReq. # noqa: E501 + + Settle currency, overridden by the path parameter and converted to lowercase # noqa: E501 + + :return: The settle of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._settle + + @settle.setter + def settle(self, settle): + """Sets the settle of this CreateChaseOrderReq. + + Settle currency, overridden by the path parameter and converted to lowercase # noqa: E501 + + :param settle: The settle of this CreateChaseOrderReq. # noqa: E501 + :type: str + """ + + self._settle = settle + + @property + def amount(self): + """Gets the amount of this CreateChaseOrderReq. # noqa: E501 + + Total order size in contracts, decimal string. Positive for buy, negative for sell. Cannot be 0 # noqa: E501 + + :return: The amount of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CreateChaseOrderReq. + + Total order size in contracts, decimal string. Positive for buy, negative for sell. Cannot be 0 # noqa: E501 + + :param amount: The amount of this CreateChaseOrderReq. # 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_limit(self): + """Gets the price_limit of this CreateChaseOrderReq. # noqa: E501 + + 最高追逐价,合法十进制字符串;未设置限价时请传 \"0\" # noqa: E501 + + :return: The price_limit of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._price_limit + + @price_limit.setter + def price_limit(self, price_limit): + """Sets the price_limit of this CreateChaseOrderReq. + + 最高追逐价,合法十进制字符串;未设置限价时请传 \"0\" # noqa: E501 + + :param price_limit: The price_limit of this CreateChaseOrderReq. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price_limit is None: # noqa: E501 + raise ValueError("Invalid value for `price_limit`, must not be `None`") # noqa: E501 + + self._price_limit = price_limit + + @property + def offset_limit(self): + """Gets the offset_limit of this CreateChaseOrderReq. # noqa: E501 + + Maximum chasing distance from the best price, mutually exclusive with price_limit # noqa: E501 + + :return: The offset_limit of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._offset_limit + + @offset_limit.setter + def offset_limit(self, offset_limit): + """Sets the offset_limit of this CreateChaseOrderReq. + + Maximum chasing distance from the best price, mutually exclusive with price_limit # noqa: E501 + + :param offset_limit: The offset_limit of this CreateChaseOrderReq. # noqa: E501 + :type: str + """ + + self._offset_limit = offset_limit + + @property + def reduce_only(self): + """Gets the reduce_only of this CreateChaseOrderReq. # noqa: E501 + + Whether reduce only # noqa: E501 + + :return: The reduce_only of this CreateChaseOrderReq. # noqa: E501 + :rtype: bool + """ + return self._reduce_only + + @reduce_only.setter + def reduce_only(self, reduce_only): + """Sets the reduce_only of this CreateChaseOrderReq. + + Whether reduce only # noqa: E501 + + :param reduce_only: The reduce_only of this CreateChaseOrderReq. # noqa: E501 + :type: bool + """ + + self._reduce_only = reduce_only + + @property + def text(self): + """Gets the text of this CreateChaseOrderReq. # noqa: E501 + + Optional custom tag # noqa: E501 + + :return: The text of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this CreateChaseOrderReq. + + Optional custom tag # noqa: E501 + + :param text: The text of this CreateChaseOrderReq. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def is_dual_mode(self): + """Gets the is_dual_mode of this CreateChaseOrderReq. # noqa: E501 + + Whether dual-position mode is enabled # noqa: E501 + + :return: The is_dual_mode of this CreateChaseOrderReq. # noqa: E501 + :rtype: bool + """ + return self._is_dual_mode + + @is_dual_mode.setter + def is_dual_mode(self, is_dual_mode): + """Sets the is_dual_mode of this CreateChaseOrderReq. + + Whether dual-position mode is enabled # noqa: E501 + + :param is_dual_mode: The is_dual_mode of this CreateChaseOrderReq. # noqa: E501 + :type: bool + """ + + self._is_dual_mode = is_dual_mode + + @property + def price_type(self): + """Gets the price_type of this CreateChaseOrderReq. # noqa: E501 + + Price type: 1 best bid/ask, 2 distance from best bid/ask # noqa: E501 + + :return: The price_type of this CreateChaseOrderReq. # noqa: E501 + :rtype: int + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this CreateChaseOrderReq. + + Price type: 1 best bid/ask, 2 distance from best bid/ask # noqa: E501 + + :param price_type: The price_type of this CreateChaseOrderReq. # noqa: E501 + :type: int + """ + + self._price_type = price_type + + @property + def price_gap_type(self): + """Gets the price_gap_type of this CreateChaseOrderReq. # noqa: E501 + + Used when price_type == 2: 1 absolute price gap, 2 percentage # noqa: E501 + + :return: The price_gap_type of this CreateChaseOrderReq. # noqa: E501 + :rtype: int + """ + return self._price_gap_type + + @price_gap_type.setter + def price_gap_type(self, price_gap_type): + """Sets the price_gap_type of this CreateChaseOrderReq. + + Used when price_type == 2: 1 absolute price gap, 2 percentage # noqa: E501 + + :param price_gap_type: The price_gap_type of this CreateChaseOrderReq. # noqa: E501 + :type: int + """ + + self._price_gap_type = price_gap_type + + @property + def price_gap_value(self): + """Gets the price_gap_value of this CreateChaseOrderReq. # noqa: E501 + + Price gap value paired with price_gap_type # noqa: E501 + + :return: The price_gap_value of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._price_gap_value + + @price_gap_value.setter + def price_gap_value(self, price_gap_value): + """Sets the price_gap_value of this CreateChaseOrderReq. + + Price gap value paired with price_gap_type # noqa: E501 + + :param price_gap_value: The price_gap_value of this CreateChaseOrderReq. # noqa: E501 + :type: str + """ + + self._price_gap_value = price_gap_value + + @property + def pos_margin_mode(self): + """Gets the pos_margin_mode of this CreateChaseOrderReq. # noqa: E501 + + Position margin mode, e.g. isolated or cross # noqa: E501 + + :return: The pos_margin_mode of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._pos_margin_mode + + @pos_margin_mode.setter + def pos_margin_mode(self, pos_margin_mode): + """Sets the pos_margin_mode of this CreateChaseOrderReq. + + Position margin mode, e.g. isolated or cross # noqa: E501 + + :param pos_margin_mode: The pos_margin_mode of this CreateChaseOrderReq. # noqa: E501 + :type: str + """ + + self._pos_margin_mode = pos_margin_mode + + @property + def position_mode(self): + """Gets the position_mode of this CreateChaseOrderReq. # noqa: E501 + + Position mode (e.g. single, dual, dual_plus) # noqa: E501 + + :return: The position_mode of this CreateChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._position_mode + + @position_mode.setter + def position_mode(self, position_mode): + """Sets the position_mode of this CreateChaseOrderReq. + + Position mode (e.g. single, dual, dual_plus) # noqa: E501 + + :param position_mode: The position_mode of this CreateChaseOrderReq. # noqa: E501 + :type: str + """ + + self._position_mode = position_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, CreateChaseOrderReq): + 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, CreateChaseOrderReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/find_coin.py b/gate_api/models/create_chase_order_resp.py similarity index 72% rename from gate_api/models/find_coin.py rename to gate_api/models/create_chase_order_resp.py index a73037a2..c3079a2b 100644 --- a/gate_api/models/find_coin.py +++ b/gate_api/models/create_chase_order_resp.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class FindCoin(object): +class CreateChaseOrderResp(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,48 +33,48 @@ class FindCoin(object): and the value is json key in definition. """ openapi_types = { - 'cointype': 'str' + 'id': 'str' } attribute_map = { - 'cointype': 'cointype' + 'id': 'id' } - def __init__(self, cointype=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 # type: (str, Configuration) -> None - """FindCoin - a model defined in OpenAPI""" # noqa: E501 + """CreateChaseOrderResp - 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._id = None self.discriminator = None - if cointype is not None: - self.cointype = cointype + if id is not None: + self.id = id @property - def cointype(self): - """Gets the cointype of this FindCoin. # noqa: E501 + def id(self): + """Gets the id of this CreateChaseOrderResp. # noqa: E501 - Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. # noqa: E501 + ID of the newly created order # noqa: E501 - :return: The cointype of this FindCoin. # noqa: E501 + :return: The id of this CreateChaseOrderResp. # noqa: E501 :rtype: str """ - return self._cointype + return self._id - @cointype.setter - def cointype(self, cointype): - """Sets the cointype of this FindCoin. + @id.setter + def id(self, id): + """Sets the id of this CreateChaseOrderResp. - Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. # noqa: E501 + ID of the newly created order # noqa: E501 - :param cointype: The cointype of this FindCoin. # noqa: E501 + :param id: The id of this CreateChaseOrderResp. # noqa: E501 :type: str """ - self._cointype = cointype + self._id = id def to_dict(self): """Returns the model properties as a dict""" @@ -110,14 +110,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, FindCoin): + if not isinstance(other, CreateChaseOrderResp): 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): + if not isinstance(other, CreateChaseOrderResp): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_earn_fixed_term_lend_response.py b/gate_api/models/create_earn_fixed_term_lend_response.py new file mode 100644 index 00000000..c50286ef --- /dev/null +++ b/gate_api/models/create_earn_fixed_term_lend_response.py @@ -0,0 +1,205 @@ +# 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 CreateEarnFixedTermLendResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'CreateEarnFixedTermLendResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, CreateEarnFixedTermLendResponseData, int, Configuration) -> None + """CreateEarnFixedTermLendResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this CreateEarnFixedTermLendResponse. # noqa: E501 + + Return code, 0 means success # noqa: E501 + + :return: The code of this CreateEarnFixedTermLendResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this CreateEarnFixedTermLendResponse. + + Return code, 0 means success # noqa: E501 + + :param code: The code of this CreateEarnFixedTermLendResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this CreateEarnFixedTermLendResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this CreateEarnFixedTermLendResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateEarnFixedTermLendResponse. + + Response message # noqa: E501 + + :param message: The message of this CreateEarnFixedTermLendResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this CreateEarnFixedTermLendResponse. # noqa: E501 + + + :return: The data of this CreateEarnFixedTermLendResponse. # noqa: E501 + :rtype: CreateEarnFixedTermLendResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CreateEarnFixedTermLendResponse. + + + :param data: The data of this CreateEarnFixedTermLendResponse. # noqa: E501 + :type: CreateEarnFixedTermLendResponseData + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this CreateEarnFixedTermLendResponse. # noqa: E501 + + Response timestamp (in seconds) # noqa: E501 + + :return: The timestamp of this CreateEarnFixedTermLendResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this CreateEarnFixedTermLendResponse. + + Response timestamp (in seconds) # noqa: E501 + + :param timestamp: The timestamp of this CreateEarnFixedTermLendResponse. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, CreateEarnFixedTermLendResponse): + 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, CreateEarnFixedTermLendResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_earn_fixed_term_lend_response_data.py b/gate_api/models/create_earn_fixed_term_lend_response_data.py new file mode 100644 index 00000000..416e9db3 --- /dev/null +++ b/gate_api/models/create_earn_fixed_term_lend_response_data.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 CreateEarnFixedTermLendResponseData(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' + } + + attribute_map = { + 'order_id': 'order_id' + } + + def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """CreateEarnFixedTermLendResponseData - 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.discriminator = None + + if order_id is not None: + self.order_id = order_id + + @property + def order_id(self): + """Gets the order_id of this CreateEarnFixedTermLendResponseData. # noqa: E501 + + Subscription order ID # noqa: E501 + + :return: The order_id of this CreateEarnFixedTermLendResponseData. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CreateEarnFixedTermLendResponseData. + + Subscription order ID # noqa: E501 + + :param order_id: The order_id of this CreateEarnFixedTermLendResponseData. # noqa: E501 + :type: int + """ + + self._order_id = order_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, CreateEarnFixedTermLendResponseData): + 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, CreateEarnFixedTermLendResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_earn_fixed_term_pre_redeem_response.py b/gate_api/models/create_earn_fixed_term_pre_redeem_response.py new file mode 100644 index 00000000..c73a6280 --- /dev/null +++ b/gate_api/models/create_earn_fixed_term_pre_redeem_response.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 CreateEarnFixedTermPreRedeemResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, object, int, Configuration) -> None + """CreateEarnFixedTermPreRedeemResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + + Return code, 0 means success # noqa: E501 + + :return: The code of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this CreateEarnFixedTermPreRedeemResponse. + + Return code, 0 means success # noqa: E501 + + :param code: The code of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateEarnFixedTermPreRedeemResponse. + + Response message # noqa: E501 + + :param message: The message of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + + Redemption result (empty object on success) # noqa: E501 + + :return: The data of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CreateEarnFixedTermPreRedeemResponse. + + Redemption result (empty object on success) # noqa: E501 + + :param data: The data of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + + Response timestamp (in seconds) # noqa: E501 + + :return: The timestamp of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this CreateEarnFixedTermPreRedeemResponse. + + Response timestamp (in seconds) # noqa: E501 + + :param timestamp: The timestamp of this CreateEarnFixedTermPreRedeemResponse. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, CreateEarnFixedTermPreRedeemResponse): + 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, CreateEarnFixedTermPreRedeemResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_order.py b/gate_api/models/create_order.py index f84a744f..b1874a15 100644 --- a/gate_api/models/create_order.py +++ b/gate_api/models/create_order.py @@ -33,74 +33,263 @@ class CreateOrder(object): and the value is json key in definition. """ openapi_types = { - 'timestamp': 'int', - 'data': 'CreateOrderData' + 'id': 'int', + 'user_id': 'int', + '_from': 'list[CreateOrderDetail]', + 'to': 'list[CreateOrderDetail]', + 'source': 'str', + 'app_id': 'str', + 'client_req_id': 'str', + 'status': 'int', + 'create_time': 'int' } attribute_map = { - 'timestamp': 'timestamp', - 'data': 'data' + 'id': 'id', + 'user_id': 'user_id', + '_from': 'from', + 'to': 'to', + 'source': 'source', + 'app_id': 'app_id', + 'client_req_id': 'client_req_id', + 'status': 'status', + 'create_time': 'create_time' } - def __init__(self, timestamp=None, data=None, local_vars_configuration=None): # noqa: E501 - # type: (int, CreateOrderData, Configuration) -> None + def __init__(self, id=None, user_id=None, _from=None, to=None, source=None, app_id=None, client_req_id=None, status=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, list[CreateOrderDetail], list[CreateOrderDetail], str, str, str, int, int, Configuration) -> None """CreateOrder - 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._timestamp = None - self._data = None + self._id = None + self._user_id = None + self.__from = None + self._to = None + self._source = None + self._app_id = None + self._client_req_id = None + self._status = None + self._create_time = None self.discriminator = None - if timestamp is not None: - self.timestamp = timestamp - if data is not None: - self.data = data + self.id = id + self.user_id = user_id + self._from = _from + self.to = to + self.source = source + self.app_id = app_id + self.client_req_id = client_req_id + self.status = status + self.create_time = create_time @property - def timestamp(self): - """Gets the timestamp of this CreateOrder. # noqa: E501 + def id(self): + """Gets the id of this CreateOrder. # noqa: E501 - Server timestamp (milliseconds) # noqa: E501 - :return: The timestamp of this CreateOrder. # noqa: E501 + :return: The id of this CreateOrder. # noqa: E501 :rtype: int """ - return self._timestamp + return self._id - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this CreateOrder. + @id.setter + def id(self, id): + """Sets the id of this CreateOrder. - Server timestamp (milliseconds) # noqa: E501 - :param timestamp: The timestamp of this CreateOrder. # noqa: E501 + :param id: The id of this CreateOrder. # noqa: E501 :type: int """ + 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._timestamp = timestamp + self._id = id @property - def data(self): - """Gets the data of this CreateOrder. # noqa: E501 + def user_id(self): + """Gets the user_id of this CreateOrder. # noqa: E501 - :return: The data of this CreateOrder. # noqa: E501 - :rtype: CreateOrderData + :return: The user_id of this CreateOrder. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this CreateOrder. + + + :param user_id: The user_id of this CreateOrder. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def _from(self): + """Gets the _from of this CreateOrder. # noqa: E501 + + + :return: The _from of this CreateOrder. # noqa: E501 + :rtype: list[CreateOrderDetail] + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this CreateOrder. + + + :param _from: The _from of this CreateOrder. # noqa: E501 + :type: list[CreateOrderDetail] + """ + 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 + + self.__from = _from + + @property + def to(self): + """Gets the to of this CreateOrder. # noqa: E501 + + + :return: The to of this CreateOrder. # noqa: E501 + :rtype: list[CreateOrderDetail] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this CreateOrder. + + + :param to: The to of this CreateOrder. # noqa: E501 + :type: list[CreateOrderDetail] + """ + 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 + + self._to = to + + @property + def source(self): + """Gets the source of this CreateOrder. # noqa: E501 + + + :return: The source of this CreateOrder. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this CreateOrder. + + + :param source: The source of this CreateOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and source is None: # noqa: E501 + raise ValueError("Invalid value for `source`, must not be `None`") # noqa: E501 + + self._source = source + + @property + def app_id(self): + """Gets the app_id of this CreateOrder. # noqa: E501 + + + :return: The app_id of this CreateOrder. # noqa: E501 + :rtype: str + """ + return self._app_id + + @app_id.setter + def app_id(self, app_id): + """Sets the app_id of this CreateOrder. + + + :param app_id: The app_id of this CreateOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and app_id is None: # noqa: E501 + raise ValueError("Invalid value for `app_id`, must not be `None`") # noqa: E501 + + self._app_id = app_id + + @property + def client_req_id(self): + """Gets the client_req_id of this CreateOrder. # noqa: E501 + + + :return: The client_req_id of this CreateOrder. # noqa: E501 + :rtype: str + """ + return self._client_req_id + + @client_req_id.setter + def client_req_id(self, client_req_id): + """Sets the client_req_id of this CreateOrder. + + + :param client_req_id: The client_req_id of this CreateOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and client_req_id is None: # noqa: E501 + raise ValueError("Invalid value for `client_req_id`, must not be `None`") # noqa: E501 + + self._client_req_id = client_req_id + + @property + def status(self): + """Gets the status of this CreateOrder. # noqa: E501 + + + :return: The status of this CreateOrder. # noqa: E501 + :rtype: int """ - return self._data + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CreateOrder. + - @data.setter - def data(self, data): - """Sets the data of this CreateOrder. + :param status: The status of this CreateOrder. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + self._status = status - :param data: The data of this CreateOrder. # noqa: E501 - :type: CreateOrderData + @property + def create_time(self): + """Gets the create_time of this CreateOrder. # noqa: E501 + + + :return: The create_time of this CreateOrder. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this CreateOrder. + + + :param create_time: The create_time of this CreateOrder. # noqa: E501 + :type: int """ + if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 - self._data = data + self._create_time = create_time def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/create_order2.py b/gate_api/models/create_order2.py new file mode 100644 index 00000000..8890acd0 --- /dev/null +++ b/gate_api/models/create_order2.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 CreateOrder2(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 = { + 'timestamp': 'int', + 'data': 'CreateOrder2Data' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'data': 'data' + } + + def __init__(self, timestamp=None, data=None, local_vars_configuration=None): # noqa: E501 + # type: (int, CreateOrder2Data, Configuration) -> None + """CreateOrder2 - 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._timestamp = None + self._data = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if data is not None: + self.data = data + + @property + def timestamp(self): + """Gets the timestamp of this CreateOrder2. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this CreateOrder2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this CreateOrder2. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this CreateOrder2. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + @property + def data(self): + """Gets the data of this CreateOrder2. # noqa: E501 + + + :return: The data of this CreateOrder2. # noqa: E501 + :rtype: CreateOrder2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CreateOrder2. + + + :param data: The data of this CreateOrder2. # noqa: E501 + :type: CreateOrder2Data + """ + + self._data = data + + 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, CreateOrder2): + 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, CreateOrder2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_order_data.py b/gate_api/models/create_order2_data.py similarity index 87% rename from gate_api/models/create_order_data.py rename to gate_api/models/create_order2_data.py index 67c67853..91da9f23 100644 --- a/gate_api/models/create_order_data.py +++ b/gate_api/models/create_order2_data.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class CreateOrderData(object): +class CreateOrder2Data(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -42,7 +42,7 @@ class CreateOrderData(object): def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 # type: (str, Configuration) -> None - """CreateOrderData - a model defined in OpenAPI""" # noqa: E501 + """CreateOrder2Data - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -55,22 +55,22 @@ def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 @property def id(self): - """Gets the id of this CreateOrderData. # noqa: E501 + """Gets the id of this CreateOrder2Data. # noqa: E501 Queue Task ID (not task ID) # noqa: E501 - :return: The id of this CreateOrderData. # noqa: E501 + :return: The id of this CreateOrder2Data. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this CreateOrderData. + """Sets the id of this CreateOrder2Data. Queue Task ID (not task ID) # noqa: E501 - :param id: The id of this CreateOrderData. # noqa: E501 + :param id: The id of this CreateOrder2Data. # noqa: E501 :type: str """ @@ -110,14 +110,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, CreateOrderData): + if not isinstance(other, CreateOrder2Data): 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, CreateOrderData): + if not isinstance(other, CreateOrder2Data): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_order_detail.py b/gate_api/models/create_order_detail.py new file mode 100644 index 00000000..b79e8965 --- /dev/null +++ b/gate_api/models/create_order_detail.py @@ -0,0 +1,203 @@ +# 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 CreateOrderDetail(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 = { + 'asset': 'str', + 'icon_url': 'str', + 'amount': 'str', + 'amount_show': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'icon_url': 'icon_url', + 'amount': 'amount', + 'amount_show': 'amount_show' + } + + def __init__(self, asset=None, icon_url=None, amount=None, amount_show=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """CreateOrderDetail - 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._asset = None + self._icon_url = None + self._amount = None + self._amount_show = None + self.discriminator = None + + self.asset = asset + self.icon_url = icon_url + self.amount = amount + self.amount_show = amount_show + + @property + def asset(self): + """Gets the asset of this CreateOrderDetail. # noqa: E501 + + + :return: The asset of this CreateOrderDetail. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this CreateOrderDetail. + + + :param asset: The asset of this CreateOrderDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def icon_url(self): + """Gets the icon_url of this CreateOrderDetail. # noqa: E501 + + + :return: The icon_url of this CreateOrderDetail. # noqa: E501 + :rtype: str + """ + return self._icon_url + + @icon_url.setter + def icon_url(self, icon_url): + """Sets the icon_url of this CreateOrderDetail. + + + :param icon_url: The icon_url of this CreateOrderDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and icon_url is None: # noqa: E501 + raise ValueError("Invalid value for `icon_url`, must not be `None`") # noqa: E501 + + self._icon_url = icon_url + + @property + def amount(self): + """Gets the amount of this CreateOrderDetail. # noqa: E501 + + + :return: The amount of this CreateOrderDetail. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CreateOrderDetail. + + + :param amount: The amount of this CreateOrderDetail. # 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 amount_show(self): + """Gets the amount_show of this CreateOrderDetail. # noqa: E501 + + + :return: The amount_show of this CreateOrderDetail. # noqa: E501 + :rtype: str + """ + return self._amount_show + + @amount_show.setter + def amount_show(self, amount_show): + """Sets the amount_show of this CreateOrderDetail. + + + :param amount_show: The amount_show of this CreateOrderDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount_show is None: # noqa: E501 + raise ValueError("Invalid value for `amount_show`, must not be `None`") # noqa: E501 + + self._amount_show = amount_show + + 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, CreateOrderDetail): + 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, CreateOrderDetail): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_order_v4.py b/gate_api/models/create_order_v4.py new file mode 100644 index 00000000..42adf9c5 --- /dev/null +++ b/gate_api/models/create_order_v4.py @@ -0,0 +1,188 @@ +# 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 CreateOrderV4(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': 'int', + 'rid': 'int', + 'amount': 'str' + } + + attribute_map = { + 'pid': 'pid', + 'rid': 'rid', + 'amount': 'amount' + } + + def __init__(self, pid=None, rid=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, Configuration) -> None + """CreateOrderV4 - 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._rid = None + self._amount = None + self.discriminator = None + + self.pid = pid + self.rid = rid + self.amount = amount + + @property + def pid(self): + """Gets the pid of this CreateOrderV4. # noqa: E501 + + Product ID # noqa: E501 + + :return: The pid of this CreateOrderV4. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this CreateOrderV4. + + Product ID # noqa: E501 + + :param pid: The pid of this CreateOrderV4. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and pid is None: # noqa: E501 + raise ValueError("Invalid value for `pid`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + pid is not None and pid < 1): # noqa: E501 + raise ValueError("Invalid value for `pid`, must be a value greater than or equal to `1`") # noqa: E501 + + self._pid = pid + + @property + def rid(self): + """Gets the rid of this CreateOrderV4. # noqa: E501 + + Reward pool ID # noqa: E501 + + :return: The rid of this CreateOrderV4. # noqa: E501 + :rtype: int + """ + return self._rid + + @rid.setter + def rid(self, rid): + """Sets the rid of this CreateOrderV4. + + Reward pool ID # noqa: E501 + + :param rid: The rid of this CreateOrderV4. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and rid is None: # noqa: E501 + raise ValueError("Invalid value for `rid`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + rid is not None and rid < 1): # noqa: E501 + raise ValueError("Invalid value for `rid`, must be a value greater than or equal to `1`") # noqa: E501 + + self._rid = rid + + @property + def amount(self): + """Gets the amount of this CreateOrderV4. # noqa: E501 + + Pledge amount (string format to preserve precision) # noqa: E501 + + :return: The amount of this CreateOrderV4. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CreateOrderV4. + + Pledge amount (string format to preserve precision) # noqa: E501 + + :param amount: The amount of this CreateOrderV4. # 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, CreateOrderV4): + 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, CreateOrderV4): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_param.py b/gate_api/models/create_param.py new file mode 100644 index 00000000..5b3ea809 --- /dev/null +++ b/gate_api/models/create_param.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 CreateParam(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 = { + 'asset': 'str', + 'amount': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'amount': 'amount' + } + + def __init__(self, asset=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """CreateParam - 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._asset = None + self._amount = None + self.discriminator = None + + self.asset = asset + self.amount = amount + + @property + def asset(self): + """Gets the asset of this CreateParam. # noqa: E501 + + Currency symbol, consistent with `GET /asset-swap/asset/list` and business support scope. # noqa: E501 + + :return: The asset of this CreateParam. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this CreateParam. + + Currency symbol, consistent with `GET /asset-swap/asset/list` and business support scope. # noqa: E501 + + :param asset: The asset of this CreateParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def amount(self): + """Gets the amount of this CreateParam. # noqa: E501 + + The quantity of this currency on this side, **decimal string** (non-scientific notation). `from` represents the selling quantity, and `to` represents the target side quantity. Different from preview interface `to[].ratio`. # noqa: E501 + + :return: The amount of this CreateParam. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CreateParam. + + The quantity of this currency on this side, **decimal string** (non-scientific notation). `from` represents the selling quantity, and `to` represents the target side quantity. Different from preview interface `to[].ratio`. # noqa: E501 + + :param amount: The amount of this CreateParam. # 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, CreateParam): + 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, CreateParam): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response201.py b/gate_api/models/create_trail_order_response.py similarity index 72% rename from gate_api/models/inline_response201.py rename to gate_api/models/create_trail_order_response.py index 878051a2..53414f2d 100644 --- a/gate_api/models/inline_response201.py +++ b/gate_api/models/create_trail_order_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse201(object): +class CreateTrailOrderResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class InlineResponse201(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'InlineResponse201Data', + 'data': 'CreateTrailOrderResult', 'timestamp': 'int' } @@ -47,8 +47,8 @@ class InlineResponse201(object): } def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, InlineResponse201Data, int, Configuration) -> None - """InlineResponse201 - a model defined in OpenAPI""" # noqa: E501 + # type: (int, str, CreateTrailOrderResult, int, Configuration) -> None + """CreateTrailOrderResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -70,22 +70,22 @@ def __init__(self, code=None, message=None, data=None, timestamp=None, local_var @property def code(self): - """Gets the code of this InlineResponse201. # noqa: E501 + """Gets the code of this CreateTrailOrderResponse. # noqa: E501 Status code, 0 means success # noqa: E501 - :return: The code of this InlineResponse201. # noqa: E501 + :return: The code of this CreateTrailOrderResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse201. + """Sets the code of this CreateTrailOrderResponse. Status code, 0 means success # noqa: E501 - :param code: The code of this InlineResponse201. # noqa: E501 + :param code: The code of this CreateTrailOrderResponse. # noqa: E501 :type: int """ @@ -93,22 +93,22 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse201. # noqa: E501 + """Gets the message of this CreateTrailOrderResponse. # noqa: E501 Response message # noqa: E501 - :return: The message of this InlineResponse201. # noqa: E501 + :return: The message of this CreateTrailOrderResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse201. + """Sets the message of this CreateTrailOrderResponse. Response message # noqa: E501 - :param message: The message of this InlineResponse201. # noqa: E501 + :param message: The message of this CreateTrailOrderResponse. # noqa: E501 :type: str """ @@ -116,43 +116,43 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse201. # noqa: E501 + """Gets the data of this CreateTrailOrderResponse. # noqa: E501 - :return: The data of this InlineResponse201. # noqa: E501 - :rtype: InlineResponse201Data + :return: The data of this CreateTrailOrderResponse. # noqa: E501 + :rtype: CreateTrailOrderResult """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse201. + """Sets the data of this CreateTrailOrderResponse. - :param data: The data of this InlineResponse201. # noqa: E501 - :type: InlineResponse201Data + :param data: The data of this CreateTrailOrderResponse. # noqa: E501 + :type: CreateTrailOrderResult """ self._data = data @property def timestamp(self): - """Gets the timestamp of this InlineResponse201. # noqa: E501 + """Gets the timestamp of this CreateTrailOrderResponse. # noqa: E501 Response timestamp (milliseconds) # noqa: E501 - :return: The timestamp of this InlineResponse201. # noqa: E501 + :return: The timestamp of this CreateTrailOrderResponse. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse201. + """Sets the timestamp of this CreateTrailOrderResponse. Response timestamp (milliseconds) # noqa: E501 - :param timestamp: The timestamp of this InlineResponse201. # noqa: E501 + :param timestamp: The timestamp of this CreateTrailOrderResponse. # noqa: E501 :type: int """ @@ -192,14 +192,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse201): + if not isinstance(other, CreateTrailOrderResponse): 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, InlineResponse201): + if not isinstance(other, CreateTrailOrderResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response201_data.py b/gate_api/models/create_trail_order_result.py similarity index 85% rename from gate_api/models/inline_response201_data.py rename to gate_api/models/create_trail_order_result.py index 5e0fee78..81af4970 100644 --- a/gate_api/models/inline_response201_data.py +++ b/gate_api/models/create_trail_order_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse201Data(object): +class CreateTrailOrderResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -42,7 +42,7 @@ class InlineResponse201Data(object): def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 # type: (str, Configuration) -> None - """InlineResponse201Data - a model defined in OpenAPI""" # noqa: E501 + """CreateTrailOrderResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -55,22 +55,22 @@ def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 @property def id(self): - """Gets the id of this InlineResponse201Data. # noqa: E501 + """Gets the id of this CreateTrailOrderResult. # noqa: E501 Order ID # noqa: E501 - :return: The id of this InlineResponse201Data. # noqa: E501 + :return: The id of this CreateTrailOrderResult. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this InlineResponse201Data. + """Sets the id of this CreateTrailOrderResult. Order ID # noqa: E501 - :param id: The id of this InlineResponse201Data. # noqa: E501 + :param id: The id of this CreateTrailOrderResult. # noqa: E501 :type: str """ @@ -110,14 +110,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse201Data): + if not isinstance(other, CreateTrailOrderResult): 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, InlineResponse201Data): + if not isinstance(other, CreateTrailOrderResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20035.py b/gate_api/models/crossex_account.py similarity index 73% rename from gate_api/models/inline_response20035.py rename to gate_api/models/crossex_account.py index 0792ce4e..54f208df 100644 --- a/gate_api/models/inline_response20035.py +++ b/gate_api/models/crossex_account.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20035(object): +class CrossexAccount(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -46,7 +46,7 @@ class InlineResponse20035(object): 'update_time': 'str', 'account_mode': 'str', 'exchange_type': 'str', - 'assets': 'list[InlineResponse20035Assets]' + 'assets': 'list[CrossexAccountAsset]' } attribute_map = { @@ -67,8 +67,8 @@ class InlineResponse20035(object): } def __init__(self, user_id=None, available_margin=None, margin_balance=None, initial_margin=None, maintenance_margin=None, initial_margin_rate=None, maintenance_margin_rate=None, position_mode=None, account_limit=None, create_time=None, update_time=None, account_mode=None, exchange_type=None, assets=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, list[InlineResponse20035Assets], Configuration) -> None - """InlineResponse20035 - a model defined in OpenAPI""" # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, list[CrossexAccountAsset], Configuration) -> None + """CrossexAccount - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -109,22 +109,22 @@ def __init__(self, user_id=None, available_margin=None, margin_balance=None, ini @property def user_id(self): - """Gets the user_id of this InlineResponse20035. # noqa: E501 + """Gets the user_id of this CrossexAccount. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20035. # noqa: E501 + :return: The user_id of this CrossexAccount. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20035. + """Sets the user_id of this CrossexAccount. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20035. # noqa: E501 + :param user_id: The user_id of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 @@ -134,22 +134,22 @@ def user_id(self, user_id): @property def available_margin(self): - """Gets the available_margin of this InlineResponse20035. # noqa: E501 + """Gets the available_margin of this CrossexAccount. # noqa: E501 Available Margin # noqa: E501 - :return: The available_margin of this InlineResponse20035. # noqa: E501 + :return: The available_margin of this CrossexAccount. # noqa: E501 :rtype: str """ return self._available_margin @available_margin.setter def available_margin(self, available_margin): - """Sets the available_margin of this InlineResponse20035. + """Sets the available_margin of this CrossexAccount. Available Margin # noqa: E501 - :param available_margin: The available_margin of this InlineResponse20035. # noqa: E501 + :param available_margin: The available_margin of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and available_margin is None: # noqa: E501 @@ -159,22 +159,22 @@ def available_margin(self, available_margin): @property def margin_balance(self): - """Gets the margin_balance of this InlineResponse20035. # noqa: E501 + """Gets the margin_balance of this CrossexAccount. # noqa: E501 marginbalance # noqa: E501 - :return: The margin_balance of this InlineResponse20035. # noqa: E501 + :return: The margin_balance of this CrossexAccount. # noqa: E501 :rtype: str """ return self._margin_balance @margin_balance.setter def margin_balance(self, margin_balance): - """Sets the margin_balance of this InlineResponse20035. + """Sets the margin_balance of this CrossexAccount. marginbalance # noqa: E501 - :param margin_balance: The margin_balance of this InlineResponse20035. # noqa: E501 + :param margin_balance: The margin_balance of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and margin_balance is None: # noqa: E501 @@ -184,22 +184,22 @@ def margin_balance(self, margin_balance): @property def initial_margin(self): - """Gets the initial_margin of this InlineResponse20035. # noqa: E501 + """Gets the initial_margin of this CrossexAccount. # noqa: E501 Initial Margin # noqa: E501 - :return: The initial_margin of this InlineResponse20035. # noqa: E501 + :return: The initial_margin of this CrossexAccount. # noqa: E501 :rtype: str """ return self._initial_margin @initial_margin.setter def initial_margin(self, initial_margin): - """Sets the initial_margin of this InlineResponse20035. + """Sets the initial_margin of this CrossexAccount. Initial Margin # noqa: E501 - :param initial_margin: The initial_margin of this InlineResponse20035. # noqa: E501 + :param initial_margin: The initial_margin of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and initial_margin is None: # noqa: E501 @@ -209,22 +209,22 @@ def initial_margin(self, initial_margin): @property def maintenance_margin(self): - """Gets the maintenance_margin of this InlineResponse20035. # noqa: E501 + """Gets the maintenance_margin of this CrossexAccount. # noqa: E501 Maintenance margin # noqa: E501 - :return: The maintenance_margin of this InlineResponse20035. # noqa: E501 + :return: The maintenance_margin of this CrossexAccount. # noqa: E501 :rtype: str """ return self._maintenance_margin @maintenance_margin.setter def maintenance_margin(self, maintenance_margin): - """Sets the maintenance_margin of this InlineResponse20035. + """Sets the maintenance_margin of this CrossexAccount. Maintenance margin # noqa: E501 - :param maintenance_margin: The maintenance_margin of this InlineResponse20035. # noqa: E501 + :param maintenance_margin: The maintenance_margin of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and maintenance_margin is None: # noqa: E501 @@ -234,22 +234,22 @@ def maintenance_margin(self, maintenance_margin): @property def initial_margin_rate(self): - """Gets the initial_margin_rate of this InlineResponse20035. # noqa: E501 + """Gets the initial_margin_rate of this CrossexAccount. # noqa: E501 Initial margin rate # noqa: E501 - :return: The initial_margin_rate of this InlineResponse20035. # noqa: E501 + :return: The initial_margin_rate of this CrossexAccount. # noqa: E501 :rtype: str """ return self._initial_margin_rate @initial_margin_rate.setter def initial_margin_rate(self, initial_margin_rate): - """Sets the initial_margin_rate of this InlineResponse20035. + """Sets the initial_margin_rate of this CrossexAccount. Initial margin rate # noqa: E501 - :param initial_margin_rate: The initial_margin_rate of this InlineResponse20035. # noqa: E501 + :param initial_margin_rate: The initial_margin_rate of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and initial_margin_rate is None: # noqa: E501 @@ -259,22 +259,22 @@ def initial_margin_rate(self, initial_margin_rate): @property def maintenance_margin_rate(self): - """Gets the maintenance_margin_rate of this InlineResponse20035. # noqa: E501 + """Gets the maintenance_margin_rate of this CrossexAccount. # noqa: E501 Maintenance margin rate # noqa: E501 - :return: The maintenance_margin_rate of this InlineResponse20035. # noqa: E501 + :return: The maintenance_margin_rate of this CrossexAccount. # noqa: E501 :rtype: str """ return self._maintenance_margin_rate @maintenance_margin_rate.setter def maintenance_margin_rate(self, maintenance_margin_rate): - """Sets the maintenance_margin_rate of this InlineResponse20035. + """Sets the maintenance_margin_rate of this CrossexAccount. Maintenance margin rate # noqa: E501 - :param maintenance_margin_rate: The maintenance_margin_rate of this InlineResponse20035. # noqa: E501 + :param maintenance_margin_rate: The maintenance_margin_rate of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and maintenance_margin_rate is None: # noqa: E501 @@ -284,22 +284,22 @@ def maintenance_margin_rate(self, maintenance_margin_rate): @property def position_mode(self): - """Gets the position_mode of this InlineResponse20035. # noqa: E501 + """Gets the position_mode of this CrossexAccount. # noqa: E501 Contract Position Mode # noqa: E501 - :return: The position_mode of this InlineResponse20035. # noqa: E501 + :return: The position_mode of this CrossexAccount. # noqa: E501 :rtype: str """ return self._position_mode @position_mode.setter def position_mode(self, position_mode): - """Sets the position_mode of this InlineResponse20035. + """Sets the position_mode of this CrossexAccount. Contract Position Mode # noqa: E501 - :param position_mode: The position_mode of this InlineResponse20035. # noqa: E501 + :param position_mode: The position_mode of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and position_mode is None: # noqa: E501 @@ -309,22 +309,22 @@ def position_mode(self, position_mode): @property def account_limit(self): - """Gets the account_limit of this InlineResponse20035. # noqa: E501 + """Gets the account_limit of this CrossexAccount. # noqa: E501 Account limit # noqa: E501 - :return: The account_limit of this InlineResponse20035. # noqa: E501 + :return: The account_limit of this CrossexAccount. # noqa: E501 :rtype: str """ return self._account_limit @account_limit.setter def account_limit(self, account_limit): - """Sets the account_limit of this InlineResponse20035. + """Sets the account_limit of this CrossexAccount. Account limit # noqa: E501 - :param account_limit: The account_limit of this InlineResponse20035. # noqa: E501 + :param account_limit: The account_limit of this CrossexAccount. # noqa: E501 :type: str """ @@ -332,22 +332,22 @@ def account_limit(self, account_limit): @property def create_time(self): - """Gets the create_time of this InlineResponse20035. # noqa: E501 + """Gets the create_time of this CrossexAccount. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20035. # noqa: E501 + :return: The create_time of this CrossexAccount. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20035. + """Sets the create_time of this CrossexAccount. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20035. # noqa: E501 + :param create_time: The create_time of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 @@ -357,22 +357,22 @@ def create_time(self, create_time): @property def update_time(self): - """Gets the update_time of this InlineResponse20035. # noqa: E501 + """Gets the update_time of this CrossexAccount. # noqa: E501 Update time # noqa: E501 - :return: The update_time of this InlineResponse20035. # noqa: E501 + :return: The update_time of this CrossexAccount. # noqa: E501 :rtype: str """ return self._update_time @update_time.setter def update_time(self, update_time): - """Sets the update_time of this InlineResponse20035. + """Sets the update_time of this CrossexAccount. Update time # noqa: E501 - :param update_time: The update_time of this InlineResponse20035. # noqa: E501 + :param update_time: The update_time of this CrossexAccount. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and update_time is None: # noqa: E501 @@ -382,22 +382,22 @@ def update_time(self, update_time): @property def account_mode(self): - """Gets the account_mode of this InlineResponse20035. # noqa: E501 + """Gets the account_mode of this CrossexAccount. # noqa: E501 Account Mode. CROSS_EXCHANGE: Cross-Exchange Mode; ISOLATED_EXCHANGE: Split-Exchange Mode # noqa: E501 - :return: The account_mode of this InlineResponse20035. # noqa: E501 + :return: The account_mode of this CrossexAccount. # noqa: E501 :rtype: str """ return self._account_mode @account_mode.setter def account_mode(self, account_mode): - """Sets the account_mode of this InlineResponse20035. + """Sets the account_mode of this CrossexAccount. Account Mode. CROSS_EXCHANGE: Cross-Exchange Mode; ISOLATED_EXCHANGE: Split-Exchange Mode # noqa: E501 - :param account_mode: The account_mode of this InlineResponse20035. # noqa: E501 + :param account_mode: The account_mode of this CrossexAccount. # noqa: E501 :type: str """ @@ -405,22 +405,22 @@ def account_mode(self, account_mode): @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse20035. # noqa: E501 + """Gets the exchange_type of this CrossexAccount. # noqa: E501 Exchange Type. When account_mode is CROSS_EXCHANGE, it must be CROSSEX; otherwise, it is another exchange. # noqa: E501 - :return: The exchange_type of this InlineResponse20035. # noqa: E501 + :return: The exchange_type of this CrossexAccount. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20035. + """Sets the exchange_type of this CrossexAccount. Exchange Type. When account_mode is CROSS_EXCHANGE, it must be CROSSEX; otherwise, it is another exchange. # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse20035. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexAccount. # noqa: E501 :type: str """ @@ -428,21 +428,23 @@ def exchange_type(self, exchange_type): @property def assets(self): - """Gets the assets of this InlineResponse20035. # noqa: E501 + """Gets the assets of this CrossexAccount. # noqa: E501 + Asset list: grouped by exchange and currency, returning per-account balances, margin, and PnL details # noqa: E501 - :return: The assets of this InlineResponse20035. # noqa: E501 - :rtype: list[InlineResponse20035Assets] + :return: The assets of this CrossexAccount. # noqa: E501 + :rtype: list[CrossexAccountAsset] """ return self._assets @assets.setter def assets(self, assets): - """Sets the assets of this InlineResponse20035. + """Sets the assets of this CrossexAccount. + Asset list: grouped by exchange and currency, returning per-account balances, margin, and PnL details # noqa: E501 - :param assets: The assets of this InlineResponse20035. # noqa: E501 - :type: list[InlineResponse20035Assets] + :param assets: The assets of this CrossexAccount. # noqa: E501 + :type: list[CrossexAccountAsset] """ if self.local_vars_configuration.client_side_validation and assets is None: # noqa: E501 raise ValueError("Invalid value for `assets`, must not be `None`") # noqa: E501 @@ -483,14 +485,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20035): + if not isinstance(other, CrossexAccount): 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, InlineResponse20035): + if not isinstance(other, CrossexAccount): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20035_assets.py b/gate_api/models/crossex_account_asset.py similarity index 73% rename from gate_api/models/inline_response20035_assets.py rename to gate_api/models/crossex_account_asset.py index 0b02d441..441106f2 100644 --- a/gate_api/models/inline_response20035_assets.py +++ b/gate_api/models/crossex_account_asset.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20035Assets(object): +class CrossexAccountAsset(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -64,7 +64,7 @@ class InlineResponse20035Assets(object): def __init__(self, user_id=None, coin=None, exchange_type=None, balance=None, upnl=None, equity=None, futures_initial_margin=None, futures_maintenance_margin=None, borrowing_initial_margin=None, borrowing_maintenance_margin=None, available_balance=None, liability=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """InlineResponse20035Assets - a model defined in OpenAPI""" # noqa: E501 + """CrossexAccountAsset - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -108,22 +108,22 @@ def __init__(self, user_id=None, coin=None, exchange_type=None, balance=None, up @property def user_id(self): - """Gets the user_id of this InlineResponse20035Assets. # noqa: E501 + """Gets the user_id of this CrossexAccountAsset. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20035Assets. # noqa: E501 + :return: The user_id of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20035Assets. + """Sets the user_id of this CrossexAccountAsset. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20035Assets. # noqa: E501 + :param user_id: The user_id of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -131,22 +131,22 @@ def user_id(self, user_id): @property def coin(self): - """Gets the coin of this InlineResponse20035Assets. # noqa: E501 + """Gets the coin of this CrossexAccountAsset. # noqa: E501 Currency # noqa: E501 - :return: The coin of this InlineResponse20035Assets. # noqa: E501 + :return: The coin of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._coin @coin.setter def coin(self, coin): - """Sets the coin of this InlineResponse20035Assets. + """Sets the coin of this CrossexAccountAsset. Currency # noqa: E501 - :param coin: The coin of this InlineResponse20035Assets. # noqa: E501 + :param coin: The coin of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -154,22 +154,22 @@ def coin(self, coin): @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse20035Assets. # noqa: E501 + """Gets the exchange_type of this CrossexAccountAsset. # noqa: E501 Exchange # noqa: E501 - :return: The exchange_type of this InlineResponse20035Assets. # noqa: E501 + :return: The exchange_type of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20035Assets. + """Sets the exchange_type of this CrossexAccountAsset. Exchange # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse20035Assets. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -177,22 +177,22 @@ def exchange_type(self, exchange_type): @property def balance(self): - """Gets the balance of this InlineResponse20035Assets. # noqa: E501 + """Gets the balance of this CrossexAccountAsset. # noqa: E501 Balance # noqa: E501 - :return: The balance of this InlineResponse20035Assets. # noqa: E501 + :return: The balance of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._balance @balance.setter def balance(self, balance): - """Sets the balance of this InlineResponse20035Assets. + """Sets the balance of this CrossexAccountAsset. Balance # noqa: E501 - :param balance: The balance of this InlineResponse20035Assets. # noqa: E501 + :param balance: The balance of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -200,22 +200,22 @@ def balance(self, balance): @property def upnl(self): - """Gets the upnl of this InlineResponse20035Assets. # noqa: E501 + """Gets the upnl of this CrossexAccountAsset. # noqa: E501 Unrealized P&L # noqa: E501 - :return: The upnl of this InlineResponse20035Assets. # noqa: E501 + :return: The upnl of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._upnl @upnl.setter def upnl(self, upnl): - """Sets the upnl of this InlineResponse20035Assets. + """Sets the upnl of this CrossexAccountAsset. Unrealized P&L # noqa: E501 - :param upnl: The upnl of this InlineResponse20035Assets. # noqa: E501 + :param upnl: The upnl of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -223,22 +223,22 @@ def upnl(self, upnl): @property def equity(self): - """Gets the equity of this InlineResponse20035Assets. # noqa: E501 + """Gets the equity of this CrossexAccountAsset. # noqa: E501 Equity (only USDT has a value; other assets are 0) # noqa: E501 - :return: The equity of this InlineResponse20035Assets. # noqa: E501 + :return: The equity of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._equity @equity.setter def equity(self, equity): - """Sets the equity of this InlineResponse20035Assets. + """Sets the equity of this CrossexAccountAsset. Equity (only USDT has a value; other assets are 0) # noqa: E501 - :param equity: The equity of this InlineResponse20035Assets. # noqa: E501 + :param equity: The equity of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -246,22 +246,22 @@ def equity(self, equity): @property def futures_initial_margin(self): - """Gets the futures_initial_margin of this InlineResponse20035Assets. # noqa: E501 + """Gets the futures_initial_margin of this CrossexAccountAsset. # noqa: E501 Futures initial margin (only USDT has a value; other assets are 0) # noqa: E501 - :return: The futures_initial_margin of this InlineResponse20035Assets. # noqa: E501 + :return: The futures_initial_margin of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._futures_initial_margin @futures_initial_margin.setter def futures_initial_margin(self, futures_initial_margin): - """Sets the futures_initial_margin of this InlineResponse20035Assets. + """Sets the futures_initial_margin of this CrossexAccountAsset. Futures initial margin (only USDT has a value; other assets are 0) # noqa: E501 - :param futures_initial_margin: The futures_initial_margin of this InlineResponse20035Assets. # noqa: E501 + :param futures_initial_margin: The futures_initial_margin of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -269,22 +269,22 @@ def futures_initial_margin(self, futures_initial_margin): @property def futures_maintenance_margin(self): - """Gets the futures_maintenance_margin of this InlineResponse20035Assets. # noqa: E501 + """Gets the futures_maintenance_margin of this CrossexAccountAsset. # noqa: E501 Futures maintenance margin (only USDT has a value; other assets are 0) # noqa: E501 - :return: The futures_maintenance_margin of this InlineResponse20035Assets. # noqa: E501 + :return: The futures_maintenance_margin of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._futures_maintenance_margin @futures_maintenance_margin.setter def futures_maintenance_margin(self, futures_maintenance_margin): - """Sets the futures_maintenance_margin of this InlineResponse20035Assets. + """Sets the futures_maintenance_margin of this CrossexAccountAsset. Futures maintenance margin (only USDT has a value; other assets are 0) # noqa: E501 - :param futures_maintenance_margin: The futures_maintenance_margin of this InlineResponse20035Assets. # noqa: E501 + :param futures_maintenance_margin: The futures_maintenance_margin of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -292,22 +292,22 @@ def futures_maintenance_margin(self, futures_maintenance_margin): @property def borrowing_initial_margin(self): - """Gets the borrowing_initial_margin of this InlineResponse20035Assets. # noqa: E501 + """Gets the borrowing_initial_margin of this CrossexAccountAsset. # noqa: E501 Margin trading initial margin (only USDT has a value; other assets are 0) # noqa: E501 - :return: The borrowing_initial_margin of this InlineResponse20035Assets. # noqa: E501 + :return: The borrowing_initial_margin of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._borrowing_initial_margin @borrowing_initial_margin.setter def borrowing_initial_margin(self, borrowing_initial_margin): - """Sets the borrowing_initial_margin of this InlineResponse20035Assets. + """Sets the borrowing_initial_margin of this CrossexAccountAsset. Margin trading initial margin (only USDT has a value; other assets are 0) # noqa: E501 - :param borrowing_initial_margin: The borrowing_initial_margin of this InlineResponse20035Assets. # noqa: E501 + :param borrowing_initial_margin: The borrowing_initial_margin of this CrossexAccountAsset. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and borrowing_initial_margin is None: # noqa: E501 @@ -317,22 +317,22 @@ def borrowing_initial_margin(self, borrowing_initial_margin): @property def borrowing_maintenance_margin(self): - """Gets the borrowing_maintenance_margin of this InlineResponse20035Assets. # noqa: E501 + """Gets the borrowing_maintenance_margin of this CrossexAccountAsset. # noqa: E501 Margin trading maintenance margin (only USDT has a value; other assets are 0) # noqa: E501 - :return: The borrowing_maintenance_margin of this InlineResponse20035Assets. # noqa: E501 + :return: The borrowing_maintenance_margin of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._borrowing_maintenance_margin @borrowing_maintenance_margin.setter def borrowing_maintenance_margin(self, borrowing_maintenance_margin): - """Sets the borrowing_maintenance_margin of this InlineResponse20035Assets. + """Sets the borrowing_maintenance_margin of this CrossexAccountAsset. Margin trading maintenance margin (only USDT has a value; other assets are 0) # noqa: E501 - :param borrowing_maintenance_margin: The borrowing_maintenance_margin of this InlineResponse20035Assets. # noqa: E501 + :param borrowing_maintenance_margin: The borrowing_maintenance_margin of this CrossexAccountAsset. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and borrowing_maintenance_margin is None: # noqa: E501 @@ -342,22 +342,22 @@ def borrowing_maintenance_margin(self, borrowing_maintenance_margin): @property def available_balance(self): - """Gets the available_balance of this InlineResponse20035Assets. # noqa: E501 + """Gets the available_balance of this CrossexAccountAsset. # noqa: E501 Available Balance # noqa: E501 - :return: The available_balance of this InlineResponse20035Assets. # noqa: E501 + :return: The available_balance of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._available_balance @available_balance.setter def available_balance(self, available_balance): - """Sets the available_balance of this InlineResponse20035Assets. + """Sets the available_balance of this CrossexAccountAsset. Available Balance # noqa: E501 - :param available_balance: The available_balance of this InlineResponse20035Assets. # noqa: E501 + :param available_balance: The available_balance of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -365,22 +365,22 @@ def available_balance(self, available_balance): @property def liability(self): - """Gets the liability of this InlineResponse20035Assets. # noqa: E501 + """Gets the liability of this CrossexAccountAsset. # noqa: E501 Liabilities (only meaningful in isolated exchange mode; always 0 in cross-exchange mode) # noqa: E501 - :return: The liability of this InlineResponse20035Assets. # noqa: E501 + :return: The liability of this CrossexAccountAsset. # noqa: E501 :rtype: str """ return self._liability @liability.setter def liability(self, liability): - """Sets the liability of this InlineResponse20035Assets. + """Sets the liability of this CrossexAccountAsset. Liabilities (only meaningful in isolated exchange mode; always 0 in cross-exchange mode) # noqa: E501 - :param liability: The liability of this InlineResponse20035Assets. # noqa: E501 + :param liability: The liability of this CrossexAccountAsset. # noqa: E501 :type: str """ @@ -420,14 +420,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20035Assets): + if not isinstance(other, CrossexAccountAsset): 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, InlineResponse20035Assets): + if not isinstance(other, CrossexAccountAsset): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20046.py b/gate_api/models/crossex_account_book_record.py similarity index 64% rename from gate_api/models/inline_response20046.py rename to gate_api/models/crossex_account_book_record.py index 09755cb1..d8f0e001 100644 --- a/gate_api/models/inline_response20046.py +++ b/gate_api/models/crossex_account_book_record.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20046(object): +class CrossexAccountBookRecord(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -36,7 +36,7 @@ class InlineResponse20046(object): 'id': 'str', 'user_id': 'str', 'business_id': 'str', - 'type': 'str', + 'statement_type': 'str', 'exchange_type': 'str', 'coin': 'str', 'change': 'str', @@ -48,7 +48,7 @@ class InlineResponse20046(object): 'id': 'id', 'user_id': 'user_id', 'business_id': 'business_id', - 'type': 'type', + 'statement_type': 'statement_type', 'exchange_type': 'exchange_type', 'coin': 'coin', 'change': 'change', @@ -56,9 +56,9 @@ class InlineResponse20046(object): 'create_time': 'create_time' } - def __init__(self, id=None, user_id=None, business_id=None, type=None, exchange_type=None, coin=None, change=None, balance=None, create_time=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, user_id=None, business_id=None, statement_type=None, exchange_type=None, coin=None, change=None, balance=None, create_time=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None - """InlineResponse20046 - a model defined in OpenAPI""" # noqa: E501 + """CrossexAccountBookRecord - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -66,7 +66,7 @@ def __init__(self, id=None, user_id=None, business_id=None, type=None, exchange_ self._id = None self._user_id = None self._business_id = None - self._type = None + self._statement_type = None self._exchange_type = None self._coin = None self._change = None @@ -77,7 +77,7 @@ def __init__(self, id=None, user_id=None, business_id=None, type=None, exchange_ self.id = id self.user_id = user_id self.business_id = business_id - self.type = type + self.statement_type = statement_type self.exchange_type = exchange_type self.coin = coin self.change = change @@ -86,22 +86,22 @@ def __init__(self, id=None, user_id=None, business_id=None, type=None, exchange_ @property def id(self): - """Gets the id of this InlineResponse20046. # noqa: E501 + """Gets the id of this CrossexAccountBookRecord. # noqa: E501 Account Change Record ID # noqa: E501 - :return: The id of this InlineResponse20046. # noqa: E501 + :return: The id of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this InlineResponse20046. + """Sets the id of this CrossexAccountBookRecord. Account Change Record ID # noqa: E501 - :param id: The id of this InlineResponse20046. # noqa: E501 + :param id: The id of this CrossexAccountBookRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 @@ -111,22 +111,22 @@ def id(self, id): @property def user_id(self): - """Gets the user_id of this InlineResponse20046. # noqa: E501 + """Gets the user_id of this CrossexAccountBookRecord. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20046. # noqa: E501 + :return: The user_id of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20046. + """Sets the user_id of this CrossexAccountBookRecord. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20046. # noqa: E501 + :param user_id: The user_id of this CrossexAccountBookRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 @@ -136,22 +136,22 @@ def user_id(self, user_id): @property def business_id(self): - """Gets the business_id of this InlineResponse20046. # noqa: E501 + """Gets the business_id of this CrossexAccountBookRecord. # noqa: E501 Business ID # noqa: E501 - :return: The business_id of this InlineResponse20046. # noqa: E501 + :return: The business_id of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ return self._business_id @business_id.setter def business_id(self, business_id): - """Sets the business_id of this InlineResponse20046. + """Sets the business_id of this CrossexAccountBookRecord. Business ID # noqa: E501 - :param business_id: The business_id of this InlineResponse20046. # noqa: E501 + :param business_id: The business_id of this CrossexAccountBookRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and business_id is None: # noqa: E501 @@ -160,48 +160,48 @@ def business_id(self, business_id): self._business_id = business_id @property - def type(self): - """Gets the type of this InlineResponse20046. # noqa: E501 + def statement_type(self): + """Gets the statement_type of this CrossexAccountBookRecord. # noqa: E501 - 变更类型| `TRANSACTION` 成交 `TRADING_FEE` 手续费 `FUNDING_FEE` 合约资金费 `LIQUIDATION_FEE` 强平费 `TRANSFER_IN` 资金转入 `TRANSFER_OUT` 资金转出 `BANKRUPT_COMPENSATION` 穿仓补贴 `AUTO_REPAY` 杠杆仓位自动还负债 # noqa: E501 + Bill entry type. `TRANSACTION` trade `TRADING_FEE` fee `FUNDING_FEE` funding `LIQUIDATION_FEE` liquidation `TRANSFER_IN` deposit `TRANSFER_OUT` withdrawal `BANKRUPT_COMPENSATION` bankruptcy subsidy `AUTO_REPAY` margin auto-repay `INTEREST_ISOLATED` isolated-venue interest entry `ACCOUNT_MODE_CHANGE` account mode switch entry `KRAKEN_CONVERSION` conversion of other margin coins to cover a negative KRAKEN_USD balance `OTHER` other # noqa: E501 - :return: The type of this InlineResponse20046. # noqa: E501 + :return: The statement_type of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ - return self._type + return self._statement_type - @type.setter - def type(self, type): - """Sets the type of this InlineResponse20046. + @statement_type.setter + def statement_type(self, statement_type): + """Sets the statement_type of this CrossexAccountBookRecord. - 变更类型| `TRANSACTION` 成交 `TRADING_FEE` 手续费 `FUNDING_FEE` 合约资金费 `LIQUIDATION_FEE` 强平费 `TRANSFER_IN` 资金转入 `TRANSFER_OUT` 资金转出 `BANKRUPT_COMPENSATION` 穿仓补贴 `AUTO_REPAY` 杠杆仓位自动还负债 # noqa: E501 + Bill entry type. `TRANSACTION` trade `TRADING_FEE` fee `FUNDING_FEE` funding `LIQUIDATION_FEE` liquidation `TRANSFER_IN` deposit `TRANSFER_OUT` withdrawal `BANKRUPT_COMPENSATION` bankruptcy subsidy `AUTO_REPAY` margin auto-repay `INTEREST_ISOLATED` isolated-venue interest entry `ACCOUNT_MODE_CHANGE` account mode switch entry `KRAKEN_CONVERSION` conversion of other margin coins to cover a negative KRAKEN_USD balance `OTHER` other # noqa: E501 - :param type: The type of this InlineResponse20046. # noqa: E501 + :param statement_type: The statement_type of this CrossexAccountBookRecord. # 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 + if self.local_vars_configuration.client_side_validation and statement_type is None: # noqa: E501 + raise ValueError("Invalid value for `statement_type`, must not be `None`") # noqa: E501 - self._type = type + self._statement_type = statement_type @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse20046. # noqa: E501 + """Gets the exchange_type of this CrossexAccountBookRecord. # noqa: E501 Exchange # noqa: E501 - :return: The exchange_type of this InlineResponse20046. # noqa: E501 + :return: The exchange_type of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20046. + """Sets the exchange_type of this CrossexAccountBookRecord. Exchange # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse20046. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexAccountBookRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and exchange_type is None: # noqa: E501 @@ -211,22 +211,22 @@ def exchange_type(self, exchange_type): @property def coin(self): - """Gets the coin of this InlineResponse20046. # noqa: E501 + """Gets the coin of this CrossexAccountBookRecord. # noqa: E501 Currency # noqa: E501 - :return: The coin of this InlineResponse20046. # noqa: E501 + :return: The coin of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ return self._coin @coin.setter def coin(self, coin): - """Sets the coin of this InlineResponse20046. + """Sets the coin of this CrossexAccountBookRecord. Currency # noqa: E501 - :param coin: The coin of this InlineResponse20046. # noqa: E501 + :param coin: The coin of this CrossexAccountBookRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and coin is None: # noqa: E501 @@ -236,22 +236,22 @@ def coin(self, coin): @property def change(self): - """Gets the change of this InlineResponse20046. # noqa: E501 + """Gets the change of this CrossexAccountBookRecord. # noqa: E501 Change amount (positive indicates transfer in; negative indicates transfer out) # noqa: E501 - :return: The change of this InlineResponse20046. # noqa: E501 + :return: The change of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ return self._change @change.setter def change(self, change): - """Sets the change of this InlineResponse20046. + """Sets the change of this CrossexAccountBookRecord. Change amount (positive indicates transfer in; negative indicates transfer out) # noqa: E501 - :param change: The change of this InlineResponse20046. # noqa: E501 + :param change: The change of this CrossexAccountBookRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and change is None: # noqa: E501 @@ -261,22 +261,22 @@ def change(self, change): @property def balance(self): - """Gets the balance of this InlineResponse20046. # noqa: E501 + """Gets the balance of this CrossexAccountBookRecord. # noqa: E501 Balance after change # noqa: E501 - :return: The balance of this InlineResponse20046. # noqa: E501 + :return: The balance of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ return self._balance @balance.setter def balance(self, balance): - """Sets the balance of this InlineResponse20046. + """Sets the balance of this CrossexAccountBookRecord. Balance after change # noqa: E501 - :param balance: The balance of this InlineResponse20046. # noqa: E501 + :param balance: The balance of this CrossexAccountBookRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and balance is None: # noqa: E501 @@ -286,22 +286,22 @@ def balance(self, balance): @property def create_time(self): - """Gets the create_time of this InlineResponse20046. # noqa: E501 + """Gets the create_time of this CrossexAccountBookRecord. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20046. # noqa: E501 + :return: The create_time of this CrossexAccountBookRecord. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20046. + """Sets the create_time of this CrossexAccountBookRecord. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20046. # noqa: E501 + :param create_time: The create_time of this CrossexAccountBookRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 @@ -343,14 +343,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20046): + if not isinstance(other, CrossexAccountBookRecord): 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, InlineResponse20046): + if not isinstance(other, CrossexAccountBookRecord): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_account_update_request.py b/gate_api/models/crossex_account_update_request.py index ab4b832a..dbb515b1 100644 --- a/gate_api/models/crossex_account_update_request.py +++ b/gate_api/models/crossex_account_update_request.py @@ -113,7 +113,7 @@ def account_mode(self, account_mode): def exchange_type(self): """Gets the exchange_type of this CrossexAccountUpdateRequest. # noqa: E501 - Exchange (BINANCE/OKX/GATE/BYBIT/CROSSEX; when account mode is ISOLATED_EXCHANGE, the exchange must be specified to modify futures position mode) # noqa: E501 + Exchange (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to adjust futures position mode. # noqa: E501 :return: The exchange_type of this CrossexAccountUpdateRequest. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def exchange_type(self): def exchange_type(self, exchange_type): """Sets the exchange_type of this CrossexAccountUpdateRequest. - Exchange (BINANCE/OKX/GATE/BYBIT/CROSSEX; when account mode is ISOLATED_EXCHANGE, the exchange must be specified to modify futures position mode) # noqa: E501 + Exchange (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to adjust futures position mode. # noqa: E501 :param exchange_type: The exchange_type of this CrossexAccountUpdateRequest. # noqa: E501 :type: str diff --git a/gate_api/models/inline_response202.py b/gate_api/models/crossex_account_update_response.py similarity index 71% rename from gate_api/models/inline_response202.py rename to gate_api/models/crossex_account_update_response.py index d953c859..fe63d592 100644 --- a/gate_api/models/inline_response202.py +++ b/gate_api/models/crossex_account_update_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse202(object): +class CrossexAccountUpdateResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -46,7 +46,7 @@ class InlineResponse202(object): def __init__(self, position_mode=None, account_mode=None, exchange_type=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, Configuration) -> None - """InlineResponse202 - a model defined in OpenAPI""" # noqa: E501 + """CrossexAccountUpdateResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -65,22 +65,22 @@ def __init__(self, position_mode=None, account_mode=None, exchange_type=None, lo @property def position_mode(self): - """Gets the position_mode of this InlineResponse202. # noqa: E501 + """Gets the position_mode of this CrossexAccountUpdateResponse. # noqa: E501 Requested futures position mode to modify (SINGLE/DUAL) # noqa: E501 - :return: The position_mode of this InlineResponse202. # noqa: E501 + :return: The position_mode of this CrossexAccountUpdateResponse. # noqa: E501 :rtype: str """ return self._position_mode @position_mode.setter def position_mode(self, position_mode): - """Sets the position_mode of this InlineResponse202. + """Sets the position_mode of this CrossexAccountUpdateResponse. Requested futures position mode to modify (SINGLE/DUAL) # noqa: E501 - :param position_mode: The position_mode of this InlineResponse202. # noqa: E501 + :param position_mode: The position_mode of this CrossexAccountUpdateResponse. # noqa: E501 :type: str """ @@ -88,22 +88,22 @@ def position_mode(self, position_mode): @property def account_mode(self): - """Gets the account_mode of this InlineResponse202. # noqa: E501 + """Gets the account_mode of this CrossexAccountUpdateResponse. # noqa: E501 Requested account mode to modify (CROSS_EXCHANGE/ISOLATED_EXCHANGE, default: CROSS_EXCHANGE) # noqa: E501 - :return: The account_mode of this InlineResponse202. # noqa: E501 + :return: The account_mode of this CrossexAccountUpdateResponse. # noqa: E501 :rtype: str """ return self._account_mode @account_mode.setter def account_mode(self, account_mode): - """Sets the account_mode of this InlineResponse202. + """Sets the account_mode of this CrossexAccountUpdateResponse. Requested account mode to modify (CROSS_EXCHANGE/ISOLATED_EXCHANGE, default: CROSS_EXCHANGE) # noqa: E501 - :param account_mode: The account_mode of this InlineResponse202. # noqa: E501 + :param account_mode: The account_mode of this CrossexAccountUpdateResponse. # noqa: E501 :type: str """ @@ -111,22 +111,22 @@ def account_mode(self, account_mode): @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse202. # noqa: E501 + """Gets the exchange_type of this CrossexAccountUpdateResponse. # noqa: E501 - Requested exchange to modify (BINANCE/OKX/GATE/BYBIT/CROSSEX; when account mode is ISOLATED_EXCHANGE, the exchange must be specified to modify futures position mode) # noqa: E501 + Exchange targeted by the requested change (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to change futures position mode. # noqa: E501 - :return: The exchange_type of this InlineResponse202. # noqa: E501 + :return: The exchange_type of this CrossexAccountUpdateResponse. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse202. + """Sets the exchange_type of this CrossexAccountUpdateResponse. - Requested exchange to modify (BINANCE/OKX/GATE/BYBIT/CROSSEX; when account mode is ISOLATED_EXCHANGE, the exchange must be specified to modify futures position mode) # noqa: E501 + Exchange targeted by the requested change (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to change futures position mode. # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse202. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexAccountUpdateResponse. # noqa: E501 :type: str """ @@ -166,14 +166,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse202): + if not isinstance(other, CrossexAccountUpdateResponse): 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, InlineResponse202): + if not isinstance(other, CrossexAccountUpdateResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20040.py b/gate_api/models/crossex_adl_rank.py similarity index 81% rename from gate_api/models/inline_response20040.py rename to gate_api/models/crossex_adl_rank.py index 30fc9b53..5ac8a7fd 100644 --- a/gate_api/models/inline_response20040.py +++ b/gate_api/models/crossex_adl_rank.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20040(object): +class CrossexAdlRank(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -48,7 +48,7 @@ class InlineResponse20040(object): def __init__(self, user_id=None, symbol=None, crossex_adl_rank=None, exchange_adl_rank=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, Configuration) -> None - """InlineResponse20040 - a model defined in OpenAPI""" # noqa: E501 + """CrossexAdlRank - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -66,22 +66,22 @@ def __init__(self, user_id=None, symbol=None, crossex_adl_rank=None, exchange_ad @property def user_id(self): - """Gets the user_id of this InlineResponse20040. # noqa: E501 + """Gets the user_id of this CrossexAdlRank. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20040. # noqa: E501 + :return: The user_id of this CrossexAdlRank. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20040. + """Sets the user_id of this CrossexAdlRank. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20040. # noqa: E501 + :param user_id: The user_id of this CrossexAdlRank. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 @@ -91,22 +91,22 @@ def user_id(self, user_id): @property def symbol(self): - """Gets the symbol of this InlineResponse20040. # noqa: E501 + """Gets the symbol of this CrossexAdlRank. # noqa: E501 Currency pair # noqa: E501 - :return: The symbol of this InlineResponse20040. # noqa: E501 + :return: The symbol of this CrossexAdlRank. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20040. + """Sets the symbol of this CrossexAdlRank. Currency pair # noqa: E501 - :param symbol: The symbol of this InlineResponse20040. # noqa: E501 + :param symbol: The symbol of this CrossexAdlRank. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 @@ -116,22 +116,22 @@ def symbol(self, symbol): @property def crossex_adl_rank(self): - """Gets the crossex_adl_rank of this InlineResponse20040. # noqa: E501 + """Gets the crossex_adl_rank of this CrossexAdlRank. # noqa: E501 CROSSEX position-reduction indicator ranking (1–5, higher value ranks higher) # noqa: E501 - :return: The crossex_adl_rank of this InlineResponse20040. # noqa: E501 + :return: The crossex_adl_rank of this CrossexAdlRank. # noqa: E501 :rtype: str """ return self._crossex_adl_rank @crossex_adl_rank.setter def crossex_adl_rank(self, crossex_adl_rank): - """Sets the crossex_adl_rank of this InlineResponse20040. + """Sets the crossex_adl_rank of this CrossexAdlRank. CROSSEX position-reduction indicator ranking (1–5, higher value ranks higher) # noqa: E501 - :param crossex_adl_rank: The crossex_adl_rank of this InlineResponse20040. # noqa: E501 + :param crossex_adl_rank: The crossex_adl_rank of this CrossexAdlRank. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and crossex_adl_rank is None: # noqa: E501 @@ -141,22 +141,22 @@ def crossex_adl_rank(self, crossex_adl_rank): @property def exchange_adl_rank(self): - """Gets the exchange_adl_rank of this InlineResponse20040. # noqa: E501 + """Gets the exchange_adl_rank of this CrossexAdlRank. # noqa: E501 Original exchange information (BINANCE: 0–4, higher value ranks higher; OKX: 0–5, higher value ranks higher; GATE: 1–5, lower value ranks higher; BYBIT: 0–5, higher value ranks higher) # noqa: E501 - :return: The exchange_adl_rank of this InlineResponse20040. # noqa: E501 + :return: The exchange_adl_rank of this CrossexAdlRank. # noqa: E501 :rtype: str """ return self._exchange_adl_rank @exchange_adl_rank.setter def exchange_adl_rank(self, exchange_adl_rank): - """Sets the exchange_adl_rank of this InlineResponse20040. + """Sets the exchange_adl_rank of this CrossexAdlRank. Original exchange information (BINANCE: 0–4, higher value ranks higher; OKX: 0–5, higher value ranks higher; GATE: 1–5, lower value ranks higher; BYBIT: 0–5, higher value ranks higher) # noqa: E501 - :param exchange_adl_rank: The exchange_adl_rank of this InlineResponse20040. # noqa: E501 + :param exchange_adl_rank: The exchange_adl_rank of this CrossexAdlRank. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and exchange_adl_rank is None: # noqa: E501 @@ -198,14 +198,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20040): + if not isinstance(other, CrossexAdlRank): 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, InlineResponse20040): + if not isinstance(other, CrossexAdlRank): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20047.py b/gate_api/models/crossex_coin_discount_rate.py similarity index 76% rename from gate_api/models/inline_response20047.py rename to gate_api/models/crossex_coin_discount_rate.py index 4754ad4f..1c7c0242 100644 --- a/gate_api/models/inline_response20047.py +++ b/gate_api/models/crossex_coin_discount_rate.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20047(object): +class CrossexCoinDiscountRate(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,7 +52,7 @@ class InlineResponse20047(object): def __init__(self, coin=None, exchange_type=None, tier=None, min_value=None, max_value=None, discount_rate=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, Configuration) -> None - """InlineResponse20047 - a model defined in OpenAPI""" # noqa: E501 + """CrossexCoinDiscountRate - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -74,22 +74,22 @@ def __init__(self, coin=None, exchange_type=None, tier=None, min_value=None, max @property def coin(self): - """Gets the coin of this InlineResponse20047. # noqa: E501 + """Gets the coin of this CrossexCoinDiscountRate. # noqa: E501 Currency # noqa: E501 - :return: The coin of this InlineResponse20047. # noqa: E501 + :return: The coin of this CrossexCoinDiscountRate. # noqa: E501 :rtype: str """ return self._coin @coin.setter def coin(self, coin): - """Sets the coin of this InlineResponse20047. + """Sets the coin of this CrossexCoinDiscountRate. Currency # noqa: E501 - :param coin: The coin of this InlineResponse20047. # noqa: E501 + :param coin: The coin of this CrossexCoinDiscountRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and coin is None: # noqa: E501 @@ -99,22 +99,22 @@ def coin(self, coin): @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse20047. # noqa: E501 + """Gets the exchange_type of this CrossexCoinDiscountRate. # noqa: E501 Exchange # noqa: E501 - :return: The exchange_type of this InlineResponse20047. # noqa: E501 + :return: The exchange_type of this CrossexCoinDiscountRate. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20047. + """Sets the exchange_type of this CrossexCoinDiscountRate. Exchange # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse20047. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexCoinDiscountRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and exchange_type is None: # noqa: E501 @@ -124,22 +124,22 @@ def exchange_type(self, exchange_type): @property def tier(self): - """Gets the tier of this InlineResponse20047. # noqa: E501 + """Gets the tier of this CrossexCoinDiscountRate. # noqa: E501 Tier # noqa: E501 - :return: The tier of this InlineResponse20047. # noqa: E501 + :return: The tier of this CrossexCoinDiscountRate. # noqa: E501 :rtype: str """ return self._tier @tier.setter def tier(self, tier): - """Sets the tier of this InlineResponse20047. + """Sets the tier of this CrossexCoinDiscountRate. Tier # noqa: E501 - :param tier: The tier of this InlineResponse20047. # noqa: E501 + :param tier: The tier of this CrossexCoinDiscountRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and tier is None: # noqa: E501 @@ -149,22 +149,22 @@ def tier(self, tier): @property def min_value(self): - """Gets the min_value of this InlineResponse20047. # noqa: E501 + """Gets the min_value of this CrossexCoinDiscountRate. # noqa: E501 Minimum value # noqa: E501 - :return: The min_value of this InlineResponse20047. # noqa: E501 + :return: The min_value of this CrossexCoinDiscountRate. # noqa: E501 :rtype: str """ return self._min_value @min_value.setter def min_value(self, min_value): - """Sets the min_value of this InlineResponse20047. + """Sets the min_value of this CrossexCoinDiscountRate. Minimum value # noqa: E501 - :param min_value: The min_value of this InlineResponse20047. # noqa: E501 + :param min_value: The min_value of this CrossexCoinDiscountRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and min_value is None: # noqa: E501 @@ -174,22 +174,22 @@ def min_value(self, min_value): @property def max_value(self): - """Gets the max_value of this InlineResponse20047. # noqa: E501 + """Gets the max_value of this CrossexCoinDiscountRate. # noqa: E501 Maximum value # noqa: E501 - :return: The max_value of this InlineResponse20047. # noqa: E501 + :return: The max_value of this CrossexCoinDiscountRate. # noqa: E501 :rtype: str """ return self._max_value @max_value.setter def max_value(self, max_value): - """Sets the max_value of this InlineResponse20047. + """Sets the max_value of this CrossexCoinDiscountRate. Maximum value # noqa: E501 - :param max_value: The max_value of this InlineResponse20047. # noqa: E501 + :param max_value: The max_value of this CrossexCoinDiscountRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and max_value is None: # noqa: E501 @@ -199,22 +199,22 @@ def max_value(self, max_value): @property def discount_rate(self): - """Gets the discount_rate of this InlineResponse20047. # noqa: E501 + """Gets the discount_rate of this CrossexCoinDiscountRate. # noqa: E501 Discount rate # noqa: E501 - :return: The discount_rate of this InlineResponse20047. # noqa: E501 + :return: The discount_rate of this CrossexCoinDiscountRate. # noqa: E501 :rtype: str """ return self._discount_rate @discount_rate.setter def discount_rate(self, discount_rate): - """Sets the discount_rate of this InlineResponse20047. + """Sets the discount_rate of this CrossexCoinDiscountRate. Discount rate # noqa: E501 - :param discount_rate: The discount_rate of this InlineResponse20047. # noqa: E501 + :param discount_rate: The discount_rate of this CrossexCoinDiscountRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and discount_rate is None: # noqa: E501 @@ -256,14 +256,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20047): + if not isinstance(other, CrossexCoinDiscountRate): 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, InlineResponse20047): + if not isinstance(other, CrossexCoinDiscountRate): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20033.py b/gate_api/models/crossex_convert_order_response.py similarity index 75% rename from gate_api/models/inline_response20033.py rename to gate_api/models/crossex_convert_order_response.py index 35279be3..bdb012bf 100644 --- a/gate_api/models/inline_response20033.py +++ b/gate_api/models/crossex_convert_order_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20033(object): +class CrossexConvertOrderResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,7 +33,7 @@ class InlineResponse20033(object): and the value is json key in definition. """ openapi_types = { - 'order_id': 'float', + 'order_id': 'str', 'text': 'str' } @@ -43,8 +43,8 @@ class InlineResponse20033(object): } def __init__(self, order_id=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, Configuration) -> None - """InlineResponse20033 - a model defined in OpenAPI""" # noqa: E501 + # type: (str, str, Configuration) -> None + """CrossexConvertOrderResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,21 +58,23 @@ def __init__(self, order_id=None, text=None, local_vars_configuration=None): # @property def order_id(self): - """Gets the order_id of this InlineResponse20033. # noqa: E501 + """Gets the order_id of this CrossexConvertOrderResponse. # noqa: E501 + Order ID # noqa: E501 - :return: The order_id of this InlineResponse20033. # noqa: E501 - :rtype: float + :return: The order_id of this CrossexConvertOrderResponse. # noqa: E501 + :rtype: str """ return self._order_id @order_id.setter def order_id(self, order_id): - """Sets the order_id of this InlineResponse20033. + """Sets the order_id of this CrossexConvertOrderResponse. + Order ID # noqa: E501 - :param order_id: The order_id of this InlineResponse20033. # noqa: E501 - :type: float + :param order_id: The order_id of this CrossexConvertOrderResponse. # 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 @@ -81,20 +83,22 @@ def order_id(self, order_id): @property def text(self): - """Gets the text of this InlineResponse20033. # noqa: E501 + """Gets the text of this CrossexConvertOrderResponse. # noqa: E501 + Order ID (cannot be customized) # noqa: E501 - :return: The text of this InlineResponse20033. # noqa: E501 + :return: The text of this CrossexConvertOrderResponse. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): - """Sets the text of this InlineResponse20033. + """Sets the text of this CrossexConvertOrderResponse. + Order ID (cannot be customized) # noqa: E501 - :param text: The text of this InlineResponse20033. # noqa: E501 + :param text: The text of this CrossexConvertOrderResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 @@ -136,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20033): + if not isinstance(other, CrossexConvertOrderResponse): 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, InlineResponse20033): + if not isinstance(other, CrossexConvertOrderResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20034.py b/gate_api/models/crossex_convert_quote_response.py similarity index 74% rename from gate_api/models/inline_response20034.py rename to gate_api/models/crossex_convert_quote_response.py index 5730441b..5bf704af 100644 --- a/gate_api/models/inline_response20034.py +++ b/gate_api/models/crossex_convert_quote_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20034(object): +class CrossexConvertQuoteResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,7 +54,7 @@ class InlineResponse20034(object): def __init__(self, quote_id=None, valid_ms=None, from_coin=None, to_coin=None, from_amount=None, to_amount=None, price=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, Configuration) -> None - """InlineResponse20034 - a model defined in OpenAPI""" # noqa: E501 + """CrossexConvertQuoteResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -78,22 +78,22 @@ def __init__(self, quote_id=None, valid_ms=None, from_coin=None, to_coin=None, f @property def quote_id(self): - """Gets the quote_id of this InlineResponse20034. # noqa: E501 + """Gets the quote_id of this CrossexConvertQuoteResponse. # noqa: E501 Quote ID # noqa: E501 - :return: The quote_id of this InlineResponse20034. # noqa: E501 + :return: The quote_id of this CrossexConvertQuoteResponse. # noqa: E501 :rtype: str """ return self._quote_id @quote_id.setter def quote_id(self, quote_id): - """Sets the quote_id of this InlineResponse20034. + """Sets the quote_id of this CrossexConvertQuoteResponse. Quote ID # noqa: E501 - :param quote_id: The quote_id of this InlineResponse20034. # noqa: E501 + :param quote_id: The quote_id of this CrossexConvertQuoteResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and quote_id is None: # noqa: E501 @@ -103,22 +103,22 @@ def quote_id(self, quote_id): @property def valid_ms(self): - """Gets the valid_ms of this InlineResponse20034. # noqa: E501 + """Gets the valid_ms of this CrossexConvertQuoteResponse. # noqa: E501 Valid time (milliseconds timestamp) # noqa: E501 - :return: The valid_ms of this InlineResponse20034. # noqa: E501 + :return: The valid_ms of this CrossexConvertQuoteResponse. # noqa: E501 :rtype: str """ return self._valid_ms @valid_ms.setter def valid_ms(self, valid_ms): - """Sets the valid_ms of this InlineResponse20034. + """Sets the valid_ms of this CrossexConvertQuoteResponse. Valid time (milliseconds timestamp) # noqa: E501 - :param valid_ms: The valid_ms of this InlineResponse20034. # noqa: E501 + :param valid_ms: The valid_ms of this CrossexConvertQuoteResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and valid_ms is None: # noqa: E501 @@ -128,22 +128,22 @@ def valid_ms(self, valid_ms): @property def from_coin(self): - """Gets the from_coin of this InlineResponse20034. # noqa: E501 + """Gets the from_coin of this CrossexConvertQuoteResponse. # noqa: E501 Asset Sold # noqa: E501 - :return: The from_coin of this InlineResponse20034. # noqa: E501 + :return: The from_coin of this CrossexConvertQuoteResponse. # noqa: E501 :rtype: str """ return self._from_coin @from_coin.setter def from_coin(self, from_coin): - """Sets the from_coin of this InlineResponse20034. + """Sets the from_coin of this CrossexConvertQuoteResponse. Asset Sold # noqa: E501 - :param from_coin: The from_coin of this InlineResponse20034. # noqa: E501 + :param from_coin: The from_coin of this CrossexConvertQuoteResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and from_coin is None: # noqa: E501 @@ -153,22 +153,22 @@ def from_coin(self, from_coin): @property def to_coin(self): - """Gets the to_coin of this InlineResponse20034. # noqa: E501 + """Gets the to_coin of this CrossexConvertQuoteResponse. # noqa: E501 Asset Bought # noqa: E501 - :return: The to_coin of this InlineResponse20034. # noqa: E501 + :return: The to_coin of this CrossexConvertQuoteResponse. # noqa: E501 :rtype: str """ return self._to_coin @to_coin.setter def to_coin(self, to_coin): - """Sets the to_coin of this InlineResponse20034. + """Sets the to_coin of this CrossexConvertQuoteResponse. Asset Bought # noqa: E501 - :param to_coin: The to_coin of this InlineResponse20034. # noqa: E501 + :param to_coin: The to_coin of this CrossexConvertQuoteResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and to_coin is None: # noqa: E501 @@ -178,22 +178,22 @@ def to_coin(self, to_coin): @property def from_amount(self): - """Gets the from_amount of this InlineResponse20034. # noqa: E501 + """Gets the from_amount of this CrossexConvertQuoteResponse. # noqa: E501 Amount to sell # noqa: E501 - :return: The from_amount of this InlineResponse20034. # noqa: E501 + :return: The from_amount of this CrossexConvertQuoteResponse. # noqa: E501 :rtype: str """ return self._from_amount @from_amount.setter def from_amount(self, from_amount): - """Sets the from_amount of this InlineResponse20034. + """Sets the from_amount of this CrossexConvertQuoteResponse. Amount to sell # noqa: E501 - :param from_amount: The from_amount of this InlineResponse20034. # noqa: E501 + :param from_amount: The from_amount of this CrossexConvertQuoteResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and from_amount is None: # noqa: E501 @@ -203,22 +203,22 @@ def from_amount(self, from_amount): @property def to_amount(self): - """Gets the to_amount of this InlineResponse20034. # noqa: E501 + """Gets the to_amount of this CrossexConvertQuoteResponse. # noqa: E501 Amount to buy # noqa: E501 - :return: The to_amount of this InlineResponse20034. # noqa: E501 + :return: The to_amount of this CrossexConvertQuoteResponse. # noqa: E501 :rtype: str """ return self._to_amount @to_amount.setter def to_amount(self, to_amount): - """Sets the to_amount of this InlineResponse20034. + """Sets the to_amount of this CrossexConvertQuoteResponse. Amount to buy # noqa: E501 - :param to_amount: The to_amount of this InlineResponse20034. # noqa: E501 + :param to_amount: The to_amount of this CrossexConvertQuoteResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and to_amount is None: # noqa: E501 @@ -228,22 +228,22 @@ def to_amount(self, to_amount): @property def price(self): - """Gets the price of this InlineResponse20034. # noqa: E501 + """Gets the price of this CrossexConvertQuoteResponse. # noqa: E501 Price # noqa: E501 - :return: The price of this InlineResponse20034. # noqa: E501 + :return: The price of this CrossexConvertQuoteResponse. # noqa: E501 :rtype: str """ return self._price @price.setter def price(self, price): - """Sets the price of this InlineResponse20034. + """Sets the price of this CrossexConvertQuoteResponse. Price # noqa: E501 - :param price: The price of this InlineResponse20034. # noqa: E501 + :param price: The price of this CrossexConvertQuoteResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 @@ -285,14 +285,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20034): + if not isinstance(other, CrossexConvertQuoteResponse): 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, InlineResponse20034): + if not isinstance(other, CrossexConvertQuoteResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20043.py b/gate_api/models/crossex_historical_margin_position.py similarity index 66% rename from gate_api/models/inline_response20043.py rename to gate_api/models/crossex_historical_margin_position.py index 774a1cec..469ffa97 100644 --- a/gate_api/models/inline_response20043.py +++ b/gate_api/models/crossex_historical_margin_position.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20043(object): +class CrossexHistoricalMarginPosition(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,7 +76,7 @@ class InlineResponse20043(object): def __init__(self, position_id=None, user_id=None, symbol=None, closed_type=None, closed_pnl=None, closed_pnl_rate=None, open_avg_price=None, closed_avg_price=None, max_position_qty=None, closed_qty=None, closed_value=None, liq_fee=None, position_side=None, leverage=None, interest=None, business_type=None, create_time=None, update_time=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, Configuration) -> None - """InlineResponse20043 - a model defined in OpenAPI""" # noqa: E501 + """CrossexHistoricalMarginPosition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -138,22 +138,22 @@ def __init__(self, position_id=None, user_id=None, symbol=None, closed_type=None @property def position_id(self): - """Gets the position_id of this InlineResponse20043. # noqa: E501 + """Gets the position_id of this CrossexHistoricalMarginPosition. # noqa: E501 Position ID # noqa: E501 - :return: The position_id of this InlineResponse20043. # noqa: E501 + :return: The position_id of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._position_id @position_id.setter def position_id(self, position_id): - """Sets the position_id of this InlineResponse20043. + """Sets the position_id of this CrossexHistoricalMarginPosition. Position ID # noqa: E501 - :param position_id: The position_id of this InlineResponse20043. # noqa: E501 + :param position_id: The position_id of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -161,22 +161,22 @@ def position_id(self, position_id): @property def user_id(self): - """Gets the user_id of this InlineResponse20043. # noqa: E501 + """Gets the user_id of this CrossexHistoricalMarginPosition. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20043. # noqa: E501 + :return: The user_id of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20043. + """Sets the user_id of this CrossexHistoricalMarginPosition. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20043. # noqa: E501 + :param user_id: The user_id of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -184,22 +184,22 @@ def user_id(self, user_id): @property def symbol(self): - """Gets the symbol of this InlineResponse20043. # noqa: E501 + """Gets the symbol of this CrossexHistoricalMarginPosition. # noqa: E501 Currency pair # noqa: E501 - :return: The symbol of this InlineResponse20043. # noqa: E501 + :return: The symbol of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20043. + """Sets the symbol of this CrossexHistoricalMarginPosition. Currency pair # noqa: E501 - :param symbol: The symbol of this InlineResponse20043. # noqa: E501 + :param symbol: The symbol of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -207,22 +207,22 @@ def symbol(self, symbol): @property def closed_type(self): - """Gets the closed_type of this InlineResponse20043. # noqa: E501 + """Gets the closed_type of this CrossexHistoricalMarginPosition. # noqa: E501 Position close type (PARTIAL_CLOSED: partially closed; COMPLETE_CLOSED: fully closed) # noqa: E501 - :return: The closed_type of this InlineResponse20043. # noqa: E501 + :return: The closed_type of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._closed_type @closed_type.setter def closed_type(self, closed_type): - """Sets the closed_type of this InlineResponse20043. + """Sets the closed_type of this CrossexHistoricalMarginPosition. Position close type (PARTIAL_CLOSED: partially closed; COMPLETE_CLOSED: fully closed) # noqa: E501 - :param closed_type: The closed_type of this InlineResponse20043. # noqa: E501 + :param closed_type: The closed_type of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -230,22 +230,22 @@ def closed_type(self, closed_type): @property def closed_pnl(self): - """Gets the closed_pnl of this InlineResponse20043. # noqa: E501 + """Gets the closed_pnl of this CrossexHistoricalMarginPosition. # noqa: E501 Close Position P&L # noqa: E501 - :return: The closed_pnl of this InlineResponse20043. # noqa: E501 + :return: The closed_pnl of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._closed_pnl @closed_pnl.setter def closed_pnl(self, closed_pnl): - """Sets the closed_pnl of this InlineResponse20043. + """Sets the closed_pnl of this CrossexHistoricalMarginPosition. Close Position P&L # noqa: E501 - :param closed_pnl: The closed_pnl of this InlineResponse20043. # noqa: E501 + :param closed_pnl: The closed_pnl of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -253,22 +253,22 @@ def closed_pnl(self, closed_pnl): @property def closed_pnl_rate(self): - """Gets the closed_pnl_rate of this InlineResponse20043. # noqa: E501 + """Gets the closed_pnl_rate of this CrossexHistoricalMarginPosition. # noqa: E501 Close Position P&L Ratio # noqa: E501 - :return: The closed_pnl_rate of this InlineResponse20043. # noqa: E501 + :return: The closed_pnl_rate of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._closed_pnl_rate @closed_pnl_rate.setter def closed_pnl_rate(self, closed_pnl_rate): - """Sets the closed_pnl_rate of this InlineResponse20043. + """Sets the closed_pnl_rate of this CrossexHistoricalMarginPosition. Close Position P&L Ratio # noqa: E501 - :param closed_pnl_rate: The closed_pnl_rate of this InlineResponse20043. # noqa: E501 + :param closed_pnl_rate: The closed_pnl_rate of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -276,22 +276,22 @@ def closed_pnl_rate(self, closed_pnl_rate): @property def open_avg_price(self): - """Gets the open_avg_price of this InlineResponse20043. # noqa: E501 + """Gets the open_avg_price of this CrossexHistoricalMarginPosition. # noqa: E501 Average Opening Price # noqa: E501 - :return: The open_avg_price of this InlineResponse20043. # noqa: E501 + :return: The open_avg_price of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._open_avg_price @open_avg_price.setter def open_avg_price(self, open_avg_price): - """Sets the open_avg_price of this InlineResponse20043. + """Sets the open_avg_price of this CrossexHistoricalMarginPosition. Average Opening Price # noqa: E501 - :param open_avg_price: The open_avg_price of this InlineResponse20043. # noqa: E501 + :param open_avg_price: The open_avg_price of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -299,22 +299,22 @@ def open_avg_price(self, open_avg_price): @property def closed_avg_price(self): - """Gets the closed_avg_price of this InlineResponse20043. # noqa: E501 + """Gets the closed_avg_price of this CrossexHistoricalMarginPosition. # noqa: E501 Average Close Price # noqa: E501 - :return: The closed_avg_price of this InlineResponse20043. # noqa: E501 + :return: The closed_avg_price of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._closed_avg_price @closed_avg_price.setter def closed_avg_price(self, closed_avg_price): - """Sets the closed_avg_price of this InlineResponse20043. + """Sets the closed_avg_price of this CrossexHistoricalMarginPosition. Average Close Price # noqa: E501 - :param closed_avg_price: The closed_avg_price of this InlineResponse20043. # noqa: E501 + :param closed_avg_price: The closed_avg_price of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -322,22 +322,22 @@ def closed_avg_price(self, closed_avg_price): @property def max_position_qty(self): - """Gets the max_position_qty of this InlineResponse20043. # noqa: E501 + """Gets the max_position_qty of this CrossexHistoricalMarginPosition. # noqa: E501 Max Trade Size # noqa: E501 - :return: The max_position_qty of this InlineResponse20043. # noqa: E501 + :return: The max_position_qty of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._max_position_qty @max_position_qty.setter def max_position_qty(self, max_position_qty): - """Sets the max_position_qty of this InlineResponse20043. + """Sets the max_position_qty of this CrossexHistoricalMarginPosition. Max Trade Size # noqa: E501 - :param max_position_qty: The max_position_qty of this InlineResponse20043. # noqa: E501 + :param max_position_qty: The max_position_qty of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -345,22 +345,22 @@ def max_position_qty(self, max_position_qty): @property def closed_qty(self): - """Gets the closed_qty of this InlineResponse20043. # noqa: E501 + """Gets the closed_qty of this CrossexHistoricalMarginPosition. # noqa: E501 Close Position Quantity # noqa: E501 - :return: The closed_qty of this InlineResponse20043. # noqa: E501 + :return: The closed_qty of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._closed_qty @closed_qty.setter def closed_qty(self, closed_qty): - """Sets the closed_qty of this InlineResponse20043. + """Sets the closed_qty of this CrossexHistoricalMarginPosition. Close Position Quantity # noqa: E501 - :param closed_qty: The closed_qty of this InlineResponse20043. # noqa: E501 + :param closed_qty: The closed_qty of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -368,22 +368,22 @@ def closed_qty(self, closed_qty): @property def closed_value(self): - """Gets the closed_value of this InlineResponse20043. # noqa: E501 + """Gets the closed_value of this CrossexHistoricalMarginPosition. # noqa: E501 Close Position Value # noqa: E501 - :return: The closed_value of this InlineResponse20043. # noqa: E501 + :return: The closed_value of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._closed_value @closed_value.setter def closed_value(self, closed_value): - """Sets the closed_value of this InlineResponse20043. + """Sets the closed_value of this CrossexHistoricalMarginPosition. Close Position Value # noqa: E501 - :param closed_value: The closed_value of this InlineResponse20043. # noqa: E501 + :param closed_value: The closed_value of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -391,22 +391,22 @@ def closed_value(self, closed_value): @property def liq_fee(self): - """Gets the liq_fee of this InlineResponse20043. # noqa: E501 + """Gets the liq_fee of this CrossexHistoricalMarginPosition. # noqa: E501 Liquidation Fee # noqa: E501 - :return: The liq_fee of this InlineResponse20043. # noqa: E501 + :return: The liq_fee of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._liq_fee @liq_fee.setter def liq_fee(self, liq_fee): - """Sets the liq_fee of this InlineResponse20043. + """Sets the liq_fee of this CrossexHistoricalMarginPosition. Liquidation Fee # noqa: E501 - :param liq_fee: The liq_fee of this InlineResponse20043. # noqa: E501 + :param liq_fee: The liq_fee of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -414,22 +414,22 @@ def liq_fee(self, liq_fee): @property def position_side(self): - """Gets the position_side of this InlineResponse20043. # noqa: E501 + """Gets the position_side of this CrossexHistoricalMarginPosition. # noqa: E501 Position Direction Before Close # noqa: E501 - :return: The position_side of this InlineResponse20043. # noqa: E501 + :return: The position_side of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._position_side @position_side.setter def position_side(self, position_side): - """Sets the position_side of this InlineResponse20043. + """Sets the position_side of this CrossexHistoricalMarginPosition. Position Direction Before Close # noqa: E501 - :param position_side: The position_side of this InlineResponse20043. # noqa: E501 + :param position_side: The position_side of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -437,22 +437,22 @@ def position_side(self, position_side): @property def leverage(self): - """Gets the leverage of this InlineResponse20043. # noqa: E501 + """Gets the leverage of this CrossexHistoricalMarginPosition. # noqa: E501 Leverage at Close # noqa: E501 - :return: The leverage of this InlineResponse20043. # noqa: E501 + :return: The leverage of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._leverage @leverage.setter def leverage(self, leverage): - """Sets the leverage of this InlineResponse20043. + """Sets the leverage of this CrossexHistoricalMarginPosition. Leverage at Close # noqa: E501 - :param leverage: The leverage of this InlineResponse20043. # noqa: E501 + :param leverage: The leverage of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -460,22 +460,22 @@ def leverage(self, leverage): @property def interest(self): - """Gets the interest of this InlineResponse20043. # noqa: E501 + """Gets the interest of this CrossexHistoricalMarginPosition. # noqa: E501 Total Deducted Interest # noqa: E501 - :return: The interest of this InlineResponse20043. # noqa: E501 + :return: The interest of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._interest @interest.setter def interest(self, interest): - """Sets the interest of this InlineResponse20043. + """Sets the interest of this CrossexHistoricalMarginPosition. Total Deducted Interest # noqa: E501 - :param interest: The interest of this InlineResponse20043. # noqa: E501 + :param interest: The interest of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and interest is None: # noqa: E501 @@ -485,22 +485,22 @@ def interest(self, interest): @property def business_type(self): - """Gets the business_type of this InlineResponse20043. # noqa: E501 + """Gets the business_type of this CrossexHistoricalMarginPosition. # noqa: E501 Position Business Type # noqa: E501 - :return: The business_type of this InlineResponse20043. # noqa: E501 + :return: The business_type of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._business_type @business_type.setter def business_type(self, business_type): - """Sets the business_type of this InlineResponse20043. + """Sets the business_type of this CrossexHistoricalMarginPosition. Position Business Type # noqa: E501 - :param business_type: The business_type of this InlineResponse20043. # noqa: E501 + :param business_type: The business_type of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and business_type is None: # noqa: E501 @@ -510,22 +510,22 @@ def business_type(self, business_type): @property def create_time(self): - """Gets the create_time of this InlineResponse20043. # noqa: E501 + """Gets the create_time of this CrossexHistoricalMarginPosition. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20043. # noqa: E501 + :return: The create_time of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20043. + """Sets the create_time of this CrossexHistoricalMarginPosition. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20043. # noqa: E501 + :param create_time: The create_time of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -533,22 +533,22 @@ def create_time(self, create_time): @property def update_time(self): - """Gets the update_time of this InlineResponse20043. # noqa: E501 + """Gets the update_time of this CrossexHistoricalMarginPosition. # noqa: E501 Update time # noqa: E501 - :return: The update_time of this InlineResponse20043. # noqa: E501 + :return: The update_time of this CrossexHistoricalMarginPosition. # noqa: E501 :rtype: str """ return self._update_time @update_time.setter def update_time(self, update_time): - """Sets the update_time of this InlineResponse20043. + """Sets the update_time of this CrossexHistoricalMarginPosition. Update time # noqa: E501 - :param update_time: The update_time of this InlineResponse20043. # noqa: E501 + :param update_time: The update_time of this CrossexHistoricalMarginPosition. # noqa: E501 :type: str """ @@ -588,14 +588,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20043): + if not isinstance(other, CrossexHistoricalMarginPosition): 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, InlineResponse20043): + if not isinstance(other, CrossexHistoricalMarginPosition): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20042.py b/gate_api/models/crossex_historical_position.py similarity index 68% rename from gate_api/models/inline_response20042.py rename to gate_api/models/crossex_historical_position.py index 027470a5..ad190e6f 100644 --- a/gate_api/models/inline_response20042.py +++ b/gate_api/models/crossex_historical_position.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20042(object): +class CrossexHistoricalPosition(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -80,7 +80,7 @@ class InlineResponse20042(object): def __init__(self, position_id=None, user_id=None, symbol=None, closed_type=None, closed_pnl=None, closed_pnl_rate=None, open_avg_price=None, closed_avg_price=None, max_position_qty=None, closed_qty=None, closed_value=None, fee=None, liq_fee=None, funding_fee=None, position_side=None, position_mode=None, leverage=None, business_type=None, create_time=None, update_time=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, Configuration) -> None - """InlineResponse20042 - a model defined in OpenAPI""" # noqa: E501 + """CrossexHistoricalPosition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -149,22 +149,22 @@ def __init__(self, position_id=None, user_id=None, symbol=None, closed_type=None @property def position_id(self): - """Gets the position_id of this InlineResponse20042. # noqa: E501 + """Gets the position_id of this CrossexHistoricalPosition. # noqa: E501 Position ID # noqa: E501 - :return: The position_id of this InlineResponse20042. # noqa: E501 + :return: The position_id of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._position_id @position_id.setter def position_id(self, position_id): - """Sets the position_id of this InlineResponse20042. + """Sets the position_id of this CrossexHistoricalPosition. Position ID # noqa: E501 - :param position_id: The position_id of this InlineResponse20042. # noqa: E501 + :param position_id: The position_id of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -172,22 +172,22 @@ def position_id(self, position_id): @property def user_id(self): - """Gets the user_id of this InlineResponse20042. # noqa: E501 + """Gets the user_id of this CrossexHistoricalPosition. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20042. # noqa: E501 + :return: The user_id of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20042. + """Sets the user_id of this CrossexHistoricalPosition. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20042. # noqa: E501 + :param user_id: The user_id of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -195,22 +195,22 @@ def user_id(self, user_id): @property def symbol(self): - """Gets the symbol of this InlineResponse20042. # noqa: E501 + """Gets the symbol of this CrossexHistoricalPosition. # noqa: E501 Currency pair # noqa: E501 - :return: The symbol of this InlineResponse20042. # noqa: E501 + :return: The symbol of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20042. + """Sets the symbol of this CrossexHistoricalPosition. Currency pair # noqa: E501 - :param symbol: The symbol of this InlineResponse20042. # noqa: E501 + :param symbol: The symbol of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -218,22 +218,22 @@ def symbol(self, symbol): @property def closed_type(self): - """Gets the closed_type of this InlineResponse20042. # noqa: E501 + """Gets the closed_type of this CrossexHistoricalPosition. # noqa: E501 Position close type (PARTIAL_CLOSED: partially closed; COMPLETE_CLOSED: fully closed) # noqa: E501 - :return: The closed_type of this InlineResponse20042. # noqa: E501 + :return: The closed_type of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._closed_type @closed_type.setter def closed_type(self, closed_type): - """Sets the closed_type of this InlineResponse20042. + """Sets the closed_type of this CrossexHistoricalPosition. Position close type (PARTIAL_CLOSED: partially closed; COMPLETE_CLOSED: fully closed) # noqa: E501 - :param closed_type: The closed_type of this InlineResponse20042. # noqa: E501 + :param closed_type: The closed_type of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -241,22 +241,22 @@ def closed_type(self, closed_type): @property def closed_pnl(self): - """Gets the closed_pnl of this InlineResponse20042. # noqa: E501 + """Gets the closed_pnl of this CrossexHistoricalPosition. # noqa: E501 Close Position P&L # noqa: E501 - :return: The closed_pnl of this InlineResponse20042. # noqa: E501 + :return: The closed_pnl of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._closed_pnl @closed_pnl.setter def closed_pnl(self, closed_pnl): - """Sets the closed_pnl of this InlineResponse20042. + """Sets the closed_pnl of this CrossexHistoricalPosition. Close Position P&L # noqa: E501 - :param closed_pnl: The closed_pnl of this InlineResponse20042. # noqa: E501 + :param closed_pnl: The closed_pnl of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -264,22 +264,22 @@ def closed_pnl(self, closed_pnl): @property def closed_pnl_rate(self): - """Gets the closed_pnl_rate of this InlineResponse20042. # noqa: E501 + """Gets the closed_pnl_rate of this CrossexHistoricalPosition. # noqa: E501 Close Position P&L Ratio # noqa: E501 - :return: The closed_pnl_rate of this InlineResponse20042. # noqa: E501 + :return: The closed_pnl_rate of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._closed_pnl_rate @closed_pnl_rate.setter def closed_pnl_rate(self, closed_pnl_rate): - """Sets the closed_pnl_rate of this InlineResponse20042. + """Sets the closed_pnl_rate of this CrossexHistoricalPosition. Close Position P&L Ratio # noqa: E501 - :param closed_pnl_rate: The closed_pnl_rate of this InlineResponse20042. # noqa: E501 + :param closed_pnl_rate: The closed_pnl_rate of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -287,22 +287,22 @@ def closed_pnl_rate(self, closed_pnl_rate): @property def open_avg_price(self): - """Gets the open_avg_price of this InlineResponse20042. # noqa: E501 + """Gets the open_avg_price of this CrossexHistoricalPosition. # noqa: E501 Average Opening Price # noqa: E501 - :return: The open_avg_price of this InlineResponse20042. # noqa: E501 + :return: The open_avg_price of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._open_avg_price @open_avg_price.setter def open_avg_price(self, open_avg_price): - """Sets the open_avg_price of this InlineResponse20042. + """Sets the open_avg_price of this CrossexHistoricalPosition. Average Opening Price # noqa: E501 - :param open_avg_price: The open_avg_price of this InlineResponse20042. # noqa: E501 + :param open_avg_price: The open_avg_price of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -310,22 +310,22 @@ def open_avg_price(self, open_avg_price): @property def closed_avg_price(self): - """Gets the closed_avg_price of this InlineResponse20042. # noqa: E501 + """Gets the closed_avg_price of this CrossexHistoricalPosition. # noqa: E501 Average Close Price # noqa: E501 - :return: The closed_avg_price of this InlineResponse20042. # noqa: E501 + :return: The closed_avg_price of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._closed_avg_price @closed_avg_price.setter def closed_avg_price(self, closed_avg_price): - """Sets the closed_avg_price of this InlineResponse20042. + """Sets the closed_avg_price of this CrossexHistoricalPosition. Average Close Price # noqa: E501 - :param closed_avg_price: The closed_avg_price of this InlineResponse20042. # noqa: E501 + :param closed_avg_price: The closed_avg_price of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -333,22 +333,22 @@ def closed_avg_price(self, closed_avg_price): @property def max_position_qty(self): - """Gets the max_position_qty of this InlineResponse20042. # noqa: E501 + """Gets the max_position_qty of this CrossexHistoricalPosition. # noqa: E501 Max Trade Size # noqa: E501 - :return: The max_position_qty of this InlineResponse20042. # noqa: E501 + :return: The max_position_qty of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._max_position_qty @max_position_qty.setter def max_position_qty(self, max_position_qty): - """Sets the max_position_qty of this InlineResponse20042. + """Sets the max_position_qty of this CrossexHistoricalPosition. Max Trade Size # noqa: E501 - :param max_position_qty: The max_position_qty of this InlineResponse20042. # noqa: E501 + :param max_position_qty: The max_position_qty of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -356,22 +356,22 @@ def max_position_qty(self, max_position_qty): @property def closed_qty(self): - """Gets the closed_qty of this InlineResponse20042. # noqa: E501 + """Gets the closed_qty of this CrossexHistoricalPosition. # noqa: E501 Close Position Quantity # noqa: E501 - :return: The closed_qty of this InlineResponse20042. # noqa: E501 + :return: The closed_qty of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._closed_qty @closed_qty.setter def closed_qty(self, closed_qty): - """Sets the closed_qty of this InlineResponse20042. + """Sets the closed_qty of this CrossexHistoricalPosition. Close Position Quantity # noqa: E501 - :param closed_qty: The closed_qty of this InlineResponse20042. # noqa: E501 + :param closed_qty: The closed_qty of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -379,22 +379,22 @@ def closed_qty(self, closed_qty): @property def closed_value(self): - """Gets the closed_value of this InlineResponse20042. # noqa: E501 + """Gets the closed_value of this CrossexHistoricalPosition. # noqa: E501 Close Position Value # noqa: E501 - :return: The closed_value of this InlineResponse20042. # noqa: E501 + :return: The closed_value of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._closed_value @closed_value.setter def closed_value(self, closed_value): - """Sets the closed_value of this InlineResponse20042. + """Sets the closed_value of this CrossexHistoricalPosition. Close Position Value # noqa: E501 - :param closed_value: The closed_value of this InlineResponse20042. # noqa: E501 + :param closed_value: The closed_value of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -402,22 +402,22 @@ def closed_value(self, closed_value): @property def fee(self): - """Gets the fee of this InlineResponse20042. # noqa: E501 + """Gets the fee of this CrossexHistoricalPosition. # noqa: E501 Position Accumulated Fees # noqa: E501 - :return: The fee of this InlineResponse20042. # noqa: E501 + :return: The fee of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._fee @fee.setter def fee(self, fee): - """Sets the fee of this InlineResponse20042. + """Sets the fee of this CrossexHistoricalPosition. Position Accumulated Fees # noqa: E501 - :param fee: The fee of this InlineResponse20042. # noqa: E501 + :param fee: The fee of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -425,22 +425,22 @@ def fee(self, fee): @property def liq_fee(self): - """Gets the liq_fee of this InlineResponse20042. # noqa: E501 + """Gets the liq_fee of this CrossexHistoricalPosition. # noqa: E501 Liquidation Fee # noqa: E501 - :return: The liq_fee of this InlineResponse20042. # noqa: E501 + :return: The liq_fee of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._liq_fee @liq_fee.setter def liq_fee(self, liq_fee): - """Sets the liq_fee of this InlineResponse20042. + """Sets the liq_fee of this CrossexHistoricalPosition. Liquidation Fee # noqa: E501 - :param liq_fee: The liq_fee of this InlineResponse20042. # noqa: E501 + :param liq_fee: The liq_fee of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -448,22 +448,22 @@ def liq_fee(self, liq_fee): @property def funding_fee(self): - """Gets the funding_fee of this InlineResponse20042. # noqa: E501 + """Gets the funding_fee of this CrossexHistoricalPosition. # noqa: E501 Funding Fee # noqa: E501 - :return: The funding_fee of this InlineResponse20042. # noqa: E501 + :return: The funding_fee of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._funding_fee @funding_fee.setter def funding_fee(self, funding_fee): - """Sets the funding_fee of this InlineResponse20042. + """Sets the funding_fee of this CrossexHistoricalPosition. Funding Fee # noqa: E501 - :param funding_fee: The funding_fee of this InlineResponse20042. # noqa: E501 + :param funding_fee: The funding_fee of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -471,22 +471,22 @@ def funding_fee(self, funding_fee): @property def position_side(self): - """Gets the position_side of this InlineResponse20042. # noqa: E501 + """Gets the position_side of this CrossexHistoricalPosition. # noqa: E501 Position Direction Before Close # noqa: E501 - :return: The position_side of this InlineResponse20042. # noqa: E501 + :return: The position_side of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._position_side @position_side.setter def position_side(self, position_side): - """Sets the position_side of this InlineResponse20042. + """Sets the position_side of this CrossexHistoricalPosition. Position Direction Before Close # noqa: E501 - :param position_side: The position_side of this InlineResponse20042. # noqa: E501 + :param position_side: The position_side of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -494,22 +494,22 @@ def position_side(self, position_side): @property def position_mode(self): - """Gets the position_mode of this InlineResponse20042. # noqa: E501 + """Gets the position_mode of this CrossexHistoricalPosition. # noqa: E501 Position Mode at Close # noqa: E501 - :return: The position_mode of this InlineResponse20042. # noqa: E501 + :return: The position_mode of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._position_mode @position_mode.setter def position_mode(self, position_mode): - """Sets the position_mode of this InlineResponse20042. + """Sets the position_mode of this CrossexHistoricalPosition. Position Mode at Close # noqa: E501 - :param position_mode: The position_mode of this InlineResponse20042. # noqa: E501 + :param position_mode: The position_mode of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -517,22 +517,22 @@ def position_mode(self, position_mode): @property def leverage(self): - """Gets the leverage of this InlineResponse20042. # noqa: E501 + """Gets the leverage of this CrossexHistoricalPosition. # noqa: E501 Leverage at Close # noqa: E501 - :return: The leverage of this InlineResponse20042. # noqa: E501 + :return: The leverage of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._leverage @leverage.setter def leverage(self, leverage): - """Sets the leverage of this InlineResponse20042. + """Sets the leverage of this CrossexHistoricalPosition. Leverage at Close # noqa: E501 - :param leverage: The leverage of this InlineResponse20042. # noqa: E501 + :param leverage: The leverage of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -540,22 +540,22 @@ def leverage(self, leverage): @property def business_type(self): - """Gets the business_type of this InlineResponse20042. # noqa: E501 + """Gets the business_type of this CrossexHistoricalPosition. # noqa: E501 Business Type # noqa: E501 - :return: The business_type of this InlineResponse20042. # noqa: E501 + :return: The business_type of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._business_type @business_type.setter def business_type(self, business_type): - """Sets the business_type of this InlineResponse20042. + """Sets the business_type of this CrossexHistoricalPosition. Business Type # noqa: E501 - :param business_type: The business_type of this InlineResponse20042. # noqa: E501 + :param business_type: The business_type of this CrossexHistoricalPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and business_type is None: # noqa: E501 @@ -565,22 +565,22 @@ def business_type(self, business_type): @property def create_time(self): - """Gets the create_time of this InlineResponse20042. # noqa: E501 + """Gets the create_time of this CrossexHistoricalPosition. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20042. # noqa: E501 + :return: The create_time of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20042. + """Sets the create_time of this CrossexHistoricalPosition. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20042. # noqa: E501 + :param create_time: The create_time of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -588,22 +588,22 @@ def create_time(self, create_time): @property def update_time(self): - """Gets the update_time of this InlineResponse20042. # noqa: E501 + """Gets the update_time of this CrossexHistoricalPosition. # noqa: E501 Update time # noqa: E501 - :return: The update_time of this InlineResponse20042. # noqa: E501 + :return: The update_time of this CrossexHistoricalPosition. # noqa: E501 :rtype: str """ return self._update_time @update_time.setter def update_time(self, update_time): - """Sets the update_time of this InlineResponse20042. + """Sets the update_time of this CrossexHistoricalPosition. Update time # noqa: E501 - :param update_time: The update_time of this InlineResponse20042. # noqa: E501 + :param update_time: The update_time of this CrossexHistoricalPosition. # noqa: E501 :type: str """ @@ -643,14 +643,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20042): + if not isinstance(other, CrossexHistoricalPosition): 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, InlineResponse20042): + if not isinstance(other, CrossexHistoricalPosition): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20036.py b/gate_api/models/crossex_interest_rate.py similarity index 81% rename from gate_api/models/inline_response20036.py rename to gate_api/models/crossex_interest_rate.py index ead36ec7..75c99a0f 100644 --- a/gate_api/models/inline_response20036.py +++ b/gate_api/models/crossex_interest_rate.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20036(object): +class CrossexInterestRate(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -48,7 +48,7 @@ class InlineResponse20036(object): def __init__(self, coin=None, exchange_type=None, hour_interest_rate=None, time=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, Configuration) -> None - """InlineResponse20036 - a model defined in OpenAPI""" # noqa: E501 + """CrossexInterestRate - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -66,22 +66,22 @@ def __init__(self, coin=None, exchange_type=None, hour_interest_rate=None, time= @property def coin(self): - """Gets the coin of this InlineResponse20036. # noqa: E501 + """Gets the coin of this CrossexInterestRate. # noqa: E501 Currency # noqa: E501 - :return: The coin of this InlineResponse20036. # noqa: E501 + :return: The coin of this CrossexInterestRate. # noqa: E501 :rtype: str """ return self._coin @coin.setter def coin(self, coin): - """Sets the coin of this InlineResponse20036. + """Sets the coin of this CrossexInterestRate. Currency # noqa: E501 - :param coin: The coin of this InlineResponse20036. # noqa: E501 + :param coin: The coin of this CrossexInterestRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and coin is None: # noqa: E501 @@ -91,22 +91,22 @@ def coin(self, coin): @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse20036. # noqa: E501 + """Gets the exchange_type of this CrossexInterestRate. # noqa: E501 Exchange # noqa: E501 - :return: The exchange_type of this InlineResponse20036. # noqa: E501 + :return: The exchange_type of this CrossexInterestRate. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20036. + """Sets the exchange_type of this CrossexInterestRate. Exchange # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse20036. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexInterestRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and exchange_type is None: # noqa: E501 @@ -116,22 +116,22 @@ def exchange_type(self, exchange_type): @property def hour_interest_rate(self): - """Gets the hour_interest_rate of this InlineResponse20036. # noqa: E501 + """Gets the hour_interest_rate of this CrossexInterestRate. # noqa: E501 Hourly Interest Rate # noqa: E501 - :return: The hour_interest_rate of this InlineResponse20036. # noqa: E501 + :return: The hour_interest_rate of this CrossexInterestRate. # noqa: E501 :rtype: str """ return self._hour_interest_rate @hour_interest_rate.setter def hour_interest_rate(self, hour_interest_rate): - """Sets the hour_interest_rate of this InlineResponse20036. + """Sets the hour_interest_rate of this CrossexInterestRate. Hourly Interest Rate # noqa: E501 - :param hour_interest_rate: The hour_interest_rate of this InlineResponse20036. # noqa: E501 + :param hour_interest_rate: The hour_interest_rate of this CrossexInterestRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and hour_interest_rate is None: # noqa: E501 @@ -141,22 +141,22 @@ def hour_interest_rate(self, hour_interest_rate): @property def time(self): - """Gets the time of this InlineResponse20036. # noqa: E501 + """Gets the time of this CrossexInterestRate. # noqa: E501 Millisecond Timestamp # noqa: E501 - :return: The time of this InlineResponse20036. # noqa: E501 + :return: The time of this CrossexInterestRate. # noqa: E501 :rtype: str """ return self._time @time.setter def time(self, time): - """Sets the time of this InlineResponse20036. + """Sets the time of this CrossexInterestRate. Millisecond Timestamp # noqa: E501 - :param time: The time of this InlineResponse20036. # noqa: E501 + :param time: The time of this CrossexInterestRate. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and time is None: # noqa: E501 @@ -198,14 +198,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20036): + if not isinstance(other, CrossexInterestRate): 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, InlineResponse20036): + if not isinstance(other, CrossexInterestRate): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2021.py b/gate_api/models/crossex_leverage_response.py similarity index 82% rename from gate_api/models/inline_response2021.py rename to gate_api/models/crossex_leverage_response.py index 56c17aa6..57b035d0 100644 --- a/gate_api/models/inline_response2021.py +++ b/gate_api/models/crossex_leverage_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2021(object): +class CrossexLeverageResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse2021(object): def __init__(self, symbol=None, leverage=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """InlineResponse2021 - a model defined in OpenAPI""" # noqa: E501 + """CrossexLeverageResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,22 +58,22 @@ def __init__(self, symbol=None, leverage=None, local_vars_configuration=None): @property def symbol(self): - """Gets the symbol of this InlineResponse2021. # noqa: E501 + """Gets the symbol of this CrossexLeverageResponse. # noqa: E501 Currency pair # noqa: E501 - :return: The symbol of this InlineResponse2021. # noqa: E501 + :return: The symbol of this CrossexLeverageResponse. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse2021. + """Sets the symbol of this CrossexLeverageResponse. Currency pair # noqa: E501 - :param symbol: The symbol of this InlineResponse2021. # noqa: E501 + :param symbol: The symbol of this CrossexLeverageResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 @@ -83,22 +83,22 @@ def symbol(self, symbol): @property def leverage(self): - """Gets the leverage of this InlineResponse2021. # noqa: E501 + """Gets the leverage of this CrossexLeverageResponse. # noqa: E501 Requested Modified Leverage # noqa: E501 - :return: The leverage of this InlineResponse2021. # noqa: E501 + :return: The leverage of this CrossexLeverageResponse. # noqa: E501 :rtype: str """ return self._leverage @leverage.setter def leverage(self, leverage): - """Sets the leverage of this InlineResponse2021. + """Sets the leverage of this CrossexLeverageResponse. Requested Modified Leverage # noqa: E501 - :param leverage: The leverage of this InlineResponse2021. # noqa: E501 + :param leverage: The leverage of this CrossexLeverageResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501 @@ -140,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2021): + if not isinstance(other, CrossexLeverageResponse): 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, InlineResponse2021): + if not isinstance(other, CrossexLeverageResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20044.py b/gate_api/models/crossex_margin_interest_record.py similarity index 69% rename from gate_api/models/inline_response20044.py rename to gate_api/models/crossex_margin_interest_record.py index d39add09..1a638902 100644 --- a/gate_api/models/inline_response20044.py +++ b/gate_api/models/crossex_margin_interest_record.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20044(object): +class CrossexMarginInterestRecord(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -62,7 +62,7 @@ class InlineResponse20044(object): def __init__(self, user_id=None, symbol=None, interest_id=None, liability_id=None, liability=None, liability_coin=None, interest=None, interest_rate=None, interest_type=None, create_time=None, exchange_type=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """InlineResponse20044 - a model defined in OpenAPI""" # noqa: E501 + """CrossexMarginInterestRecord - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -94,22 +94,22 @@ def __init__(self, user_id=None, symbol=None, interest_id=None, liability_id=Non @property def user_id(self): - """Gets the user_id of this InlineResponse20044. # noqa: E501 + """Gets the user_id of this CrossexMarginInterestRecord. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20044. # noqa: E501 + :return: The user_id of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20044. + """Sets the user_id of this CrossexMarginInterestRecord. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20044. # noqa: E501 + :param user_id: The user_id of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 @@ -119,22 +119,22 @@ def user_id(self, user_id): @property def symbol(self): - """Gets the symbol of this InlineResponse20044. # noqa: E501 + """Gets the symbol of this CrossexMarginInterestRecord. # noqa: E501 Trading Pair # noqa: E501 - :return: The symbol of this InlineResponse20044. # noqa: E501 + :return: The symbol of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20044. + """Sets the symbol of this CrossexMarginInterestRecord. Trading Pair # noqa: E501 - :param symbol: The symbol of this InlineResponse20044. # noqa: E501 + :param symbol: The symbol of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 @@ -144,22 +144,22 @@ def symbol(self, symbol): @property def interest_id(self): - """Gets the interest_id of this InlineResponse20044. # noqa: E501 + """Gets the interest_id of this CrossexMarginInterestRecord. # noqa: E501 Interest Deduction ID # noqa: E501 - :return: The interest_id of this InlineResponse20044. # noqa: E501 + :return: The interest_id of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._interest_id @interest_id.setter def interest_id(self, interest_id): - """Sets the interest_id of this InlineResponse20044. + """Sets the interest_id of this CrossexMarginInterestRecord. Interest Deduction ID # noqa: E501 - :param interest_id: The interest_id of this InlineResponse20044. # noqa: E501 + :param interest_id: The interest_id of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and interest_id is None: # noqa: E501 @@ -169,22 +169,22 @@ def interest_id(self, interest_id): @property def liability_id(self): - """Gets the liability_id of this InlineResponse20044. # noqa: E501 + """Gets the liability_id of this CrossexMarginInterestRecord. # noqa: E501 Debt Source ID, can be Order ID or Position ID # noqa: E501 - :return: The liability_id of this InlineResponse20044. # noqa: E501 + :return: The liability_id of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._liability_id @liability_id.setter def liability_id(self, liability_id): - """Sets the liability_id of this InlineResponse20044. + """Sets the liability_id of this CrossexMarginInterestRecord. Debt Source ID, can be Order ID or Position ID # noqa: E501 - :param liability_id: The liability_id of this InlineResponse20044. # noqa: E501 + :param liability_id: The liability_id of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and liability_id is None: # noqa: E501 @@ -194,22 +194,22 @@ def liability_id(self, liability_id): @property def liability(self): - """Gets the liability of this InlineResponse20044. # noqa: E501 + """Gets the liability of this CrossexMarginInterestRecord. # noqa: E501 Debt Quantity # noqa: E501 - :return: The liability of this InlineResponse20044. # noqa: E501 + :return: The liability of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._liability @liability.setter def liability(self, liability): - """Sets the liability of this InlineResponse20044. + """Sets the liability of this CrossexMarginInterestRecord. Debt Quantity # noqa: E501 - :param liability: The liability of this InlineResponse20044. # noqa: E501 + :param liability: The liability of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and liability is None: # noqa: E501 @@ -219,22 +219,22 @@ def liability(self, liability): @property def liability_coin(self): - """Gets the liability_coin of this InlineResponse20044. # noqa: E501 + """Gets the liability_coin of this CrossexMarginInterestRecord. # noqa: E501 Debt Currency # noqa: E501 - :return: The liability_coin of this InlineResponse20044. # noqa: E501 + :return: The liability_coin of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._liability_coin @liability_coin.setter def liability_coin(self, liability_coin): - """Sets the liability_coin of this InlineResponse20044. + """Sets the liability_coin of this CrossexMarginInterestRecord. Debt Currency # noqa: E501 - :param liability_coin: The liability_coin of this InlineResponse20044. # noqa: E501 + :param liability_coin: The liability_coin of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and liability_coin is None: # noqa: E501 @@ -244,22 +244,22 @@ def liability_coin(self, liability_coin): @property def interest(self): - """Gets the interest of this InlineResponse20044. # noqa: E501 + """Gets the interest of this CrossexMarginInterestRecord. # noqa: E501 Interest # noqa: E501 - :return: The interest of this InlineResponse20044. # noqa: E501 + :return: The interest of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._interest @interest.setter def interest(self, interest): - """Sets the interest of this InlineResponse20044. + """Sets the interest of this CrossexMarginInterestRecord. Interest # noqa: E501 - :param interest: The interest of this InlineResponse20044. # noqa: E501 + :param interest: The interest of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and interest is None: # noqa: E501 @@ -269,22 +269,22 @@ def interest(self, interest): @property def interest_rate(self): - """Gets the interest_rate of this InlineResponse20044. # noqa: E501 + """Gets the interest_rate of this CrossexMarginInterestRecord. # noqa: E501 interest rate # noqa: E501 - :return: The interest_rate of this InlineResponse20044. # noqa: E501 + :return: The interest_rate of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._interest_rate @interest_rate.setter def interest_rate(self, interest_rate): - """Sets the interest_rate of this InlineResponse20044. + """Sets the interest_rate of this CrossexMarginInterestRecord. interest rate # noqa: E501 - :param interest_rate: The interest_rate of this InlineResponse20044. # noqa: E501 + :param interest_rate: The interest_rate of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and interest_rate is None: # noqa: E501 @@ -294,22 +294,22 @@ def interest_rate(self, interest_rate): @property def interest_type(self): - """Gets the interest_type of this InlineResponse20044. # noqa: E501 + """Gets the interest_type of this CrossexMarginInterestRecord. # noqa: E501 - Interest deduction type (`PERIODIC_POSITION`: periodic position interest; `PERIODIC_OPEN_ORDER`: periodic open-order interest; `IMMEDIATE_OPEN_ORDER`: interest charged on order opening) # noqa: E501 + Interest deduction type (`PERIODIC_POSITION` hourly interest on position, `PERIODIC_OPEN_ORDER` hourly interest on open orders, `IMMEDIATE_OPEN_ORDER` interest charged on order placement, `PERIODIC_ISOLATED` hourly interest on debt) # noqa: E501 - :return: The interest_type of this InlineResponse20044. # noqa: E501 + :return: The interest_type of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._interest_type @interest_type.setter def interest_type(self, interest_type): - """Sets the interest_type of this InlineResponse20044. + """Sets the interest_type of this CrossexMarginInterestRecord. - Interest deduction type (`PERIODIC_POSITION`: periodic position interest; `PERIODIC_OPEN_ORDER`: periodic open-order interest; `IMMEDIATE_OPEN_ORDER`: interest charged on order opening) # noqa: E501 + Interest deduction type (`PERIODIC_POSITION` hourly interest on position, `PERIODIC_OPEN_ORDER` hourly interest on open orders, `IMMEDIATE_OPEN_ORDER` interest charged on order placement, `PERIODIC_ISOLATED` hourly interest on debt) # noqa: E501 - :param interest_type: The interest_type of this InlineResponse20044. # noqa: E501 + :param interest_type: The interest_type of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and interest_type is None: # noqa: E501 @@ -319,22 +319,22 @@ def interest_type(self, interest_type): @property def create_time(self): - """Gets the create_time of this InlineResponse20044. # noqa: E501 + """Gets the create_time of this CrossexMarginInterestRecord. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20044. # noqa: E501 + :return: The create_time of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20044. + """Sets the create_time of this CrossexMarginInterestRecord. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20044. # noqa: E501 + :param create_time: The create_time of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 @@ -344,22 +344,22 @@ def create_time(self, create_time): @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse20044. # noqa: E501 + """Gets the exchange_type of this CrossexMarginInterestRecord. # noqa: E501 Exchange # noqa: E501 - :return: The exchange_type of this InlineResponse20044. # noqa: E501 + :return: The exchange_type of this CrossexMarginInterestRecord. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20044. + """Sets the exchange_type of this CrossexMarginInterestRecord. Exchange # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse20044. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexMarginInterestRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and exchange_type is None: # noqa: E501 @@ -401,14 +401,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20044): + if not isinstance(other, CrossexMarginInterestRecord): 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, InlineResponse20044): + if not isinstance(other, CrossexMarginInterestRecord): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20039.py b/gate_api/models/crossex_margin_position.py similarity index 73% rename from gate_api/models/inline_response20039.py rename to gate_api/models/crossex_margin_position.py index 59b5023e..7db9c75d 100644 --- a/gate_api/models/inline_response20039.py +++ b/gate_api/models/crossex_margin_position.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20039(object): +class CrossexMarginPosition(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -82,7 +82,7 @@ class InlineResponse20039(object): def __init__(self, user_id=None, position_id=None, symbol=None, position_side=None, initial_margin=None, maintenance_margin=None, asset_qty=None, asset_coin=None, position_value=None, liability=None, liability_coin=None, interest=None, max_position_qty=None, entry_price=None, index_price=None, upnl=None, upnl_rate=None, leverage=None, max_leverage=None, create_time=None, update_time=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 - """InlineResponse20039 - a model defined in OpenAPI""" # noqa: E501 + """CrossexMarginPosition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -134,22 +134,22 @@ def __init__(self, user_id=None, position_id=None, symbol=None, position_side=No @property def user_id(self): - """Gets the user_id of this InlineResponse20039. # noqa: E501 + """Gets the user_id of this CrossexMarginPosition. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20039. # noqa: E501 + :return: The user_id of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20039. + """Sets the user_id of this CrossexMarginPosition. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20039. # noqa: E501 + :param user_id: The user_id of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 @@ -159,22 +159,22 @@ def user_id(self, user_id): @property def position_id(self): - """Gets the position_id of this InlineResponse20039. # noqa: E501 + """Gets the position_id of this CrossexMarginPosition. # noqa: E501 Leveraged Position ID # noqa: E501 - :return: The position_id of this InlineResponse20039. # noqa: E501 + :return: The position_id of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._position_id @position_id.setter def position_id(self, position_id): - """Sets the position_id of this InlineResponse20039. + """Sets the position_id of this CrossexMarginPosition. Leveraged Position ID # noqa: E501 - :param position_id: The position_id of this InlineResponse20039. # noqa: E501 + :param position_id: The position_id of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and position_id is None: # noqa: E501 @@ -184,22 +184,22 @@ def position_id(self, position_id): @property def symbol(self): - """Gets the symbol of this InlineResponse20039. # noqa: E501 + """Gets the symbol of this CrossexMarginPosition. # noqa: E501 Trading Pair # noqa: E501 - :return: The symbol of this InlineResponse20039. # noqa: E501 + :return: The symbol of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20039. + """Sets the symbol of this CrossexMarginPosition. Trading Pair # noqa: E501 - :param symbol: The symbol of this InlineResponse20039. # noqa: E501 + :param symbol: The symbol of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 @@ -209,22 +209,22 @@ def symbol(self, symbol): @property def position_side(self): - """Gets the position_side of this InlineResponse20039. # noqa: E501 + """Gets the position_side of this CrossexMarginPosition. # noqa: E501 Position Direction # noqa: E501 - :return: The position_side of this InlineResponse20039. # noqa: E501 + :return: The position_side of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._position_side @position_side.setter def position_side(self, position_side): - """Sets the position_side of this InlineResponse20039. + """Sets the position_side of this CrossexMarginPosition. Position Direction # noqa: E501 - :param position_side: The position_side of this InlineResponse20039. # noqa: E501 + :param position_side: The position_side of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and position_side is None: # noqa: E501 @@ -234,22 +234,22 @@ def position_side(self, position_side): @property def initial_margin(self): - """Gets the initial_margin of this InlineResponse20039. # noqa: E501 + """Gets the initial_margin of this CrossexMarginPosition. # noqa: E501 Initial position margin # noqa: E501 - :return: The initial_margin of this InlineResponse20039. # noqa: E501 + :return: The initial_margin of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._initial_margin @initial_margin.setter def initial_margin(self, initial_margin): - """Sets the initial_margin of this InlineResponse20039. + """Sets the initial_margin of this CrossexMarginPosition. Initial position margin # noqa: E501 - :param initial_margin: The initial_margin of this InlineResponse20039. # noqa: E501 + :param initial_margin: The initial_margin of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and initial_margin is None: # noqa: E501 @@ -259,22 +259,22 @@ def initial_margin(self, initial_margin): @property def maintenance_margin(self): - """Gets the maintenance_margin of this InlineResponse20039. # noqa: E501 + """Gets the maintenance_margin of this CrossexMarginPosition. # noqa: E501 Position maintenance margin # noqa: E501 - :return: The maintenance_margin of this InlineResponse20039. # noqa: E501 + :return: The maintenance_margin of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._maintenance_margin @maintenance_margin.setter def maintenance_margin(self, maintenance_margin): - """Sets the maintenance_margin of this InlineResponse20039. + """Sets the maintenance_margin of this CrossexMarginPosition. Position maintenance margin # noqa: E501 - :param maintenance_margin: The maintenance_margin of this InlineResponse20039. # noqa: E501 + :param maintenance_margin: The maintenance_margin of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and maintenance_margin is None: # noqa: E501 @@ -284,22 +284,22 @@ def maintenance_margin(self, maintenance_margin): @property def asset_qty(self): - """Gets the asset_qty of this InlineResponse20039. # noqa: E501 + """Gets the asset_qty of this CrossexMarginPosition. # noqa: E501 Position Asset Quantity # noqa: E501 - :return: The asset_qty of this InlineResponse20039. # noqa: E501 + :return: The asset_qty of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._asset_qty @asset_qty.setter def asset_qty(self, asset_qty): - """Sets the asset_qty of this InlineResponse20039. + """Sets the asset_qty of this CrossexMarginPosition. Position Asset Quantity # noqa: E501 - :param asset_qty: The asset_qty of this InlineResponse20039. # noqa: E501 + :param asset_qty: The asset_qty of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and asset_qty is None: # noqa: E501 @@ -309,22 +309,22 @@ def asset_qty(self, asset_qty): @property def asset_coin(self): - """Gets the asset_coin of this InlineResponse20039. # noqa: E501 + """Gets the asset_coin of this CrossexMarginPosition. # noqa: E501 Position Asset Currency # noqa: E501 - :return: The asset_coin of this InlineResponse20039. # noqa: E501 + :return: The asset_coin of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._asset_coin @asset_coin.setter def asset_coin(self, asset_coin): - """Sets the asset_coin of this InlineResponse20039. + """Sets the asset_coin of this CrossexMarginPosition. Position Asset Currency # noqa: E501 - :param asset_coin: The asset_coin of this InlineResponse20039. # noqa: E501 + :param asset_coin: The asset_coin of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and asset_coin is None: # noqa: E501 @@ -334,22 +334,22 @@ def asset_coin(self, asset_coin): @property def position_value(self): - """Gets the position_value of this InlineResponse20039. # noqa: E501 + """Gets the position_value of this CrossexMarginPosition. # noqa: E501 Position Value # noqa: E501 - :return: The position_value of this InlineResponse20039. # noqa: E501 + :return: The position_value of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._position_value @position_value.setter def position_value(self, position_value): - """Sets the position_value of this InlineResponse20039. + """Sets the position_value of this CrossexMarginPosition. Position Value # noqa: E501 - :param position_value: The position_value of this InlineResponse20039. # noqa: E501 + :param position_value: The position_value of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and position_value is None: # noqa: E501 @@ -359,22 +359,22 @@ def position_value(self, position_value): @property def liability(self): - """Gets the liability of this InlineResponse20039. # noqa: E501 + """Gets the liability of this CrossexMarginPosition. # noqa: E501 Debt Quantity # noqa: E501 - :return: The liability of this InlineResponse20039. # noqa: E501 + :return: The liability of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._liability @liability.setter def liability(self, liability): - """Sets the liability of this InlineResponse20039. + """Sets the liability of this CrossexMarginPosition. Debt Quantity # noqa: E501 - :param liability: The liability of this InlineResponse20039. # noqa: E501 + :param liability: The liability of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and liability is None: # noqa: E501 @@ -384,22 +384,22 @@ def liability(self, liability): @property def liability_coin(self): - """Gets the liability_coin of this InlineResponse20039. # noqa: E501 + """Gets the liability_coin of this CrossexMarginPosition. # noqa: E501 Debt Currency # noqa: E501 - :return: The liability_coin of this InlineResponse20039. # noqa: E501 + :return: The liability_coin of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._liability_coin @liability_coin.setter def liability_coin(self, liability_coin): - """Sets the liability_coin of this InlineResponse20039. + """Sets the liability_coin of this CrossexMarginPosition. Debt Currency # noqa: E501 - :param liability_coin: The liability_coin of this InlineResponse20039. # noqa: E501 + :param liability_coin: The liability_coin of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and liability_coin is None: # noqa: E501 @@ -409,22 +409,22 @@ def liability_coin(self, liability_coin): @property def interest(self): - """Gets the interest of this InlineResponse20039. # noqa: E501 + """Gets the interest of this CrossexMarginPosition. # noqa: E501 Deducted Interest # noqa: E501 - :return: The interest of this InlineResponse20039. # noqa: E501 + :return: The interest of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._interest @interest.setter def interest(self, interest): - """Sets the interest of this InlineResponse20039. + """Sets the interest of this CrossexMarginPosition. Deducted Interest # noqa: E501 - :param interest: The interest of this InlineResponse20039. # noqa: E501 + :param interest: The interest of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and interest is None: # noqa: E501 @@ -434,22 +434,22 @@ def interest(self, interest): @property def max_position_qty(self): - """Gets the max_position_qty of this InlineResponse20039. # noqa: E501 + """Gets the max_position_qty of this CrossexMarginPosition. # noqa: E501 Max Trade Size # noqa: E501 - :return: The max_position_qty of this InlineResponse20039. # noqa: E501 + :return: The max_position_qty of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._max_position_qty @max_position_qty.setter def max_position_qty(self, max_position_qty): - """Sets the max_position_qty of this InlineResponse20039. + """Sets the max_position_qty of this CrossexMarginPosition. Max Trade Size # noqa: E501 - :param max_position_qty: The max_position_qty of this InlineResponse20039. # noqa: E501 + :param max_position_qty: The max_position_qty of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and max_position_qty is None: # noqa: E501 @@ -459,22 +459,22 @@ def max_position_qty(self, max_position_qty): @property def entry_price(self): - """Gets the entry_price of this InlineResponse20039. # noqa: E501 + """Gets the entry_price of this CrossexMarginPosition. # noqa: E501 Position Cost Price (Average Opening Price) # noqa: E501 - :return: The entry_price of this InlineResponse20039. # noqa: E501 + :return: The entry_price of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._entry_price @entry_price.setter def entry_price(self, entry_price): - """Sets the entry_price of this InlineResponse20039. + """Sets the entry_price of this CrossexMarginPosition. Position Cost Price (Average Opening Price) # noqa: E501 - :param entry_price: The entry_price of this InlineResponse20039. # noqa: E501 + :param entry_price: The entry_price of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and entry_price is None: # noqa: E501 @@ -484,22 +484,22 @@ def entry_price(self, entry_price): @property def index_price(self): - """Gets the index_price of this InlineResponse20039. # noqa: E501 + """Gets the index_price of this CrossexMarginPosition. # noqa: E501 Index price # noqa: E501 - :return: The index_price of this InlineResponse20039. # noqa: E501 + :return: The index_price of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._index_price @index_price.setter def index_price(self, index_price): - """Sets the index_price of this InlineResponse20039. + """Sets the index_price of this CrossexMarginPosition. Index price # noqa: E501 - :param index_price: The index_price of this InlineResponse20039. # noqa: E501 + :param index_price: The index_price of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and index_price is None: # noqa: E501 @@ -509,22 +509,22 @@ def index_price(self, index_price): @property def upnl(self): - """Gets the upnl of this InlineResponse20039. # noqa: E501 + """Gets the upnl of this CrossexMarginPosition. # noqa: E501 Unrealized P&L # noqa: E501 - :return: The upnl of this InlineResponse20039. # noqa: E501 + :return: The upnl of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._upnl @upnl.setter def upnl(self, upnl): - """Sets the upnl of this InlineResponse20039. + """Sets the upnl of this CrossexMarginPosition. Unrealized P&L # noqa: E501 - :param upnl: The upnl of this InlineResponse20039. # noqa: E501 + :param upnl: The upnl of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and upnl is None: # noqa: E501 @@ -534,22 +534,22 @@ def upnl(self, upnl): @property def upnl_rate(self): - """Gets the upnl_rate of this InlineResponse20039. # noqa: E501 + """Gets the upnl_rate of this CrossexMarginPosition. # noqa: E501 Unrealized P&L Ratio # noqa: E501 - :return: The upnl_rate of this InlineResponse20039. # noqa: E501 + :return: The upnl_rate of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._upnl_rate @upnl_rate.setter def upnl_rate(self, upnl_rate): - """Sets the upnl_rate of this InlineResponse20039. + """Sets the upnl_rate of this CrossexMarginPosition. Unrealized P&L Ratio # noqa: E501 - :param upnl_rate: The upnl_rate of this InlineResponse20039. # noqa: E501 + :param upnl_rate: The upnl_rate of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and upnl_rate is None: # noqa: E501 @@ -559,22 +559,22 @@ def upnl_rate(self, upnl_rate): @property def leverage(self): - """Gets the leverage of this InlineResponse20039. # noqa: E501 + """Gets the leverage of this CrossexMarginPosition. # noqa: E501 Opening Leverage # noqa: E501 - :return: The leverage of this InlineResponse20039. # noqa: E501 + :return: The leverage of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._leverage @leverage.setter def leverage(self, leverage): - """Sets the leverage of this InlineResponse20039. + """Sets the leverage of this CrossexMarginPosition. Opening Leverage # noqa: E501 - :param leverage: The leverage of this InlineResponse20039. # noqa: E501 + :param leverage: The leverage of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501 @@ -584,22 +584,22 @@ def leverage(self, leverage): @property def max_leverage(self): - """Gets the max_leverage of this InlineResponse20039. # noqa: E501 + """Gets the max_leverage of this CrossexMarginPosition. # noqa: E501 Maximum leverage # noqa: E501 - :return: The max_leverage of this InlineResponse20039. # noqa: E501 + :return: The max_leverage of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._max_leverage @max_leverage.setter def max_leverage(self, max_leverage): - """Sets the max_leverage of this InlineResponse20039. + """Sets the max_leverage of this CrossexMarginPosition. Maximum leverage # noqa: E501 - :param max_leverage: The max_leverage of this InlineResponse20039. # noqa: E501 + :param max_leverage: The max_leverage of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and max_leverage is None: # noqa: E501 @@ -609,22 +609,22 @@ def max_leverage(self, max_leverage): @property def create_time(self): - """Gets the create_time of this InlineResponse20039. # noqa: E501 + """Gets the create_time of this CrossexMarginPosition. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20039. # noqa: E501 + :return: The create_time of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20039. + """Sets the create_time of this CrossexMarginPosition. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20039. # noqa: E501 + :param create_time: The create_time of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 @@ -634,22 +634,22 @@ def create_time(self, create_time): @property def update_time(self): - """Gets the update_time of this InlineResponse20039. # noqa: E501 + """Gets the update_time of this CrossexMarginPosition. # noqa: E501 Update time # noqa: E501 - :return: The update_time of this InlineResponse20039. # noqa: E501 + :return: The update_time of this CrossexMarginPosition. # noqa: E501 :rtype: str """ return self._update_time @update_time.setter def update_time(self, update_time): - """Sets the update_time of this InlineResponse20039. + """Sets the update_time of this CrossexMarginPosition. Update time # noqa: E501 - :param update_time: The update_time of this InlineResponse20039. # noqa: E501 + :param update_time: The update_time of this CrossexMarginPosition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and update_time is None: # noqa: E501 @@ -691,14 +691,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20039): + if not isinstance(other, CrossexMarginPosition): 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, InlineResponse20039): + if not isinstance(other, CrossexMarginPosition): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20032.py b/gate_api/models/crossex_order.py similarity index 65% rename from gate_api/models/inline_response20032.py rename to gate_api/models/crossex_order.py index 028e7c7e..63198722 100644 --- a/gate_api/models/inline_response20032.py +++ b/gate_api/models/crossex_order.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20032(object): +class CrossexOrder(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -96,7 +96,7 @@ class InlineResponse20032(object): def __init__(self, user_id=None, order_id=None, text=None, state=None, symbol=None, side=None, type=None, attribute=None, exchange_type=None, business_type=None, qty=None, quote_qty=None, price=None, time_in_force=None, executed_qty=None, executed_amount=None, executed_avg_price=None, fee_coin=None, fee=None, reduce_only=None, leverage=None, reason=None, last_executed_qty=None, last_executed_price=None, last_executed_amount=None, position_side=None, create_time=None, update_time=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, str, str, Configuration) -> None - """InlineResponse20032 - a model defined in OpenAPI""" # noqa: E501 + """CrossexOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -162,22 +162,22 @@ def __init__(self, user_id=None, order_id=None, text=None, state=None, symbol=No @property def user_id(self): - """Gets the user_id of this InlineResponse20032. # noqa: E501 + """Gets the user_id of this CrossexOrder. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20032. # noqa: E501 + :return: The user_id of this CrossexOrder. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20032. + """Sets the user_id of this CrossexOrder. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20032. # noqa: E501 + :param user_id: The user_id of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 @@ -187,22 +187,22 @@ def user_id(self, user_id): @property def order_id(self): - """Gets the order_id of this InlineResponse20032. # noqa: E501 + """Gets the order_id of this CrossexOrder. # noqa: E501 Order ID # noqa: E501 - :return: The order_id of this InlineResponse20032. # noqa: E501 + :return: The order_id of this CrossexOrder. # noqa: E501 :rtype: str """ return self._order_id @order_id.setter def order_id(self, order_id): - """Sets the order_id of this InlineResponse20032. + """Sets the order_id of this CrossexOrder. Order ID # noqa: E501 - :param order_id: The order_id of this InlineResponse20032. # noqa: E501 + :param order_id: The order_id of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 @@ -212,22 +212,22 @@ def order_id(self, order_id): @property def text(self): - """Gets the text of this InlineResponse20032. # noqa: E501 + """Gets the text of this CrossexOrder. # noqa: E501 - Client Order ID # noqa: E501 + Client-defined order ID. # noqa: E501 - :return: The text of this InlineResponse20032. # noqa: E501 + :return: The text of this CrossexOrder. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): - """Sets the text of this InlineResponse20032. + """Sets the text of this CrossexOrder. - Client Order ID # noqa: E501 + Client-defined order ID. # noqa: E501 - :param text: The text of this InlineResponse20032. # noqa: E501 + :param text: The text of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 @@ -237,22 +237,22 @@ def text(self, text): @property def state(self): - """Gets the state of this InlineResponse20032. # noqa: E501 + """Gets the state of this CrossexOrder. # noqa: E501 - Order Status # noqa: E501 + Order status: NEW: Validated and queued to be sent to the exchange. OPEN: Resting on the exchange order book. PARTIALLY_FILLED: Partially filled. FILLED: Fully filled. FAIL: CrossEx internal validation failed; see the `reason` field for details. REJECT: Rejected by the exchange; see the `reason` field for details. # noqa: E501 - :return: The state of this InlineResponse20032. # noqa: E501 + :return: The state of this CrossexOrder. # noqa: E501 :rtype: str """ return self._state @state.setter def state(self, state): - """Sets the state of this InlineResponse20032. + """Sets the state of this CrossexOrder. - Order Status # noqa: E501 + Order status: NEW: Validated and queued to be sent to the exchange. OPEN: Resting on the exchange order book. PARTIALLY_FILLED: Partially filled. FILLED: Fully filled. FAIL: CrossEx internal validation failed; see the `reason` field for details. REJECT: Rejected by the exchange; see the `reason` field for details. # noqa: E501 - :param state: The state of this InlineResponse20032. # noqa: E501 + :param state: The state of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501 @@ -262,22 +262,22 @@ def state(self, state): @property def symbol(self): - """Gets the symbol of this InlineResponse20032. # noqa: E501 + """Gets the symbol of this CrossexOrder. # noqa: E501 - Currency pair # noqa: E501 + Unique trading pair identifiers, e.g. `BINANCE_SPOT_BTC_USDT`, `BINANCE_FUTURE_BTC_USDT`. # noqa: E501 - :return: The symbol of this InlineResponse20032. # noqa: E501 + :return: The symbol of this CrossexOrder. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20032. + """Sets the symbol of this CrossexOrder. - Currency pair # noqa: E501 + Unique trading pair identifiers, e.g. `BINANCE_SPOT_BTC_USDT`, `BINANCE_FUTURE_BTC_USDT`. # noqa: E501 - :param symbol: The symbol of this InlineResponse20032. # noqa: E501 + :param symbol: The symbol of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 @@ -287,22 +287,22 @@ def symbol(self, symbol): @property def side(self): - """Gets the side of this InlineResponse20032. # noqa: E501 + """Gets the side of this CrossexOrder. # noqa: E501 - direction # noqa: E501 + Side (`BUY` buy / `SELL` sell). # noqa: E501 - :return: The side of this InlineResponse20032. # noqa: E501 + :return: The side of this CrossexOrder. # noqa: E501 :rtype: str """ return self._side @side.setter def side(self, side): - """Sets the side of this InlineResponse20032. + """Sets the side of this CrossexOrder. - direction # noqa: E501 + Side (`BUY` buy / `SELL` sell). # noqa: E501 - :param side: The side of this InlineResponse20032. # noqa: E501 + :param side: The side of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 @@ -312,22 +312,22 @@ def side(self, side): @property def type(self): - """Gets the type of this InlineResponse20032. # noqa: E501 + """Gets the type of this CrossexOrder. # noqa: E501 - type # noqa: E501 + Order type (`LIMIT` limit / `MARKET` market). # noqa: E501 - :return: The type of this InlineResponse20032. # noqa: E501 + :return: The type of this CrossexOrder. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this InlineResponse20032. + """Sets the type of this CrossexOrder. - type # noqa: E501 + Order type (`LIMIT` limit / `MARKET` market). # noqa: E501 - :param type: The type of this InlineResponse20032. # noqa: E501 + :param type: The type of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 @@ -337,22 +337,22 @@ def type(self, type): @property def attribute(self): - """Gets the attribute of this InlineResponse20032. # noqa: E501 + """Gets the attribute of this CrossexOrder. # noqa: E501 - Attribute COMMON: Normal Order, LIQ: Liquidation Takeover Order, REDUCE: Liquidation Reduce Order, ADL: Auto-Reduce # noqa: E501 + Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage / `SETTLEMENT` delisting settlement). # noqa: E501 - :return: The attribute of this InlineResponse20032. # noqa: E501 + :return: The attribute of this CrossexOrder. # noqa: E501 :rtype: str """ return self._attribute @attribute.setter def attribute(self, attribute): - """Sets the attribute of this InlineResponse20032. + """Sets the attribute of this CrossexOrder. - Attribute COMMON: Normal Order, LIQ: Liquidation Takeover Order, REDUCE: Liquidation Reduce Order, ADL: Auto-Reduce # noqa: E501 + Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage / `SETTLEMENT` delisting settlement). # noqa: E501 - :param attribute: The attribute of this InlineResponse20032. # noqa: E501 + :param attribute: The attribute of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and attribute is None: # noqa: E501 @@ -362,22 +362,22 @@ def attribute(self, attribute): @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse20032. # noqa: E501 + """Gets the exchange_type of this CrossexOrder. # noqa: E501 - Exchange # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 - :return: The exchange_type of this InlineResponse20032. # noqa: E501 + :return: The exchange_type of this CrossexOrder. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20032. + """Sets the exchange_type of this CrossexOrder. - Exchange # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse20032. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and exchange_type is None: # noqa: E501 @@ -387,22 +387,22 @@ def exchange_type(self, exchange_type): @property def business_type(self): - """Gets the business_type of this InlineResponse20032. # noqa: E501 + """Gets the business_type of this CrossexOrder. # noqa: E501 - Business Type # noqa: E501 + Business type (`SPOT` Spot / `FUTURE` Futures / `MARGIN` Margin). # noqa: E501 - :return: The business_type of this InlineResponse20032. # noqa: E501 + :return: The business_type of this CrossexOrder. # noqa: E501 :rtype: str """ return self._business_type @business_type.setter def business_type(self, business_type): - """Sets the business_type of this InlineResponse20032. + """Sets the business_type of this CrossexOrder. - Business Type # noqa: E501 + Business type (`SPOT` Spot / `FUTURE` Futures / `MARGIN` Margin). # noqa: E501 - :param business_type: The business_type of this InlineResponse20032. # noqa: E501 + :param business_type: The business_type of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and business_type is None: # noqa: E501 @@ -412,22 +412,22 @@ def business_type(self, business_type): @property def qty(self): - """Gets the qty of this InlineResponse20032. # noqa: E501 + """Gets the qty of this CrossexOrder. # noqa: E501 - Base Currency Quantity # noqa: E501 + Order quantity in the base currency. # noqa: E501 - :return: The qty of this InlineResponse20032. # noqa: E501 + :return: The qty of this CrossexOrder. # noqa: E501 :rtype: str """ return self._qty @qty.setter def qty(self, qty): - """Sets the qty of this InlineResponse20032. + """Sets the qty of this CrossexOrder. - Base Currency Quantity # noqa: E501 + Order quantity in the base currency. # noqa: E501 - :param qty: The qty of this InlineResponse20032. # noqa: E501 + :param qty: The qty of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and qty is None: # noqa: E501 @@ -437,22 +437,22 @@ def qty(self, qty): @property def quote_qty(self): - """Gets the quote_qty of this InlineResponse20032. # noqa: E501 + """Gets the quote_qty of this CrossexOrder. # noqa: E501 - Quote Currency Quantity # noqa: E501 + Order quantity in the quote currency. # noqa: E501 - :return: The quote_qty of this InlineResponse20032. # noqa: E501 + :return: The quote_qty of this CrossexOrder. # noqa: E501 :rtype: str """ return self._quote_qty @quote_qty.setter def quote_qty(self, quote_qty): - """Sets the quote_qty of this InlineResponse20032. + """Sets the quote_qty of this CrossexOrder. - Quote Currency Quantity # noqa: E501 + Order quantity in the quote currency. # noqa: E501 - :param quote_qty: The quote_qty of this InlineResponse20032. # noqa: E501 + :param quote_qty: The quote_qty of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and quote_qty is None: # noqa: E501 @@ -462,22 +462,22 @@ def quote_qty(self, quote_qty): @property def price(self): - """Gets the price of this InlineResponse20032. # noqa: E501 + """Gets the price of this CrossexOrder. # noqa: E501 - Price # noqa: E501 + Order price. # noqa: E501 - :return: The price of this InlineResponse20032. # noqa: E501 + :return: The price of this CrossexOrder. # noqa: E501 :rtype: str """ return self._price @price.setter def price(self, price): - """Sets the price of this InlineResponse20032. + """Sets the price of this CrossexOrder. - Price # noqa: E501 + Order price. # noqa: E501 - :param price: The price of this InlineResponse20032. # noqa: E501 + :param price: The price of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 @@ -487,22 +487,22 @@ def price(self, price): @property def time_in_force(self): - """Gets the time_in_force of this InlineResponse20032. # noqa: E501 + """Gets the time_in_force of this CrossexOrder. # noqa: E501 - Time in Force Strategy # noqa: E501 + Time in force (default `GTC`; enum: `GTC` / `IOC` / `FOK` / `POC`). # noqa: E501 - :return: The time_in_force of this InlineResponse20032. # noqa: E501 + :return: The time_in_force of this CrossexOrder. # 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 InlineResponse20032. + """Sets the time_in_force of this CrossexOrder. - Time in Force Strategy # noqa: E501 + Time in force (default `GTC`; enum: `GTC` / `IOC` / `FOK` / `POC`). # noqa: E501 - :param time_in_force: The time_in_force of this InlineResponse20032. # noqa: E501 + :param time_in_force: The time_in_force of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and time_in_force is None: # noqa: E501 @@ -512,22 +512,22 @@ def time_in_force(self, time_in_force): @property def executed_qty(self): - """Gets the executed_qty of this InlineResponse20032. # noqa: E501 + """Gets the executed_qty of this CrossexOrder. # noqa: E501 - Filled Quantity # noqa: E501 + Filled base amount. # noqa: E501 - :return: The executed_qty of this InlineResponse20032. # noqa: E501 + :return: The executed_qty of this CrossexOrder. # noqa: E501 :rtype: str """ return self._executed_qty @executed_qty.setter def executed_qty(self, executed_qty): - """Sets the executed_qty of this InlineResponse20032. + """Sets the executed_qty of this CrossexOrder. - Filled Quantity # noqa: E501 + Filled base amount. # noqa: E501 - :param executed_qty: The executed_qty of this InlineResponse20032. # noqa: E501 + :param executed_qty: The executed_qty of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and executed_qty is None: # noqa: E501 @@ -537,22 +537,22 @@ def executed_qty(self, executed_qty): @property def executed_amount(self): - """Gets the executed_amount of this InlineResponse20032. # noqa: E501 + """Gets the executed_amount of this CrossexOrder. # noqa: E501 - Filled Amount # noqa: E501 + Filled quote amount. # noqa: E501 - :return: The executed_amount of this InlineResponse20032. # noqa: E501 + :return: The executed_amount of this CrossexOrder. # noqa: E501 :rtype: str """ return self._executed_amount @executed_amount.setter def executed_amount(self, executed_amount): - """Sets the executed_amount of this InlineResponse20032. + """Sets the executed_amount of this CrossexOrder. - Filled Amount # noqa: E501 + Filled quote amount. # noqa: E501 - :param executed_amount: The executed_amount of this InlineResponse20032. # noqa: E501 + :param executed_amount: The executed_amount of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and executed_amount is None: # noqa: E501 @@ -562,22 +562,22 @@ def executed_amount(self, executed_amount): @property def executed_avg_price(self): - """Gets the executed_avg_price of this InlineResponse20032. # noqa: E501 + """Gets the executed_avg_price of this CrossexOrder. # noqa: E501 Average Filled Price # noqa: E501 - :return: The executed_avg_price of this InlineResponse20032. # noqa: E501 + :return: The executed_avg_price of this CrossexOrder. # noqa: E501 :rtype: str """ return self._executed_avg_price @executed_avg_price.setter def executed_avg_price(self, executed_avg_price): - """Sets the executed_avg_price of this InlineResponse20032. + """Sets the executed_avg_price of this CrossexOrder. Average Filled Price # noqa: E501 - :param executed_avg_price: The executed_avg_price of this InlineResponse20032. # noqa: E501 + :param executed_avg_price: The executed_avg_price of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and executed_avg_price is None: # noqa: E501 @@ -587,22 +587,22 @@ def executed_avg_price(self, executed_avg_price): @property def fee_coin(self): - """Gets the fee_coin of this InlineResponse20032. # noqa: E501 + """Gets the fee_coin of this CrossexOrder. # noqa: E501 Fee currency # noqa: E501 - :return: The fee_coin of this InlineResponse20032. # noqa: E501 + :return: The fee_coin of this CrossexOrder. # noqa: E501 :rtype: str """ return self._fee_coin @fee_coin.setter def fee_coin(self, fee_coin): - """Sets the fee_coin of this InlineResponse20032. + """Sets the fee_coin of this CrossexOrder. Fee currency # noqa: E501 - :param fee_coin: The fee_coin of this InlineResponse20032. # noqa: E501 + :param fee_coin: The fee_coin of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and fee_coin is None: # noqa: E501 @@ -612,22 +612,22 @@ def fee_coin(self, fee_coin): @property def fee(self): - """Gets the fee of this InlineResponse20032. # noqa: E501 + """Gets the fee of this CrossexOrder. # noqa: E501 - fee # noqa: E501 + Fee amount. # noqa: E501 - :return: The fee of this InlineResponse20032. # noqa: E501 + :return: The fee of this CrossexOrder. # noqa: E501 :rtype: str """ return self._fee @fee.setter def fee(self, fee): - """Sets the fee of this InlineResponse20032. + """Sets the fee of this CrossexOrder. - fee # noqa: E501 + Fee amount. # noqa: E501 - :param fee: The fee of this InlineResponse20032. # noqa: E501 + :param fee: The fee of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and fee is None: # noqa: E501 @@ -637,22 +637,22 @@ def fee(self, fee): @property def reduce_only(self): - """Gets the reduce_only of this InlineResponse20032. # noqa: E501 + """Gets the reduce_only of this CrossexOrder. # noqa: E501 - Reduce Position Only # noqa: E501 + Reduce-only order (`\"true\"` or `\"false\"`). # noqa: E501 - :return: The reduce_only of this InlineResponse20032. # noqa: E501 + :return: The reduce_only of this CrossexOrder. # noqa: E501 :rtype: str """ return self._reduce_only @reduce_only.setter def reduce_only(self, reduce_only): - """Sets the reduce_only of this InlineResponse20032. + """Sets the reduce_only of this CrossexOrder. - Reduce Position Only # noqa: E501 + Reduce-only order (`\"true\"` or `\"false\"`). # noqa: E501 - :param reduce_only: The reduce_only of this InlineResponse20032. # noqa: E501 + :param reduce_only: The reduce_only of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and reduce_only is None: # noqa: E501 @@ -662,22 +662,22 @@ def reduce_only(self, reduce_only): @property def leverage(self): - """Gets the leverage of this InlineResponse20032. # noqa: E501 + """Gets the leverage of this CrossexOrder. # noqa: E501 - leverage # noqa: E501 + Order leverage multiplier. # noqa: E501 - :return: The leverage of this InlineResponse20032. # noqa: E501 + :return: The leverage of this CrossexOrder. # noqa: E501 :rtype: str """ return self._leverage @leverage.setter def leverage(self, leverage): - """Sets the leverage of this InlineResponse20032. + """Sets the leverage of this CrossexOrder. - leverage # noqa: E501 + Order leverage multiplier. # noqa: E501 - :param leverage: The leverage of this InlineResponse20032. # noqa: E501 + :param leverage: The leverage of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501 @@ -687,22 +687,22 @@ def leverage(self, leverage): @property def reason(self): - """Gets the reason of this InlineResponse20032. # noqa: E501 + """Gets the reason of this CrossexOrder. # noqa: E501 - Reason # noqa: E501 + Failure reason description. # noqa: E501 - :return: The reason of this InlineResponse20032. # noqa: E501 + :return: The reason of this CrossexOrder. # noqa: E501 :rtype: str """ return self._reason @reason.setter def reason(self, reason): - """Sets the reason of this InlineResponse20032. + """Sets the reason of this CrossexOrder. - Reason # noqa: E501 + Failure reason description. # noqa: E501 - :param reason: The reason of this InlineResponse20032. # noqa: E501 + :param reason: The reason of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and reason is None: # noqa: E501 @@ -712,22 +712,22 @@ def reason(self, reason): @property def last_executed_qty(self): - """Gets the last_executed_qty of this InlineResponse20032. # noqa: E501 + """Gets the last_executed_qty of this CrossexOrder. # noqa: E501 - Latest Filled Quantity # noqa: E501 + Base quantity of the latest fill. # noqa: E501 - :return: The last_executed_qty of this InlineResponse20032. # noqa: E501 + :return: The last_executed_qty of this CrossexOrder. # noqa: E501 :rtype: str """ return self._last_executed_qty @last_executed_qty.setter def last_executed_qty(self, last_executed_qty): - """Sets the last_executed_qty of this InlineResponse20032. + """Sets the last_executed_qty of this CrossexOrder. - Latest Filled Quantity # noqa: E501 + Base quantity of the latest fill. # noqa: E501 - :param last_executed_qty: The last_executed_qty of this InlineResponse20032. # noqa: E501 + :param last_executed_qty: The last_executed_qty of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and last_executed_qty is None: # noqa: E501 @@ -737,22 +737,22 @@ def last_executed_qty(self, last_executed_qty): @property def last_executed_price(self): - """Gets the last_executed_price of this InlineResponse20032. # noqa: E501 + """Gets the last_executed_price of this CrossexOrder. # noqa: E501 - Latest Filled Price # noqa: E501 + Price of the latest fill. # noqa: E501 - :return: The last_executed_price of this InlineResponse20032. # noqa: E501 + :return: The last_executed_price of this CrossexOrder. # noqa: E501 :rtype: str """ return self._last_executed_price @last_executed_price.setter def last_executed_price(self, last_executed_price): - """Sets the last_executed_price of this InlineResponse20032. + """Sets the last_executed_price of this CrossexOrder. - Latest Filled Price # noqa: E501 + Price of the latest fill. # noqa: E501 - :param last_executed_price: The last_executed_price of this InlineResponse20032. # noqa: E501 + :param last_executed_price: The last_executed_price of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and last_executed_price is None: # noqa: E501 @@ -762,22 +762,22 @@ def last_executed_price(self, last_executed_price): @property def last_executed_amount(self): - """Gets the last_executed_amount of this InlineResponse20032. # noqa: E501 + """Gets the last_executed_amount of this CrossexOrder. # noqa: E501 - Latest Filled Amount # noqa: E501 + Quote amount of the latest fill. # noqa: E501 - :return: The last_executed_amount of this InlineResponse20032. # noqa: E501 + :return: The last_executed_amount of this CrossexOrder. # noqa: E501 :rtype: str """ return self._last_executed_amount @last_executed_amount.setter def last_executed_amount(self, last_executed_amount): - """Sets the last_executed_amount of this InlineResponse20032. + """Sets the last_executed_amount of this CrossexOrder. - Latest Filled Amount # noqa: E501 + Quote amount of the latest fill. # noqa: E501 - :param last_executed_amount: The last_executed_amount of this InlineResponse20032. # noqa: E501 + :param last_executed_amount: The last_executed_amount of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and last_executed_amount is None: # noqa: E501 @@ -787,22 +787,22 @@ def last_executed_amount(self, last_executed_amount): @property def position_side(self): - """Gets the position_side of this InlineResponse20032. # noqa: E501 + """Gets the position_side of this CrossexOrder. # noqa: E501 - Position Direction # noqa: E501 + Position side (`NONE` flat / `LONG` long / `SHORT` short). # noqa: E501 - :return: The position_side of this InlineResponse20032. # noqa: E501 + :return: The position_side of this CrossexOrder. # noqa: E501 :rtype: str """ return self._position_side @position_side.setter def position_side(self, position_side): - """Sets the position_side of this InlineResponse20032. + """Sets the position_side of this CrossexOrder. - Position Direction # noqa: E501 + Position side (`NONE` flat / `LONG` long / `SHORT` short). # noqa: E501 - :param position_side: The position_side of this InlineResponse20032. # noqa: E501 + :param position_side: The position_side of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and position_side is None: # noqa: E501 @@ -812,22 +812,22 @@ def position_side(self, position_side): @property def create_time(self): - """Gets the create_time of this InlineResponse20032. # noqa: E501 + """Gets the create_time of this CrossexOrder. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20032. # noqa: E501 + :return: The create_time of this CrossexOrder. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20032. + """Sets the create_time of this CrossexOrder. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20032. # noqa: E501 + :param create_time: The create_time of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 @@ -837,22 +837,22 @@ def create_time(self, create_time): @property def update_time(self): - """Gets the update_time of this InlineResponse20032. # noqa: E501 + """Gets the update_time of this CrossexOrder. # noqa: E501 Update time # noqa: E501 - :return: The update_time of this InlineResponse20032. # noqa: E501 + :return: The update_time of this CrossexOrder. # noqa: E501 :rtype: str """ return self._update_time @update_time.setter def update_time(self, update_time): - """Sets the update_time of this InlineResponse20032. + """Sets the update_time of this CrossexOrder. Update time # noqa: E501 - :param update_time: The update_time of this InlineResponse20032. # noqa: E501 + :param update_time: The update_time of this CrossexOrder. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and update_time is None: # noqa: E501 @@ -894,14 +894,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20032): + if not isinstance(other, CrossexOrder): 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, InlineResponse20032): + if not isinstance(other, CrossexOrder): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20031.py b/gate_api/models/crossex_order_action_response.py similarity index 81% rename from gate_api/models/inline_response20031.py rename to gate_api/models/crossex_order_action_response.py index 10e30ab7..ca1051e5 100644 --- a/gate_api/models/inline_response20031.py +++ b/gate_api/models/crossex_order_action_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20031(object): +class CrossexOrderActionResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse20031(object): def __init__(self, order_id=None, text=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """InlineResponse20031 - a model defined in OpenAPI""" # noqa: E501 + """CrossexOrderActionResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,22 +58,22 @@ def __init__(self, order_id=None, text=None, local_vars_configuration=None): # @property def order_id(self): - """Gets the order_id of this InlineResponse20031. # noqa: E501 + """Gets the order_id of this CrossexOrderActionResponse. # noqa: E501 Order ID # noqa: E501 - :return: The order_id of this InlineResponse20031. # noqa: E501 + :return: The order_id of this CrossexOrderActionResponse. # noqa: E501 :rtype: str """ return self._order_id @order_id.setter def order_id(self, order_id): - """Sets the order_id of this InlineResponse20031. + """Sets the order_id of this CrossexOrderActionResponse. Order ID # noqa: E501 - :param order_id: The order_id of this InlineResponse20031. # noqa: E501 + :param order_id: The order_id of this CrossexOrderActionResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 @@ -83,22 +83,22 @@ def order_id(self, order_id): @property def text(self): - """Gets the text of this InlineResponse20031. # noqa: E501 + """Gets the text of this CrossexOrderActionResponse. # noqa: E501 User-defined Order ID # noqa: E501 - :return: The text of this InlineResponse20031. # noqa: E501 + :return: The text of this CrossexOrderActionResponse. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): - """Sets the text of this InlineResponse20031. + """Sets the text of this CrossexOrderActionResponse. User-defined Order ID # noqa: E501 - :param text: The text of this InlineResponse20031. # noqa: E501 + :param text: The text of this CrossexOrderActionResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 @@ -140,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20031): + if not isinstance(other, CrossexOrderActionResponse): 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, InlineResponse20031): + if not isinstance(other, CrossexOrderActionResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_order_request.py b/gate_api/models/crossex_order_request.py index 254ebca1..8d9a8732 100644 --- a/gate_api/models/crossex_order_request.py +++ b/gate_api/models/crossex_order_request.py @@ -123,7 +123,7 @@ def text(self, text): def symbol(self): """Gets the symbol of this CrossexOrderRequest. # noqa: E501 - Unique Identifier for Exchange_Business_Base_Counter Examples: If you want to place a spot order for ADA/USDT on BINANCE, use: `BINANCE_SPOT_ADA_USDT`; If you want to place a USDT-M perpetual futures order for ADA/USDT on OKX, use: `OKX_FUTURE_ADA_USDT`; If you want to place a spot margin order for ADA/USDT on GATE, use: `GATE_MARGIN_ADA_USDT`; If you want to place a spot order for ADA/USDT on BYBIT, use: `BYBIT_SPOT_ADA_USDT`; Currently supports three order types: Spot Orders, USDT-M Perpetual Futures Orders, and Spot Margin Orders. BYBIT does not currently support spot margin orders # noqa: E501 + Unique identifier `{Exchange}_{Business}_{Base}_{Counter}` Examples: To send a Binance spot order on `ADA/USDT`, use `BINANCE_SPOT_ADA_USDT`; For an ADA/USDT-margined USDT perpetual futures order on OKX, use `OKX_FUTURE_ADA_USDT`; For ADA/USDT margin trading on Gate, use `GATE_MARGIN_ADA_USDT`; For ADA/USDT spot trading on Bybit, use `BYBIT_SPOT_ADA_USDT`; For an ADA/USD futures order on Kraken, use `KRAKEN_FUTURE_ADA_USD`; For an ADA/USDC futures order on Hyperliquid, use `HYPERLIQUID_FUTURE_ADA_USDC`; Supports spot trades, USDT-margined perpetual futures, and spot margin templates. BYBIT omits spot margin for now; Kraken and Hyperliquid omit dedicated spot/margin legs inside CrossEx. # noqa: E501 :return: The symbol of this CrossexOrderRequest. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def symbol(self): def symbol(self, symbol): """Sets the symbol of this CrossexOrderRequest. - Unique Identifier for Exchange_Business_Base_Counter Examples: If you want to place a spot order for ADA/USDT on BINANCE, use: `BINANCE_SPOT_ADA_USDT`; If you want to place a USDT-M perpetual futures order for ADA/USDT on OKX, use: `OKX_FUTURE_ADA_USDT`; If you want to place a spot margin order for ADA/USDT on GATE, use: `GATE_MARGIN_ADA_USDT`; If you want to place a spot order for ADA/USDT on BYBIT, use: `BYBIT_SPOT_ADA_USDT`; Currently supports three order types: Spot Orders, USDT-M Perpetual Futures Orders, and Spot Margin Orders. BYBIT does not currently support spot margin orders # noqa: E501 + Unique identifier `{Exchange}_{Business}_{Base}_{Counter}` Examples: To send a Binance spot order on `ADA/USDT`, use `BINANCE_SPOT_ADA_USDT`; For an ADA/USDT-margined USDT perpetual futures order on OKX, use `OKX_FUTURE_ADA_USDT`; For ADA/USDT margin trading on Gate, use `GATE_MARGIN_ADA_USDT`; For ADA/USDT spot trading on Bybit, use `BYBIT_SPOT_ADA_USDT`; For an ADA/USD futures order on Kraken, use `KRAKEN_FUTURE_ADA_USD`; For an ADA/USDC futures order on Hyperliquid, use `HYPERLIQUID_FUTURE_ADA_USDC`; Supports spot trades, USDT-margined perpetual futures, and spot margin templates. BYBIT omits spot margin for now; Kraken and Hyperliquid omit dedicated spot/margin legs inside CrossEx. # noqa: E501 :param symbol: The symbol of this CrossexOrderRequest. # noqa: E501 :type: str diff --git a/gate_api/models/inline_response20038.py b/gate_api/models/crossex_position.py similarity index 69% rename from gate_api/models/inline_response20038.py rename to gate_api/models/crossex_position.py index 7fda9334..100f0720 100644 --- a/gate_api/models/inline_response20038.py +++ b/gate_api/models/crossex_position.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20038(object): +class CrossexPosition(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -82,7 +82,7 @@ class InlineResponse20038(object): def __init__(self, user_id=None, position_id=None, symbol=None, position_side=None, initial_margin=None, maintenance_margin=None, position_qty=None, position_value=None, upnl=None, upnl_rate=None, entry_price=None, mark_price=None, leverage=None, max_leverage=None, risk_limit=None, fee=None, funding_fee=None, funding_time=None, create_time=None, update_time=None, closed_pnl=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 - """InlineResponse20038 - a model defined in OpenAPI""" # noqa: E501 + """CrossexPosition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -155,22 +155,22 @@ def __init__(self, user_id=None, position_id=None, symbol=None, position_side=No @property def user_id(self): - """Gets the user_id of this InlineResponse20038. # noqa: E501 + """Gets the user_id of this CrossexPosition. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20038. # noqa: E501 + :return: The user_id of this CrossexPosition. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20038. + """Sets the user_id of this CrossexPosition. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20038. # noqa: E501 + :param user_id: The user_id of this CrossexPosition. # noqa: E501 :type: str """ @@ -178,22 +178,22 @@ def user_id(self, user_id): @property def position_id(self): - """Gets the position_id of this InlineResponse20038. # noqa: E501 + """Gets the position_id of this CrossexPosition. # noqa: E501 Position ID # noqa: E501 - :return: The position_id of this InlineResponse20038. # noqa: E501 + :return: The position_id of this CrossexPosition. # noqa: E501 :rtype: str """ return self._position_id @position_id.setter def position_id(self, position_id): - """Sets the position_id of this InlineResponse20038. + """Sets the position_id of this CrossexPosition. Position ID # noqa: E501 - :param position_id: The position_id of this InlineResponse20038. # noqa: E501 + :param position_id: The position_id of this CrossexPosition. # noqa: E501 :type: str """ @@ -201,22 +201,22 @@ def position_id(self, position_id): @property def symbol(self): - """Gets the symbol of this InlineResponse20038. # noqa: E501 + """Gets the symbol of this CrossexPosition. # noqa: E501 Currency pair # noqa: E501 - :return: The symbol of this InlineResponse20038. # noqa: E501 + :return: The symbol of this CrossexPosition. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20038. + """Sets the symbol of this CrossexPosition. Currency pair # noqa: E501 - :param symbol: The symbol of this InlineResponse20038. # noqa: E501 + :param symbol: The symbol of this CrossexPosition. # noqa: E501 :type: str """ @@ -224,22 +224,22 @@ def symbol(self, symbol): @property def position_side(self): - """Gets the position_side of this InlineResponse20038. # noqa: E501 + """Gets the position_side of this CrossexPosition. # noqa: E501 Position Direction # noqa: E501 - :return: The position_side of this InlineResponse20038. # noqa: E501 + :return: The position_side of this CrossexPosition. # noqa: E501 :rtype: str """ return self._position_side @position_side.setter def position_side(self, position_side): - """Sets the position_side of this InlineResponse20038. + """Sets the position_side of this CrossexPosition. Position Direction # noqa: E501 - :param position_side: The position_side of this InlineResponse20038. # noqa: E501 + :param position_side: The position_side of this CrossexPosition. # noqa: E501 :type: str """ @@ -247,22 +247,22 @@ def position_side(self, position_side): @property def initial_margin(self): - """Gets the initial_margin of this InlineResponse20038. # noqa: E501 + """Gets the initial_margin of this CrossexPosition. # noqa: E501 Initial Margin # noqa: E501 - :return: The initial_margin of this InlineResponse20038. # noqa: E501 + :return: The initial_margin of this CrossexPosition. # noqa: E501 :rtype: str """ return self._initial_margin @initial_margin.setter def initial_margin(self, initial_margin): - """Sets the initial_margin of this InlineResponse20038. + """Sets the initial_margin of this CrossexPosition. Initial Margin # noqa: E501 - :param initial_margin: The initial_margin of this InlineResponse20038. # noqa: E501 + :param initial_margin: The initial_margin of this CrossexPosition. # noqa: E501 :type: str """ @@ -270,22 +270,22 @@ def initial_margin(self, initial_margin): @property def maintenance_margin(self): - """Gets the maintenance_margin of this InlineResponse20038. # noqa: E501 + """Gets the maintenance_margin of this CrossexPosition. # noqa: E501 Maintenance margin # noqa: E501 - :return: The maintenance_margin of this InlineResponse20038. # noqa: E501 + :return: The maintenance_margin of this CrossexPosition. # noqa: E501 :rtype: str """ return self._maintenance_margin @maintenance_margin.setter def maintenance_margin(self, maintenance_margin): - """Sets the maintenance_margin of this InlineResponse20038. + """Sets the maintenance_margin of this CrossexPosition. Maintenance margin # noqa: E501 - :param maintenance_margin: The maintenance_margin of this InlineResponse20038. # noqa: E501 + :param maintenance_margin: The maintenance_margin of this CrossexPosition. # noqa: E501 :type: str """ @@ -293,22 +293,22 @@ def maintenance_margin(self, maintenance_margin): @property def position_qty(self): - """Gets the position_qty of this InlineResponse20038. # noqa: E501 + """Gets the position_qty of this CrossexPosition. # noqa: E501 Position Quantity # noqa: E501 - :return: The position_qty of this InlineResponse20038. # noqa: E501 + :return: The position_qty of this CrossexPosition. # noqa: E501 :rtype: str """ return self._position_qty @position_qty.setter def position_qty(self, position_qty): - """Sets the position_qty of this InlineResponse20038. + """Sets the position_qty of this CrossexPosition. Position Quantity # noqa: E501 - :param position_qty: The position_qty of this InlineResponse20038. # noqa: E501 + :param position_qty: The position_qty of this CrossexPosition. # noqa: E501 :type: str """ @@ -316,22 +316,22 @@ def position_qty(self, position_qty): @property def position_value(self): - """Gets the position_value of this InlineResponse20038. # noqa: E501 + """Gets the position_value of this CrossexPosition. # noqa: E501 Position Value # noqa: E501 - :return: The position_value of this InlineResponse20038. # noqa: E501 + :return: The position_value of this CrossexPosition. # noqa: E501 :rtype: str """ return self._position_value @position_value.setter def position_value(self, position_value): - """Sets the position_value of this InlineResponse20038. + """Sets the position_value of this CrossexPosition. Position Value # noqa: E501 - :param position_value: The position_value of this InlineResponse20038. # noqa: E501 + :param position_value: The position_value of this CrossexPosition. # noqa: E501 :type: str """ @@ -339,22 +339,22 @@ def position_value(self, position_value): @property def upnl(self): - """Gets the upnl of this InlineResponse20038. # noqa: E501 + """Gets the upnl of this CrossexPosition. # noqa: E501 Unrealized P&L # noqa: E501 - :return: The upnl of this InlineResponse20038. # noqa: E501 + :return: The upnl of this CrossexPosition. # noqa: E501 :rtype: str """ return self._upnl @upnl.setter def upnl(self, upnl): - """Sets the upnl of this InlineResponse20038. + """Sets the upnl of this CrossexPosition. Unrealized P&L # noqa: E501 - :param upnl: The upnl of this InlineResponse20038. # noqa: E501 + :param upnl: The upnl of this CrossexPosition. # noqa: E501 :type: str """ @@ -362,22 +362,22 @@ def upnl(self, upnl): @property def upnl_rate(self): - """Gets the upnl_rate of this InlineResponse20038. # noqa: E501 + """Gets the upnl_rate of this CrossexPosition. # noqa: E501 Unrealized P&L Ratio # noqa: E501 - :return: The upnl_rate of this InlineResponse20038. # noqa: E501 + :return: The upnl_rate of this CrossexPosition. # noqa: E501 :rtype: str """ return self._upnl_rate @upnl_rate.setter def upnl_rate(self, upnl_rate): - """Sets the upnl_rate of this InlineResponse20038. + """Sets the upnl_rate of this CrossexPosition. Unrealized P&L Ratio # noqa: E501 - :param upnl_rate: The upnl_rate of this InlineResponse20038. # noqa: E501 + :param upnl_rate: The upnl_rate of this CrossexPosition. # noqa: E501 :type: str """ @@ -385,22 +385,22 @@ def upnl_rate(self, upnl_rate): @property def entry_price(self): - """Gets the entry_price of this InlineResponse20038. # noqa: E501 + """Gets the entry_price of this CrossexPosition. # noqa: E501 Position Average Entry Price # noqa: E501 - :return: The entry_price of this InlineResponse20038. # noqa: E501 + :return: The entry_price of this CrossexPosition. # noqa: E501 :rtype: str """ return self._entry_price @entry_price.setter def entry_price(self, entry_price): - """Sets the entry_price of this InlineResponse20038. + """Sets the entry_price of this CrossexPosition. Position Average Entry Price # noqa: E501 - :param entry_price: The entry_price of this InlineResponse20038. # noqa: E501 + :param entry_price: The entry_price of this CrossexPosition. # noqa: E501 :type: str """ @@ -408,22 +408,22 @@ def entry_price(self, entry_price): @property def mark_price(self): - """Gets the mark_price of this InlineResponse20038. # noqa: E501 + """Gets the mark_price of this CrossexPosition. # noqa: E501 Mark price # noqa: E501 - :return: The mark_price of this InlineResponse20038. # noqa: E501 + :return: The mark_price of this CrossexPosition. # noqa: E501 :rtype: str """ return self._mark_price @mark_price.setter def mark_price(self, mark_price): - """Sets the mark_price of this InlineResponse20038. + """Sets the mark_price of this CrossexPosition. Mark price # noqa: E501 - :param mark_price: The mark_price of this InlineResponse20038. # noqa: E501 + :param mark_price: The mark_price of this CrossexPosition. # noqa: E501 :type: str """ @@ -431,22 +431,22 @@ def mark_price(self, mark_price): @property def leverage(self): - """Gets the leverage of this InlineResponse20038. # noqa: E501 + """Gets the leverage of this CrossexPosition. # noqa: E501 Position Leverage # noqa: E501 - :return: The leverage of this InlineResponse20038. # noqa: E501 + :return: The leverage of this CrossexPosition. # noqa: E501 :rtype: str """ return self._leverage @leverage.setter def leverage(self, leverage): - """Sets the leverage of this InlineResponse20038. + """Sets the leverage of this CrossexPosition. Position Leverage # noqa: E501 - :param leverage: The leverage of this InlineResponse20038. # noqa: E501 + :param leverage: The leverage of this CrossexPosition. # noqa: E501 :type: str """ @@ -454,22 +454,22 @@ def leverage(self, leverage): @property def max_leverage(self): - """Gets the max_leverage of this InlineResponse20038. # noqa: E501 + """Gets the max_leverage of this CrossexPosition. # noqa: E501 Maximum leverage # noqa: E501 - :return: The max_leverage of this InlineResponse20038. # noqa: E501 + :return: The max_leverage of this CrossexPosition. # noqa: E501 :rtype: str """ return self._max_leverage @max_leverage.setter def max_leverage(self, max_leverage): - """Sets the max_leverage of this InlineResponse20038. + """Sets the max_leverage of this CrossexPosition. Maximum leverage # noqa: E501 - :param max_leverage: The max_leverage of this InlineResponse20038. # noqa: E501 + :param max_leverage: The max_leverage of this CrossexPosition. # noqa: E501 :type: str """ @@ -477,22 +477,22 @@ def max_leverage(self, max_leverage): @property def risk_limit(self): - """Gets the risk_limit of this InlineResponse20038. # noqa: E501 + """Gets the risk_limit of this CrossexPosition. # noqa: E501 Position risk limit # noqa: E501 - :return: The risk_limit of this InlineResponse20038. # noqa: E501 + :return: The risk_limit of this CrossexPosition. # noqa: E501 :rtype: str """ return self._risk_limit @risk_limit.setter def risk_limit(self, risk_limit): - """Sets the risk_limit of this InlineResponse20038. + """Sets the risk_limit of this CrossexPosition. Position risk limit # noqa: E501 - :param risk_limit: The risk_limit of this InlineResponse20038. # noqa: E501 + :param risk_limit: The risk_limit of this CrossexPosition. # noqa: E501 :type: str """ @@ -500,22 +500,22 @@ def risk_limit(self, risk_limit): @property def fee(self): - """Gets the fee of this InlineResponse20038. # noqa: E501 + """Gets the fee of this CrossexPosition. # noqa: E501 Position Fee # noqa: E501 - :return: The fee of this InlineResponse20038. # noqa: E501 + :return: The fee of this CrossexPosition. # noqa: E501 :rtype: str """ return self._fee @fee.setter def fee(self, fee): - """Sets the fee of this InlineResponse20038. + """Sets the fee of this CrossexPosition. Position Fee # noqa: E501 - :param fee: The fee of this InlineResponse20038. # noqa: E501 + :param fee: The fee of this CrossexPosition. # noqa: E501 :type: str """ @@ -523,22 +523,22 @@ def fee(self, fee): @property def funding_fee(self): - """Gets the funding_fee of this InlineResponse20038. # noqa: E501 + """Gets the funding_fee of this CrossexPosition. # noqa: E501 Position Funding Fee # noqa: E501 - :return: The funding_fee of this InlineResponse20038. # noqa: E501 + :return: The funding_fee of this CrossexPosition. # noqa: E501 :rtype: str """ return self._funding_fee @funding_fee.setter def funding_fee(self, funding_fee): - """Sets the funding_fee of this InlineResponse20038. + """Sets the funding_fee of this CrossexPosition. Position Funding Fee # noqa: E501 - :param funding_fee: The funding_fee of this InlineResponse20038. # noqa: E501 + :param funding_fee: The funding_fee of this CrossexPosition. # noqa: E501 :type: str """ @@ -546,22 +546,22 @@ def funding_fee(self, funding_fee): @property def funding_time(self): - """Gets the funding_time of this InlineResponse20038. # noqa: E501 + """Gets the funding_time of this CrossexPosition. # noqa: E501 Position funding fee collection time (0 indicates it has not been collected yet) # noqa: E501 - :return: The funding_time of this InlineResponse20038. # noqa: E501 + :return: The funding_time of this CrossexPosition. # noqa: E501 :rtype: str """ return self._funding_time @funding_time.setter def funding_time(self, funding_time): - """Sets the funding_time of this InlineResponse20038. + """Sets the funding_time of this CrossexPosition. Position funding fee collection time (0 indicates it has not been collected yet) # noqa: E501 - :param funding_time: The funding_time of this InlineResponse20038. # noqa: E501 + :param funding_time: The funding_time of this CrossexPosition. # noqa: E501 :type: str """ @@ -569,22 +569,22 @@ def funding_time(self, funding_time): @property def create_time(self): - """Gets the create_time of this InlineResponse20038. # noqa: E501 + """Gets the create_time of this CrossexPosition. # noqa: E501 Position Creation Time # noqa: E501 - :return: The create_time of this InlineResponse20038. # noqa: E501 + :return: The create_time of this CrossexPosition. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20038. + """Sets the create_time of this CrossexPosition. Position Creation Time # noqa: E501 - :param create_time: The create_time of this InlineResponse20038. # noqa: E501 + :param create_time: The create_time of this CrossexPosition. # noqa: E501 :type: str """ @@ -592,22 +592,22 @@ def create_time(self, create_time): @property def update_time(self): - """Gets the update_time of this InlineResponse20038. # noqa: E501 + """Gets the update_time of this CrossexPosition. # noqa: E501 Position Update Time # noqa: E501 - :return: The update_time of this InlineResponse20038. # noqa: E501 + :return: The update_time of this CrossexPosition. # noqa: E501 :rtype: str """ return self._update_time @update_time.setter def update_time(self, update_time): - """Sets the update_time of this InlineResponse20038. + """Sets the update_time of this CrossexPosition. Position Update Time # noqa: E501 - :param update_time: The update_time of this InlineResponse20038. # noqa: E501 + :param update_time: The update_time of this CrossexPosition. # noqa: E501 :type: str """ @@ -615,22 +615,22 @@ def update_time(self, update_time): @property def closed_pnl(self): - """Gets the closed_pnl of this InlineResponse20038. # noqa: E501 + """Gets the closed_pnl of this CrossexPosition. # noqa: E501 Realized PnL # noqa: E501 - :return: The closed_pnl of this InlineResponse20038. # noqa: E501 + :return: The closed_pnl of this CrossexPosition. # noqa: E501 :rtype: str """ return self._closed_pnl @closed_pnl.setter def closed_pnl(self, closed_pnl): - """Sets the closed_pnl of this InlineResponse20038. + """Sets the closed_pnl of this CrossexPosition. Realized PnL # noqa: E501 - :param closed_pnl: The closed_pnl of this InlineResponse20038. # noqa: E501 + :param closed_pnl: The closed_pnl of this CrossexPosition. # noqa: E501 :type: str """ @@ -670,14 +670,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20038): + if not isinstance(other, CrossexPosition): 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, InlineResponse20038): + if not isinstance(other, CrossexPosition): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20027.py b/gate_api/models/crossex_risk_limit.py similarity index 76% rename from gate_api/models/inline_response20027.py rename to gate_api/models/crossex_risk_limit.py index 44806177..c3d05655 100644 --- a/gate_api/models/inline_response20027.py +++ b/gate_api/models/crossex_risk_limit.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20027(object): +class CrossexRiskLimit(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +34,7 @@ class InlineResponse20027(object): """ openapi_types = { 'symbol': 'str', - 'tiers': 'list[CrossexRuleRiskLimitsTiers]' + 'tiers': 'list[CrossexRiskLimitTier]' } attribute_map = { @@ -43,8 +43,8 @@ class InlineResponse20027(object): } def __init__(self, symbol=None, tiers=None, local_vars_configuration=None): # noqa: E501 - # type: (str, list[CrossexRuleRiskLimitsTiers], Configuration) -> None - """InlineResponse20027 - a model defined in OpenAPI""" # noqa: E501 + # type: (str, list[CrossexRiskLimitTier], Configuration) -> None + """CrossexRiskLimit - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -60,20 +60,20 @@ def __init__(self, symbol=None, tiers=None, local_vars_configuration=None): # n @property def symbol(self): - """Gets the symbol of this InlineResponse20027. # noqa: E501 + """Gets the symbol of this CrossexRiskLimit. # noqa: E501 - :return: The symbol of this InlineResponse20027. # noqa: E501 + :return: The symbol of this CrossexRiskLimit. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20027. + """Sets the symbol of this CrossexRiskLimit. - :param symbol: The symbol of this InlineResponse20027. # noqa: E501 + :param symbol: The symbol of this CrossexRiskLimit. # noqa: E501 :type: str """ @@ -81,21 +81,21 @@ def symbol(self, symbol): @property def tiers(self): - """Gets the tiers of this InlineResponse20027. # noqa: E501 + """Gets the tiers of this CrossexRiskLimit. # noqa: E501 - :return: The tiers of this InlineResponse20027. # noqa: E501 - :rtype: list[CrossexRuleRiskLimitsTiers] + :return: The tiers of this CrossexRiskLimit. # noqa: E501 + :rtype: list[CrossexRiskLimitTier] """ return self._tiers @tiers.setter def tiers(self, tiers): - """Sets the tiers of this InlineResponse20027. + """Sets the tiers of this CrossexRiskLimit. - :param tiers: The tiers of this InlineResponse20027. # noqa: E501 - :type: list[CrossexRuleRiskLimitsTiers] + :param tiers: The tiers of this CrossexRiskLimit. # noqa: E501 + :type: list[CrossexRiskLimitTier] """ self._tiers = tiers @@ -134,14 +134,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20027): + if not isinstance(other, CrossexRiskLimit): 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, InlineResponse20027): + if not isinstance(other, CrossexRiskLimit): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_rule_risk_limits_tiers.py b/gate_api/models/crossex_risk_limit_tier.py similarity index 68% rename from gate_api/models/crossex_rule_risk_limits_tiers.py rename to gate_api/models/crossex_risk_limit_tier.py index 103be024..1d7d3290 100644 --- a/gate_api/models/crossex_rule_risk_limits_tiers.py +++ b/gate_api/models/crossex_risk_limit_tier.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class CrossexRuleRiskLimitsTiers(object): +class CrossexRiskLimitTier(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,6 +35,7 @@ class CrossexRuleRiskLimitsTiers(object): openapi_types = { 'min_risk_limit_value': 'str', 'max_risk_limit_value': 'str', + 'quick_cal_amount': 'str', 'leverage_max': 'str', 'maintenance_rate': 'str', 'tier': 'str' @@ -43,20 +44,22 @@ class CrossexRuleRiskLimitsTiers(object): attribute_map = { 'min_risk_limit_value': 'min_risk_limit_value', 'max_risk_limit_value': 'max_risk_limit_value', + 'quick_cal_amount': 'quick_cal_amount', 'leverage_max': 'leverage_max', 'maintenance_rate': 'maintenance_rate', 'tier': 'tier' } - def __init__(self, min_risk_limit_value=None, max_risk_limit_value=None, leverage_max=None, maintenance_rate=None, tier=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """CrossexRuleRiskLimitsTiers - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, min_risk_limit_value=None, max_risk_limit_value=None, quick_cal_amount=None, leverage_max=None, maintenance_rate=None, tier=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """CrossexRiskLimitTier - 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._min_risk_limit_value = None self._max_risk_limit_value = None + self._quick_cal_amount = None self._leverage_max = None self._maintenance_rate = None self._tier = None @@ -64,28 +67,29 @@ def __init__(self, min_risk_limit_value=None, max_risk_limit_value=None, leverag self.min_risk_limit_value = min_risk_limit_value self.max_risk_limit_value = max_risk_limit_value + self.quick_cal_amount = quick_cal_amount self.leverage_max = leverage_max self.maintenance_rate = maintenance_rate self.tier = tier @property def min_risk_limit_value(self): - """Gets the min_risk_limit_value of this CrossexRuleRiskLimitsTiers. # noqa: E501 + """Gets the min_risk_limit_value of this CrossexRiskLimitTier. # noqa: E501 Minimum risk limit value # noqa: E501 - :return: The min_risk_limit_value of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :return: The min_risk_limit_value of this CrossexRiskLimitTier. # noqa: E501 :rtype: str """ return self._min_risk_limit_value @min_risk_limit_value.setter def min_risk_limit_value(self, min_risk_limit_value): - """Sets the min_risk_limit_value of this CrossexRuleRiskLimitsTiers. + """Sets the min_risk_limit_value of this CrossexRiskLimitTier. Minimum risk limit value # noqa: E501 - :param min_risk_limit_value: The min_risk_limit_value of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :param min_risk_limit_value: The min_risk_limit_value of this CrossexRiskLimitTier. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and min_risk_limit_value is None: # noqa: E501 @@ -95,22 +99,22 @@ def min_risk_limit_value(self, min_risk_limit_value): @property def max_risk_limit_value(self): - """Gets the max_risk_limit_value of this CrossexRuleRiskLimitsTiers. # noqa: E501 + """Gets the max_risk_limit_value of this CrossexRiskLimitTier. # noqa: E501 Maximum risk limit value # noqa: E501 - :return: The max_risk_limit_value of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :return: The max_risk_limit_value of this CrossexRiskLimitTier. # noqa: E501 :rtype: str """ return self._max_risk_limit_value @max_risk_limit_value.setter def max_risk_limit_value(self, max_risk_limit_value): - """Sets the max_risk_limit_value of this CrossexRuleRiskLimitsTiers. + """Sets the max_risk_limit_value of this CrossexRiskLimitTier. Maximum risk limit value # noqa: E501 - :param max_risk_limit_value: The max_risk_limit_value of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :param max_risk_limit_value: The max_risk_limit_value of this CrossexRiskLimitTier. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and max_risk_limit_value is None: # noqa: E501 @@ -118,24 +122,49 @@ def max_risk_limit_value(self, max_risk_limit_value): self._max_risk_limit_value = max_risk_limit_value + @property + def quick_cal_amount(self): + """Gets the quick_cal_amount of this CrossexRiskLimitTier. # noqa: E501 + + Quick-calculation amount # noqa: E501 + + :return: The quick_cal_amount of this CrossexRiskLimitTier. # noqa: E501 + :rtype: str + """ + return self._quick_cal_amount + + @quick_cal_amount.setter + def quick_cal_amount(self, quick_cal_amount): + """Sets the quick_cal_amount of this CrossexRiskLimitTier. + + Quick-calculation amount # noqa: E501 + + :param quick_cal_amount: The quick_cal_amount of this CrossexRiskLimitTier. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and quick_cal_amount is None: # noqa: E501 + raise ValueError("Invalid value for `quick_cal_amount`, must not be `None`") # noqa: E501 + + self._quick_cal_amount = quick_cal_amount + @property def leverage_max(self): - """Gets the leverage_max of this CrossexRuleRiskLimitsTiers. # noqa: E501 + """Gets the leverage_max of this CrossexRiskLimitTier. # noqa: E501 Maximum leverage # noqa: E501 - :return: The leverage_max of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :return: The leverage_max of this CrossexRiskLimitTier. # noqa: E501 :rtype: str """ return self._leverage_max @leverage_max.setter def leverage_max(self, leverage_max): - """Sets the leverage_max of this CrossexRuleRiskLimitsTiers. + """Sets the leverage_max of this CrossexRiskLimitTier. Maximum leverage # noqa: E501 - :param leverage_max: The leverage_max of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :param leverage_max: The leverage_max of this CrossexRiskLimitTier. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and leverage_max is None: # noqa: E501 @@ -145,22 +174,22 @@ def leverage_max(self, leverage_max): @property def maintenance_rate(self): - """Gets the maintenance_rate of this CrossexRuleRiskLimitsTiers. # noqa: E501 + """Gets the maintenance_rate of this CrossexRiskLimitTier. # noqa: E501 Maintenance margin rate # noqa: E501 - :return: The maintenance_rate of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :return: The maintenance_rate of this CrossexRiskLimitTier. # noqa: E501 :rtype: str """ return self._maintenance_rate @maintenance_rate.setter def maintenance_rate(self, maintenance_rate): - """Sets the maintenance_rate of this CrossexRuleRiskLimitsTiers. + """Sets the maintenance_rate of this CrossexRiskLimitTier. Maintenance margin rate # noqa: E501 - :param maintenance_rate: The maintenance_rate of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :param maintenance_rate: The maintenance_rate of this CrossexRiskLimitTier. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and maintenance_rate is None: # noqa: E501 @@ -170,22 +199,22 @@ def maintenance_rate(self, maintenance_rate): @property def tier(self): - """Gets the tier of this CrossexRuleRiskLimitsTiers. # noqa: E501 + """Gets the tier of this CrossexRiskLimitTier. # noqa: E501 Tier # noqa: E501 - :return: The tier of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :return: The tier of this CrossexRiskLimitTier. # noqa: E501 :rtype: str """ return self._tier @tier.setter def tier(self, tier): - """Sets the tier of this CrossexRuleRiskLimitsTiers. + """Sets the tier of this CrossexRiskLimitTier. Tier # noqa: E501 - :param tier: The tier of this CrossexRuleRiskLimitsTiers. # noqa: E501 + :param tier: The tier of this CrossexRiskLimitTier. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and tier is None: # noqa: E501 @@ -227,14 +256,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, CrossexRuleRiskLimitsTiers): + if not isinstance(other, CrossexRiskLimitTier): 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, CrossexRuleRiskLimitsTiers): + if not isinstance(other, CrossexRiskLimitTier): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20037_special_fee_list.py b/gate_api/models/crossex_special_fee.py similarity index 77% rename from gate_api/models/inline_response20037_special_fee_list.py rename to gate_api/models/crossex_special_fee.py index f79940bc..5bd26fcb 100644 --- a/gate_api/models/inline_response20037_special_fee_list.py +++ b/gate_api/models/crossex_special_fee.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20037SpecialFeeList(object): +class CrossexSpecialFee(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -46,7 +46,7 @@ class InlineResponse20037SpecialFeeList(object): def __init__(self, symbol=None, taker_fee_rate=None, maker_fee_rate=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, Configuration) -> None - """InlineResponse20037SpecialFeeList - a model defined in OpenAPI""" # noqa: E501 + """CrossexSpecialFee - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -62,22 +62,22 @@ def __init__(self, symbol=None, taker_fee_rate=None, maker_fee_rate=None, local_ @property def symbol(self): - """Gets the symbol of this InlineResponse20037SpecialFeeList. # noqa: E501 + """Gets the symbol of this CrossexSpecialFee. # noqa: E501 Currency pair # noqa: E501 - :return: The symbol of this InlineResponse20037SpecialFeeList. # noqa: E501 + :return: The symbol of this CrossexSpecialFee. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20037SpecialFeeList. + """Sets the symbol of this CrossexSpecialFee. Currency pair # noqa: E501 - :param symbol: The symbol of this InlineResponse20037SpecialFeeList. # noqa: E501 + :param symbol: The symbol of this CrossexSpecialFee. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 @@ -87,22 +87,22 @@ def symbol(self, symbol): @property def taker_fee_rate(self): - """Gets the taker_fee_rate of this InlineResponse20037SpecialFeeList. # noqa: E501 + """Gets the taker_fee_rate of this CrossexSpecialFee. # noqa: E501 Taker fee rate # noqa: E501 - :return: The taker_fee_rate of this InlineResponse20037SpecialFeeList. # noqa: E501 + :return: The taker_fee_rate of this CrossexSpecialFee. # noqa: E501 :rtype: str """ return self._taker_fee_rate @taker_fee_rate.setter def taker_fee_rate(self, taker_fee_rate): - """Sets the taker_fee_rate of this InlineResponse20037SpecialFeeList. + """Sets the taker_fee_rate of this CrossexSpecialFee. Taker fee rate # noqa: E501 - :param taker_fee_rate: The taker_fee_rate of this InlineResponse20037SpecialFeeList. # noqa: E501 + :param taker_fee_rate: The taker_fee_rate of this CrossexSpecialFee. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and taker_fee_rate is None: # noqa: E501 @@ -112,22 +112,22 @@ def taker_fee_rate(self, taker_fee_rate): @property def maker_fee_rate(self): - """Gets the maker_fee_rate of this InlineResponse20037SpecialFeeList. # noqa: E501 + """Gets the maker_fee_rate of this CrossexSpecialFee. # noqa: E501 Maker fee rate # noqa: E501 - :return: The maker_fee_rate of this InlineResponse20037SpecialFeeList. # noqa: E501 + :return: The maker_fee_rate of this CrossexSpecialFee. # noqa: E501 :rtype: str """ return self._maker_fee_rate @maker_fee_rate.setter def maker_fee_rate(self, maker_fee_rate): - """Sets the maker_fee_rate of this InlineResponse20037SpecialFeeList. + """Sets the maker_fee_rate of this CrossexSpecialFee. Maker fee rate # noqa: E501 - :param maker_fee_rate: The maker_fee_rate of this InlineResponse20037SpecialFeeList. # noqa: E501 + :param maker_fee_rate: The maker_fee_rate of this CrossexSpecialFee. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and maker_fee_rate is None: # noqa: E501 @@ -169,14 +169,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20037SpecialFeeList): + if not isinstance(other, CrossexSpecialFee): 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, InlineResponse20037SpecialFeeList): + if not isinstance(other, CrossexSpecialFee): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20045.py b/gate_api/models/crossex_trade.py similarity index 68% rename from gate_api/models/inline_response20045.py rename to gate_api/models/crossex_trade.py index 3119c8d4..a796f910 100644 --- a/gate_api/models/inline_response20045.py +++ b/gate_api/models/crossex_trade.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20045(object): +class CrossexTrade(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,7 +76,7 @@ class InlineResponse20045(object): def __init__(self, user_id=None, transaction_id=None, order_id=None, text=None, symbol=None, exchange_type=None, business_type=None, side=None, qty=None, price=None, fee=None, fee_coin=None, fee_rate=None, match_role=None, rpnl=None, position_mode=None, position_side=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, str, str, str, Configuration) -> None - """InlineResponse20045 - a model defined in OpenAPI""" # noqa: E501 + """CrossexTrade - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -140,22 +140,22 @@ def __init__(self, user_id=None, transaction_id=None, order_id=None, text=None, @property def user_id(self): - """Gets the user_id of this InlineResponse20045. # noqa: E501 + """Gets the user_id of this CrossexTrade. # noqa: E501 User ID # noqa: E501 - :return: The user_id of this InlineResponse20045. # noqa: E501 + :return: The user_id of this CrossexTrade. # noqa: E501 :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id): - """Sets the user_id of this InlineResponse20045. + """Sets the user_id of this CrossexTrade. User ID # noqa: E501 - :param user_id: The user_id of this InlineResponse20045. # noqa: E501 + :param user_id: The user_id of this CrossexTrade. # noqa: E501 :type: str """ @@ -163,22 +163,22 @@ def user_id(self, user_id): @property def transaction_id(self): - """Gets the transaction_id of this InlineResponse20045. # noqa: E501 + """Gets the transaction_id of this CrossexTrade. # noqa: E501 filledrecordsID # noqa: E501 - :return: The transaction_id of this InlineResponse20045. # noqa: E501 + :return: The transaction_id of this CrossexTrade. # noqa: E501 :rtype: str """ return self._transaction_id @transaction_id.setter def transaction_id(self, transaction_id): - """Sets the transaction_id of this InlineResponse20045. + """Sets the transaction_id of this CrossexTrade. filledrecordsID # noqa: E501 - :param transaction_id: The transaction_id of this InlineResponse20045. # noqa: E501 + :param transaction_id: The transaction_id of this CrossexTrade. # noqa: E501 :type: str """ @@ -186,22 +186,22 @@ def transaction_id(self, transaction_id): @property def order_id(self): - """Gets the order_id of this InlineResponse20045. # noqa: E501 + """Gets the order_id of this CrossexTrade. # noqa: E501 Order ID # noqa: E501 - :return: The order_id of this InlineResponse20045. # noqa: E501 + :return: The order_id of this CrossexTrade. # noqa: E501 :rtype: str """ return self._order_id @order_id.setter def order_id(self, order_id): - """Sets the order_id of this InlineResponse20045. + """Sets the order_id of this CrossexTrade. Order ID # noqa: E501 - :param order_id: The order_id of this InlineResponse20045. # noqa: E501 + :param order_id: The order_id of this CrossexTrade. # noqa: E501 :type: str """ @@ -209,22 +209,22 @@ def order_id(self, order_id): @property def text(self): - """Gets the text of this InlineResponse20045. # noqa: E501 + """Gets the text of this CrossexTrade. # noqa: E501 User Order ID # noqa: E501 - :return: The text of this InlineResponse20045. # noqa: E501 + :return: The text of this CrossexTrade. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): - """Sets the text of this InlineResponse20045. + """Sets the text of this CrossexTrade. User Order ID # noqa: E501 - :param text: The text of this InlineResponse20045. # noqa: E501 + :param text: The text of this CrossexTrade. # noqa: E501 :type: str """ @@ -232,22 +232,22 @@ def text(self, text): @property def symbol(self): - """Gets the symbol of this InlineResponse20045. # noqa: E501 + """Gets the symbol of this CrossexTrade. # noqa: E501 Currency pair # noqa: E501 - :return: The symbol of this InlineResponse20045. # noqa: E501 + :return: The symbol of this CrossexTrade. # noqa: E501 :rtype: str """ return self._symbol @symbol.setter def symbol(self, symbol): - """Sets the symbol of this InlineResponse20045. + """Sets the symbol of this CrossexTrade. Currency pair # noqa: E501 - :param symbol: The symbol of this InlineResponse20045. # noqa: E501 + :param symbol: The symbol of this CrossexTrade. # noqa: E501 :type: str """ @@ -255,22 +255,22 @@ def symbol(self, symbol): @property def exchange_type(self): - """Gets the exchange_type of this InlineResponse20045. # noqa: E501 + """Gets the exchange_type of this CrossexTrade. # noqa: E501 Exchange # noqa: E501 - :return: The exchange_type of this InlineResponse20045. # noqa: E501 + :return: The exchange_type of this CrossexTrade. # noqa: E501 :rtype: str """ return self._exchange_type @exchange_type.setter def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20045. + """Sets the exchange_type of this CrossexTrade. Exchange # noqa: E501 - :param exchange_type: The exchange_type of this InlineResponse20045. # noqa: E501 + :param exchange_type: The exchange_type of this CrossexTrade. # noqa: E501 :type: str """ @@ -278,22 +278,22 @@ def exchange_type(self, exchange_type): @property def business_type(self): - """Gets the business_type of this InlineResponse20045. # noqa: E501 + """Gets the business_type of this CrossexTrade. # noqa: E501 Business Type # noqa: E501 - :return: The business_type of this InlineResponse20045. # noqa: E501 + :return: The business_type of this CrossexTrade. # noqa: E501 :rtype: str """ return self._business_type @business_type.setter def business_type(self, business_type): - """Sets the business_type of this InlineResponse20045. + """Sets the business_type of this CrossexTrade. Business Type # noqa: E501 - :param business_type: The business_type of this InlineResponse20045. # noqa: E501 + :param business_type: The business_type of this CrossexTrade. # noqa: E501 :type: str """ @@ -301,22 +301,22 @@ def business_type(self, business_type): @property def side(self): - """Gets the side of this InlineResponse20045. # noqa: E501 + """Gets the side of this CrossexTrade. # noqa: E501 Buy/Sell Direction # noqa: E501 - :return: The side of this InlineResponse20045. # noqa: E501 + :return: The side of this CrossexTrade. # noqa: E501 :rtype: str """ return self._side @side.setter def side(self, side): - """Sets the side of this InlineResponse20045. + """Sets the side of this CrossexTrade. Buy/Sell Direction # noqa: E501 - :param side: The side of this InlineResponse20045. # noqa: E501 + :param side: The side of this CrossexTrade. # noqa: E501 :type: str """ @@ -324,22 +324,22 @@ def side(self, side): @property def qty(self): - """Gets the qty of this InlineResponse20045. # noqa: E501 + """Gets the qty of this CrossexTrade. # noqa: E501 Trading size # noqa: E501 - :return: The qty of this InlineResponse20045. # noqa: E501 + :return: The qty of this CrossexTrade. # noqa: E501 :rtype: str """ return self._qty @qty.setter def qty(self, qty): - """Sets the qty of this InlineResponse20045. + """Sets the qty of this CrossexTrade. Trading size # noqa: E501 - :param qty: The qty of this InlineResponse20045. # noqa: E501 + :param qty: The qty of this CrossexTrade. # noqa: E501 :type: str """ @@ -347,22 +347,22 @@ def qty(self, qty): @property def price(self): - """Gets the price of this InlineResponse20045. # noqa: E501 + """Gets the price of this CrossexTrade. # noqa: E501 Fill Price # noqa: E501 - :return: The price of this InlineResponse20045. # noqa: E501 + :return: The price of this CrossexTrade. # noqa: E501 :rtype: str """ return self._price @price.setter def price(self, price): - """Sets the price of this InlineResponse20045. + """Sets the price of this CrossexTrade. Fill Price # noqa: E501 - :param price: The price of this InlineResponse20045. # noqa: E501 + :param price: The price of this CrossexTrade. # noqa: E501 :type: str """ @@ -370,22 +370,22 @@ def price(self, price): @property def fee(self): - """Gets the fee of this InlineResponse20045. # noqa: E501 + """Gets the fee of this CrossexTrade. # noqa: E501 fee # noqa: E501 - :return: The fee of this InlineResponse20045. # noqa: E501 + :return: The fee of this CrossexTrade. # noqa: E501 :rtype: str """ return self._fee @fee.setter def fee(self, fee): - """Sets the fee of this InlineResponse20045. + """Sets the fee of this CrossexTrade. fee # noqa: E501 - :param fee: The fee of this InlineResponse20045. # noqa: E501 + :param fee: The fee of this CrossexTrade. # noqa: E501 :type: str """ @@ -393,22 +393,22 @@ def fee(self, fee): @property def fee_coin(self): - """Gets the fee_coin of this InlineResponse20045. # noqa: E501 + """Gets the fee_coin of this CrossexTrade. # noqa: E501 Fee currency # noqa: E501 - :return: The fee_coin of this InlineResponse20045. # noqa: E501 + :return: The fee_coin of this CrossexTrade. # noqa: E501 :rtype: str """ return self._fee_coin @fee_coin.setter def fee_coin(self, fee_coin): - """Sets the fee_coin of this InlineResponse20045. + """Sets the fee_coin of this CrossexTrade. Fee currency # noqa: E501 - :param fee_coin: The fee_coin of this InlineResponse20045. # noqa: E501 + :param fee_coin: The fee_coin of this CrossexTrade. # noqa: E501 :type: str """ @@ -416,22 +416,22 @@ def fee_coin(self, fee_coin): @property def fee_rate(self): - """Gets the fee_rate of this InlineResponse20045. # noqa: E501 + """Gets the fee_rate of this CrossexTrade. # noqa: E501 Fee Rate # noqa: E501 - :return: The fee_rate of this InlineResponse20045. # noqa: E501 + :return: The fee_rate of this CrossexTrade. # noqa: E501 :rtype: str """ return self._fee_rate @fee_rate.setter def fee_rate(self, fee_rate): - """Sets the fee_rate of this InlineResponse20045. + """Sets the fee_rate of this CrossexTrade. Fee Rate # noqa: E501 - :param fee_rate: The fee_rate of this InlineResponse20045. # noqa: E501 + :param fee_rate: The fee_rate of this CrossexTrade. # noqa: E501 :type: str """ @@ -439,22 +439,22 @@ def fee_rate(self, fee_rate): @property def match_role(self): - """Gets the match_role of this InlineResponse20045. # noqa: E501 + """Gets the match_role of this CrossexTrade. # noqa: E501 Filled Role # noqa: E501 - :return: The match_role of this InlineResponse20045. # noqa: E501 + :return: The match_role of this CrossexTrade. # noqa: E501 :rtype: str """ return self._match_role @match_role.setter def match_role(self, match_role): - """Sets the match_role of this InlineResponse20045. + """Sets the match_role of this CrossexTrade. Filled Role # noqa: E501 - :param match_role: The match_role of this InlineResponse20045. # noqa: E501 + :param match_role: The match_role of this CrossexTrade. # noqa: E501 :type: str """ @@ -462,22 +462,22 @@ def match_role(self, match_role): @property def rpnl(self): - """Gets the rpnl of this InlineResponse20045. # noqa: E501 + """Gets the rpnl of this CrossexTrade. # noqa: E501 Realized P&L # noqa: E501 - :return: The rpnl of this InlineResponse20045. # noqa: E501 + :return: The rpnl of this CrossexTrade. # noqa: E501 :rtype: str """ return self._rpnl @rpnl.setter def rpnl(self, rpnl): - """Sets the rpnl of this InlineResponse20045. + """Sets the rpnl of this CrossexTrade. Realized P&L # noqa: E501 - :param rpnl: The rpnl of this InlineResponse20045. # noqa: E501 + :param rpnl: The rpnl of this CrossexTrade. # noqa: E501 :type: str """ @@ -485,22 +485,22 @@ def rpnl(self, rpnl): @property def position_mode(self): - """Gets the position_mode of this InlineResponse20045. # noqa: E501 + """Gets the position_mode of this CrossexTrade. # noqa: E501 Position Mode # noqa: E501 - :return: The position_mode of this InlineResponse20045. # noqa: E501 + :return: The position_mode of this CrossexTrade. # noqa: E501 :rtype: str """ return self._position_mode @position_mode.setter def position_mode(self, position_mode): - """Sets the position_mode of this InlineResponse20045. + """Sets the position_mode of this CrossexTrade. Position Mode # noqa: E501 - :param position_mode: The position_mode of this InlineResponse20045. # noqa: E501 + :param position_mode: The position_mode of this CrossexTrade. # noqa: E501 :type: str """ @@ -508,22 +508,22 @@ def position_mode(self, position_mode): @property def position_side(self): - """Gets the position_side of this InlineResponse20045. # noqa: E501 + """Gets the position_side of this CrossexTrade. # noqa: E501 Position Direction # noqa: E501 - :return: The position_side of this InlineResponse20045. # noqa: E501 + :return: The position_side of this CrossexTrade. # noqa: E501 :rtype: str """ return self._position_side @position_side.setter def position_side(self, position_side): - """Sets the position_side of this InlineResponse20045. + """Sets the position_side of this CrossexTrade. Position Direction # noqa: E501 - :param position_side: The position_side of this InlineResponse20045. # noqa: E501 + :param position_side: The position_side of this CrossexTrade. # noqa: E501 :type: str """ @@ -531,22 +531,22 @@ def position_side(self, position_side): @property def create_time(self): - """Gets the create_time of this InlineResponse20045. # noqa: E501 + """Gets the create_time of this CrossexTrade. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20045. # noqa: E501 + :return: The create_time of this CrossexTrade. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20045. + """Sets the create_time of this CrossexTrade. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20045. # noqa: E501 + :param create_time: The create_time of this CrossexTrade. # noqa: E501 :type: str """ @@ -586,14 +586,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20045): + if not isinstance(other, CrossexTrade): 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, InlineResponse20045): + if not isinstance(other, CrossexTrade): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20028.py b/gate_api/models/crossex_transfer_coin.py similarity index 79% rename from gate_api/models/inline_response20028.py rename to gate_api/models/crossex_transfer_coin.py index bf75760e..86d99835 100644 --- a/gate_api/models/inline_response20028.py +++ b/gate_api/models/crossex_transfer_coin.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20028(object): +class CrossexTransferCoin(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,7 +50,7 @@ class InlineResponse20028(object): def __init__(self, coin=None, min_trans_amount=None, est_fee=None, precision=None, is_disabled=None, local_vars_configuration=None): # noqa: E501 # type: (str, float, float, int, int, Configuration) -> None - """InlineResponse20028 - a model defined in OpenAPI""" # noqa: E501 + """CrossexTransferCoin - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -70,22 +70,22 @@ def __init__(self, coin=None, min_trans_amount=None, est_fee=None, precision=Non @property def coin(self): - """Gets the coin of this InlineResponse20028. # noqa: E501 + """Gets the coin of this CrossexTransferCoin. # noqa: E501 Currency # noqa: E501 - :return: The coin of this InlineResponse20028. # noqa: E501 + :return: The coin of this CrossexTransferCoin. # noqa: E501 :rtype: str """ return self._coin @coin.setter def coin(self, coin): - """Sets the coin of this InlineResponse20028. + """Sets the coin of this CrossexTransferCoin. Currency # noqa: E501 - :param coin: The coin of this InlineResponse20028. # noqa: E501 + :param coin: The coin of this CrossexTransferCoin. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and coin is None: # noqa: E501 @@ -95,22 +95,22 @@ def coin(self, coin): @property def min_trans_amount(self): - """Gets the min_trans_amount of this InlineResponse20028. # noqa: E501 + """Gets the min_trans_amount of this CrossexTransferCoin. # noqa: E501 Minimum Transfer Quantity (including estimated fees) # noqa: E501 - :return: The min_trans_amount of this InlineResponse20028. # noqa: E501 + :return: The min_trans_amount of this CrossexTransferCoin. # noqa: E501 :rtype: float """ return self._min_trans_amount @min_trans_amount.setter def min_trans_amount(self, min_trans_amount): - """Sets the min_trans_amount of this InlineResponse20028. + """Sets the min_trans_amount of this CrossexTransferCoin. Minimum Transfer Quantity (including estimated fees) # noqa: E501 - :param min_trans_amount: The min_trans_amount of this InlineResponse20028. # noqa: E501 + :param min_trans_amount: The min_trans_amount of this CrossexTransferCoin. # noqa: E501 :type: float """ if self.local_vars_configuration.client_side_validation and min_trans_amount is None: # noqa: E501 @@ -120,22 +120,22 @@ def min_trans_amount(self, min_trans_amount): @property def est_fee(self): - """Gets the est_fee of this InlineResponse20028. # noqa: E501 + """Gets the est_fee of this CrossexTransferCoin. # noqa: E501 Estimated Fee # noqa: E501 - :return: The est_fee of this InlineResponse20028. # noqa: E501 + :return: The est_fee of this CrossexTransferCoin. # noqa: E501 :rtype: float """ return self._est_fee @est_fee.setter def est_fee(self, est_fee): - """Sets the est_fee of this InlineResponse20028. + """Sets the est_fee of this CrossexTransferCoin. Estimated Fee # noqa: E501 - :param est_fee: The est_fee of this InlineResponse20028. # noqa: E501 + :param est_fee: The est_fee of this CrossexTransferCoin. # noqa: E501 :type: float """ if self.local_vars_configuration.client_side_validation and est_fee is None: # noqa: E501 @@ -145,22 +145,22 @@ def est_fee(self, est_fee): @property def precision(self): - """Gets the precision of this InlineResponse20028. # noqa: E501 + """Gets the precision of this CrossexTransferCoin. # noqa: E501 Precision # noqa: E501 - :return: The precision of this InlineResponse20028. # noqa: E501 + :return: The precision of this CrossexTransferCoin. # noqa: E501 :rtype: int """ return self._precision @precision.setter def precision(self, precision): - """Sets the precision of this InlineResponse20028. + """Sets the precision of this CrossexTransferCoin. Precision # noqa: E501 - :param precision: The precision of this InlineResponse20028. # noqa: E501 + :param precision: The precision of this CrossexTransferCoin. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and precision is None: # noqa: E501 @@ -170,22 +170,22 @@ def precision(self, precision): @property def is_disabled(self): - """Gets the is_disabled of this InlineResponse20028. # noqa: E501 + """Gets the is_disabled of this CrossexTransferCoin. # noqa: E501 If it is disabled. 0 means NOT being disabled # noqa: E501 - :return: The is_disabled of this InlineResponse20028. # noqa: E501 + :return: The is_disabled of this CrossexTransferCoin. # noqa: E501 :rtype: int """ return self._is_disabled @is_disabled.setter def is_disabled(self, is_disabled): - """Sets the is_disabled of this InlineResponse20028. + """Sets the is_disabled of this CrossexTransferCoin. If it is disabled. 0 means NOT being disabled # noqa: E501 - :param is_disabled: The is_disabled of this InlineResponse20028. # noqa: E501 + :param is_disabled: The is_disabled of this CrossexTransferCoin. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and is_disabled is None: # noqa: E501 @@ -227,14 +227,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20028): + if not isinstance(other, CrossexTransferCoin): 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, InlineResponse20028): + if not isinstance(other, CrossexTransferCoin): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20029.py b/gate_api/models/crossex_transfer_record.py similarity index 71% rename from gate_api/models/inline_response20029.py rename to gate_api/models/crossex_transfer_record.py index 42200a89..e068bbca 100644 --- a/gate_api/models/inline_response20029.py +++ b/gate_api/models/crossex_transfer_record.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20029(object): +class CrossexTransferRecord(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -62,7 +62,7 @@ class InlineResponse20029(object): def __init__(self, id=None, text=None, from_account_type=None, to_account_type=None, coin=None, amount=None, actual_receive=None, status=None, fail_reason=None, create_time=None, update_time=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, int, int, Configuration) -> None - """InlineResponse20029 - a model defined in OpenAPI""" # noqa: E501 + """CrossexTransferRecord - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -96,22 +96,22 @@ def __init__(self, id=None, text=None, from_account_type=None, to_account_type=N @property def id(self): - """Gets the id of this InlineResponse20029. # noqa: E501 + """Gets the id of this CrossexTransferRecord. # noqa: E501 Order ID # noqa: E501 - :return: The id of this InlineResponse20029. # noqa: E501 + :return: The id of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this InlineResponse20029. + """Sets the id of this CrossexTransferRecord. Order ID # noqa: E501 - :param id: The id of this InlineResponse20029. # noqa: E501 + :param id: The id of this CrossexTransferRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 @@ -121,22 +121,22 @@ def id(self, id): @property def text(self): - """Gets the text of this InlineResponse20029. # noqa: E501 + """Gets the text of this CrossexTransferRecord. # noqa: E501 Client Custom ID # noqa: E501 - :return: The text of this InlineResponse20029. # noqa: E501 + :return: The text of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): - """Sets the text of this InlineResponse20029. + """Sets the text of this CrossexTransferRecord. Client Custom ID # noqa: E501 - :param text: The text of this InlineResponse20029. # noqa: E501 + :param text: The text of this CrossexTransferRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 @@ -146,22 +146,22 @@ def text(self, text): @property def from_account_type(self): - """Gets the from_account_type of this InlineResponse20029. # noqa: E501 + """Gets the from_account_type of this CrossexTransferRecord. # noqa: E501 - Source `from` account (CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT) # noqa: E501 + `from` credit account touched by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 - :return: The from_account_type of this InlineResponse20029. # noqa: E501 + :return: The from_account_type of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._from_account_type @from_account_type.setter def from_account_type(self, from_account_type): - """Sets the from_account_type of this InlineResponse20029. + """Sets the from_account_type of this CrossexTransferRecord. - Source `from` account (CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT) # noqa: E501 + `from` credit account touched by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 - :param from_account_type: The from_account_type of this InlineResponse20029. # noqa: E501 + :param from_account_type: The from_account_type of this CrossexTransferRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and from_account_type is None: # noqa: E501 @@ -171,20 +171,22 @@ def from_account_type(self, from_account_type): @property def to_account_type(self): - """Gets the to_account_type of this InlineResponse20029. # noqa: E501 + """Gets the to_account_type of this CrossexTransferRecord. # noqa: E501 + `to` debit account handled by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 - :return: The to_account_type of this InlineResponse20029. # noqa: E501 + :return: The to_account_type of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._to_account_type @to_account_type.setter def to_account_type(self, to_account_type): - """Sets the to_account_type of this InlineResponse20029. + """Sets the to_account_type of this CrossexTransferRecord. + `to` debit account handled by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 - :param to_account_type: The to_account_type of this InlineResponse20029. # noqa: E501 + :param to_account_type: The to_account_type of this CrossexTransferRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and to_account_type is None: # noqa: E501 @@ -194,22 +196,22 @@ def to_account_type(self, to_account_type): @property def coin(self): - """Gets the coin of this InlineResponse20029. # noqa: E501 + """Gets the coin of this CrossexTransferRecord. # noqa: E501 Currency # noqa: E501 - :return: The coin of this InlineResponse20029. # noqa: E501 + :return: The coin of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._coin @coin.setter def coin(self, coin): - """Sets the coin of this InlineResponse20029. + """Sets the coin of this CrossexTransferRecord. Currency # noqa: E501 - :param coin: The coin of this InlineResponse20029. # noqa: E501 + :param coin: The coin of this CrossexTransferRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and coin is None: # noqa: E501 @@ -219,22 +221,22 @@ def coin(self, coin): @property def amount(self): - """Gets the amount of this InlineResponse20029. # noqa: E501 + """Gets the amount of this CrossexTransferRecord. # noqa: E501 Transfer amount, the amount requested for the transfer # noqa: E501 - :return: The amount of this InlineResponse20029. # noqa: E501 + :return: The amount of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._amount @amount.setter def amount(self, amount): - """Sets the amount of this InlineResponse20029. + """Sets the amount of this CrossexTransferRecord. Transfer amount, the amount requested for the transfer # noqa: E501 - :param amount: The amount of this InlineResponse20029. # noqa: E501 + :param amount: The amount of this CrossexTransferRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 @@ -244,22 +246,22 @@ def amount(self, amount): @property def actual_receive(self): - """Gets the actual_receive of this InlineResponse20029. # noqa: E501 + """Gets the actual_receive of this CrossexTransferRecord. # noqa: E501 Actual credited amount (has a value when status = SUCCESS; empty for other statuses) # noqa: E501 - :return: The actual_receive of this InlineResponse20029. # noqa: E501 + :return: The actual_receive of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._actual_receive @actual_receive.setter def actual_receive(self, actual_receive): - """Sets the actual_receive of this InlineResponse20029. + """Sets the actual_receive of this CrossexTransferRecord. Actual credited amount (has a value when status = SUCCESS; empty for other statuses) # noqa: E501 - :param actual_receive: The actual_receive of this InlineResponse20029. # noqa: E501 + :param actual_receive: The actual_receive of this CrossexTransferRecord. # noqa: E501 :type: str """ @@ -267,22 +269,22 @@ def actual_receive(self, actual_receive): @property def status(self): - """Gets the status of this InlineResponse20029. # noqa: E501 + """Gets the status of this CrossexTransferRecord. # noqa: E501 Transfer Status - `FAIL`: Failed - `SUCCESS`: Successful - `PENDING`: Transfer in Progress # noqa: E501 - :return: The status of this InlineResponse20029. # noqa: E501 + :return: The status of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20029. + """Sets the status of this CrossexTransferRecord. Transfer Status - `FAIL`: Failed - `SUCCESS`: Successful - `PENDING`: Transfer in Progress # noqa: E501 - :param status: The status of this InlineResponse20029. # noqa: E501 + :param status: The status of this CrossexTransferRecord. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 @@ -292,22 +294,22 @@ def status(self, status): @property def fail_reason(self): - """Gets the fail_reason of this InlineResponse20029. # noqa: E501 + """Gets the fail_reason of this CrossexTransferRecord. # noqa: E501 Failure reason (has a value when status = FAIL; empty for other statuses) # noqa: E501 - :return: The fail_reason of this InlineResponse20029. # noqa: E501 + :return: The fail_reason of this CrossexTransferRecord. # noqa: E501 :rtype: str """ return self._fail_reason @fail_reason.setter def fail_reason(self, fail_reason): - """Sets the fail_reason of this InlineResponse20029. + """Sets the fail_reason of this CrossexTransferRecord. Failure reason (has a value when status = FAIL; empty for other statuses) # noqa: E501 - :param fail_reason: The fail_reason of this InlineResponse20029. # noqa: E501 + :param fail_reason: The fail_reason of this CrossexTransferRecord. # noqa: E501 :type: str """ @@ -315,22 +317,22 @@ def fail_reason(self, fail_reason): @property def create_time(self): - """Gets the create_time of this InlineResponse20029. # noqa: E501 + """Gets the create_time of this CrossexTransferRecord. # noqa: E501 Creation time of order # noqa: E501 - :return: The create_time of this InlineResponse20029. # noqa: E501 + :return: The create_time of this CrossexTransferRecord. # noqa: E501 :rtype: int """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20029. + """Sets the create_time of this CrossexTransferRecord. Creation time of order # noqa: E501 - :param create_time: The create_time of this InlineResponse20029. # noqa: E501 + :param create_time: The create_time of this CrossexTransferRecord. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 @@ -340,22 +342,22 @@ def create_time(self, create_time): @property def update_time(self): - """Gets the update_time of this InlineResponse20029. # noqa: E501 + """Gets the update_time of this CrossexTransferRecord. # noqa: E501 OrderUpdateTime # noqa: E501 - :return: The update_time of this InlineResponse20029. # noqa: E501 + :return: The update_time of this CrossexTransferRecord. # noqa: E501 :rtype: int """ return self._update_time @update_time.setter def update_time(self, update_time): - """Sets the update_time of this InlineResponse20029. + """Sets the update_time of this CrossexTransferRecord. OrderUpdateTime # noqa: E501 - :param update_time: The update_time of this InlineResponse20029. # noqa: E501 + :param update_time: The update_time of this CrossexTransferRecord. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and update_time is None: # noqa: E501 @@ -397,14 +399,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20029): + if not isinstance(other, CrossexTransferRecord): 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, InlineResponse20029): + if not isinstance(other, CrossexTransferRecord): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_transfer_request.py b/gate_api/models/crossex_transfer_request.py index 30ea6419..dbd8048c 100644 --- a/gate_api/models/crossex_transfer_request.py +++ b/gate_api/models/crossex_transfer_request.py @@ -123,7 +123,7 @@ def amount(self, amount): def _from(self): """Gets the _from of this CrossexTransferRequest. # noqa: E501 - Transfer-in account: CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT # noqa: E501 + `from` receiving account (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 :return: The _from of this CrossexTransferRequest. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def _from(self): def _from(self, _from): """Sets the _from of this CrossexTransferRequest. - Transfer-in account: CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT # noqa: E501 + `from` receiving account (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 :param _from: The _from of this CrossexTransferRequest. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def _from(self, _from): def to(self): """Gets the to of this CrossexTransferRequest. # noqa: E501 - Transfer-out account: CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT # noqa: E501 + `to` debit account (funds withdrawn from): `CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT` # noqa: E501 :return: The to of this CrossexTransferRequest. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def to(self): def to(self, to): """Sets the to of this CrossexTransferRequest. - Transfer-out account: CROSSEX_BINANCE, CROSSEX_OKX, CROSSEX_GATE, CROSSEX_BYBIT, CROSSEX, SPOT # noqa: E501 + `to` debit account (funds withdrawn from): `CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT` # noqa: E501 :param to: The to of this CrossexTransferRequest. # noqa: E501 :type: str diff --git a/gate_api/models/inline_response20030.py b/gate_api/models/crossex_transfer_response.py similarity index 83% rename from gate_api/models/inline_response20030.py rename to gate_api/models/crossex_transfer_response.py index c1aa4d18..dd84c6a1 100644 --- a/gate_api/models/inline_response20030.py +++ b/gate_api/models/crossex_transfer_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20030(object): +class CrossexTransferResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse20030(object): def __init__(self, tx_id=None, text=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """InlineResponse20030 - a model defined in OpenAPI""" # noqa: E501 + """CrossexTransferResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,22 +58,22 @@ def __init__(self, tx_id=None, text=None, local_vars_configuration=None): # noq @property def tx_id(self): - """Gets the tx_id of this InlineResponse20030. # noqa: E501 + """Gets the tx_id of this CrossexTransferResponse. # noqa: E501 Order ID # noqa: E501 - :return: The tx_id of this InlineResponse20030. # noqa: E501 + :return: The tx_id of this CrossexTransferResponse. # noqa: E501 :rtype: str """ return self._tx_id @tx_id.setter def tx_id(self, tx_id): - """Sets the tx_id of this InlineResponse20030. + """Sets the tx_id of this CrossexTransferResponse. Order ID # noqa: E501 - :param tx_id: The tx_id of this InlineResponse20030. # noqa: E501 + :param tx_id: The tx_id of this CrossexTransferResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and tx_id is None: # noqa: E501 @@ -83,22 +83,22 @@ def tx_id(self, tx_id): @property def text(self): - """Gets the text of this InlineResponse20030. # noqa: E501 + """Gets the text of this CrossexTransferResponse. # noqa: E501 User-defined Order ID # noqa: E501 - :return: The text of this InlineResponse20030. # noqa: E501 + :return: The text of this CrossexTransferResponse. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): - """Sets the text of this InlineResponse20030. + """Sets the text of this CrossexTransferResponse. User-defined Order ID # noqa: E501 - :param text: The text of this InlineResponse20030. # noqa: E501 + :param text: The text of this CrossexTransferResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 @@ -140,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20030): + if not isinstance(other, CrossexTransferResponse): 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, InlineResponse20030): + if not isinstance(other, CrossexTransferResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py index 85ed24f7..0634b91c 100644 --- a/gate_api/models/currency.py +++ b/gate_api/models/currency.py @@ -44,7 +44,8 @@ class Currency(object): 'chain': 'str', 'chains': 'list[SpotCurrencyChain]', 'total_supply': 'str', - 'market_cap': 'str' + 'market_cap': 'str', + 'category': 'list[str]' } attribute_map = { @@ -59,11 +60,12 @@ class Currency(object): 'chain': 'chain', 'chains': 'chains', 'total_supply': 'total_supply', - 'market_cap': 'market_cap' + 'market_cap': 'market_cap', + 'category': 'category' } - 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, total_supply=None, market_cap=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, bool, bool, bool, bool, bool, str, str, list[SpotCurrencyChain], 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, total_supply=None, market_cap=None, category=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, bool, bool, bool, bool, bool, str, str, list[SpotCurrencyChain], str, str, list[str], Configuration) -> None """Currency - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -81,6 +83,7 @@ def __init__(self, currency=None, name=None, delisted=None, withdraw_disabled=No self._chains = None self._total_supply = None self._market_cap = None + self._category = None self.discriminator = None if currency is not None: @@ -107,6 +110,8 @@ def __init__(self, currency=None, name=None, delisted=None, withdraw_disabled=No self.total_supply = total_supply if market_cap is not None: self.market_cap = market_cap + if category is not None: + self.category = category @property def currency(self): @@ -384,6 +389,29 @@ def market_cap(self, market_cap): self._market_cap = market_cap + @property + def category(self): + """Gets the category of this Currency. # noqa: E501 + + Currency categories - stocks: Stocks - metals: Metals - indices: Indices - forex: Forex - commodities: Commodities # noqa: E501 + + :return: The category of this Currency. # noqa: E501 + :rtype: list[str] + """ + return self._category + + @category.setter + def category(self, category): + """Sets the category of this Currency. + + Currency categories - stocks: Stocks - metals: Metals - indices: Indices - forex: Forex - commodities: Commodities # noqa: E501 + + :param category: The category of this Currency. # noqa: E501 + :type: list[str] + """ + + self._category = category + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/delivery_order_book.py b/gate_api/models/delivery_order_book.py index c0087208..d449821a 100644 --- a/gate_api/models/delivery_order_book.py +++ b/gate_api/models/delivery_order_book.py @@ -36,8 +36,8 @@ class DeliveryOrderBook(object): 'id': 'int', 'current': 'float', 'update': 'float', - 'asks': 'list[FuturesOrderBookItem1]', - 'bids': 'list[FuturesOrderBookItem1]' + 'asks': 'list[DeliveryOrderBookItem]', + 'bids': 'list[DeliveryOrderBookItem]' } attribute_map = { @@ -49,7 +49,7 @@ class DeliveryOrderBook(object): } def __init__(self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None): # noqa: E501 - # type: (int, float, float, list[FuturesOrderBookItem1], list[FuturesOrderBookItem1], Configuration) -> None + # type: (int, float, float, list[DeliveryOrderBookItem], list[DeliveryOrderBookItem], Configuration) -> None """DeliveryOrderBook - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -147,7 +147,7 @@ def asks(self): Ask Depth # noqa: E501 :return: The asks of this DeliveryOrderBook. # noqa: E501 - :rtype: list[FuturesOrderBookItem1] + :rtype: list[DeliveryOrderBookItem] """ return self._asks @@ -158,7 +158,7 @@ def asks(self, asks): Ask Depth # noqa: E501 :param asks: The asks of this DeliveryOrderBook. # noqa: E501 - :type: list[FuturesOrderBookItem1] + :type: list[DeliveryOrderBookItem] """ if self.local_vars_configuration.client_side_validation and asks is None: # noqa: E501 raise ValueError("Invalid value for `asks`, must not be `None`") # noqa: E501 @@ -172,7 +172,7 @@ def bids(self): Bid Depth # noqa: E501 :return: The bids of this DeliveryOrderBook. # noqa: E501 - :rtype: list[FuturesOrderBookItem1] + :rtype: list[DeliveryOrderBookItem] """ return self._bids @@ -183,7 +183,7 @@ def bids(self, bids): Bid Depth # noqa: E501 :param bids: The bids of this DeliveryOrderBook. # noqa: E501 - :type: list[FuturesOrderBookItem1] + :type: list[DeliveryOrderBookItem] """ if self.local_vars_configuration.client_side_validation and bids is None: # noqa: E501 raise ValueError("Invalid value for `bids`, must not be `None`") # noqa: E501 diff --git a/gate_api/models/futures_order_book_item1.py b/gate_api/models/delivery_order_book_item.py similarity index 82% rename from gate_api/models/futures_order_book_item1.py rename to gate_api/models/delivery_order_book_item.py index c2aed685..c8ef36d4 100644 --- a/gate_api/models/futures_order_book_item1.py +++ b/gate_api/models/delivery_order_book_item.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class FuturesOrderBookItem1(object): +class DeliveryOrderBookItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class FuturesOrderBookItem1(object): def __init__(self, p=None, s=None, local_vars_configuration=None): # noqa: E501 # type: (str, int, Configuration) -> None - """FuturesOrderBookItem1 - a model defined in OpenAPI""" # noqa: E501 + """DeliveryOrderBookItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -60,22 +60,22 @@ def __init__(self, p=None, s=None, local_vars_configuration=None): # noqa: E501 @property def p(self): - """Gets the p of this FuturesOrderBookItem1. # noqa: E501 + """Gets the p of this DeliveryOrderBookItem. # noqa: E501 Price (quote currency) # noqa: E501 - :return: The p of this FuturesOrderBookItem1. # noqa: E501 + :return: The p of this DeliveryOrderBookItem. # noqa: E501 :rtype: str """ return self._p @p.setter def p(self, p): - """Sets the p of this FuturesOrderBookItem1. + """Sets the p of this DeliveryOrderBookItem. Price (quote currency) # noqa: E501 - :param p: The p of this FuturesOrderBookItem1. # noqa: E501 + :param p: The p of this DeliveryOrderBookItem. # noqa: E501 :type: str """ @@ -83,22 +83,22 @@ def p(self, p): @property def s(self): - """Gets the s of this FuturesOrderBookItem1. # noqa: E501 + """Gets the s of this DeliveryOrderBookItem. # noqa: E501 Size # noqa: E501 - :return: The s of this FuturesOrderBookItem1. # noqa: E501 + :return: The s of this DeliveryOrderBookItem. # noqa: E501 :rtype: int """ return self._s @s.setter def s(self, s): - """Sets the s of this FuturesOrderBookItem1. + """Sets the s of this DeliveryOrderBookItem. Size # noqa: E501 - :param s: The s of this FuturesOrderBookItem1. # noqa: E501 + :param s: The s of this DeliveryOrderBookItem. # noqa: E501 :type: int """ @@ -138,14 +138,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, FuturesOrderBookItem1): + if not isinstance(other, DeliveryOrderBookItem): 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, FuturesOrderBookItem1): + if not isinstance(other, DeliveryOrderBookItem): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/delta_neutral_enabled.py b/gate_api/models/delta_neutral_enabled.py new file mode 100644 index 00000000..82eb2f56 --- /dev/null +++ b/gate_api/models/delta_neutral_enabled.py @@ -0,0 +1,124 @@ +# 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 DeltaNeutralEnabled(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 = { + 'enabled': 'bool' + } + + attribute_map = { + 'enabled': 'enabled' + } + + def __init__(self, enabled=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, Configuration) -> None + """DeltaNeutralEnabled - 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._enabled = None + self.discriminator = None + + self.enabled = enabled + + @property + def enabled(self): + """Gets the enabled of this DeltaNeutralEnabled. # noqa: E501 + + Whether to enable the account Delta-neutral strategy mode # noqa: E501 + + :return: The enabled of this DeltaNeutralEnabled. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this DeltaNeutralEnabled. + + Whether to enable the account Delta-neutral strategy mode # noqa: E501 + + :param enabled: The enabled of this DeltaNeutralEnabled. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and enabled is None: # noqa: E501 + raise ValueError("Invalid value for `enabled`, must not be `None`") # noqa: E501 + + self._enabled = enabled + + 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, DeltaNeutralEnabled): + 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, DeltaNeutralEnabled): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/deposit_record.py b/gate_api/models/deposit_record.py index 274c9291..45893d04 100644 --- a/gate_api/models/deposit_record.py +++ b/gate_api/models/deposit_record.py @@ -41,6 +41,7 @@ class DepositRecord(object): 'address': 'str', 'memo': 'str', 'status': 'str', + 'refund_status': 'str', 'chain': 'str' } @@ -53,11 +54,12 @@ class DepositRecord(object): 'address': 'address', 'memo': 'memo', 'status': 'status', + 'refund_status': 'refund_status', 'chain': 'chain' } - def __init__(self, id=None, txid=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, Configuration) -> None + def __init__(self, id=None, txid=None, timestamp=None, amount=None, currency=None, address=None, memo=None, status=None, refund_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() @@ -71,6 +73,7 @@ def __init__(self, id=None, txid=None, timestamp=None, amount=None, currency=Non self._address = None self._memo = None self._status = None + self._refund_status = None self._chain = None self.discriminator = None @@ -88,6 +91,8 @@ def __init__(self, id=None, txid=None, timestamp=None, amount=None, currency=Non self.memo = memo if status is not None: self.status = status + if refund_status is not None: + self.refund_status = refund_status self.chain = chain @property @@ -278,6 +283,29 @@ def status(self, status): self._status = status + @property + def refund_status(self): + """Gets the refund_status of this DepositRecord. # noqa: E501 + + Blocked deposit refund status. This field is returned only when the deposit record has a blocked deposit refund record with a non-empty refund status. Not returned when there is no refund record or the refund status is empty - REFUNDING: Refund in progress - REFUNDED: Refund completed - REFUND_FAILED: Refund failed - REJECTED: Refund rejected # noqa: E501 + + :return: The refund_status of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._refund_status + + @refund_status.setter + def refund_status(self, refund_status): + """Sets the refund_status of this DepositRecord. + + Blocked deposit refund status. This field is returned only when the deposit record has a blocked deposit refund record with a non-empty refund status. Not returned when there is no refund record or the refund status is empty - REFUNDING: Refund in progress - REFUNDED: Refund completed - REFUND_FAILED: Refund failed - REJECTED: Refund rejected # noqa: E501 + + :param refund_status: The refund_status of this DepositRecord. # noqa: E501 + :type: str + """ + + self._refund_status = refund_status + @property def chain(self): """Gets the chain of this DepositRecord. # noqa: E501 diff --git a/gate_api/models/discover_scene.py b/gate_api/models/discover_scene.py new file mode 100644 index 00000000..e8c2afe5 --- /dev/null +++ b/gate_api/models/discover_scene.py @@ -0,0 +1,103 @@ +# 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 DiscoverScene(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + TOP1 = "top1" + BUNDLE = "bundle" + FILTER = "filter" + REFRESH = "refresh" + + allowable_values = [TOP1, BUNDLE, FILTER, REFRESH] # noqa: E501 + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + # type: (Configuration) -> None + """DiscoverScene - 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.discriminator = None + + 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, DiscoverScene): + 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, DiscoverScene): + 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 index 37343530..222b00e2 100644 --- a/gate_api/models/dual_get_orders.py +++ b/gate_api/models/dual_get_orders.py @@ -35,7 +35,6 @@ class DualGetOrders(object): openapi_types = { 'id': 'int', 'plan_id': 'int', - 'copies': 'str', 'invest_amount': 'str', 'settlement_amount': 'str', 'create_time': 'int', @@ -55,7 +54,6 @@ class DualGetOrders(object): attribute_map = { 'id': 'id', 'plan_id': 'plan_id', - 'copies': 'copies', 'invest_amount': 'invest_amount', 'settlement_amount': 'settlement_amount', 'create_time': 'create_time', @@ -72,8 +70,8 @@ class DualGetOrders(object): '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 + def __init__(self, id=None, plan_id=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, 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() @@ -81,7 +79,6 @@ def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settl self._id = None self._plan_id = None - self._copies = None self._invest_amount = None self._settlement_amount = None self._create_time = None @@ -102,8 +99,6 @@ def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settl 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: @@ -179,29 +174,6 @@ def plan_id(self, plan_id): 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 diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py index dc302ac0..1801929e 100644 --- a/gate_api/models/dual_get_plans.py +++ b/gate_api/models/dual_get_plans.py @@ -39,10 +39,8 @@ class DualGetPlans(object): 'exercise_currency': 'str', 'exercise_price': 'float', 'delivery_time': 'int', - 'min_copies': 'int', - 'max_copies': 'int', - 'per_value': 'str', 'apy_display': 'str', + 'min_amount': 'str', 'start_time': 'int', 'end_time': 'int', 'status': 'str' @@ -55,17 +53,15 @@ class DualGetPlans(object): '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', + 'min_amount': 'min_amount', '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 + def __init__(self, id=None, instrument_name=None, invest_currency=None, exercise_currency=None, exercise_price=None, delivery_time=None, apy_display=None, min_amount=None, start_time=None, end_time=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, float, 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() @@ -77,10 +73,8 @@ def __init__(self, id=None, instrument_name=None, invest_currency=None, exercise 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._min_amount = None self._start_time = None self._end_time = None self._status = None @@ -98,14 +92,10 @@ def __init__(self, id=None, instrument_name=None, invest_currency=None, exercise 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 min_amount is not None: + self.min_amount = min_amount if start_time is not None: self.start_time = start_time if end_time is not None: @@ -252,96 +242,50 @@ def delivery_time(self, delivery_time): 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 + def apy_display(self): + """Gets the apy_display of this DualGetPlans. # noqa: E501 - Value Per Unit (deprecated) # noqa: E501 + Annual Yield # noqa: E501 - :return: The per_value of this DualGetPlans. # noqa: E501 + :return: The apy_display of this DualGetPlans. # noqa: E501 :rtype: str """ - return self._per_value + return self._apy_display - @per_value.setter - def per_value(self, per_value): - """Sets the per_value of this DualGetPlans. + @apy_display.setter + def apy_display(self, apy_display): + """Sets the apy_display of this DualGetPlans. - Value Per Unit (deprecated) # noqa: E501 + Annual Yield # noqa: E501 - :param per_value: The per_value of this DualGetPlans. # noqa: E501 + :param apy_display: The apy_display of this DualGetPlans. # noqa: E501 :type: str """ - self._per_value = per_value + self._apy_display = apy_display @property - def apy_display(self): - """Gets the apy_display of this DualGetPlans. # noqa: E501 + def min_amount(self): + """Gets the min_amount of this DualGetPlans. # noqa: E501 - Annual Yield # noqa: E501 + Minimum investment amount # noqa: E501 - :return: The apy_display of this DualGetPlans. # noqa: E501 + :return: The min_amount of this DualGetPlans. # noqa: E501 :rtype: str """ - return self._apy_display + return self._min_amount - @apy_display.setter - def apy_display(self, apy_display): - """Sets the apy_display of this DualGetPlans. + @min_amount.setter + def min_amount(self, min_amount): + """Sets the min_amount of this DualGetPlans. - Annual Yield # noqa: E501 + Minimum investment amount # noqa: E501 - :param apy_display: The apy_display of this DualGetPlans. # noqa: E501 + :param min_amount: The min_amount of this DualGetPlans. # noqa: E501 :type: str """ - self._apy_display = apy_display + self._min_amount = min_amount @property def start_time(self): @@ -393,7 +337,7 @@ def end_time(self, end_time): def status(self): """Gets the status of this DualGetPlans. # noqa: E501 - 状态: `NOTSTARTED`-未开始 `ONGOING`-进行中 `ENDED`-已结束 # noqa: E501 + Status: `NOTSTARTED` - Not started `ONGOING` - In progress `ENDED` - Ended # noqa: E501 :return: The status of this DualGetPlans. # noqa: E501 :rtype: str @@ -404,7 +348,7 @@ def status(self): def status(self, status): """Sets the status of this DualGetPlans. - 状态: `NOTSTARTED`-未开始 `ONGOING`-进行中 `ENDED`-已结束 # noqa: E501 + Status: `NOTSTARTED` - Not started `ONGOING` - In progress `ENDED` - Ended # noqa: E501 :param status: The status of this DualGetPlans. # noqa: E501 :type: str diff --git a/gate_api/models/dual_modify_order_reinvest_params.py b/gate_api/models/dual_modify_order_reinvest_params.py new file mode 100644 index 00000000..794a5844 --- /dev/null +++ b/gate_api/models/dual_modify_order_reinvest_params.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 DualModifyOrderReinvestParams(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', + 'status': 'int', + 'effective_time_duration': 'int' + } + + attribute_map = { + 'order_id': 'order_id', + 'status': 'status', + 'effective_time_duration': 'effective_time_duration' + } + + def __init__(self, order_id=None, status=None, effective_time_duration=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, Configuration) -> None + """DualModifyOrderReinvestParams - 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._status = None + self._effective_time_duration = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if status is not None: + self.status = status + if effective_time_duration is not None: + self.effective_time_duration = effective_time_duration + + @property + def order_id(self): + """Gets the order_id of this DualModifyOrderReinvestParams. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this DualModifyOrderReinvestParams. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this DualModifyOrderReinvestParams. + + Order ID # noqa: E501 + + :param order_id: The order_id of this DualModifyOrderReinvestParams. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def status(self): + """Gets the status of this DualModifyOrderReinvestParams. # noqa: E501 + + `0` — off; `1` — on # noqa: E501 + + :return: The status of this DualModifyOrderReinvestParams. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this DualModifyOrderReinvestParams. + + `0` — off; `1` — on # noqa: E501 + + :param status: The status of this DualModifyOrderReinvestParams. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def effective_time_duration(self): + """Gets the effective_time_duration of this DualModifyOrderReinvestParams. # noqa: E501 + + Effective duration in seconds; default 1 day (86400) # noqa: E501 + + :return: The effective_time_duration of this DualModifyOrderReinvestParams. # noqa: E501 + :rtype: int + """ + return self._effective_time_duration + + @effective_time_duration.setter + def effective_time_duration(self, effective_time_duration): + """Sets the effective_time_duration of this DualModifyOrderReinvestParams. + + Effective duration in seconds; default 1 day (86400) # noqa: E501 + + :param effective_time_duration: The effective_time_duration of this DualModifyOrderReinvestParams. # noqa: E501 + :type: int + """ + + self._effective_time_duration = effective_time_duration + + 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, DualModifyOrderReinvestParams): + 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, DualModifyOrderReinvestParams): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/dual_order_refund_params.py b/gate_api/models/dual_order_refund_params.py new file mode 100644 index 00000000..1177ce1c --- /dev/null +++ b/gate_api/models/dual_order_refund_params.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 DualOrderRefundParams(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', + 'req_id': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'req_id': 'req_id' + } + + def __init__(self, order_id=None, req_id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """DualOrderRefundParams - 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._req_id = None + self.discriminator = None + + self.order_id = order_id + self.req_id = req_id + + @property + def order_id(self): + """Gets the order_id of this DualOrderRefundParams. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this DualOrderRefundParams. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this DualOrderRefundParams. + + Order ID # noqa: E501 + + :param order_id: The order_id of this DualOrderRefundParams. # 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 req_id(self): + """Gets the req_id of this DualOrderRefundParams. # noqa: E501 + + Request ID returned by order-refund-preview # noqa: E501 + + :return: The req_id of this DualOrderRefundParams. # noqa: E501 + :rtype: str + """ + return self._req_id + + @req_id.setter + def req_id(self, req_id): + """Sets the req_id of this DualOrderRefundParams. + + Request ID returned by order-refund-preview # noqa: E501 + + :param req_id: The req_id of this DualOrderRefundParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and req_id is None: # noqa: E501 + raise ValueError("Invalid value for `req_id`, must not be `None`") # noqa: E501 + + self._req_id = req_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, DualOrderRefundParams): + 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, DualOrderRefundParams): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/dual_order_refund_preview.py b/gate_api/models/dual_order_refund_preview.py new file mode 100644 index 00000000..2a7f4ca8 --- /dev/null +++ b/gate_api/models/dual_order_refund_preview.py @@ -0,0 +1,543 @@ +# 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 DualOrderRefundPreview(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 = { + 'create_timest': 'int', + 'delivery_timest': 'int', + 'exercise_price': 'str', + 'invest_amount': 'str', + 'invest_currency': 'str', + 'name': 'str', + 'order_id': 'int', + 'req_id': 'str', + 'refund_service_charge': 'int', + 'settle_price': 'str', + 'settlement_amount': 'str', + 'settlement_currency': 'str', + 'settlement_interest': 'str', + 'settlement_principle': 'str', + 'type': 'str', + 'money_back_timest': 'int' + } + + attribute_map = { + 'create_timest': 'create_timest', + 'delivery_timest': 'delivery_timest', + 'exercise_price': 'exercise_price', + 'invest_amount': 'invest_amount', + 'invest_currency': 'invest_currency', + 'name': 'name', + 'order_id': 'order_id', + 'req_id': 'req_id', + 'refund_service_charge': 'refund_service_charge', + 'settle_price': 'settle_price', + 'settlement_amount': 'settlement_amount', + 'settlement_currency': 'settlement_currency', + 'settlement_interest': 'settlement_interest', + 'settlement_principle': 'settlement_principle', + 'type': 'type', + 'money_back_timest': 'money_back_timest' + } + + def __init__(self, create_timest=None, delivery_timest=None, exercise_price=None, invest_amount=None, invest_currency=None, name=None, order_id=None, req_id=None, refund_service_charge=None, settle_price=None, settlement_amount=None, settlement_currency=None, settlement_interest=None, settlement_principle=None, type=None, money_back_timest=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, int, str, int, str, str, str, str, str, str, int, Configuration) -> None + """DualOrderRefundPreview - 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._create_timest = None + self._delivery_timest = None + self._exercise_price = None + self._invest_amount = None + self._invest_currency = None + self._name = None + self._order_id = None + self._req_id = None + self._refund_service_charge = None + self._settle_price = None + self._settlement_amount = None + self._settlement_currency = None + self._settlement_interest = None + self._settlement_principle = None + self._type = None + self._money_back_timest = None + self.discriminator = None + + if create_timest is not None: + self.create_timest = create_timest + if delivery_timest is not None: + self.delivery_timest = delivery_timest + if exercise_price is not None: + self.exercise_price = exercise_price + if invest_amount is not None: + self.invest_amount = invest_amount + if invest_currency is not None: + self.invest_currency = invest_currency + if name is not None: + self.name = name + if order_id is not None: + self.order_id = order_id + if req_id is not None: + self.req_id = req_id + if refund_service_charge is not None: + self.refund_service_charge = refund_service_charge + if settle_price is not None: + self.settle_price = settle_price + if settlement_amount is not None: + self.settlement_amount = settlement_amount + if settlement_currency is not None: + self.settlement_currency = settlement_currency + if settlement_interest is not None: + self.settlement_interest = settlement_interest + if settlement_principle is not None: + self.settlement_principle = settlement_principle + if type is not None: + self.type = type + if money_back_timest is not None: + self.money_back_timest = money_back_timest + + @property + def create_timest(self): + """Gets the create_timest of this DualOrderRefundPreview. # noqa: E501 + + Order creation timestamp # noqa: E501 + + :return: The create_timest of this DualOrderRefundPreview. # noqa: E501 + :rtype: int + """ + return self._create_timest + + @create_timest.setter + def create_timest(self, create_timest): + """Sets the create_timest of this DualOrderRefundPreview. + + Order creation timestamp # noqa: E501 + + :param create_timest: The create_timest of this DualOrderRefundPreview. # noqa: E501 + :type: int + """ + + self._create_timest = create_timest + + @property + def delivery_timest(self): + """Gets the delivery_timest of this DualOrderRefundPreview. # noqa: E501 + + Order delivery timestamp # noqa: E501 + + :return: The delivery_timest of this DualOrderRefundPreview. # noqa: E501 + :rtype: int + """ + return self._delivery_timest + + @delivery_timest.setter + def delivery_timest(self, delivery_timest): + """Sets the delivery_timest of this DualOrderRefundPreview. + + Order delivery timestamp # noqa: E501 + + :param delivery_timest: The delivery_timest of this DualOrderRefundPreview. # noqa: E501 + :type: int + """ + + self._delivery_timest = delivery_timest + + @property + def exercise_price(self): + """Gets the exercise_price of this DualOrderRefundPreview. # noqa: E501 + + Strike price # noqa: E501 + + :return: The exercise_price of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._exercise_price + + @exercise_price.setter + def exercise_price(self, exercise_price): + """Sets the exercise_price of this DualOrderRefundPreview. + + Strike price # noqa: E501 + + :param exercise_price: The exercise_price of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._exercise_price = exercise_price + + @property + def invest_amount(self): + """Gets the invest_amount of this DualOrderRefundPreview. # noqa: E501 + + Investment amount # noqa: E501 + + :return: The invest_amount of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._invest_amount + + @invest_amount.setter + def invest_amount(self, invest_amount): + """Sets the invest_amount of this DualOrderRefundPreview. + + Investment amount # noqa: E501 + + :param invest_amount: The invest_amount of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._invest_amount = invest_amount + + @property + def invest_currency(self): + """Gets the invest_currency of this DualOrderRefundPreview. # noqa: E501 + + Investment Token # noqa: E501 + + :return: The invest_currency of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._invest_currency + + @invest_currency.setter + def invest_currency(self, invest_currency): + """Sets the invest_currency of this DualOrderRefundPreview. + + Investment Token # noqa: E501 + + :param invest_currency: The invest_currency of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._invest_currency = invest_currency + + @property + def name(self): + """Gets the name of this DualOrderRefundPreview. # noqa: E501 + + Order name identifier # noqa: E501 + + :return: The name of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DualOrderRefundPreview. + + Order name identifier # noqa: E501 + + :param name: The name of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def order_id(self): + """Gets the order_id of this DualOrderRefundPreview. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this DualOrderRefundPreview. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this DualOrderRefundPreview. + + Order ID # noqa: E501 + + :param order_id: The order_id of this DualOrderRefundPreview. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def req_id(self): + """Gets the req_id of this DualOrderRefundPreview. # noqa: E501 + + Request ID used for actual redemption # noqa: E501 + + :return: The req_id of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._req_id + + @req_id.setter + def req_id(self, req_id): + """Sets the req_id of this DualOrderRefundPreview. + + Request ID used for actual redemption # noqa: E501 + + :param req_id: The req_id of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._req_id = req_id + + @property + def refund_service_charge(self): + """Gets the refund_service_charge of this DualOrderRefundPreview. # noqa: E501 + + Refund fee # noqa: E501 + + :return: The refund_service_charge of this DualOrderRefundPreview. # noqa: E501 + :rtype: int + """ + return self._refund_service_charge + + @refund_service_charge.setter + def refund_service_charge(self, refund_service_charge): + """Sets the refund_service_charge of this DualOrderRefundPreview. + + Refund fee # noqa: E501 + + :param refund_service_charge: The refund_service_charge of this DualOrderRefundPreview. # noqa: E501 + :type: int + """ + + self._refund_service_charge = refund_service_charge + + @property + def settle_price(self): + """Gets the settle_price of this DualOrderRefundPreview. # noqa: E501 + + Settlement price # noqa: E501 + + :return: The settle_price of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._settle_price + + @settle_price.setter + def settle_price(self, settle_price): + """Sets the settle_price of this DualOrderRefundPreview. + + Settlement price # noqa: E501 + + :param settle_price: The settle_price of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._settle_price = settle_price + + @property + def settlement_amount(self): + """Gets the settlement_amount of this DualOrderRefundPreview. # noqa: E501 + + Settlement amount # noqa: E501 + + :return: The settlement_amount of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._settlement_amount + + @settlement_amount.setter + def settlement_amount(self, settlement_amount): + """Sets the settlement_amount of this DualOrderRefundPreview. + + Settlement amount # noqa: E501 + + :param settlement_amount: The settlement_amount of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._settlement_amount = settlement_amount + + @property + def settlement_currency(self): + """Gets the settlement_currency of this DualOrderRefundPreview. # noqa: E501 + + Settlement currency # noqa: E501 + + :return: The settlement_currency of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._settlement_currency + + @settlement_currency.setter + def settlement_currency(self, settlement_currency): + """Sets the settlement_currency of this DualOrderRefundPreview. + + Settlement currency # noqa: E501 + + :param settlement_currency: The settlement_currency of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._settlement_currency = settlement_currency + + @property + def settlement_interest(self): + """Gets the settlement_interest of this DualOrderRefundPreview. # noqa: E501 + + Settlement interest # noqa: E501 + + :return: The settlement_interest of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._settlement_interest + + @settlement_interest.setter + def settlement_interest(self, settlement_interest): + """Sets the settlement_interest of this DualOrderRefundPreview. + + Settlement interest # noqa: E501 + + :param settlement_interest: The settlement_interest of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._settlement_interest = settlement_interest + + @property + def settlement_principle(self): + """Gets the settlement_principle of this DualOrderRefundPreview. # noqa: E501 + + Settlement principal # noqa: E501 + + :return: The settlement_principle of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._settlement_principle + + @settlement_principle.setter + def settlement_principle(self, settlement_principle): + """Sets the settlement_principle of this DualOrderRefundPreview. + + Settlement principal # noqa: E501 + + :param settlement_principle: The settlement_principle of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._settlement_principle = settlement_principle + + @property + def type(self): + """Gets the type of this DualOrderRefundPreview. # noqa: E501 + + `call`: sell high; `put`: buy low # noqa: E501 + + :return: The type of this DualOrderRefundPreview. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this DualOrderRefundPreview. + + `call`: sell high; `put`: buy low # noqa: E501 + + :param type: The type of this DualOrderRefundPreview. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def money_back_timest(self): + """Gets the money_back_timest of this DualOrderRefundPreview. # noqa: E501 + + Redemption time # noqa: E501 + + :return: The money_back_timest of this DualOrderRefundPreview. # noqa: E501 + :rtype: int + """ + return self._money_back_timest + + @money_back_timest.setter + def money_back_timest(self, money_back_timest): + """Sets the money_back_timest of this DualOrderRefundPreview. + + Redemption time # noqa: E501 + + :param money_back_timest: The money_back_timest of this DualOrderRefundPreview. # noqa: E501 + :type: int + """ + + self._money_back_timest = money_back_timest + + 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, DualOrderRefundPreview): + 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, DualOrderRefundPreview): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/dual_project_recommend.py b/gate_api/models/dual_project_recommend.py new file mode 100644 index 00000000..cd4b1a33 --- /dev/null +++ b/gate_api/models/dual_project_recommend.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 DualProjectRecommend(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', + 'category': 'int', + 'type': 'str', + 'invest_currency': 'str', + 'exercise_currency': 'str', + 'apy_display': 'str', + 'exercise_price': 'str', + 'delivery_timest': 'int', + 'min_amount': 'str', + 'max_amount': 'str', + 'min_copies': 'int', + 'max_copies': 'int', + 'invest_days': 'int', + 'invest_hours': 'str' + } + + attribute_map = { + 'id': 'id', + 'category': 'category', + 'type': 'type', + 'invest_currency': 'invest_currency', + 'exercise_currency': 'exercise_currency', + 'apy_display': 'apy_display', + 'exercise_price': 'exercise_price', + 'delivery_timest': 'delivery_timest', + 'min_amount': 'min_amount', + 'max_amount': 'max_amount', + 'min_copies': 'min_copies', + 'max_copies': 'max_copies', + 'invest_days': 'invest_days', + 'invest_hours': 'invest_hours' + } + + def __init__(self, id=None, category=None, type=None, invest_currency=None, exercise_currency=None, apy_display=None, exercise_price=None, delivery_timest=None, min_amount=None, max_amount=None, min_copies=None, max_copies=None, invest_days=None, invest_hours=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, int, str, str, int, int, int, str, Configuration) -> None + """DualProjectRecommend - 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._category = None + self._type = None + self._invest_currency = None + self._exercise_currency = None + self._apy_display = None + self._exercise_price = None + self._delivery_timest = None + self._min_amount = None + self._max_amount = None + self._min_copies = None + self._max_copies = None + self._invest_days = None + self._invest_hours = None + self.discriminator = None + + if id is not None: + self.id = id + if category is not None: + self.category = category + if type is not None: + self.type = type + if invest_currency is not None: + self.invest_currency = invest_currency + if exercise_currency is not None: + self.exercise_currency = exercise_currency + if apy_display is not None: + self.apy_display = apy_display + if exercise_price is not None: + self.exercise_price = exercise_price + if delivery_timest is not None: + self.delivery_timest = delivery_timest + if min_amount is not None: + self.min_amount = min_amount + if max_amount is not None: + self.max_amount = max_amount + if min_copies is not None: + self.min_copies = min_copies + if max_copies is not None: + self.max_copies = max_copies + if invest_days is not None: + self.invest_days = invest_days + if invest_hours is not None: + self.invest_hours = invest_hours + + @property + def id(self): + """Gets the id of this DualProjectRecommend. # noqa: E501 + + Product ID # noqa: E501 + + :return: The id of this DualProjectRecommend. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DualProjectRecommend. + + Product ID # noqa: E501 + + :param id: The id of this DualProjectRecommend. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def category(self): + """Gets the category of this DualProjectRecommend. # noqa: E501 + + Strategy category # noqa: E501 + + :return: The category of this DualProjectRecommend. # noqa: E501 + :rtype: int + """ + return self._category + + @category.setter + def category(self, category): + """Sets the category of this DualProjectRecommend. + + Strategy category # noqa: E501 + + :param category: The category of this DualProjectRecommend. # noqa: E501 + :type: int + """ + + self._category = category + + @property + def type(self): + """Gets the type of this DualProjectRecommend. # noqa: E501 + + `call`: sell high; `put`: buy low # noqa: E501 + + :return: The type of this DualProjectRecommend. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this DualProjectRecommend. + + `call`: sell high; `put`: buy low # noqa: E501 + + :param type: The type of this DualProjectRecommend. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def invest_currency(self): + """Gets the invest_currency of this DualProjectRecommend. # noqa: E501 + + Investment Token # noqa: E501 + + :return: The invest_currency of this DualProjectRecommend. # noqa: E501 + :rtype: str + """ + return self._invest_currency + + @invest_currency.setter + def invest_currency(self, invest_currency): + """Sets the invest_currency of this DualProjectRecommend. + + Investment Token # noqa: E501 + + :param invest_currency: The invest_currency of this DualProjectRecommend. # noqa: E501 + :type: str + """ + + self._invest_currency = invest_currency + + @property + def exercise_currency(self): + """Gets the exercise_currency of this DualProjectRecommend. # noqa: E501 + + Strike Token # noqa: E501 + + :return: The exercise_currency of this DualProjectRecommend. # noqa: E501 + :rtype: str + """ + return self._exercise_currency + + @exercise_currency.setter + def exercise_currency(self, exercise_currency): + """Sets the exercise_currency of this DualProjectRecommend. + + Strike Token # noqa: E501 + + :param exercise_currency: The exercise_currency of this DualProjectRecommend. # noqa: E501 + :type: str + """ + + self._exercise_currency = exercise_currency + + @property + def apy_display(self): + """Gets the apy_display of this DualProjectRecommend. # noqa: E501 + + Annual Yield # noqa: E501 + + :return: The apy_display of this DualProjectRecommend. # noqa: E501 + :rtype: str + """ + return self._apy_display + + @apy_display.setter + def apy_display(self, apy_display): + """Sets the apy_display of this DualProjectRecommend. + + Annual Yield # noqa: E501 + + :param apy_display: The apy_display of this DualProjectRecommend. # noqa: E501 + :type: str + """ + + self._apy_display = apy_display + + @property + def exercise_price(self): + """Gets the exercise_price of this DualProjectRecommend. # noqa: E501 + + Strike price # noqa: E501 + + :return: The exercise_price of this DualProjectRecommend. # noqa: E501 + :rtype: str + """ + return self._exercise_price + + @exercise_price.setter + def exercise_price(self, exercise_price): + """Sets the exercise_price of this DualProjectRecommend. + + Strike price # noqa: E501 + + :param exercise_price: The exercise_price of this DualProjectRecommend. # noqa: E501 + :type: str + """ + + self._exercise_price = exercise_price + + @property + def delivery_timest(self): + """Gets the delivery_timest of this DualProjectRecommend. # noqa: E501 + + Settlement time # noqa: E501 + + :return: The delivery_timest of this DualProjectRecommend. # noqa: E501 + :rtype: int + """ + return self._delivery_timest + + @delivery_timest.setter + def delivery_timest(self, delivery_timest): + """Sets the delivery_timest of this DualProjectRecommend. + + Settlement time # noqa: E501 + + :param delivery_timest: The delivery_timest of this DualProjectRecommend. # noqa: E501 + :type: int + """ + + self._delivery_timest = delivery_timest + + @property + def min_amount(self): + """Gets the min_amount of this DualProjectRecommend. # noqa: E501 + + Minimum investment amount # noqa: E501 + + :return: The min_amount of this DualProjectRecommend. # noqa: E501 + :rtype: str + """ + return self._min_amount + + @min_amount.setter + def min_amount(self, min_amount): + """Sets the min_amount of this DualProjectRecommend. + + Minimum investment amount # noqa: E501 + + :param min_amount: The min_amount of this DualProjectRecommend. # noqa: E501 + :type: str + """ + + self._min_amount = min_amount + + @property + def max_amount(self): + """Gets the max_amount of this DualProjectRecommend. # noqa: E501 + + Maximum investment amount # noqa: E501 + + :return: The max_amount of this DualProjectRecommend. # noqa: E501 + :rtype: str + """ + return self._max_amount + + @max_amount.setter + def max_amount(self, max_amount): + """Sets the max_amount of this DualProjectRecommend. + + Maximum investment amount # noqa: E501 + + :param max_amount: The max_amount of this DualProjectRecommend. # noqa: E501 + :type: str + """ + + self._max_amount = max_amount + + @property + def min_copies(self): + """Gets the min_copies of this DualProjectRecommend. # noqa: E501 + + Minimum Units # noqa: E501 + + :return: The min_copies of this DualProjectRecommend. # noqa: E501 + :rtype: int + """ + return self._min_copies + + @min_copies.setter + def min_copies(self, min_copies): + """Sets the min_copies of this DualProjectRecommend. + + Minimum Units # noqa: E501 + + :param min_copies: The min_copies of this DualProjectRecommend. # noqa: E501 + :type: int + """ + + self._min_copies = min_copies + + @property + def max_copies(self): + """Gets the max_copies of this DualProjectRecommend. # noqa: E501 + + Maximum Units # noqa: E501 + + :return: The max_copies of this DualProjectRecommend. # noqa: E501 + :rtype: int + """ + return self._max_copies + + @max_copies.setter + def max_copies(self, max_copies): + """Sets the max_copies of this DualProjectRecommend. + + Maximum Units # noqa: E501 + + :param max_copies: The max_copies of this DualProjectRecommend. # noqa: E501 + :type: int + """ + + self._max_copies = max_copies + + @property + def invest_days(self): + """Gets the invest_days of this DualProjectRecommend. # noqa: E501 + + Lock-up days # noqa: E501 + + :return: The invest_days of this DualProjectRecommend. # noqa: E501 + :rtype: int + """ + return self._invest_days + + @invest_days.setter + def invest_days(self, invest_days): + """Sets the invest_days of this DualProjectRecommend. + + Lock-up days # noqa: E501 + + :param invest_days: The invest_days of this DualProjectRecommend. # noqa: E501 + :type: int + """ + + self._invest_days = invest_days + + @property + def invest_hours(self): + """Gets the invest_hours of this DualProjectRecommend. # noqa: E501 + + Lock-up hours # noqa: E501 + + :return: The invest_hours of this DualProjectRecommend. # noqa: E501 + :rtype: str + """ + return self._invest_hours + + @invest_hours.setter + def invest_hours(self, invest_hours): + """Sets the invest_hours of this DualProjectRecommend. + + Lock-up hours # noqa: E501 + + :param invest_hours: The invest_hours of this DualProjectRecommend. # noqa: E501 + :type: str + """ + + self._invest_hours = invest_hours + + 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, DualProjectRecommend): + 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, DualProjectRecommend): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/earn_fixed_term_pre_redeem_request.py b/gate_api/models/earn_fixed_term_pre_redeem_request.py new file mode 100644 index 00000000..f11d96bb --- /dev/null +++ b/gate_api/models/earn_fixed_term_pre_redeem_request.py @@ -0,0 +1,124 @@ +# 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 EarnFixedTermPreRedeemRequest(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' + } + + attribute_map = { + 'order_id': 'order_id' + } + + def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, Configuration) -> None + """EarnFixedTermPreRedeemRequest - 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.discriminator = None + + self.order_id = order_id + + @property + def order_id(self): + """Gets the order_id of this EarnFixedTermPreRedeemRequest. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this EarnFixedTermPreRedeemRequest. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this EarnFixedTermPreRedeemRequest. + + Order ID # noqa: E501 + + :param order_id: The order_id of this EarnFixedTermPreRedeemRequest. # 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 + + 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, EarnFixedTermPreRedeemRequest): + 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, EarnFixedTermPreRedeemRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/eligibility.py b/gate_api/models/eligibility.py new file mode 100644 index 00000000..5428d653 --- /dev/null +++ b/gate_api/models/eligibility.py @@ -0,0 +1,190 @@ +# 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 Eligibility(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 = { + 'eligible': 'bool', + 'block_reasons': 'list[str]', + 'block_reason_codes': 'list[str]' + } + + attribute_map = { + 'eligible': 'eligible', + 'block_reasons': 'block_reasons', + 'block_reason_codes': 'block_reason_codes' + } + + def __init__(self, eligible=None, block_reasons=None, block_reason_codes=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, list[str], list[str], Configuration) -> None + """Eligibility - 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._eligible = None + self._block_reasons = None + self._block_reason_codes = None + self.discriminator = None + + self.eligible = eligible + self.block_reasons = block_reasons + self.block_reason_codes = block_reason_codes + + @property + def eligible(self): + """Gets the eligible of this Eligibility. # noqa: E501 + + Whether eligible for application # noqa: E501 + + :return: The eligible of this Eligibility. # noqa: E501 + :rtype: bool + """ + return self._eligible + + @eligible.setter + def eligible(self, eligible): + """Sets the eligible of this Eligibility. + + Whether eligible for application # noqa: E501 + + :param eligible: The eligible of this Eligibility. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and eligible is None: # noqa: E501 + raise ValueError("Invalid value for `eligible`, must not be `None`") # noqa: E501 + + self._eligible = eligible + + @property + def block_reasons(self): + """Gets the block_reasons of this Eligibility. # noqa: E501 + + List of ineligibility reason descriptions # noqa: E501 + + :return: The block_reasons of this Eligibility. # noqa: E501 + :rtype: list[str] + """ + return self._block_reasons + + @block_reasons.setter + def block_reasons(self, block_reasons): + """Sets the block_reasons of this Eligibility. + + List of ineligibility reason descriptions # noqa: E501 + + :param block_reasons: The block_reasons of this Eligibility. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and block_reasons is None: # noqa: E501 + raise ValueError("Invalid value for `block_reasons`, must not be `None`") # noqa: E501 + + self._block_reasons = block_reasons + + @property + def block_reason_codes(self): + """Gets the block_reason_codes of this Eligibility. # noqa: E501 + + List of ineligibility reason codes # noqa: E501 + + :return: The block_reason_codes of this Eligibility. # noqa: E501 + :rtype: list[str] + """ + return self._block_reason_codes + + @block_reason_codes.setter + def block_reason_codes(self, block_reason_codes): + """Sets the block_reason_codes of this Eligibility. + + List of ineligibility reason codes # noqa: E501 + + :param block_reason_codes: The block_reason_codes of this Eligibility. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and block_reason_codes is None: # noqa: E501 + raise ValueError("Invalid value for `block_reason_codes`, must not be `None`") # noqa: E501 + allowed_values = ["user_not_exist", "user_blacked", "sub_account", "already_agent", "kyc_incomplete", "in_agent_tree", "ch_code_conflict"] # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + not set(block_reason_codes).issubset(set(allowed_values))): # noqa: E501 + raise ValueError( + "Invalid values for `block_reason_codes` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(block_reason_codes) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._block_reason_codes = block_reason_codes + + 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, Eligibility): + 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, Eligibility): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/eligibility_response.py b/gate_api/models/eligibility_response.py new file mode 100644 index 00000000..b35c18b5 --- /dev/null +++ b/gate_api/models/eligibility_response.py @@ -0,0 +1,209 @@ +# 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 EligibilityResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'Eligibility', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Eligibility, int, Configuration) -> None + """EligibilityResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this EligibilityResponse. # noqa: E501 + + Error Code, 0 Indicates Success # noqa: E501 + + :return: The code of this EligibilityResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this EligibilityResponse. + + Error Code, 0 Indicates Success # noqa: E501 + + :param code: The code of this EligibilityResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this EligibilityResponse. # noqa: E501 + + Error message description # noqa: E501 + + :return: The message of this EligibilityResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this EligibilityResponse. + + Error message description # noqa: E501 + + :param message: The message of this EligibilityResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this EligibilityResponse. # noqa: E501 + + + :return: The data of this EligibilityResponse. # noqa: E501 + :rtype: Eligibility + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this EligibilityResponse. + + + :param data: The data of this EligibilityResponse. # noqa: E501 + :type: Eligibility + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this EligibilityResponse. # noqa: E501 + + Unix timestamp # noqa: E501 + + :return: The timestamp of this EligibilityResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this EligibilityResponse. + + Unix timestamp # noqa: E501 + + :param timestamp: The timestamp of this EligibilityResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, EligibilityResponse): + 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, EligibilityResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/eligibility_response_all_of.py b/gate_api/models/eligibility_response_all_of.py new file mode 100644 index 00000000..ab936f85 --- /dev/null +++ b/gate_api/models/eligibility_response_all_of.py @@ -0,0 +1,121 @@ +# 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 EligibilityResponseAllOf(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 = { + 'data': 'Eligibility' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + # type: (Eligibility, Configuration) -> None + """EligibilityResponseAllOf - 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._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this EligibilityResponseAllOf. # noqa: E501 + + + :return: The data of this EligibilityResponseAllOf. # noqa: E501 + :rtype: Eligibility + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this EligibilityResponseAllOf. + + + :param data: The data of this EligibilityResponseAllOf. # noqa: E501 + :type: Eligibility + """ + + self._data = data + + 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, EligibilityResponseAllOf): + 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, EligibilityResponseAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/err_code_msg.py b/gate_api/models/err_code_msg.py new file mode 100644 index 00000000..87a8e3b7 --- /dev/null +++ b/gate_api/models/err_code_msg.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 ErrCodeMsg(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 = { + 'code': 'int', + 'message': 'str', + 'extra': 'object' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'extra': 'extra' + } + + def __init__(self, code=None, message=None, extra=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, object, Configuration) -> None + """ErrCodeMsg - 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._code = None + self._message = None + self._extra = None + self.discriminator = None + + self.code = code + self.message = message + self.extra = extra + + @property + def code(self): + """Gets the code of this ErrCodeMsg. # noqa: E501 + + Error code # noqa: E501 + + :return: The code of this ErrCodeMsg. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ErrCodeMsg. + + Error code # noqa: E501 + + :param code: The code of this ErrCodeMsg. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this ErrCodeMsg. # noqa: E501 + + Error message # noqa: E501 + + :return: The message of this ErrCodeMsg. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ErrCodeMsg. + + Error message # noqa: E501 + + :param message: The message of this ErrCodeMsg. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def extra(self): + """Gets the extra of this ErrCodeMsg. # noqa: E501 + + Additional information # noqa: E501 + + :return: The extra of this ErrCodeMsg. # noqa: E501 + :rtype: object + """ + return self._extra + + @extra.setter + def extra(self, extra): + """Sets the extra of this ErrCodeMsg. + + Additional information # noqa: E501 + + :param extra: The extra of this ErrCodeMsg. # noqa: E501 + :type: object + """ + if self.local_vars_configuration.client_side_validation and extra is None: # noqa: E501 + raise ValueError("Invalid value for `extra`, must not be `None`") # noqa: E501 + + self._extra = extra + + 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, ErrCodeMsg): + 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, ErrCodeMsg): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2009.py b/gate_api/models/error_response.py similarity index 74% rename from gate_api/models/inline_response2009.py rename to gate_api/models/error_response.py index 38fa3d19..c925fa6a 100644 --- a/gate_api/models/inline_response2009.py +++ b/gate_api/models/error_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2009(object): +class ErrorResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class InlineResponse2009(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'InlineResponse2009Data', + 'data': 'object', 'timestamp': 'int' } @@ -47,8 +47,8 @@ class InlineResponse2009(object): } def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, InlineResponse2009Data, int, Configuration) -> None - """InlineResponse2009 - a model defined in OpenAPI""" # noqa: E501 + # type: (int, str, object, int, Configuration) -> None + """ErrorResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -66,20 +66,22 @@ def __init__(self, code=None, message=None, data=None, timestamp=None, local_var @property def code(self): - """Gets the code of this InlineResponse2009. # noqa: E501 + """Gets the code of this ErrorResponse. # noqa: E501 + Error code # noqa: E501 - :return: The code of this InlineResponse2009. # noqa: E501 + :return: The code of this ErrorResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse2009. + """Sets the code of this ErrorResponse. + Error code # noqa: E501 - :param code: The code of this InlineResponse2009. # noqa: E501 + :param code: The code of this ErrorResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 @@ -89,20 +91,22 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse2009. # noqa: E501 + """Gets the message of this ErrorResponse. # noqa: E501 + Error message # noqa: E501 - :return: The message of this InlineResponse2009. # noqa: E501 + :return: The message of this ErrorResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse2009. + """Sets the message of this ErrorResponse. + Error message # noqa: E501 - :param message: The message of this InlineResponse2009. # noqa: E501 + :param message: The message of this ErrorResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 @@ -112,21 +116,23 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse2009. # noqa: E501 + """Gets the data of this ErrorResponse. # noqa: E501 + Empty object # noqa: E501 - :return: The data of this InlineResponse2009. # noqa: E501 - :rtype: InlineResponse2009Data + :return: The data of this ErrorResponse. # noqa: E501 + :rtype: object """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse2009. + """Sets the data of this ErrorResponse. + Empty object # noqa: E501 - :param data: The data of this InlineResponse2009. # noqa: E501 - :type: InlineResponse2009Data + :param data: The data of this ErrorResponse. # noqa: E501 + :type: object """ if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 @@ -135,20 +141,22 @@ def data(self, data): @property def timestamp(self): - """Gets the timestamp of this InlineResponse2009. # noqa: E501 + """Gets the timestamp of this ErrorResponse. # noqa: E501 + Unix timestamp # noqa: E501 - :return: The timestamp of this InlineResponse2009. # noqa: E501 + :return: The timestamp of this ErrorResponse. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse2009. + """Sets the timestamp of this ErrorResponse. + Unix timestamp # noqa: E501 - :param timestamp: The timestamp of this InlineResponse2009. # noqa: E501 + :param timestamp: The timestamp of this ErrorResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 @@ -190,14 +198,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2009): + if not isinstance(other, ErrorResponse): 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, InlineResponse2009): + if not isinstance(other, ErrorResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/evaluate_item.py b/gate_api/models/evaluate_item.py new file mode 100644 index 00000000..cd25b1d7 --- /dev/null +++ b/gate_api/models/evaluate_item.py @@ -0,0 +1,284 @@ +# 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 EvaluateItem(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 = { + 'asset': 'str', + 'asset_full_name': 'str', + 'asset_icon_url': 'str', + 'available': 'str', + 'available_show': 'str', + 'evaluate_usdt': 'str', + 'evaluate_usdt_show': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'asset_full_name': 'asset_full_name', + 'asset_icon_url': 'asset_icon_url', + 'available': 'available', + 'available_show': 'available_show', + 'evaluate_usdt': 'evaluate_usdt', + 'evaluate_usdt_show': 'evaluate_usdt_show' + } + + def __init__(self, asset=None, asset_full_name=None, asset_icon_url=None, available=None, available_show=None, evaluate_usdt=None, evaluate_usdt_show=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, Configuration) -> None + """EvaluateItem - 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._asset = None + self._asset_full_name = None + self._asset_icon_url = None + self._available = None + self._available_show = None + self._evaluate_usdt = None + self._evaluate_usdt_show = None + self.discriminator = None + + self.asset = asset + self.asset_full_name = asset_full_name + self.asset_icon_url = asset_icon_url + self.available = available + self.available_show = available_show + self.evaluate_usdt = evaluate_usdt + self.evaluate_usdt_show = evaluate_usdt_show + + @property + def asset(self): + """Gets the asset of this EvaluateItem. # noqa: E501 + + + :return: The asset of this EvaluateItem. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this EvaluateItem. + + + :param asset: The asset of this EvaluateItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def asset_full_name(self): + """Gets the asset_full_name of this EvaluateItem. # noqa: E501 + + + :return: The asset_full_name of this EvaluateItem. # noqa: E501 + :rtype: str + """ + return self._asset_full_name + + @asset_full_name.setter + def asset_full_name(self, asset_full_name): + """Sets the asset_full_name of this EvaluateItem. + + + :param asset_full_name: The asset_full_name of this EvaluateItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset_full_name is None: # noqa: E501 + raise ValueError("Invalid value for `asset_full_name`, must not be `None`") # noqa: E501 + + self._asset_full_name = asset_full_name + + @property + def asset_icon_url(self): + """Gets the asset_icon_url of this EvaluateItem. # noqa: E501 + + + :return: The asset_icon_url of this EvaluateItem. # noqa: E501 + :rtype: str + """ + return self._asset_icon_url + + @asset_icon_url.setter + def asset_icon_url(self, asset_icon_url): + """Sets the asset_icon_url of this EvaluateItem. + + + :param asset_icon_url: The asset_icon_url of this EvaluateItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset_icon_url is None: # noqa: E501 + raise ValueError("Invalid value for `asset_icon_url`, must not be `None`") # noqa: E501 + + self._asset_icon_url = asset_icon_url + + @property + def available(self): + """Gets the available of this EvaluateItem. # noqa: E501 + + + :return: The available of this EvaluateItem. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this EvaluateItem. + + + :param available: The available of this EvaluateItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and available is None: # noqa: E501 + raise ValueError("Invalid value for `available`, must not be `None`") # noqa: E501 + + self._available = available + + @property + def available_show(self): + """Gets the available_show of this EvaluateItem. # noqa: E501 + + + :return: The available_show of this EvaluateItem. # noqa: E501 + :rtype: str + """ + return self._available_show + + @available_show.setter + def available_show(self, available_show): + """Sets the available_show of this EvaluateItem. + + + :param available_show: The available_show of this EvaluateItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and available_show is None: # noqa: E501 + raise ValueError("Invalid value for `available_show`, must not be `None`") # noqa: E501 + + self._available_show = available_show + + @property + def evaluate_usdt(self): + """Gets the evaluate_usdt of this EvaluateItem. # noqa: E501 + + + :return: The evaluate_usdt of this EvaluateItem. # noqa: E501 + :rtype: str + """ + return self._evaluate_usdt + + @evaluate_usdt.setter + def evaluate_usdt(self, evaluate_usdt): + """Sets the evaluate_usdt of this EvaluateItem. + + + :param evaluate_usdt: The evaluate_usdt of this EvaluateItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and evaluate_usdt is None: # noqa: E501 + raise ValueError("Invalid value for `evaluate_usdt`, must not be `None`") # noqa: E501 + + self._evaluate_usdt = evaluate_usdt + + @property + def evaluate_usdt_show(self): + """Gets the evaluate_usdt_show of this EvaluateItem. # noqa: E501 + + + :return: The evaluate_usdt_show of this EvaluateItem. # noqa: E501 + :rtype: str + """ + return self._evaluate_usdt_show + + @evaluate_usdt_show.setter + def evaluate_usdt_show(self, evaluate_usdt_show): + """Sets the evaluate_usdt_show of this EvaluateItem. + + + :param evaluate_usdt_show: The evaluate_usdt_show of this EvaluateItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and evaluate_usdt_show is None: # noqa: E501 + raise ValueError("Invalid value for `evaluate_usdt_show`, must not be `None`") # noqa: E501 + + self._evaluate_usdt_show = evaluate_usdt_show + + 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, EvaluateItem): + 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, EvaluateItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/evaluate_resp.py b/gate_api/models/evaluate_resp.py new file mode 100644 index 00000000..206e0bcc --- /dev/null +++ b/gate_api/models/evaluate_resp.py @@ -0,0 +1,230 @@ +# 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 EvaluateResp(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[EvaluateItem]', + 'total': 'int', + 'cursor': 'str', + 'total_available': 'str', + 'total_available_show': 'str' + } + + attribute_map = { + 'list': 'list', + 'total': 'total', + 'cursor': 'cursor', + 'total_available': 'total_available', + 'total_available_show': 'total_available_show' + } + + def __init__(self, list=None, total=None, cursor=None, total_available=None, total_available_show=None, local_vars_configuration=None): # noqa: E501 + # type: (list[EvaluateItem], int, str, str, str, Configuration) -> None + """EvaluateResp - 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._total = None + self._cursor = None + self._total_available = None + self._total_available_show = None + self.discriminator = None + + self.list = list + self.total = total + self.cursor = cursor + self.total_available = total_available + self.total_available_show = total_available_show + + @property + def list(self): + """Gets the list of this EvaluateResp. # noqa: E501 + + + :return: The list of this EvaluateResp. # noqa: E501 + :rtype: list[EvaluateItem] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this EvaluateResp. + + + :param list: The list of this EvaluateResp. # noqa: E501 + :type: list[EvaluateItem] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + self._list = list + + @property + def total(self): + """Gets the total of this EvaluateResp. # noqa: E501 + + + :return: The total of this EvaluateResp. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this EvaluateResp. + + + :param total: The total of this EvaluateResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 + raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 + + self._total = total + + @property + def cursor(self): + """Gets the cursor of this EvaluateResp. # noqa: E501 + + + :return: The cursor of this EvaluateResp. # noqa: E501 + :rtype: str + """ + return self._cursor + + @cursor.setter + def cursor(self, cursor): + """Sets the cursor of this EvaluateResp. + + + :param cursor: The cursor of this EvaluateResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and cursor is None: # noqa: E501 + raise ValueError("Invalid value for `cursor`, must not be `None`") # noqa: E501 + + self._cursor = cursor + + @property + def total_available(self): + """Gets the total_available of this EvaluateResp. # noqa: E501 + + + :return: The total_available of this EvaluateResp. # noqa: E501 + :rtype: str + """ + return self._total_available + + @total_available.setter + def total_available(self, total_available): + """Sets the total_available of this EvaluateResp. + + + :param total_available: The total_available of this EvaluateResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_available is None: # noqa: E501 + raise ValueError("Invalid value for `total_available`, must not be `None`") # noqa: E501 + + self._total_available = total_available + + @property + def total_available_show(self): + """Gets the total_available_show of this EvaluateResp. # noqa: E501 + + + :return: The total_available_show of this EvaluateResp. # noqa: E501 + :rtype: str + """ + return self._total_available_show + + @total_available_show.setter + def total_available_show(self, total_available_show): + """Sets the total_available_show of this EvaluateResp. + + + :param total_available_show: The total_available_show of this EvaluateResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_available_show is None: # noqa: E501 + raise ValueError("Invalid value for `total_available_show`, must not be `None`") # noqa: E501 + + self._total_available_show = total_available_show + + 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, EvaluateResp): + 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, EvaluateResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ex_skill_claim_reward_req.py b/gate_api/models/ex_skill_claim_reward_req.py new file mode 100644 index 00000000..f81d8568 --- /dev/null +++ b/gate_api/models/ex_skill_claim_reward_req.py @@ -0,0 +1,124 @@ +# 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 ExSkillClaimRewardReq(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 = { + 'welfare_task_id': 'int' + } + + attribute_map = { + 'welfare_task_id': 'welfare_task_id' + } + + def __init__(self, welfare_task_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """ExSkillClaimRewardReq - 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._welfare_task_id = None + self.discriminator = None + + self.welfare_task_id = welfare_task_id + + @property + def welfare_task_id(self): + """Gets the welfare_task_id of this ExSkillClaimRewardReq. # noqa: E501 + + Rewards Center task ID # noqa: E501 + + :return: The welfare_task_id of this ExSkillClaimRewardReq. # noqa: E501 + :rtype: int + """ + return self._welfare_task_id + + @welfare_task_id.setter + def welfare_task_id(self, welfare_task_id): + """Sets the welfare_task_id of this ExSkillClaimRewardReq. + + Rewards Center task ID # noqa: E501 + + :param welfare_task_id: The welfare_task_id of this ExSkillClaimRewardReq. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and welfare_task_id is None: # noqa: E501 + raise ValueError("Invalid value for `welfare_task_id`, must not be `None`") # noqa: E501 + + self._welfare_task_id = welfare_task_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, ExSkillClaimRewardReq): + 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, ExSkillClaimRewardReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ex_skill_claim_task_req.py b/gate_api/models/ex_skill_claim_task_req.py new file mode 100644 index 00000000..0d9b8617 --- /dev/null +++ b/gate_api/models/ex_skill_claim_task_req.py @@ -0,0 +1,124 @@ +# 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 ExSkillClaimTaskReq(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 = { + 'welfare_task_id': 'int' + } + + attribute_map = { + 'welfare_task_id': 'welfare_task_id' + } + + def __init__(self, welfare_task_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """ExSkillClaimTaskReq - 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._welfare_task_id = None + self.discriminator = None + + self.welfare_task_id = welfare_task_id + + @property + def welfare_task_id(self): + """Gets the welfare_task_id of this ExSkillClaimTaskReq. # noqa: E501 + + Rewards Center task ID # noqa: E501 + + :return: The welfare_task_id of this ExSkillClaimTaskReq. # noqa: E501 + :rtype: int + """ + return self._welfare_task_id + + @welfare_task_id.setter + def welfare_task_id(self, welfare_task_id): + """Sets the welfare_task_id of this ExSkillClaimTaskReq. + + Rewards Center task ID # noqa: E501 + + :param welfare_task_id: The welfare_task_id of this ExSkillClaimTaskReq. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and welfare_task_id is None: # noqa: E501 + raise ValueError("Invalid value for `welfare_task_id`, must not be `None`") # noqa: E501 + + self._welfare_task_id = welfare_task_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, ExSkillClaimTaskReq): + 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, ExSkillClaimTaskReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fixed_term_bonus_info.py b/gate_api/models/fixed_term_bonus_info.py new file mode 100644 index 00000000..61d4729c --- /dev/null +++ b/gate_api/models/fixed_term_bonus_info.py @@ -0,0 +1,627 @@ +# 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 FixedTermBonusInfo(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', + 'product_id': 'int', + 'asset': 'str', + 'bonus_asset': 'str', + 'kyc_limit': 'str', + 'ladder_apr': 'list[LadderApr]', + 'total_bonus_amount': 'str', + 'user_total_bonus_amount': 'str', + 'status': 'int', + 'start_time': 'str', + 'end_time': 'str', + 'create_time': 'str', + 'start_at': 'int', + 'end_at': 'int', + 'total_issued_amount': 'str', + 'user_total_issued_amount': 'str', + 'bonus_asset_price': 'str', + 'product_asset_price': 'str', + 'product_year_rate': 'str' + } + + attribute_map = { + 'id': 'id', + 'product_id': 'product_id', + 'asset': 'asset', + 'bonus_asset': 'bonus_asset', + 'kyc_limit': 'kyc_limit', + 'ladder_apr': 'ladder_apr', + 'total_bonus_amount': 'total_bonus_amount', + 'user_total_bonus_amount': 'user_total_bonus_amount', + 'status': 'status', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'create_time': 'create_time', + 'start_at': 'start_at', + 'end_at': 'end_at', + 'total_issued_amount': 'total_issued_amount', + 'user_total_issued_amount': 'user_total_issued_amount', + 'bonus_asset_price': 'bonus_asset_price', + 'product_asset_price': 'product_asset_price', + 'product_year_rate': 'product_year_rate' + } + + def __init__(self, id=None, product_id=None, asset=None, bonus_asset=None, kyc_limit=None, ladder_apr=None, total_bonus_amount=None, user_total_bonus_amount=None, status=None, start_time=None, end_time=None, create_time=None, start_at=None, end_at=None, total_issued_amount=None, user_total_issued_amount=None, bonus_asset_price=None, product_asset_price=None, product_year_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, list[LadderApr], str, str, int, str, str, str, int, int, str, str, str, str, str, Configuration) -> None + """FixedTermBonusInfo - 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._product_id = None + self._asset = None + self._bonus_asset = None + self._kyc_limit = None + self._ladder_apr = None + self._total_bonus_amount = None + self._user_total_bonus_amount = None + self._status = None + self._start_time = None + self._end_time = None + self._create_time = None + self._start_at = None + self._end_at = None + self._total_issued_amount = None + self._user_total_issued_amount = None + self._bonus_asset_price = None + self._product_asset_price = None + self._product_year_rate = None + self.discriminator = None + + if id is not None: + self.id = id + if product_id is not None: + self.product_id = product_id + if asset is not None: + self.asset = asset + if bonus_asset is not None: + self.bonus_asset = bonus_asset + if kyc_limit is not None: + self.kyc_limit = kyc_limit + if ladder_apr is not None: + self.ladder_apr = ladder_apr + if total_bonus_amount is not None: + self.total_bonus_amount = total_bonus_amount + if user_total_bonus_amount is not None: + self.user_total_bonus_amount = user_total_bonus_amount + if status is not None: + self.status = status + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if create_time is not None: + self.create_time = create_time + if start_at is not None: + self.start_at = start_at + if end_at is not None: + self.end_at = end_at + if total_issued_amount is not None: + self.total_issued_amount = total_issued_amount + if user_total_issued_amount is not None: + self.user_total_issued_amount = user_total_issued_amount + if bonus_asset_price is not None: + self.bonus_asset_price = bonus_asset_price + if product_asset_price is not None: + self.product_asset_price = product_asset_price + if product_year_rate is not None: + self.product_year_rate = product_year_rate + + @property + def id(self): + """Gets the id of this FixedTermBonusInfo. # noqa: E501 + + Activity ID # noqa: E501 + + :return: The id of this FixedTermBonusInfo. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FixedTermBonusInfo. + + Activity ID # noqa: E501 + + :param id: The id of this FixedTermBonusInfo. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def product_id(self): + """Gets the product_id of this FixedTermBonusInfo. # noqa: E501 + + Associated product ID # noqa: E501 + + :return: The product_id of this FixedTermBonusInfo. # noqa: E501 + :rtype: int + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this FixedTermBonusInfo. + + Associated product ID # noqa: E501 + + :param product_id: The product_id of this FixedTermBonusInfo. # noqa: E501 + :type: int + """ + + self._product_id = product_id + + @property + def asset(self): + """Gets the asset of this FixedTermBonusInfo. # noqa: E501 + + Product currency # noqa: E501 + + :return: The asset of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this FixedTermBonusInfo. + + Product currency # noqa: E501 + + :param asset: The asset of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._asset = asset + + @property + def bonus_asset(self): + """Gets the bonus_asset of this FixedTermBonusInfo. # noqa: E501 + + Reward currency # noqa: E501 + + :return: The bonus_asset of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._bonus_asset + + @bonus_asset.setter + def bonus_asset(self, bonus_asset): + """Sets the bonus_asset of this FixedTermBonusInfo. + + Reward currency # noqa: E501 + + :param bonus_asset: The bonus_asset of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._bonus_asset = bonus_asset + + @property + def kyc_limit(self): + """Gets the kyc_limit of this FixedTermBonusInfo. # noqa: E501 + + KYC level restrictions, comma-separated # noqa: E501 + + :return: The kyc_limit of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._kyc_limit + + @kyc_limit.setter + def kyc_limit(self, kyc_limit): + """Sets the kyc_limit of this FixedTermBonusInfo. + + KYC level restrictions, comma-separated # noqa: E501 + + :param kyc_limit: The kyc_limit of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._kyc_limit = kyc_limit + + @property + def ladder_apr(self): + """Gets the ladder_apr of this FixedTermBonusInfo. # noqa: E501 + + Tiered annual interest rate # noqa: E501 + + :return: The ladder_apr of this FixedTermBonusInfo. # noqa: E501 + :rtype: list[LadderApr] + """ + return self._ladder_apr + + @ladder_apr.setter + def ladder_apr(self, ladder_apr): + """Sets the ladder_apr of this FixedTermBonusInfo. + + Tiered annual interest rate # noqa: E501 + + :param ladder_apr: The ladder_apr of this FixedTermBonusInfo. # noqa: E501 + :type: list[LadderApr] + """ + + self._ladder_apr = ladder_apr + + @property + def total_bonus_amount(self): + """Gets the total_bonus_amount of this FixedTermBonusInfo. # noqa: E501 + + Total reward amount # noqa: E501 + + :return: The total_bonus_amount of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._total_bonus_amount + + @total_bonus_amount.setter + def total_bonus_amount(self, total_bonus_amount): + """Sets the total_bonus_amount of this FixedTermBonusInfo. + + Total reward amount # noqa: E501 + + :param total_bonus_amount: The total_bonus_amount of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._total_bonus_amount = total_bonus_amount + + @property + def user_total_bonus_amount(self): + """Gets the user_total_bonus_amount of this FixedTermBonusInfo. # noqa: E501 + + Maximum reward per user # noqa: E501 + + :return: The user_total_bonus_amount of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._user_total_bonus_amount + + @user_total_bonus_amount.setter + def user_total_bonus_amount(self, user_total_bonus_amount): + """Sets the user_total_bonus_amount of this FixedTermBonusInfo. + + Maximum reward per user # noqa: E501 + + :param user_total_bonus_amount: The user_total_bonus_amount of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._user_total_bonus_amount = user_total_bonus_amount + + @property + def status(self): + """Gets the status of this FixedTermBonusInfo. # noqa: E501 + + Activity status: 1 for unlisted, 2 for listed, 3 for delisted # noqa: E501 + + :return: The status of this FixedTermBonusInfo. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FixedTermBonusInfo. + + Activity status: 1 for unlisted, 2 for listed, 3 for delisted # noqa: E501 + + :param status: The status of this FixedTermBonusInfo. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def start_time(self): + """Gets the start_time of this FixedTermBonusInfo. # noqa: E501 + + Activity start time # noqa: E501 + + :return: The start_time of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this FixedTermBonusInfo. + + Activity start time # noqa: E501 + + :param start_time: The start_time of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this FixedTermBonusInfo. # noqa: E501 + + Activity end time # noqa: E501 + + :return: The end_time of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this FixedTermBonusInfo. + + Activity end time # noqa: E501 + + :param end_time: The end_time of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._end_time = end_time + + @property + def create_time(self): + """Gets the create_time of this FixedTermBonusInfo. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FixedTermBonusInfo. + + Created time # noqa: E501 + + :param create_time: The create_time of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def start_at(self): + """Gets the start_at of this FixedTermBonusInfo. # noqa: E501 + + Activity start timestamp (in seconds) # noqa: E501 + + :return: The start_at of this FixedTermBonusInfo. # noqa: E501 + :rtype: int + """ + return self._start_at + + @start_at.setter + def start_at(self, start_at): + """Sets the start_at of this FixedTermBonusInfo. + + Activity start timestamp (in seconds) # noqa: E501 + + :param start_at: The start_at of this FixedTermBonusInfo. # noqa: E501 + :type: int + """ + + self._start_at = start_at + + @property + def end_at(self): + """Gets the end_at of this FixedTermBonusInfo. # noqa: E501 + + Activity end timestamp (in seconds) # noqa: E501 + + :return: The end_at of this FixedTermBonusInfo. # noqa: E501 + :rtype: int + """ + return self._end_at + + @end_at.setter + def end_at(self, end_at): + """Sets the end_at of this FixedTermBonusInfo. + + Activity end timestamp (in seconds) # noqa: E501 + + :param end_at: The end_at of this FixedTermBonusInfo. # noqa: E501 + :type: int + """ + + self._end_at = end_at + + @property + def total_issued_amount(self): + """Gets the total_issued_amount of this FixedTermBonusInfo. # noqa: E501 + + Total rewards distributed # noqa: E501 + + :return: The total_issued_amount of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._total_issued_amount + + @total_issued_amount.setter + def total_issued_amount(self, total_issued_amount): + """Sets the total_issued_amount of this FixedTermBonusInfo. + + Total rewards distributed # noqa: E501 + + :param total_issued_amount: The total_issued_amount of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._total_issued_amount = total_issued_amount + + @property + def user_total_issued_amount(self): + """Gets the user_total_issued_amount of this FixedTermBonusInfo. # noqa: E501 + + Total rewards distributed to the user # noqa: E501 + + :return: The user_total_issued_amount of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._user_total_issued_amount + + @user_total_issued_amount.setter + def user_total_issued_amount(self, user_total_issued_amount): + """Sets the user_total_issued_amount of this FixedTermBonusInfo. + + Total rewards distributed to the user # noqa: E501 + + :param user_total_issued_amount: The user_total_issued_amount of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._user_total_issued_amount = user_total_issued_amount + + @property + def bonus_asset_price(self): + """Gets the bonus_asset_price of this FixedTermBonusInfo. # noqa: E501 + + Reward currency price (denominated in USDT) # noqa: E501 + + :return: The bonus_asset_price of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._bonus_asset_price + + @bonus_asset_price.setter + def bonus_asset_price(self, bonus_asset_price): + """Sets the bonus_asset_price of this FixedTermBonusInfo. + + Reward currency price (denominated in USDT) # noqa: E501 + + :param bonus_asset_price: The bonus_asset_price of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._bonus_asset_price = bonus_asset_price + + @property + def product_asset_price(self): + """Gets the product_asset_price of this FixedTermBonusInfo. # noqa: E501 + + Product currency price (denominated in USDT) # noqa: E501 + + :return: The product_asset_price of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._product_asset_price + + @product_asset_price.setter + def product_asset_price(self, product_asset_price): + """Sets the product_asset_price of this FixedTermBonusInfo. + + Product currency price (denominated in USDT) # noqa: E501 + + :param product_asset_price: The product_asset_price of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._product_asset_price = product_asset_price + + @property + def product_year_rate(self): + """Gets the product_year_rate of this FixedTermBonusInfo. # noqa: E501 + + Product base annual interest rate # noqa: E501 + + :return: The product_year_rate of this FixedTermBonusInfo. # noqa: E501 + :rtype: str + """ + return self._product_year_rate + + @product_year_rate.setter + def product_year_rate(self, product_year_rate): + """Sets the product_year_rate of this FixedTermBonusInfo. + + Product base annual interest rate # noqa: E501 + + :param product_year_rate: The product_year_rate of this FixedTermBonusInfo. # noqa: E501 + :type: str + """ + + self._product_year_rate = product_year_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, FixedTermBonusInfo): + 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, FixedTermBonusInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fixed_term_coupon_info.py b/gate_api/models/fixed_term_coupon_info.py new file mode 100644 index 00000000..2e493f48 --- /dev/null +++ b/gate_api/models/fixed_term_coupon_info.py @@ -0,0 +1,588 @@ +# 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 FixedTermCouponInfo(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', + 'business': 'int', + 'user_id': 'int', + 'asset': 'str', + 'order_id': 'int', + 'financial_rate_id': 'int', + 'buy_limit_low': 'str', + 'buy_limit_high': 'str', + 'rate_day': 'int', + 'rate_ratio': 'str', + 'coupon_days': 'int', + 'coupon_principal': 'str', + 'coupon_year_rate': 'str', + 'coupon_interest': 'str', + 'status': 'int', + 'finish_time': 'str', + 'create_time': 'str' + } + + attribute_map = { + 'id': 'id', + 'business': 'business', + 'user_id': 'user_id', + 'asset': 'asset', + 'order_id': 'order_id', + 'financial_rate_id': 'financial_rate_id', + 'buy_limit_low': 'buy_limit_low', + 'buy_limit_high': 'buy_limit_high', + 'rate_day': 'rate_day', + 'rate_ratio': 'rate_ratio', + 'coupon_days': 'coupon_days', + 'coupon_principal': 'coupon_principal', + 'coupon_year_rate': 'coupon_year_rate', + 'coupon_interest': 'coupon_interest', + 'status': 'status', + 'finish_time': 'finish_time', + 'create_time': 'create_time' + } + + def __init__(self, id=None, business=None, user_id=None, asset=None, order_id=None, financial_rate_id=None, buy_limit_low=None, buy_limit_high=None, rate_day=None, rate_ratio=None, coupon_days=None, coupon_principal=None, coupon_year_rate=None, coupon_interest=None, status=None, finish_time=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, str, int, int, str, str, int, str, int, str, str, str, int, str, str, Configuration) -> None + """FixedTermCouponInfo - 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._business = None + self._user_id = None + self._asset = None + self._order_id = None + self._financial_rate_id = None + self._buy_limit_low = None + self._buy_limit_high = None + self._rate_day = None + self._rate_ratio = None + self._coupon_days = None + self._coupon_principal = None + self._coupon_year_rate = None + self._coupon_interest = None + self._status = None + self._finish_time = None + self._create_time = None + self.discriminator = None + + self.id = id + self.business = business + self.user_id = user_id + self.asset = asset + self.order_id = order_id + self.financial_rate_id = financial_rate_id + self.buy_limit_low = buy_limit_low + self.buy_limit_high = buy_limit_high + self.rate_day = rate_day + self.rate_ratio = rate_ratio + self.coupon_days = coupon_days + self.coupon_principal = coupon_principal + self.coupon_year_rate = coupon_year_rate + self.coupon_interest = coupon_interest + self.status = status + self.finish_time = finish_time + self.create_time = create_time + + @property + def id(self): + """Gets the id of this FixedTermCouponInfo. # noqa: E501 + + Interest rate boost coupon record ID # noqa: E501 + + :return: The id of this FixedTermCouponInfo. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FixedTermCouponInfo. + + Interest rate boost coupon record ID # noqa: E501 + + :param id: The id of this FixedTermCouponInfo. # noqa: E501 + :type: int + """ + 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 business(self): + """Gets the business of this FixedTermCouponInfo. # noqa: E501 + + Business Type # noqa: E501 + + :return: The business of this FixedTermCouponInfo. # noqa: E501 + :rtype: int + """ + return self._business + + @business.setter + def business(self, business): + """Sets the business of this FixedTermCouponInfo. + + Business Type # noqa: E501 + + :param business: The business of this FixedTermCouponInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and business is None: # noqa: E501 + raise ValueError("Invalid value for `business`, must not be `None`") # noqa: E501 + + self._business = business + + @property + def user_id(self): + """Gets the user_id of this FixedTermCouponInfo. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this FixedTermCouponInfo. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this FixedTermCouponInfo. + + User ID # noqa: E501 + + :param user_id: The user_id of this FixedTermCouponInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def asset(self): + """Gets the asset of this FixedTermCouponInfo. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this FixedTermCouponInfo. + + Currency # noqa: E501 + + :param asset: The asset of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def order_id(self): + """Gets the order_id of this FixedTermCouponInfo. # noqa: E501 + + Associated order ID # noqa: E501 + + :return: The order_id of this FixedTermCouponInfo. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this FixedTermCouponInfo. + + Associated order ID # noqa: E501 + + :param order_id: The order_id of this FixedTermCouponInfo. # 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 financial_rate_id(self): + """Gets the financial_rate_id of this FixedTermCouponInfo. # noqa: E501 + + Interest rate boost coupon ID # noqa: E501 + + :return: The financial_rate_id of this FixedTermCouponInfo. # noqa: E501 + :rtype: int + """ + return self._financial_rate_id + + @financial_rate_id.setter + def financial_rate_id(self, financial_rate_id): + """Sets the financial_rate_id of this FixedTermCouponInfo. + + Interest rate boost coupon ID # noqa: E501 + + :param financial_rate_id: The financial_rate_id of this FixedTermCouponInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and financial_rate_id is None: # noqa: E501 + raise ValueError("Invalid value for `financial_rate_id`, must not be `None`") # noqa: E501 + + self._financial_rate_id = financial_rate_id + + @property + def buy_limit_low(self): + """Gets the buy_limit_low of this FixedTermCouponInfo. # noqa: E501 + + Minimum subscription amount for interest rate boost coupon # noqa: E501 + + :return: The buy_limit_low of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._buy_limit_low + + @buy_limit_low.setter + def buy_limit_low(self, buy_limit_low): + """Sets the buy_limit_low of this FixedTermCouponInfo. + + Minimum subscription amount for interest rate boost coupon # noqa: E501 + + :param buy_limit_low: The buy_limit_low of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_limit_low is None: # noqa: E501 + raise ValueError("Invalid value for `buy_limit_low`, must not be `None`") # noqa: E501 + + self._buy_limit_low = buy_limit_low + + @property + def buy_limit_high(self): + """Gets the buy_limit_high of this FixedTermCouponInfo. # noqa: E501 + + Maximum subscription amount for interest rate boost coupon # noqa: E501 + + :return: The buy_limit_high of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._buy_limit_high + + @buy_limit_high.setter + def buy_limit_high(self, buy_limit_high): + """Sets the buy_limit_high of this FixedTermCouponInfo. + + Maximum subscription amount for interest rate boost coupon # noqa: E501 + + :param buy_limit_high: The buy_limit_high of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_limit_high is None: # noqa: E501 + raise ValueError("Invalid value for `buy_limit_high`, must not be `None`") # noqa: E501 + + self._buy_limit_high = buy_limit_high + + @property + def rate_day(self): + """Gets the rate_day of this FixedTermCouponInfo. # noqa: E501 + + Interest rate boost days # noqa: E501 + + :return: The rate_day of this FixedTermCouponInfo. # noqa: E501 + :rtype: int + """ + return self._rate_day + + @rate_day.setter + def rate_day(self, rate_day): + """Sets the rate_day of this FixedTermCouponInfo. + + Interest rate boost days # noqa: E501 + + :param rate_day: The rate_day of this FixedTermCouponInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and rate_day is None: # noqa: E501 + raise ValueError("Invalid value for `rate_day`, must not be `None`") # noqa: E501 + + self._rate_day = rate_day + + @property + def rate_ratio(self): + """Gets the rate_ratio of this FixedTermCouponInfo. # noqa: E501 + + Interest rate boost percentage # noqa: E501 + + :return: The rate_ratio of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._rate_ratio + + @rate_ratio.setter + def rate_ratio(self, rate_ratio): + """Sets the rate_ratio of this FixedTermCouponInfo. + + Interest rate boost percentage # noqa: E501 + + :param rate_ratio: The rate_ratio of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and rate_ratio is None: # noqa: E501 + raise ValueError("Invalid value for `rate_ratio`, must not be `None`") # noqa: E501 + + self._rate_ratio = rate_ratio + + @property + def coupon_days(self): + """Gets the coupon_days of this FixedTermCouponInfo. # noqa: E501 + + Actual interest rate boost days # noqa: E501 + + :return: The coupon_days of this FixedTermCouponInfo. # noqa: E501 + :rtype: int + """ + return self._coupon_days + + @coupon_days.setter + def coupon_days(self, coupon_days): + """Sets the coupon_days of this FixedTermCouponInfo. + + Actual interest rate boost days # noqa: E501 + + :param coupon_days: The coupon_days of this FixedTermCouponInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and coupon_days is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_days`, must not be `None`") # noqa: E501 + + self._coupon_days = coupon_days + + @property + def coupon_principal(self): + """Gets the coupon_principal of this FixedTermCouponInfo. # noqa: E501 + + Principal for interest rate boost calculation # noqa: E501 + + :return: The coupon_principal of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._coupon_principal + + @coupon_principal.setter + def coupon_principal(self, coupon_principal): + """Sets the coupon_principal of this FixedTermCouponInfo. + + Principal for interest rate boost calculation # noqa: E501 + + :param coupon_principal: The coupon_principal of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and coupon_principal is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_principal`, must not be `None`") # noqa: E501 + + self._coupon_principal = coupon_principal + + @property + def coupon_year_rate(self): + """Gets the coupon_year_rate of this FixedTermCouponInfo. # noqa: E501 + + Interest rate boost APR # noqa: E501 + + :return: The coupon_year_rate of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._coupon_year_rate + + @coupon_year_rate.setter + def coupon_year_rate(self, coupon_year_rate): + """Sets the coupon_year_rate of this FixedTermCouponInfo. + + Interest rate boost APR # noqa: E501 + + :param coupon_year_rate: The coupon_year_rate of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and coupon_year_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_year_rate`, must not be `None`") # noqa: E501 + + self._coupon_year_rate = coupon_year_rate + + @property + def coupon_interest(self): + """Gets the coupon_interest of this FixedTermCouponInfo. # noqa: E501 + + Interest generated from rate boost # noqa: E501 + + :return: The coupon_interest of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._coupon_interest + + @coupon_interest.setter + def coupon_interest(self, coupon_interest): + """Sets the coupon_interest of this FixedTermCouponInfo. + + Interest generated from rate boost # noqa: E501 + + :param coupon_interest: The coupon_interest of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and coupon_interest is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_interest`, must not be `None`") # noqa: E501 + + self._coupon_interest = coupon_interest + + @property + def status(self): + """Gets the status of this FixedTermCouponInfo. # noqa: E501 + + Status: 1 for active, 2 for settled # noqa: E501 + + :return: The status of this FixedTermCouponInfo. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FixedTermCouponInfo. + + Status: 1 for active, 2 for settled # noqa: E501 + + :param status: The status of this FixedTermCouponInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def finish_time(self): + """Gets the finish_time of this FixedTermCouponInfo. # noqa: E501 + + Settlement time # noqa: E501 + + :return: The finish_time of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._finish_time + + @finish_time.setter + def finish_time(self, finish_time): + """Sets the finish_time of this FixedTermCouponInfo. + + Settlement time # noqa: E501 + + :param finish_time: The finish_time of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and finish_time is None: # noqa: E501 + raise ValueError("Invalid value for `finish_time`, must not be `None`") # noqa: E501 + + self._finish_time = finish_time + + @property + def create_time(self): + """Gets the create_time of this FixedTermCouponInfo. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this FixedTermCouponInfo. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FixedTermCouponInfo. + + Created time # noqa: E501 + + :param create_time: The create_time of this FixedTermCouponInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + 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, FixedTermCouponInfo): + 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, FixedTermCouponInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fixed_term_history_record.py b/gate_api/models/fixed_term_history_record.py new file mode 100644 index 00000000..f6dbfd74 --- /dev/null +++ b/gate_api/models/fixed_term_history_record.py @@ -0,0 +1,550 @@ +# 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 FixedTermHistoryRecord(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', + 'order_id': 'int', + 'user_id': 'int', + 'asset': 'str', + 'uniq_time': 'str', + 'bonus_id': 'int', + 'product_id': 'int', + 'bonus_asset': 'str', + 'total_principal': 'str', + 'amount': 'str', + 'asset_price': 'str', + 'status': 'int', + 'detail': 'str', + 'create_time': 'str', + 'create_at': 'int', + 'lock_up_period': 'int' + } + + attribute_map = { + 'id': 'id', + 'order_id': 'order_id', + 'user_id': 'user_id', + 'asset': 'asset', + 'uniq_time': 'uniq_time', + 'bonus_id': 'bonus_id', + 'product_id': 'product_id', + 'bonus_asset': 'bonus_asset', + 'total_principal': 'total_principal', + 'amount': 'amount', + 'asset_price': 'asset_price', + 'status': 'status', + 'detail': 'detail', + 'create_time': 'create_time', + 'create_at': 'create_at', + 'lock_up_period': 'lock_up_period' + } + + def __init__(self, id=None, order_id=None, user_id=None, asset=None, uniq_time=None, bonus_id=None, product_id=None, bonus_asset=None, total_principal=None, amount=None, asset_price=None, status=None, detail=None, create_time=None, create_at=None, lock_up_period=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, str, str, int, int, str, str, str, str, int, str, str, int, int, Configuration) -> None + """FixedTermHistoryRecord - 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._order_id = None + self._user_id = None + self._asset = None + self._uniq_time = None + self._bonus_id = None + self._product_id = None + self._bonus_asset = None + self._total_principal = None + self._amount = None + self._asset_price = None + self._status = None + self._detail = None + self._create_time = None + self._create_at = None + self._lock_up_period = None + self.discriminator = None + + self.id = id + if order_id is not None: + self.order_id = order_id + self.user_id = user_id + self.asset = asset + if uniq_time is not None: + self.uniq_time = uniq_time + if bonus_id is not None: + self.bonus_id = bonus_id + self.product_id = product_id + if bonus_asset is not None: + self.bonus_asset = bonus_asset + if total_principal is not None: + self.total_principal = total_principal + if amount is not None: + self.amount = amount + if asset_price is not None: + self.asset_price = asset_price + self.status = status + if detail is not None: + self.detail = detail + self.create_time = create_time + self.create_at = create_at + if lock_up_period is not None: + self.lock_up_period = lock_up_period + + @property + def id(self): + """Gets the id of this FixedTermHistoryRecord. # noqa: E501 + + Record ID # noqa: E501 + + :return: The id of this FixedTermHistoryRecord. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FixedTermHistoryRecord. + + Record ID # noqa: E501 + + :param id: The id of this FixedTermHistoryRecord. # noqa: E501 + :type: int + """ + 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 order_id(self): + """Gets the order_id of this FixedTermHistoryRecord. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this FixedTermHistoryRecord. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this FixedTermHistoryRecord. + + Order ID # noqa: E501 + + :param order_id: The order_id of this FixedTermHistoryRecord. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def user_id(self): + """Gets the user_id of this FixedTermHistoryRecord. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this FixedTermHistoryRecord. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this FixedTermHistoryRecord. + + User ID # noqa: E501 + + :param user_id: The user_id of this FixedTermHistoryRecord. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def asset(self): + """Gets the asset of this FixedTermHistoryRecord. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this FixedTermHistoryRecord. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this FixedTermHistoryRecord. + + Currency # noqa: E501 + + :param asset: The asset of this FixedTermHistoryRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def uniq_time(self): + """Gets the uniq_time of this FixedTermHistoryRecord. # noqa: E501 + + Unique time identifier (date) # noqa: E501 + + :return: The uniq_time of this FixedTermHistoryRecord. # noqa: E501 + :rtype: str + """ + return self._uniq_time + + @uniq_time.setter + def uniq_time(self, uniq_time): + """Sets the uniq_time of this FixedTermHistoryRecord. + + Unique time identifier (date) # noqa: E501 + + :param uniq_time: The uniq_time of this FixedTermHistoryRecord. # noqa: E501 + :type: str + """ + + self._uniq_time = uniq_time + + @property + def bonus_id(self): + """Gets the bonus_id of this FixedTermHistoryRecord. # noqa: E501 + + Reward campaign ID # noqa: E501 + + :return: The bonus_id of this FixedTermHistoryRecord. # noqa: E501 + :rtype: int + """ + return self._bonus_id + + @bonus_id.setter + def bonus_id(self, bonus_id): + """Sets the bonus_id of this FixedTermHistoryRecord. + + Reward campaign ID # noqa: E501 + + :param bonus_id: The bonus_id of this FixedTermHistoryRecord. # noqa: E501 + :type: int + """ + + self._bonus_id = bonus_id + + @property + def product_id(self): + """Gets the product_id of this FixedTermHistoryRecord. # noqa: E501 + + Product ID # noqa: E501 + + :return: The product_id of this FixedTermHistoryRecord. # noqa: E501 + :rtype: int + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this FixedTermHistoryRecord. + + Product ID # noqa: E501 + + :param product_id: The product_id of this FixedTermHistoryRecord. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and product_id is None: # noqa: E501 + raise ValueError("Invalid value for `product_id`, must not be `None`") # noqa: E501 + + self._product_id = product_id + + @property + def bonus_asset(self): + """Gets the bonus_asset of this FixedTermHistoryRecord. # noqa: E501 + + Reward currency # noqa: E501 + + :return: The bonus_asset of this FixedTermHistoryRecord. # noqa: E501 + :rtype: str + """ + return self._bonus_asset + + @bonus_asset.setter + def bonus_asset(self, bonus_asset): + """Sets the bonus_asset of this FixedTermHistoryRecord. + + Reward currency # noqa: E501 + + :param bonus_asset: The bonus_asset of this FixedTermHistoryRecord. # noqa: E501 + :type: str + """ + + self._bonus_asset = bonus_asset + + @property + def total_principal(self): + """Gets the total_principal of this FixedTermHistoryRecord. # noqa: E501 + + Total principal # noqa: E501 + + :return: The total_principal of this FixedTermHistoryRecord. # noqa: E501 + :rtype: str + """ + return self._total_principal + + @total_principal.setter + def total_principal(self, total_principal): + """Sets the total_principal of this FixedTermHistoryRecord. + + Total principal # noqa: E501 + + :param total_principal: The total_principal of this FixedTermHistoryRecord. # noqa: E501 + :type: str + """ + + self._total_principal = total_principal + + @property + def amount(self): + """Gets the amount of this FixedTermHistoryRecord. # noqa: E501 + + Amount # noqa: E501 + + :return: The amount of this FixedTermHistoryRecord. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this FixedTermHistoryRecord. + + Amount # noqa: E501 + + :param amount: The amount of this FixedTermHistoryRecord. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def asset_price(self): + """Gets the asset_price of this FixedTermHistoryRecord. # noqa: E501 + + Currency price # noqa: E501 + + :return: The asset_price of this FixedTermHistoryRecord. # noqa: E501 + :rtype: str + """ + return self._asset_price + + @asset_price.setter + def asset_price(self, asset_price): + """Sets the asset_price of this FixedTermHistoryRecord. + + Currency price # noqa: E501 + + :param asset_price: The asset_price of this FixedTermHistoryRecord. # noqa: E501 + :type: str + """ + + self._asset_price = asset_price + + @property + def status(self): + """Gets the status of this FixedTermHistoryRecord. # noqa: E501 + + Status # noqa: E501 + + :return: The status of this FixedTermHistoryRecord. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FixedTermHistoryRecord. + + Status # noqa: E501 + + :param status: The status of this FixedTermHistoryRecord. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def detail(self): + """Gets the detail of this FixedTermHistoryRecord. # noqa: E501 + + Detail description # noqa: E501 + + :return: The detail of this FixedTermHistoryRecord. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this FixedTermHistoryRecord. + + Detail description # noqa: E501 + + :param detail: The detail of this FixedTermHistoryRecord. # noqa: E501 + :type: str + """ + + self._detail = detail + + @property + def create_time(self): + """Gets the create_time of this FixedTermHistoryRecord. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this FixedTermHistoryRecord. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FixedTermHistoryRecord. + + Created time # noqa: E501 + + :param create_time: The create_time of this FixedTermHistoryRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + @property + def create_at(self): + """Gets the create_at of this FixedTermHistoryRecord. # noqa: E501 + + Creation timestamp (in seconds) # noqa: E501 + + :return: The create_at of this FixedTermHistoryRecord. # noqa: E501 + :rtype: int + """ + return self._create_at + + @create_at.setter + def create_at(self, create_at): + """Sets the create_at of this FixedTermHistoryRecord. + + Creation timestamp (in seconds) # noqa: E501 + + :param create_at: The create_at of this FixedTermHistoryRecord. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and create_at is None: # noqa: E501 + raise ValueError("Invalid value for `create_at`, must not be `None`") # noqa: E501 + + self._create_at = create_at + + @property + def lock_up_period(self): + """Gets the lock_up_period of this FixedTermHistoryRecord. # noqa: E501 + + Term # noqa: E501 + + :return: The lock_up_period of this FixedTermHistoryRecord. # noqa: E501 + :rtype: int + """ + return self._lock_up_period + + @lock_up_period.setter + def lock_up_period(self, lock_up_period): + """Sets the lock_up_period of this FixedTermHistoryRecord. + + Term # noqa: E501 + + :param lock_up_period: The lock_up_period of this FixedTermHistoryRecord. # noqa: E501 + :type: int + """ + + self._lock_up_period = lock_up_period + + 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, FixedTermHistoryRecord): + 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, FixedTermHistoryRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fixed_term_lend_order.py b/gate_api/models/fixed_term_lend_order.py new file mode 100644 index 00000000..8ed9c0d4 --- /dev/null +++ b/gate_api/models/fixed_term_lend_order.py @@ -0,0 +1,901 @@ +# 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 FixedTermLendOrder(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', + 'business': 'int', + 'order_id': 'int', + 'user_id': 'int', + 'asset': 'str', + 'product_id': 'int', + 'lock_up_period': 'int', + 'principal': 'str', + 'year_rate': 'str', + 'product_type': 'int', + 'interest': 'str', + 'status': 'int', + 'reinvest_status': 'int', + 'redeem_account_type': 'int', + 'origin_order': 'str', + 'redeem_type': 'int', + 'redeem_time': 'str', + 'finish_time': 'str', + 'create_time': 'str', + 'year_rate_perent': 'str', + 'total_year_rate_percent': 'str', + 'total_interest': 'str', + 'product_info': 'FixedTermProductInfo', + 'bonus_info': 'FixedTermBonusInfo', + 'coupon_info': 'FixedTermCouponInfo', + 'redeem_at': 'int', + 'finish_at': 'int', + 'create_at': 'int', + 'icon': 'str' + } + + attribute_map = { + 'id': 'id', + 'business': 'business', + 'order_id': 'order_id', + 'user_id': 'user_id', + 'asset': 'asset', + 'product_id': 'product_id', + 'lock_up_period': 'lock_up_period', + 'principal': 'principal', + 'year_rate': 'year_rate', + 'product_type': 'product_type', + 'interest': 'interest', + 'status': 'status', + 'reinvest_status': 'reinvest_status', + 'redeem_account_type': 'redeem_account_type', + 'origin_order': 'origin_order', + 'redeem_type': 'redeem_type', + 'redeem_time': 'redeem_time', + 'finish_time': 'finish_time', + 'create_time': 'create_time', + 'year_rate_perent': 'year_rate_perent', + 'total_year_rate_percent': 'total_year_rate_percent', + 'total_interest': 'total_interest', + 'product_info': 'product_info', + 'bonus_info': 'bonus_info', + 'coupon_info': 'coupon_info', + 'redeem_at': 'redeem_at', + 'finish_at': 'finish_at', + 'create_at': 'create_at', + 'icon': 'icon' + } + + def __init__(self, id=None, business=None, order_id=None, user_id=None, asset=None, product_id=None, lock_up_period=None, principal=None, year_rate=None, product_type=None, interest=None, status=None, reinvest_status=None, redeem_account_type=None, origin_order=None, redeem_type=None, redeem_time=None, finish_time=None, create_time=None, year_rate_perent=None, total_year_rate_percent=None, total_interest=None, product_info=None, bonus_info=None, coupon_info=None, redeem_at=None, finish_at=None, create_at=None, icon=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, int, str, int, int, str, str, int, str, int, int, int, str, int, str, str, str, str, str, str, FixedTermProductInfo, FixedTermBonusInfo, FixedTermCouponInfo, int, int, int, str, Configuration) -> None + """FixedTermLendOrder - 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._business = None + self._order_id = None + self._user_id = None + self._asset = None + self._product_id = None + self._lock_up_period = None + self._principal = None + self._year_rate = None + self._product_type = None + self._interest = None + self._status = None + self._reinvest_status = None + self._redeem_account_type = None + self._origin_order = None + self._redeem_type = None + self._redeem_time = None + self._finish_time = None + self._create_time = None + self._year_rate_perent = None + self._total_year_rate_percent = None + self._total_interest = None + self._product_info = None + self._bonus_info = None + self._coupon_info = None + self._redeem_at = None + self._finish_at = None + self._create_at = None + self._icon = None + self.discriminator = None + + if id is not None: + self.id = id + if business is not None: + self.business = business + if order_id is not None: + self.order_id = order_id + if user_id is not None: + self.user_id = user_id + if asset is not None: + self.asset = asset + if product_id is not None: + self.product_id = product_id + if lock_up_period is not None: + self.lock_up_period = lock_up_period + if principal is not None: + self.principal = principal + if year_rate is not None: + self.year_rate = year_rate + if product_type is not None: + self.product_type = product_type + if interest is not None: + self.interest = interest + if status is not None: + self.status = status + if reinvest_status is not None: + self.reinvest_status = reinvest_status + if redeem_account_type is not None: + self.redeem_account_type = redeem_account_type + if origin_order is not None: + self.origin_order = origin_order + if redeem_type is not None: + self.redeem_type = redeem_type + if redeem_time is not None: + self.redeem_time = redeem_time + if finish_time is not None: + self.finish_time = finish_time + if create_time is not None: + self.create_time = create_time + if year_rate_perent is not None: + self.year_rate_perent = year_rate_perent + if total_year_rate_percent is not None: + self.total_year_rate_percent = total_year_rate_percent + if total_interest is not None: + self.total_interest = total_interest + if product_info is not None: + self.product_info = product_info + if bonus_info is not None: + self.bonus_info = bonus_info + if coupon_info is not None: + self.coupon_info = coupon_info + if redeem_at is not None: + self.redeem_at = redeem_at + if finish_at is not None: + self.finish_at = finish_at + if create_at is not None: + self.create_at = create_at + if icon is not None: + self.icon = icon + + @property + def id(self): + """Gets the id of this FixedTermLendOrder. # noqa: E501 + + Subscription record ID # noqa: E501 + + :return: The id of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FixedTermLendOrder. + + Subscription record ID # noqa: E501 + + :param id: The id of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def business(self): + """Gets the business of this FixedTermLendOrder. # noqa: E501 + + Business type: 1 for regular, 2 for VIP # noqa: E501 + + :return: The business of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._business + + @business.setter + def business(self, business): + """Sets the business of this FixedTermLendOrder. + + Business type: 1 for regular, 2 for VIP # noqa: E501 + + :param business: The business of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._business = business + + @property + def order_id(self): + """Gets the order_id of this FixedTermLendOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this FixedTermLendOrder. + + Order ID # noqa: E501 + + :param order_id: The order_id of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def user_id(self): + """Gets the user_id of this FixedTermLendOrder. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this FixedTermLendOrder. + + User ID # noqa: E501 + + :param user_id: The user_id of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def asset(self): + """Gets the asset of this FixedTermLendOrder. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this FixedTermLendOrder. + + Currency # noqa: E501 + + :param asset: The asset of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._asset = asset + + @property + def product_id(self): + """Gets the product_id of this FixedTermLendOrder. # noqa: E501 + + Product ID # noqa: E501 + + :return: The product_id of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this FixedTermLendOrder. + + Product ID # noqa: E501 + + :param product_id: The product_id of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._product_id = product_id + + @property + def lock_up_period(self): + """Gets the lock_up_period of this FixedTermLendOrder. # noqa: E501 + + Lock-up period (in days) # noqa: E501 + + :return: The lock_up_period of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._lock_up_period + + @lock_up_period.setter + def lock_up_period(self, lock_up_period): + """Sets the lock_up_period of this FixedTermLendOrder. + + Lock-up period (in days) # noqa: E501 + + :param lock_up_period: The lock_up_period of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._lock_up_period = lock_up_period + + @property + def principal(self): + """Gets the principal of this FixedTermLendOrder. # noqa: E501 + + Subscription principal # noqa: E501 + + :return: The principal of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this FixedTermLendOrder. + + Subscription principal # noqa: E501 + + :param principal: The principal of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._principal = principal + + @property + def year_rate(self): + """Gets the year_rate of this FixedTermLendOrder. # noqa: E501 + + Annual interest rate # noqa: E501 + + :return: The year_rate of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._year_rate + + @year_rate.setter + def year_rate(self, year_rate): + """Sets the year_rate of this FixedTermLendOrder. + + Annual interest rate # noqa: E501 + + :param year_rate: The year_rate of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._year_rate = year_rate + + @property + def product_type(self): + """Gets the product_type of this FixedTermLendOrder. # noqa: E501 + + Product type: 1 for regular, 2 for VIP # noqa: E501 + + :return: The product_type of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._product_type + + @product_type.setter + def product_type(self, product_type): + """Sets the product_type of this FixedTermLendOrder. + + Product type: 1 for regular, 2 for VIP # noqa: E501 + + :param product_type: The product_type of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._product_type = product_type + + @property + def interest(self): + """Gets the interest of this FixedTermLendOrder. # noqa: E501 + + Accrued interest # noqa: E501 + + :return: The interest of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this FixedTermLendOrder. + + Accrued interest # noqa: E501 + + :param interest: The interest of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._interest = interest + + @property + def status(self): + """Gets the status of this FixedTermLendOrder. # noqa: E501 + + Order status: 1 for holding, 2 for redeemed, 3 for matured, 4 for settled # noqa: E501 + + :return: The status of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FixedTermLendOrder. + + Order status: 1 for holding, 2 for redeemed, 3 for matured, 4 for settled # noqa: E501 + + :param status: The status of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def reinvest_status(self): + """Gets the reinvest_status of this FixedTermLendOrder. # noqa: E501 + + Auto-renewal status: 0 for disabled, 1 for enabled # noqa: E501 + + :return: The reinvest_status of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._reinvest_status + + @reinvest_status.setter + def reinvest_status(self, reinvest_status): + """Sets the reinvest_status of this FixedTermLendOrder. + + Auto-renewal status: 0 for disabled, 1 for enabled # noqa: E501 + + :param reinvest_status: The reinvest_status of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._reinvest_status = reinvest_status + + @property + def redeem_account_type(self): + """Gets the redeem_account_type of this FixedTermLendOrder. # noqa: E501 + + Redemption payout account type: 1 for spot account # noqa: E501 + + :return: The redeem_account_type of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._redeem_account_type + + @redeem_account_type.setter + def redeem_account_type(self, redeem_account_type): + """Sets the redeem_account_type of this FixedTermLendOrder. + + Redemption payout account type: 1 for spot account # noqa: E501 + + :param redeem_account_type: The redeem_account_type of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._redeem_account_type = redeem_account_type + + @property + def origin_order(self): + """Gets the origin_order of this FixedTermLendOrder. # noqa: E501 + + Original order ID, linked to previous order IDs in auto-renewal scenarios # noqa: E501 + + :return: The origin_order of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._origin_order + + @origin_order.setter + def origin_order(self, origin_order): + """Sets the origin_order of this FixedTermLendOrder. + + Original order ID, linked to previous order IDs in auto-renewal scenarios # noqa: E501 + + :param origin_order: The origin_order of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._origin_order = origin_order + + @property + def redeem_type(self): + """Gets the redeem_type of this FixedTermLendOrder. # noqa: E501 + + Redemption type: 1 for early redemption, 2 for maturity redemption # noqa: E501 + + :return: The redeem_type of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._redeem_type + + @redeem_type.setter + def redeem_type(self, redeem_type): + """Sets the redeem_type of this FixedTermLendOrder. + + Redemption type: 1 for early redemption, 2 for maturity redemption # noqa: E501 + + :param redeem_type: The redeem_type of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._redeem_type = redeem_type + + @property + def redeem_time(self): + """Gets the redeem_time of this FixedTermLendOrder. # noqa: E501 + + Redemption time # noqa: E501 + + :return: The redeem_time of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._redeem_time + + @redeem_time.setter + def redeem_time(self, redeem_time): + """Sets the redeem_time of this FixedTermLendOrder. + + Redemption time # noqa: E501 + + :param redeem_time: The redeem_time of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._redeem_time = redeem_time + + @property + def finish_time(self): + """Gets the finish_time of this FixedTermLendOrder. # noqa: E501 + + Expiration time # noqa: E501 + + :return: The finish_time of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._finish_time + + @finish_time.setter + def finish_time(self, finish_time): + """Sets the finish_time of this FixedTermLendOrder. + + Expiration time # noqa: E501 + + :param finish_time: The finish_time of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._finish_time = finish_time + + @property + def create_time(self): + """Gets the create_time of this FixedTermLendOrder. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FixedTermLendOrder. + + Created time # noqa: E501 + + :param create_time: The create_time of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def year_rate_perent(self): + """Gets the year_rate_perent of this FixedTermLendOrder. # noqa: E501 + + Annual interest rate percentage display value # noqa: E501 + + :return: The year_rate_perent of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._year_rate_perent + + @year_rate_perent.setter + def year_rate_perent(self, year_rate_perent): + """Sets the year_rate_perent of this FixedTermLendOrder. + + Annual interest rate percentage display value # noqa: E501 + + :param year_rate_perent: The year_rate_perent of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._year_rate_perent = year_rate_perent + + @property + def total_year_rate_percent(self): + """Gets the total_year_rate_percent of this FixedTermLendOrder. # noqa: E501 + + Comprehensive annualized yield percentage (including interest rate boost, rewards, etc.) # noqa: E501 + + :return: The total_year_rate_percent of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._total_year_rate_percent + + @total_year_rate_percent.setter + def total_year_rate_percent(self, total_year_rate_percent): + """Sets the total_year_rate_percent of this FixedTermLendOrder. + + Comprehensive annualized yield percentage (including interest rate boost, rewards, etc.) # noqa: E501 + + :param total_year_rate_percent: The total_year_rate_percent of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._total_year_rate_percent = total_year_rate_percent + + @property + def total_interest(self): + """Gets the total_interest of this FixedTermLendOrder. # noqa: E501 + + Total earnings (including interest and bonus rewards) # noqa: E501 + + :return: The total_interest of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._total_interest + + @total_interest.setter + def total_interest(self, total_interest): + """Sets the total_interest of this FixedTermLendOrder. + + Total earnings (including interest and bonus rewards) # noqa: E501 + + :param total_interest: The total_interest of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._total_interest = total_interest + + @property + def product_info(self): + """Gets the product_info of this FixedTermLendOrder. # noqa: E501 + + + :return: The product_info of this FixedTermLendOrder. # noqa: E501 + :rtype: FixedTermProductInfo + """ + return self._product_info + + @product_info.setter + def product_info(self, product_info): + """Sets the product_info of this FixedTermLendOrder. + + + :param product_info: The product_info of this FixedTermLendOrder. # noqa: E501 + :type: FixedTermProductInfo + """ + + self._product_info = product_info + + @property + def bonus_info(self): + """Gets the bonus_info of this FixedTermLendOrder. # noqa: E501 + + + :return: The bonus_info of this FixedTermLendOrder. # noqa: E501 + :rtype: FixedTermBonusInfo + """ + return self._bonus_info + + @bonus_info.setter + def bonus_info(self, bonus_info): + """Sets the bonus_info of this FixedTermLendOrder. + + + :param bonus_info: The bonus_info of this FixedTermLendOrder. # noqa: E501 + :type: FixedTermBonusInfo + """ + + self._bonus_info = bonus_info + + @property + def coupon_info(self): + """Gets the coupon_info of this FixedTermLendOrder. # noqa: E501 + + + :return: The coupon_info of this FixedTermLendOrder. # noqa: E501 + :rtype: FixedTermCouponInfo + """ + return self._coupon_info + + @coupon_info.setter + def coupon_info(self, coupon_info): + """Sets the coupon_info of this FixedTermLendOrder. + + + :param coupon_info: The coupon_info of this FixedTermLendOrder. # noqa: E501 + :type: FixedTermCouponInfo + """ + + self._coupon_info = coupon_info + + @property + def redeem_at(self): + """Gets the redeem_at of this FixedTermLendOrder. # noqa: E501 + + Redemption timestamp (in seconds) # noqa: E501 + + :return: The redeem_at of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._redeem_at + + @redeem_at.setter + def redeem_at(self, redeem_at): + """Sets the redeem_at of this FixedTermLendOrder. + + Redemption timestamp (in seconds) # noqa: E501 + + :param redeem_at: The redeem_at of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._redeem_at = redeem_at + + @property + def finish_at(self): + """Gets the finish_at of this FixedTermLendOrder. # noqa: E501 + + Expiration timestamp (in seconds) # noqa: E501 + + :return: The finish_at of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._finish_at + + @finish_at.setter + def finish_at(self, finish_at): + """Sets the finish_at of this FixedTermLendOrder. + + Expiration timestamp (in seconds) # noqa: E501 + + :param finish_at: The finish_at of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._finish_at = finish_at + + @property + def create_at(self): + """Gets the create_at of this FixedTermLendOrder. # noqa: E501 + + Creation timestamp (in seconds) # noqa: E501 + + :return: The create_at of this FixedTermLendOrder. # noqa: E501 + :rtype: int + """ + return self._create_at + + @create_at.setter + def create_at(self, create_at): + """Sets the create_at of this FixedTermLendOrder. + + Creation timestamp (in seconds) # noqa: E501 + + :param create_at: The create_at of this FixedTermLendOrder. # noqa: E501 + :type: int + """ + + self._create_at = create_at + + @property + def icon(self): + """Gets the icon of this FixedTermLendOrder. # noqa: E501 + + Currency icon URL # noqa: E501 + + :return: The icon of this FixedTermLendOrder. # noqa: E501 + :rtype: str + """ + return self._icon + + @icon.setter + def icon(self, icon): + """Sets the icon of this FixedTermLendOrder. + + Currency icon URL # noqa: E501 + + :param icon: The icon of this FixedTermLendOrder. # noqa: E501 + :type: str + """ + + self._icon = icon + + 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, FixedTermLendOrder): + 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, FixedTermLendOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fixed_term_lend_request.py b/gate_api/models/fixed_term_lend_request.py new file mode 100644 index 00000000..bbee8c44 --- /dev/null +++ b/gate_api/models/fixed_term_lend_request.py @@ -0,0 +1,293 @@ +# 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 FixedTermLendRequest(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 = { + 'product_id': 'int', + 'amount': 'str', + 'year_rate': 'str', + 'reinvest_status': 'int', + 'redeem_account_type': 'int', + 'financial_rate_id': 'int', + 'sub_business': 'int' + } + + attribute_map = { + 'product_id': 'product_id', + 'amount': 'amount', + 'year_rate': 'year_rate', + 'reinvest_status': 'reinvest_status', + 'redeem_account_type': 'redeem_account_type', + 'financial_rate_id': 'financial_rate_id', + 'sub_business': 'sub_business' + } + + def __init__(self, product_id=None, amount=None, year_rate=None, reinvest_status=None, redeem_account_type=None, financial_rate_id=None, sub_business=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, int, int, int, Configuration) -> None + """FixedTermLendRequest - 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._product_id = None + self._amount = None + self._year_rate = None + self._reinvest_status = None + self._redeem_account_type = None + self._financial_rate_id = None + self._sub_business = None + self.discriminator = None + + self.product_id = product_id + self.amount = amount + if year_rate is not None: + self.year_rate = year_rate + if reinvest_status is not None: + self.reinvest_status = reinvest_status + if redeem_account_type is not None: + self.redeem_account_type = redeem_account_type + if financial_rate_id is not None: + self.financial_rate_id = financial_rate_id + if sub_business is not None: + self.sub_business = sub_business + + @property + def product_id(self): + """Gets the product_id of this FixedTermLendRequest. # noqa: E501 + + Product ID # noqa: E501 + + :return: The product_id of this FixedTermLendRequest. # noqa: E501 + :rtype: int + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this FixedTermLendRequest. + + Product ID # noqa: E501 + + :param product_id: The product_id of this FixedTermLendRequest. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and product_id is None: # noqa: E501 + raise ValueError("Invalid value for `product_id`, must not be `None`") # noqa: E501 + + self._product_id = product_id + + @property + def amount(self): + """Gets the amount of this FixedTermLendRequest. # noqa: E501 + + Subscription amount # noqa: E501 + + :return: The amount of this FixedTermLendRequest. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this FixedTermLendRequest. + + Subscription amount # noqa: E501 + + :param amount: The amount of this FixedTermLendRequest. # 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 year_rate(self): + """Gets the year_rate of this FixedTermLendRequest. # noqa: E501 + + Annual interest rate # noqa: E501 + + :return: The year_rate of this FixedTermLendRequest. # noqa: E501 + :rtype: str + """ + return self._year_rate + + @year_rate.setter + def year_rate(self, year_rate): + """Sets the year_rate of this FixedTermLendRequest. + + Annual interest rate # noqa: E501 + + :param year_rate: The year_rate of this FixedTermLendRequest. # noqa: E501 + :type: str + """ + + self._year_rate = year_rate + + @property + def reinvest_status(self): + """Gets the reinvest_status of this FixedTermLendRequest. # noqa: E501 + + Auto-renewal status: 0 for disabled, 1 for enabled # noqa: E501 + + :return: The reinvest_status of this FixedTermLendRequest. # noqa: E501 + :rtype: int + """ + return self._reinvest_status + + @reinvest_status.setter + def reinvest_status(self, reinvest_status): + """Sets the reinvest_status of this FixedTermLendRequest. + + Auto-renewal status: 0 for disabled, 1 for enabled # noqa: E501 + + :param reinvest_status: The reinvest_status of this FixedTermLendRequest. # noqa: E501 + :type: int + """ + + self._reinvest_status = reinvest_status + + @property + def redeem_account_type(self): + """Gets the redeem_account_type of this FixedTermLendRequest. # noqa: E501 + + Redemption payout account type: 1 for spot account # noqa: E501 + + :return: The redeem_account_type of this FixedTermLendRequest. # noqa: E501 + :rtype: int + """ + return self._redeem_account_type + + @redeem_account_type.setter + def redeem_account_type(self, redeem_account_type): + """Sets the redeem_account_type of this FixedTermLendRequest. + + Redemption payout account type: 1 for spot account # noqa: E501 + + :param redeem_account_type: The redeem_account_type of this FixedTermLendRequest. # noqa: E501 + :type: int + """ + + self._redeem_account_type = redeem_account_type + + @property + def financial_rate_id(self): + """Gets the financial_rate_id of this FixedTermLendRequest. # noqa: E501 + + Interest rate boost coupon ID, 0 means not used # noqa: E501 + + :return: The financial_rate_id of this FixedTermLendRequest. # noqa: E501 + :rtype: int + """ + return self._financial_rate_id + + @financial_rate_id.setter + def financial_rate_id(self, financial_rate_id): + """Sets the financial_rate_id of this FixedTermLendRequest. + + Interest rate boost coupon ID, 0 means not used # noqa: E501 + + :param financial_rate_id: The financial_rate_id of this FixedTermLendRequest. # noqa: E501 + :type: int + """ + + self._financial_rate_id = financial_rate_id + + @property + def sub_business(self): + """Gets the sub_business of this FixedTermLendRequest. # noqa: E501 + + Sub-business type # noqa: E501 + + :return: The sub_business of this FixedTermLendRequest. # noqa: E501 + :rtype: int + """ + return self._sub_business + + @sub_business.setter + def sub_business(self, sub_business): + """Sets the sub_business of this FixedTermLendRequest. + + Sub-business type # noqa: E501 + + :param sub_business: The sub_business of this FixedTermLendRequest. # noqa: E501 + :type: int + """ + + self._sub_business = sub_business + + 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, FixedTermLendRequest): + 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, FixedTermLendRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fixed_term_product.py b/gate_api/models/fixed_term_product.py new file mode 100644 index 00000000..5de6e1aa --- /dev/null +++ b/gate_api/models/fixed_term_product.py @@ -0,0 +1,627 @@ +# 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 FixedTermProduct(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', + 'name': 'str', + 'asset': 'str', + 'lock_up_period': 'int', + 'min_lend_amount': 'str', + 'user_max_lend_amount': 'str', + 'total_lend_amount': 'str', + 'year_rate': 'str', + 'type': 'int', + 'pre_redeem': 'int', + 'reinvest': 'int', + 'redeem_account': 'int', + 'min_vip': 'int', + 'max_vip': 'int', + 'status': 'int', + 'create_time': 'str', + 'user_max_lend_volume': 'str', + 'user_total_amount': 'str', + 'sale_status': 'int' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'asset': 'asset', + 'lock_up_period': 'lock_up_period', + 'min_lend_amount': 'min_lend_amount', + 'user_max_lend_amount': 'user_max_lend_amount', + 'total_lend_amount': 'total_lend_amount', + 'year_rate': 'year_rate', + 'type': 'type', + 'pre_redeem': 'pre_redeem', + 'reinvest': 'reinvest', + 'redeem_account': 'redeem_account', + 'min_vip': 'min_vip', + 'max_vip': 'max_vip', + 'status': 'status', + 'create_time': 'create_time', + 'user_max_lend_volume': 'user_max_lend_volume', + 'user_total_amount': 'user_total_amount', + 'sale_status': 'sale_status' + } + + def __init__(self, id=None, name=None, asset=None, lock_up_period=None, min_lend_amount=None, user_max_lend_amount=None, total_lend_amount=None, year_rate=None, type=None, pre_redeem=None, reinvest=None, redeem_account=None, min_vip=None, max_vip=None, status=None, create_time=None, user_max_lend_volume=None, user_total_amount=None, sale_status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, str, str, str, str, int, int, int, int, int, int, int, str, str, str, int, Configuration) -> None + """FixedTermProduct - 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._name = None + self._asset = None + self._lock_up_period = None + self._min_lend_amount = None + self._user_max_lend_amount = None + self._total_lend_amount = None + self._year_rate = None + self._type = None + self._pre_redeem = None + self._reinvest = None + self._redeem_account = None + self._min_vip = None + self._max_vip = None + self._status = None + self._create_time = None + self._user_max_lend_volume = None + self._user_total_amount = None + self._sale_status = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if asset is not None: + self.asset = asset + if lock_up_period is not None: + self.lock_up_period = lock_up_period + if min_lend_amount is not None: + self.min_lend_amount = min_lend_amount + if user_max_lend_amount is not None: + self.user_max_lend_amount = user_max_lend_amount + if total_lend_amount is not None: + self.total_lend_amount = total_lend_amount + if year_rate is not None: + self.year_rate = year_rate + if type is not None: + self.type = type + if pre_redeem is not None: + self.pre_redeem = pre_redeem + if reinvest is not None: + self.reinvest = reinvest + if redeem_account is not None: + self.redeem_account = redeem_account + if min_vip is not None: + self.min_vip = min_vip + if max_vip is not None: + self.max_vip = max_vip + if status is not None: + self.status = status + if create_time is not None: + self.create_time = create_time + if user_max_lend_volume is not None: + self.user_max_lend_volume = user_max_lend_volume + if user_total_amount is not None: + self.user_total_amount = user_total_amount + if sale_status is not None: + self.sale_status = sale_status + + @property + def id(self): + """Gets the id of this FixedTermProduct. # noqa: E501 + + Product ID # noqa: E501 + + :return: The id of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FixedTermProduct. + + Product ID # noqa: E501 + + :param id: The id of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this FixedTermProduct. # noqa: E501 + + Product name # noqa: E501 + + :return: The name of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this FixedTermProduct. + + Product name # noqa: E501 + + :param name: The name of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def asset(self): + """Gets the asset of this FixedTermProduct. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this FixedTermProduct. + + Currency # noqa: E501 + + :param asset: The asset of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._asset = asset + + @property + def lock_up_period(self): + """Gets the lock_up_period of this FixedTermProduct. # noqa: E501 + + Lock-up period (in days) # noqa: E501 + + :return: The lock_up_period of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._lock_up_period + + @lock_up_period.setter + def lock_up_period(self, lock_up_period): + """Sets the lock_up_period of this FixedTermProduct. + + Lock-up period (in days) # noqa: E501 + + :param lock_up_period: The lock_up_period of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._lock_up_period = lock_up_period + + @property + def min_lend_amount(self): + """Gets the min_lend_amount of this FixedTermProduct. # noqa: E501 + + Minimum earn amount # noqa: E501 + + :return: The min_lend_amount of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._min_lend_amount + + @min_lend_amount.setter + def min_lend_amount(self, min_lend_amount): + """Sets the min_lend_amount of this FixedTermProduct. + + Minimum earn amount # noqa: E501 + + :param min_lend_amount: The min_lend_amount of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._min_lend_amount = min_lend_amount + + @property + def user_max_lend_amount(self): + """Gets the user_max_lend_amount of this FixedTermProduct. # noqa: E501 + + User maximum earn limit # noqa: E501 + + :return: The user_max_lend_amount of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._user_max_lend_amount + + @user_max_lend_amount.setter + def user_max_lend_amount(self, user_max_lend_amount): + """Sets the user_max_lend_amount of this FixedTermProduct. + + User maximum earn limit # noqa: E501 + + :param user_max_lend_amount: The user_max_lend_amount of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._user_max_lend_amount = user_max_lend_amount + + @property + def total_lend_amount(self): + """Gets the total_lend_amount of this FixedTermProduct. # noqa: E501 + + Platform earn limit # noqa: E501 + + :return: The total_lend_amount of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._total_lend_amount + + @total_lend_amount.setter + def total_lend_amount(self, total_lend_amount): + """Sets the total_lend_amount of this FixedTermProduct. + + Platform earn limit # noqa: E501 + + :param total_lend_amount: The total_lend_amount of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._total_lend_amount = total_lend_amount + + @property + def year_rate(self): + """Gets the year_rate of this FixedTermProduct. # noqa: E501 + + Annual interest rate # noqa: E501 + + :return: The year_rate of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._year_rate + + @year_rate.setter + def year_rate(self, year_rate): + """Sets the year_rate of this FixedTermProduct. + + Annual interest rate # noqa: E501 + + :param year_rate: The year_rate of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._year_rate = year_rate + + @property + def type(self): + """Gets the type of this FixedTermProduct. # noqa: E501 + + Product type: 1 for regular, 2 for VIP # noqa: E501 + + :return: The type of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this FixedTermProduct. + + Product type: 1 for regular, 2 for VIP # noqa: E501 + + :param type: The type of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._type = type + + @property + def pre_redeem(self): + """Gets the pre_redeem of this FixedTermProduct. # noqa: E501 + + Whether early redemption is supported: 0 for not supported, 1 for supported # noqa: E501 + + :return: The pre_redeem of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._pre_redeem + + @pre_redeem.setter + def pre_redeem(self, pre_redeem): + """Sets the pre_redeem of this FixedTermProduct. + + Whether early redemption is supported: 0 for not supported, 1 for supported # noqa: E501 + + :param pre_redeem: The pre_redeem of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._pre_redeem = pre_redeem + + @property + def reinvest(self): + """Gets the reinvest of this FixedTermProduct. # noqa: E501 + + Whether auto-renewal is supported: 0 for not supported, 1 for supported # noqa: E501 + + :return: The reinvest of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._reinvest + + @reinvest.setter + def reinvest(self, reinvest): + """Sets the reinvest of this FixedTermProduct. + + Whether auto-renewal is supported: 0 for not supported, 1 for supported # noqa: E501 + + :param reinvest: The reinvest of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._reinvest = reinvest + + @property + def redeem_account(self): + """Gets the redeem_account of this FixedTermProduct. # noqa: E501 + + Whether fixed-to-flexible conversion is supported: 0 for not supported, 1 for supported # noqa: E501 + + :return: The redeem_account of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._redeem_account + + @redeem_account.setter + def redeem_account(self, redeem_account): + """Sets the redeem_account of this FixedTermProduct. + + Whether fixed-to-flexible conversion is supported: 0 for not supported, 1 for supported # noqa: E501 + + :param redeem_account: The redeem_account of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._redeem_account = redeem_account + + @property + def min_vip(self): + """Gets the min_vip of this FixedTermProduct. # noqa: E501 + + Minimum VIP level requirement, 0-16, 0 means no restriction # noqa: E501 + + :return: The min_vip of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._min_vip + + @min_vip.setter + def min_vip(self, min_vip): + """Sets the min_vip of this FixedTermProduct. + + Minimum VIP level requirement, 0-16, 0 means no restriction # noqa: E501 + + :param min_vip: The min_vip of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._min_vip = min_vip + + @property + def max_vip(self): + """Gets the max_vip of this FixedTermProduct. # noqa: E501 + + Maximum VIP level requirement (0-16), 0 means no restriction # noqa: E501 + + :return: The max_vip of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._max_vip + + @max_vip.setter + def max_vip(self, max_vip): + """Sets the max_vip of this FixedTermProduct. + + Maximum VIP level requirement (0-16), 0 means no restriction # noqa: E501 + + :param max_vip: The max_vip of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._max_vip = max_vip + + @property + def status(self): + """Gets the status of this FixedTermProduct. # noqa: E501 + + Product status: 1 for unlisted, 2 for listed, 3 for delisted # noqa: E501 + + :return: The status of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FixedTermProduct. + + Product status: 1 for unlisted, 2 for listed, 3 for delisted # noqa: E501 + + :param status: The status of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def create_time(self): + """Gets the create_time of this FixedTermProduct. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FixedTermProduct. + + Created time # noqa: E501 + + :param create_time: The create_time of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def user_max_lend_volume(self): + """Gets the user_max_lend_volume of this FixedTermProduct. # noqa: E501 + + User maximum earn amount # noqa: E501 + + :return: The user_max_lend_volume of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._user_max_lend_volume + + @user_max_lend_volume.setter + def user_max_lend_volume(self, user_max_lend_volume): + """Sets the user_max_lend_volume of this FixedTermProduct. + + User maximum earn amount # noqa: E501 + + :param user_max_lend_volume: The user_max_lend_volume of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._user_max_lend_volume = user_max_lend_volume + + @property + def user_total_amount(self): + """Gets the user_total_amount of this FixedTermProduct. # noqa: E501 + + Total amount the user has invested in earn products # noqa: E501 + + :return: The user_total_amount of this FixedTermProduct. # noqa: E501 + :rtype: str + """ + return self._user_total_amount + + @user_total_amount.setter + def user_total_amount(self, user_total_amount): + """Sets the user_total_amount of this FixedTermProduct. + + Total amount the user has invested in earn products # noqa: E501 + + :param user_total_amount: The user_total_amount of this FixedTermProduct. # noqa: E501 + :type: str + """ + + self._user_total_amount = user_total_amount + + @property + def sale_status(self): + """Gets the sale_status of this FixedTermProduct. # noqa: E501 + + Sale status: 1 for on sale, 2 for sold out # noqa: E501 + + :return: The sale_status of this FixedTermProduct. # noqa: E501 + :rtype: int + """ + return self._sale_status + + @sale_status.setter + def sale_status(self, sale_status): + """Sets the sale_status of this FixedTermProduct. + + Sale status: 1 for on sale, 2 for sold out # noqa: E501 + + :param sale_status: The sale_status of this FixedTermProduct. # noqa: E501 + :type: int + """ + + self._sale_status = sale_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, FixedTermProduct): + 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, FixedTermProduct): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fixed_term_product_info.py b/gate_api/models/fixed_term_product_info.py new file mode 100644 index 00000000..6204ae81 --- /dev/null +++ b/gate_api/models/fixed_term_product_info.py @@ -0,0 +1,240 @@ +# 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 FixedTermProductInfo(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 = { + 'pre_redeem': 'int', + 'reinvest': 'int', + 'redeem_account': 'int', + 'min_vip': 'int', + 'max_vip': 'int' + } + + attribute_map = { + 'pre_redeem': 'pre_redeem', + 'reinvest': 'reinvest', + 'redeem_account': 'redeem_account', + 'min_vip': 'min_vip', + 'max_vip': 'max_vip' + } + + def __init__(self, pre_redeem=None, reinvest=None, redeem_account=None, min_vip=None, max_vip=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, int, int, Configuration) -> None + """FixedTermProductInfo - 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._pre_redeem = None + self._reinvest = None + self._redeem_account = None + self._min_vip = None + self._max_vip = None + self.discriminator = None + + self.pre_redeem = pre_redeem + self.reinvest = reinvest + self.redeem_account = redeem_account + self.min_vip = min_vip + self.max_vip = max_vip + + @property + def pre_redeem(self): + """Gets the pre_redeem of this FixedTermProductInfo. # noqa: E501 + + Whether early redemption is supported: 0 for not supported, 1 for supported # noqa: E501 + + :return: The pre_redeem of this FixedTermProductInfo. # noqa: E501 + :rtype: int + """ + return self._pre_redeem + + @pre_redeem.setter + def pre_redeem(self, pre_redeem): + """Sets the pre_redeem of this FixedTermProductInfo. + + Whether early redemption is supported: 0 for not supported, 1 for supported # noqa: E501 + + :param pre_redeem: The pre_redeem of this FixedTermProductInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and pre_redeem is None: # noqa: E501 + raise ValueError("Invalid value for `pre_redeem`, must not be `None`") # noqa: E501 + + self._pre_redeem = pre_redeem + + @property + def reinvest(self): + """Gets the reinvest of this FixedTermProductInfo. # noqa: E501 + + Whether auto-renewal is supported: 0 for not supported, 1 for supported # noqa: E501 + + :return: The reinvest of this FixedTermProductInfo. # noqa: E501 + :rtype: int + """ + return self._reinvest + + @reinvest.setter + def reinvest(self, reinvest): + """Sets the reinvest of this FixedTermProductInfo. + + Whether auto-renewal is supported: 0 for not supported, 1 for supported # noqa: E501 + + :param reinvest: The reinvest of this FixedTermProductInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and reinvest is None: # noqa: E501 + raise ValueError("Invalid value for `reinvest`, must not be `None`") # noqa: E501 + + self._reinvest = reinvest + + @property + def redeem_account(self): + """Gets the redeem_account of this FixedTermProductInfo. # noqa: E501 + + Redemption payout account type # noqa: E501 + + :return: The redeem_account of this FixedTermProductInfo. # noqa: E501 + :rtype: int + """ + return self._redeem_account + + @redeem_account.setter + def redeem_account(self, redeem_account): + """Sets the redeem_account of this FixedTermProductInfo. + + Redemption payout account type # noqa: E501 + + :param redeem_account: The redeem_account of this FixedTermProductInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and redeem_account is None: # noqa: E501 + raise ValueError("Invalid value for `redeem_account`, must not be `None`") # noqa: E501 + + self._redeem_account = redeem_account + + @property + def min_vip(self): + """Gets the min_vip of this FixedTermProductInfo. # noqa: E501 + + Minimum VIP level requirement, 0 means no restriction # noqa: E501 + + :return: The min_vip of this FixedTermProductInfo. # noqa: E501 + :rtype: int + """ + return self._min_vip + + @min_vip.setter + def min_vip(self, min_vip): + """Sets the min_vip of this FixedTermProductInfo. + + Minimum VIP level requirement, 0 means no restriction # noqa: E501 + + :param min_vip: The min_vip of this FixedTermProductInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and min_vip is None: # noqa: E501 + raise ValueError("Invalid value for `min_vip`, must not be `None`") # noqa: E501 + + self._min_vip = min_vip + + @property + def max_vip(self): + """Gets the max_vip of this FixedTermProductInfo. # noqa: E501 + + Maximum VIP level requirement, 0 means no restriction # noqa: E501 + + :return: The max_vip of this FixedTermProductInfo. # noqa: E501 + :rtype: int + """ + return self._max_vip + + @max_vip.setter + def max_vip(self, max_vip): + """Sets the max_vip of this FixedTermProductInfo. + + Maximum VIP level requirement, 0 means no restriction # noqa: E501 + + :param max_vip: The max_vip of this FixedTermProductInfo. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and max_vip is None: # noqa: E501 + raise ValueError("Invalid value for `max_vip`, must not be `None`") # noqa: E501 + + self._max_vip = max_vip + + 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, FixedTermProductInfo): + 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, FixedTermProductInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fixed_term_product_simple.py b/gate_api/models/fixed_term_product_simple.py new file mode 100644 index 00000000..a34dda56 --- /dev/null +++ b/gate_api/models/fixed_term_product_simple.py @@ -0,0 +1,403 @@ +# 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 FixedTermProductSimple(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', + 'asset': 'str', + 'lock_up_period': 'int', + 'year_rate': 'str', + 'type': 'int', + 'pre_redeem': 'int', + 'reinvest': 'int', + 'simple_earn': 'int', + 'min_vip': 'int', + 'max_vip': 'int', + 'sale_status': 'int' + } + + attribute_map = { + 'id': 'id', + 'asset': 'asset', + 'lock_up_period': 'lock_up_period', + 'year_rate': 'year_rate', + 'type': 'type', + 'pre_redeem': 'pre_redeem', + 'reinvest': 'reinvest', + 'simple_earn': 'simple_earn', + 'min_vip': 'min_vip', + 'max_vip': 'max_vip', + 'sale_status': 'sale_status' + } + + def __init__(self, id=None, asset=None, lock_up_period=None, year_rate=None, type=None, pre_redeem=None, reinvest=None, simple_earn=None, min_vip=None, max_vip=None, sale_status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, str, int, int, int, int, int, int, int, Configuration) -> None + """FixedTermProductSimple - 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._asset = None + self._lock_up_period = None + self._year_rate = None + self._type = None + self._pre_redeem = None + self._reinvest = None + self._simple_earn = None + self._min_vip = None + self._max_vip = None + self._sale_status = None + self.discriminator = None + + if id is not None: + self.id = id + if asset is not None: + self.asset = asset + if lock_up_period is not None: + self.lock_up_period = lock_up_period + if year_rate is not None: + self.year_rate = year_rate + if type is not None: + self.type = type + if pre_redeem is not None: + self.pre_redeem = pre_redeem + if reinvest is not None: + self.reinvest = reinvest + if simple_earn is not None: + self.simple_earn = simple_earn + if min_vip is not None: + self.min_vip = min_vip + if max_vip is not None: + self.max_vip = max_vip + if sale_status is not None: + self.sale_status = sale_status + + @property + def id(self): + """Gets the id of this FixedTermProductSimple. # noqa: E501 + + Product ID # noqa: E501 + + :return: The id of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FixedTermProductSimple. + + Product ID # noqa: E501 + + :param id: The id of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def asset(self): + """Gets the asset of this FixedTermProductSimple. # noqa: E501 + + Currency # noqa: E501 + + :return: The asset of this FixedTermProductSimple. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this FixedTermProductSimple. + + Currency # noqa: E501 + + :param asset: The asset of this FixedTermProductSimple. # noqa: E501 + :type: str + """ + + self._asset = asset + + @property + def lock_up_period(self): + """Gets the lock_up_period of this FixedTermProductSimple. # noqa: E501 + + Lock-up period (in days) # noqa: E501 + + :return: The lock_up_period of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._lock_up_period + + @lock_up_period.setter + def lock_up_period(self, lock_up_period): + """Sets the lock_up_period of this FixedTermProductSimple. + + Lock-up period (in days) # noqa: E501 + + :param lock_up_period: The lock_up_period of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._lock_up_period = lock_up_period + + @property + def year_rate(self): + """Gets the year_rate of this FixedTermProductSimple. # noqa: E501 + + Annual interest rate # noqa: E501 + + :return: The year_rate of this FixedTermProductSimple. # noqa: E501 + :rtype: str + """ + return self._year_rate + + @year_rate.setter + def year_rate(self, year_rate): + """Sets the year_rate of this FixedTermProductSimple. + + Annual interest rate # noqa: E501 + + :param year_rate: The year_rate of this FixedTermProductSimple. # noqa: E501 + :type: str + """ + + self._year_rate = year_rate + + @property + def type(self): + """Gets the type of this FixedTermProductSimple. # noqa: E501 + + Product type: 1 for regular, 2 for VIP # noqa: E501 + + :return: The type of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this FixedTermProductSimple. + + Product type: 1 for regular, 2 for VIP # noqa: E501 + + :param type: The type of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._type = type + + @property + def pre_redeem(self): + """Gets the pre_redeem of this FixedTermProductSimple. # noqa: E501 + + Whether early redemption is supported: 0 for not supported, 1 for supported # noqa: E501 + + :return: The pre_redeem of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._pre_redeem + + @pre_redeem.setter + def pre_redeem(self, pre_redeem): + """Sets the pre_redeem of this FixedTermProductSimple. + + Whether early redemption is supported: 0 for not supported, 1 for supported # noqa: E501 + + :param pre_redeem: The pre_redeem of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._pre_redeem = pre_redeem + + @property + def reinvest(self): + """Gets the reinvest of this FixedTermProductSimple. # noqa: E501 + + Whether auto-renewal is supported: 0 for not supported, 1 for supported # noqa: E501 + + :return: The reinvest of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._reinvest + + @reinvest.setter + def reinvest(self, reinvest): + """Sets the reinvest of this FixedTermProductSimple. + + Whether auto-renewal is supported: 0 for not supported, 1 for supported # noqa: E501 + + :param reinvest: The reinvest of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._reinvest = reinvest + + @property + def simple_earn(self): + """Gets the simple_earn of this FixedTermProductSimple. # noqa: E501 + + Whether fixed-to-flexible conversion is supported: 0 for not supported, 1 for supported # noqa: E501 + + :return: The simple_earn of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._simple_earn + + @simple_earn.setter + def simple_earn(self, simple_earn): + """Sets the simple_earn of this FixedTermProductSimple. + + Whether fixed-to-flexible conversion is supported: 0 for not supported, 1 for supported # noqa: E501 + + :param simple_earn: The simple_earn of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._simple_earn = simple_earn + + @property + def min_vip(self): + """Gets the min_vip of this FixedTermProductSimple. # noqa: E501 + + Minimum VIP level requirement, 0 means no restriction # noqa: E501 + + :return: The min_vip of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._min_vip + + @min_vip.setter + def min_vip(self, min_vip): + """Sets the min_vip of this FixedTermProductSimple. + + Minimum VIP level requirement, 0 means no restriction # noqa: E501 + + :param min_vip: The min_vip of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._min_vip = min_vip + + @property + def max_vip(self): + """Gets the max_vip of this FixedTermProductSimple. # noqa: E501 + + Maximum VIP level requirement, 0 means no restriction # noqa: E501 + + :return: The max_vip of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._max_vip + + @max_vip.setter + def max_vip(self, max_vip): + """Sets the max_vip of this FixedTermProductSimple. + + Maximum VIP level requirement, 0 means no restriction # noqa: E501 + + :param max_vip: The max_vip of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._max_vip = max_vip + + @property + def sale_status(self): + """Gets the sale_status of this FixedTermProductSimple. # noqa: E501 + + Sale status: 1 for on sale, 2 for sold out # noqa: E501 + + :return: The sale_status of this FixedTermProductSimple. # noqa: E501 + :rtype: int + """ + return self._sale_status + + @sale_status.setter + def sale_status(self, sale_status): + """Sets the sale_status of this FixedTermProductSimple. + + Sale status: 1 for on sale, 2 for sold out # noqa: E501 + + :param sale_status: The sale_status of this FixedTermProductSimple. # noqa: E501 + :type: int + """ + + self._sale_status = sale_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, FixedTermProductSimple): + 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, FixedTermProductSimple): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2008.py b/gate_api/models/flash_swap_error_response.py similarity index 80% rename from gate_api/models/inline_response2008.py rename to gate_api/models/flash_swap_error_response.py index 2c9f85cd..f7a8b2a9 100644 --- a/gate_api/models/inline_response2008.py +++ b/gate_api/models/flash_swap_error_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2008(object): +class FlashSwapErrorResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse2008(object): def __init__(self, code=None, message=None, local_vars_configuration=None): # noqa: E501 # type: (int, str, Configuration) -> None - """InlineResponse2008 - a model defined in OpenAPI""" # noqa: E501 + """FlashSwapErrorResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,20 +58,22 @@ def __init__(self, code=None, message=None, local_vars_configuration=None): # n @property def code(self): - """Gets the code of this InlineResponse2008. # noqa: E501 + """Gets the code of this FlashSwapErrorResponse. # noqa: E501 + Error code # noqa: E501 - :return: The code of this InlineResponse2008. # noqa: E501 + :return: The code of this FlashSwapErrorResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse2008. + """Sets the code of this FlashSwapErrorResponse. + Error code # noqa: E501 - :param code: The code of this InlineResponse2008. # noqa: E501 + :param code: The code of this FlashSwapErrorResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 @@ -81,20 +83,22 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse2008. # noqa: E501 + """Gets the message of this FlashSwapErrorResponse. # noqa: E501 + Error message # noqa: E501 - :return: The message of this InlineResponse2008. # noqa: E501 + :return: The message of this FlashSwapErrorResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse2008. + """Sets the message of this FlashSwapErrorResponse. + Error message # noqa: E501 - :param message: The message of this InlineResponse2008. # noqa: E501 + :param message: The message of this FlashSwapErrorResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 @@ -136,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2008): + if not isinstance(other, FlashSwapErrorResponse): 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, InlineResponse2008): + if not isinstance(other, FlashSwapErrorResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_create_param.py b/gate_api/models/flash_swap_multi_currency_create_param.py new file mode 100644 index 00000000..6815042d --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_create_param.py @@ -0,0 +1,211 @@ +# 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 FlashSwapMultiCurrencyCreateParam(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 = { + 'sell_asset': 'str', + 'sell_amount': 'str', + 'buy_asset': 'str', + 'buy_amount': 'str' + } + + attribute_map = { + 'sell_asset': 'sell_asset', + 'sell_amount': 'sell_amount', + 'buy_asset': 'buy_asset', + 'buy_amount': 'buy_amount' + } + + def __init__(self, sell_asset=None, sell_amount=None, buy_asset=None, buy_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """FlashSwapMultiCurrencyCreateParam - 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._sell_asset = None + self._sell_amount = None + self._buy_asset = None + self._buy_amount = None + self.discriminator = None + + self.sell_asset = sell_asset + self.sell_amount = sell_amount + self.buy_asset = buy_asset + self.buy_amount = buy_amount + + @property + def sell_asset(self): + """Gets the sell_asset of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + + Currency to sell # noqa: E501 + + :return: The sell_asset of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + :rtype: str + """ + return self._sell_asset + + @sell_asset.setter + def sell_asset(self, sell_asset): + """Sets the sell_asset of this FlashSwapMultiCurrencyCreateParam. + + Currency to sell # noqa: E501 + + :param sell_asset: The sell_asset of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sell_asset is None: # noqa: E501 + raise ValueError("Invalid value for `sell_asset`, must not be `None`") # noqa: E501 + + self._sell_asset = sell_asset + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + + Sell amount # noqa: E501 + + :return: The sell_amount of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapMultiCurrencyCreateParam. + + Sell amount # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sell_amount is None: # noqa: E501 + raise ValueError("Invalid value for `sell_amount`, must not be `None`") # noqa: E501 + + self._sell_amount = sell_amount + + @property + def buy_asset(self): + """Gets the buy_asset of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + + Currency to buy # noqa: E501 + + :return: The buy_asset of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + :rtype: str + """ + return self._buy_asset + + @buy_asset.setter + def buy_asset(self, buy_asset): + """Sets the buy_asset of this FlashSwapMultiCurrencyCreateParam. + + Currency to buy # noqa: E501 + + :param buy_asset: The buy_asset of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_asset is None: # noqa: E501 + raise ValueError("Invalid value for `buy_asset`, must not be `None`") # noqa: E501 + + self._buy_asset = buy_asset + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + + Buy amount # noqa: E501 + + :return: The buy_amount of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapMultiCurrencyCreateParam. + + Buy amount # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapMultiCurrencyCreateParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_amount is None: # noqa: E501 + raise ValueError("Invalid value for `buy_amount`, must not be `None`") # noqa: E501 + + self._buy_amount = buy_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, FlashSwapMultiCurrencyCreateParam): + 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, FlashSwapMultiCurrencyCreateParam): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_req.py b/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_req.py new file mode 100644 index 00000000..fb432492 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_req.py @@ -0,0 +1,124 @@ +# 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 FlashSwapMultiCurrencyManyToOneOrderCreateReq(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 = { + 'params': 'list[FlashSwapMultiCurrencyCreateParam]' + } + + attribute_map = { + 'params': 'params' + } + + def __init__(self, params=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FlashSwapMultiCurrencyCreateParam], Configuration) -> None + """FlashSwapMultiCurrencyManyToOneOrderCreateReq - 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._params = None + self.discriminator = None + + self.params = params + + @property + def params(self): + """Gets the params of this FlashSwapMultiCurrencyManyToOneOrderCreateReq. # noqa: E501 + + Multi-currency exchange parameter list # noqa: E501 + + :return: The params of this FlashSwapMultiCurrencyManyToOneOrderCreateReq. # noqa: E501 + :rtype: list[FlashSwapMultiCurrencyCreateParam] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this FlashSwapMultiCurrencyManyToOneOrderCreateReq. + + Multi-currency exchange parameter list # noqa: E501 + + :param params: The params of this FlashSwapMultiCurrencyManyToOneOrderCreateReq. # noqa: E501 + :type: list[FlashSwapMultiCurrencyCreateParam] + """ + if self.local_vars_configuration.client_side_validation and params is None: # noqa: E501 + raise ValueError("Invalid value for `params`, must not be `None`") # noqa: E501 + + self._params = params + + 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, FlashSwapMultiCurrencyManyToOneOrderCreateReq): + 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, FlashSwapMultiCurrencyManyToOneOrderCreateReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_resp.py b/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_resp.py new file mode 100644 index 00000000..0c675911 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_resp.py @@ -0,0 +1,208 @@ +# 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 FlashSwapMultiCurrencyManyToOneOrderCreateResp(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'FlashSwapMultiCurrencyManyToOneOrderCreateRespData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, FlashSwapMultiCurrencyManyToOneOrderCreateRespData, int, Configuration) -> None + """FlashSwapMultiCurrencyManyToOneOrderCreateResp - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + + Response code, 0 means success # noqa: E501 + + :return: The code of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. + + Response code, 0 means success # noqa: E501 + + :param code: The code of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. + + Response message # noqa: E501 + + :param message: The message of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + + + :return: The data of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + :rtype: FlashSwapMultiCurrencyManyToOneOrderCreateRespData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. + + + :param data: The data of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + :type: FlashSwapMultiCurrencyManyToOneOrderCreateRespData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + + Response timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. + + Response timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this FlashSwapMultiCurrencyManyToOneOrderCreateResp. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, FlashSwapMultiCurrencyManyToOneOrderCreateResp): + 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, FlashSwapMultiCurrencyManyToOneOrderCreateResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_resp_data.py b/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_resp_data.py new file mode 100644 index 00000000..9c0cc892 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_many_to_one_order_create_resp_data.py @@ -0,0 +1,211 @@ +# 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 FlashSwapMultiCurrencyManyToOneOrderCreateRespData(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 = { + 'orders': 'list[FlashSwapMultiCurrencyOrder]', + 'account_mode': 'int', + 'exchange_time_ms': 'int', + 'total_acquire_amount': 'str' + } + + attribute_map = { + 'orders': 'orders', + 'account_mode': 'account_mode', + 'exchange_time_ms': 'exchange_time_ms', + 'total_acquire_amount': 'total_acquire_amount' + } + + def __init__(self, orders=None, account_mode=None, exchange_time_ms=None, total_acquire_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FlashSwapMultiCurrencyOrder], int, int, str, Configuration) -> None + """FlashSwapMultiCurrencyManyToOneOrderCreateRespData - 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._orders = None + self._account_mode = None + self._exchange_time_ms = None + self._total_acquire_amount = None + self.discriminator = None + + self.orders = orders + self.account_mode = account_mode + self.exchange_time_ms = exchange_time_ms + self.total_acquire_amount = total_acquire_amount + + @property + def orders(self): + """Gets the orders of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + + Order list # noqa: E501 + + :return: The orders of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + :rtype: list[FlashSwapMultiCurrencyOrder] + """ + return self._orders + + @orders.setter + def orders(self, orders): + """Sets the orders of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. + + Order list # noqa: E501 + + :param orders: The orders of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + :type: list[FlashSwapMultiCurrencyOrder] + """ + if self.local_vars_configuration.client_side_validation and orders is None: # noqa: E501 + raise ValueError("Invalid value for `orders`, must not be `None`") # noqa: E501 + + self._orders = orders + + @property + def account_mode(self): + """Gets the account_mode of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + + Account Mode # noqa: E501 + + :return: The account_mode of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._account_mode + + @account_mode.setter + def account_mode(self, account_mode): + """Sets the account_mode of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. + + Account Mode # noqa: E501 + + :param account_mode: The account_mode of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and account_mode is None: # noqa: E501 + raise ValueError("Invalid value for `account_mode`, must not be `None`") # noqa: E501 + + self._account_mode = account_mode + + @property + def exchange_time_ms(self): + """Gets the exchange_time_ms of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + + Exchange timestamp (in milliseconds) # noqa: E501 + + :return: The exchange_time_ms of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._exchange_time_ms + + @exchange_time_ms.setter + def exchange_time_ms(self, exchange_time_ms): + """Sets the exchange_time_ms of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. + + Exchange timestamp (in milliseconds) # noqa: E501 + + :param exchange_time_ms: The exchange_time_ms of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and exchange_time_ms is None: # noqa: E501 + raise ValueError("Invalid value for `exchange_time_ms`, must not be `None`") # noqa: E501 + + self._exchange_time_ms = exchange_time_ms + + @property + def total_acquire_amount(self): + """Gets the total_acquire_amount of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + + Total amount received # noqa: E501 + + :return: The total_acquire_amount of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._total_acquire_amount + + @total_acquire_amount.setter + def total_acquire_amount(self, total_acquire_amount): + """Sets the total_acquire_amount of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. + + Total amount received # noqa: E501 + + :param total_acquire_amount: The total_acquire_amount of this FlashSwapMultiCurrencyManyToOneOrderCreateRespData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_acquire_amount is None: # noqa: E501 + raise ValueError("Invalid value for `total_acquire_amount`, must not be `None`") # noqa: E501 + + self._total_acquire_amount = total_acquire_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, FlashSwapMultiCurrencyManyToOneOrderCreateRespData): + 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, FlashSwapMultiCurrencyManyToOneOrderCreateRespData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_req.py b/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_req.py new file mode 100644 index 00000000..6513f9a2 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_req.py @@ -0,0 +1,124 @@ +# 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 FlashSwapMultiCurrencyManyToOneOrderPreviewReq(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 = { + 'params': 'list[FlashSwapMultiCurrencyPreviewParam]' + } + + attribute_map = { + 'params': 'params' + } + + def __init__(self, params=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FlashSwapMultiCurrencyPreviewParam], Configuration) -> None + """FlashSwapMultiCurrencyManyToOneOrderPreviewReq - 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._params = None + self.discriminator = None + + self.params = params + + @property + def params(self): + """Gets the params of this FlashSwapMultiCurrencyManyToOneOrderPreviewReq. # noqa: E501 + + Multi-currency exchange preview parameter list # noqa: E501 + + :return: The params of this FlashSwapMultiCurrencyManyToOneOrderPreviewReq. # noqa: E501 + :rtype: list[FlashSwapMultiCurrencyPreviewParam] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this FlashSwapMultiCurrencyManyToOneOrderPreviewReq. + + Multi-currency exchange preview parameter list # noqa: E501 + + :param params: The params of this FlashSwapMultiCurrencyManyToOneOrderPreviewReq. # noqa: E501 + :type: list[FlashSwapMultiCurrencyPreviewParam] + """ + if self.local_vars_configuration.client_side_validation and params is None: # noqa: E501 + raise ValueError("Invalid value for `params`, must not be `None`") # noqa: E501 + + self._params = params + + 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, FlashSwapMultiCurrencyManyToOneOrderPreviewReq): + 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, FlashSwapMultiCurrencyManyToOneOrderPreviewReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_resp.py b/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_resp.py new file mode 100644 index 00000000..782a6bba --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_resp.py @@ -0,0 +1,208 @@ +# 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 FlashSwapMultiCurrencyManyToOneOrderPreviewResp(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'FlashSwapMultiCurrencyManyToOneOrderPreviewRespData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, FlashSwapMultiCurrencyManyToOneOrderPreviewRespData, int, Configuration) -> None + """FlashSwapMultiCurrencyManyToOneOrderPreviewResp - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + + Response code, 0 means success # noqa: E501 + + :return: The code of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. + + Response code, 0 means success # noqa: E501 + + :param code: The code of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. + + Response message # noqa: E501 + + :param message: The message of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + + + :return: The data of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + :rtype: FlashSwapMultiCurrencyManyToOneOrderPreviewRespData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. + + + :param data: The data of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + :type: FlashSwapMultiCurrencyManyToOneOrderPreviewRespData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + + Response timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. + + Response timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this FlashSwapMultiCurrencyManyToOneOrderPreviewResp. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, FlashSwapMultiCurrencyManyToOneOrderPreviewResp): + 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, FlashSwapMultiCurrencyManyToOneOrderPreviewResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_resp_data.py b/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_resp_data.py new file mode 100644 index 00000000..4a906df5 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_many_to_one_order_preview_resp_data.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 FlashSwapMultiCurrencyManyToOneOrderPreviewRespData(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 = { + 'orders': 'list[FlashSwapMultiCurrencyPreviewOrder]', + 'total_acquire_amount': 'str' + } + + attribute_map = { + 'orders': 'orders', + 'total_acquire_amount': 'total_acquire_amount' + } + + def __init__(self, orders=None, total_acquire_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FlashSwapMultiCurrencyPreviewOrder], str, Configuration) -> None + """FlashSwapMultiCurrencyManyToOneOrderPreviewRespData - 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._orders = None + self._total_acquire_amount = None + self.discriminator = None + + self.orders = orders + self.total_acquire_amount = total_acquire_amount + + @property + def orders(self): + """Gets the orders of this FlashSwapMultiCurrencyManyToOneOrderPreviewRespData. # noqa: E501 + + Preview order list # noqa: E501 + + :return: The orders of this FlashSwapMultiCurrencyManyToOneOrderPreviewRespData. # noqa: E501 + :rtype: list[FlashSwapMultiCurrencyPreviewOrder] + """ + return self._orders + + @orders.setter + def orders(self, orders): + """Sets the orders of this FlashSwapMultiCurrencyManyToOneOrderPreviewRespData. + + Preview order list # noqa: E501 + + :param orders: The orders of this FlashSwapMultiCurrencyManyToOneOrderPreviewRespData. # noqa: E501 + :type: list[FlashSwapMultiCurrencyPreviewOrder] + """ + if self.local_vars_configuration.client_side_validation and orders is None: # noqa: E501 + raise ValueError("Invalid value for `orders`, must not be `None`") # noqa: E501 + + self._orders = orders + + @property + def total_acquire_amount(self): + """Gets the total_acquire_amount of this FlashSwapMultiCurrencyManyToOneOrderPreviewRespData. # noqa: E501 + + Total amount received # noqa: E501 + + :return: The total_acquire_amount of this FlashSwapMultiCurrencyManyToOneOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._total_acquire_amount + + @total_acquire_amount.setter + def total_acquire_amount(self, total_acquire_amount): + """Sets the total_acquire_amount of this FlashSwapMultiCurrencyManyToOneOrderPreviewRespData. + + Total amount received # noqa: E501 + + :param total_acquire_amount: The total_acquire_amount of this FlashSwapMultiCurrencyManyToOneOrderPreviewRespData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_acquire_amount is None: # noqa: E501 + raise ValueError("Invalid value for `total_acquire_amount`, must not be `None`") # noqa: E501 + + self._total_acquire_amount = total_acquire_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, FlashSwapMultiCurrencyManyToOneOrderPreviewRespData): + 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, FlashSwapMultiCurrencyManyToOneOrderPreviewRespData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_req.py b/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_req.py new file mode 100644 index 00000000..0cca585a --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_req.py @@ -0,0 +1,124 @@ +# 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 FlashSwapMultiCurrencyOneToManyOrderCreateReq(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 = { + 'params': 'list[FlashSwapMultiCurrencyCreateParam]' + } + + attribute_map = { + 'params': 'params' + } + + def __init__(self, params=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FlashSwapMultiCurrencyCreateParam], Configuration) -> None + """FlashSwapMultiCurrencyOneToManyOrderCreateReq - 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._params = None + self.discriminator = None + + self.params = params + + @property + def params(self): + """Gets the params of this FlashSwapMultiCurrencyOneToManyOrderCreateReq. # noqa: E501 + + Multi-currency exchange parameter list # noqa: E501 + + :return: The params of this FlashSwapMultiCurrencyOneToManyOrderCreateReq. # noqa: E501 + :rtype: list[FlashSwapMultiCurrencyCreateParam] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this FlashSwapMultiCurrencyOneToManyOrderCreateReq. + + Multi-currency exchange parameter list # noqa: E501 + + :param params: The params of this FlashSwapMultiCurrencyOneToManyOrderCreateReq. # noqa: E501 + :type: list[FlashSwapMultiCurrencyCreateParam] + """ + if self.local_vars_configuration.client_side_validation and params is None: # noqa: E501 + raise ValueError("Invalid value for `params`, must not be `None`") # noqa: E501 + + self._params = params + + 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, FlashSwapMultiCurrencyOneToManyOrderCreateReq): + 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, FlashSwapMultiCurrencyOneToManyOrderCreateReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_resp.py b/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_resp.py new file mode 100644 index 00000000..e15fab26 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_resp.py @@ -0,0 +1,208 @@ +# 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 FlashSwapMultiCurrencyOneToManyOrderCreateResp(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'FlashSwapMultiCurrencyOneToManyOrderCreateRespData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, FlashSwapMultiCurrencyOneToManyOrderCreateRespData, int, Configuration) -> None + """FlashSwapMultiCurrencyOneToManyOrderCreateResp - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + + Response code, 0 means success # noqa: E501 + + :return: The code of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. + + Response code, 0 means success # noqa: E501 + + :param code: The code of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. + + Response message # noqa: E501 + + :param message: The message of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + + + :return: The data of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + :rtype: FlashSwapMultiCurrencyOneToManyOrderCreateRespData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. + + + :param data: The data of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + :type: FlashSwapMultiCurrencyOneToManyOrderCreateRespData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + + Response timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. + + Response timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this FlashSwapMultiCurrencyOneToManyOrderCreateResp. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, FlashSwapMultiCurrencyOneToManyOrderCreateResp): + 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, FlashSwapMultiCurrencyOneToManyOrderCreateResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_resp_data.py b/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_resp_data.py new file mode 100644 index 00000000..624b9fd7 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_one_to_many_order_create_resp_data.py @@ -0,0 +1,240 @@ +# 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 FlashSwapMultiCurrencyOneToManyOrderCreateRespData(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 = { + 'orders': 'list[FlashSwapMultiCurrencyOrder]', + 'account_mode': 'int', + 'exchange_time_ms': 'int', + 'total_consume_amount': 'str', + 'total_acquire_amount': 'str' + } + + attribute_map = { + 'orders': 'orders', + 'account_mode': 'account_mode', + 'exchange_time_ms': 'exchange_time_ms', + 'total_consume_amount': 'total_consume_amount', + 'total_acquire_amount': 'total_acquire_amount' + } + + def __init__(self, orders=None, account_mode=None, exchange_time_ms=None, total_consume_amount=None, total_acquire_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FlashSwapMultiCurrencyOrder], int, int, str, str, Configuration) -> None + """FlashSwapMultiCurrencyOneToManyOrderCreateRespData - 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._orders = None + self._account_mode = None + self._exchange_time_ms = None + self._total_consume_amount = None + self._total_acquire_amount = None + self.discriminator = None + + self.orders = orders + self.account_mode = account_mode + self.exchange_time_ms = exchange_time_ms + self.total_consume_amount = total_consume_amount + self.total_acquire_amount = total_acquire_amount + + @property + def orders(self): + """Gets the orders of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + + Order list # noqa: E501 + + :return: The orders of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :rtype: list[FlashSwapMultiCurrencyOrder] + """ + return self._orders + + @orders.setter + def orders(self, orders): + """Sets the orders of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. + + Order list # noqa: E501 + + :param orders: The orders of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :type: list[FlashSwapMultiCurrencyOrder] + """ + if self.local_vars_configuration.client_side_validation and orders is None: # noqa: E501 + raise ValueError("Invalid value for `orders`, must not be `None`") # noqa: E501 + + self._orders = orders + + @property + def account_mode(self): + """Gets the account_mode of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + + Account Mode # noqa: E501 + + :return: The account_mode of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._account_mode + + @account_mode.setter + def account_mode(self, account_mode): + """Sets the account_mode of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. + + Account Mode # noqa: E501 + + :param account_mode: The account_mode of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and account_mode is None: # noqa: E501 + raise ValueError("Invalid value for `account_mode`, must not be `None`") # noqa: E501 + + self._account_mode = account_mode + + @property + def exchange_time_ms(self): + """Gets the exchange_time_ms of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + + Exchange timestamp (in milliseconds) # noqa: E501 + + :return: The exchange_time_ms of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._exchange_time_ms + + @exchange_time_ms.setter + def exchange_time_ms(self, exchange_time_ms): + """Sets the exchange_time_ms of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. + + Exchange timestamp (in milliseconds) # noqa: E501 + + :param exchange_time_ms: The exchange_time_ms of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and exchange_time_ms is None: # noqa: E501 + raise ValueError("Invalid value for `exchange_time_ms`, must not be `None`") # noqa: E501 + + self._exchange_time_ms = exchange_time_ms + + @property + def total_consume_amount(self): + """Gets the total_consume_amount of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + + Total consumed amount # noqa: E501 + + :return: The total_consume_amount of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._total_consume_amount + + @total_consume_amount.setter + def total_consume_amount(self, total_consume_amount): + """Sets the total_consume_amount of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. + + Total consumed amount # noqa: E501 + + :param total_consume_amount: The total_consume_amount of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_consume_amount is None: # noqa: E501 + raise ValueError("Invalid value for `total_consume_amount`, must not be `None`") # noqa: E501 + + self._total_consume_amount = total_consume_amount + + @property + def total_acquire_amount(self): + """Gets the total_acquire_amount of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + + Total amount received # noqa: E501 + + :return: The total_acquire_amount of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._total_acquire_amount + + @total_acquire_amount.setter + def total_acquire_amount(self, total_acquire_amount): + """Sets the total_acquire_amount of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. + + Total amount received # noqa: E501 + + :param total_acquire_amount: The total_acquire_amount of this FlashSwapMultiCurrencyOneToManyOrderCreateRespData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_acquire_amount is None: # noqa: E501 + raise ValueError("Invalid value for `total_acquire_amount`, must not be `None`") # noqa: E501 + + self._total_acquire_amount = total_acquire_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, FlashSwapMultiCurrencyOneToManyOrderCreateRespData): + 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, FlashSwapMultiCurrencyOneToManyOrderCreateRespData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_req.py b/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_req.py new file mode 100644 index 00000000..88283124 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_req.py @@ -0,0 +1,124 @@ +# 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 FlashSwapMultiCurrencyOneToManyOrderPreviewReq(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 = { + 'params': 'list[FlashSwapMultiCurrencyPreviewParam]' + } + + attribute_map = { + 'params': 'params' + } + + def __init__(self, params=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FlashSwapMultiCurrencyPreviewParam], Configuration) -> None + """FlashSwapMultiCurrencyOneToManyOrderPreviewReq - 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._params = None + self.discriminator = None + + self.params = params + + @property + def params(self): + """Gets the params of this FlashSwapMultiCurrencyOneToManyOrderPreviewReq. # noqa: E501 + + Multi-currency exchange preview parameter list # noqa: E501 + + :return: The params of this FlashSwapMultiCurrencyOneToManyOrderPreviewReq. # noqa: E501 + :rtype: list[FlashSwapMultiCurrencyPreviewParam] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this FlashSwapMultiCurrencyOneToManyOrderPreviewReq. + + Multi-currency exchange preview parameter list # noqa: E501 + + :param params: The params of this FlashSwapMultiCurrencyOneToManyOrderPreviewReq. # noqa: E501 + :type: list[FlashSwapMultiCurrencyPreviewParam] + """ + if self.local_vars_configuration.client_side_validation and params is None: # noqa: E501 + raise ValueError("Invalid value for `params`, must not be `None`") # noqa: E501 + + self._params = params + + 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, FlashSwapMultiCurrencyOneToManyOrderPreviewReq): + 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, FlashSwapMultiCurrencyOneToManyOrderPreviewReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_resp.py b/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_resp.py new file mode 100644 index 00000000..ae9cb00d --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_resp.py @@ -0,0 +1,208 @@ +# 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 FlashSwapMultiCurrencyOneToManyOrderPreviewResp(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'FlashSwapMultiCurrencyOneToManyOrderPreviewRespData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, FlashSwapMultiCurrencyOneToManyOrderPreviewRespData, int, Configuration) -> None + """FlashSwapMultiCurrencyOneToManyOrderPreviewResp - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + + Response code, 0 means success # noqa: E501 + + :return: The code of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. + + Response code, 0 means success # noqa: E501 + + :param code: The code of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. + + Response message # noqa: E501 + + :param message: The message of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + + + :return: The data of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + :rtype: FlashSwapMultiCurrencyOneToManyOrderPreviewRespData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. + + + :param data: The data of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + :type: FlashSwapMultiCurrencyOneToManyOrderPreviewRespData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + + Response timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. + + Response timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this FlashSwapMultiCurrencyOneToManyOrderPreviewResp. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, FlashSwapMultiCurrencyOneToManyOrderPreviewResp): + 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, FlashSwapMultiCurrencyOneToManyOrderPreviewResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_resp_data.py b/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_resp_data.py new file mode 100644 index 00000000..66c34532 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_one_to_many_order_preview_resp_data.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 FlashSwapMultiCurrencyOneToManyOrderPreviewRespData(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 = { + 'orders': 'list[FlashSwapMultiCurrencyPreviewOrder]', + 'total_consume_amount': 'str', + 'total_acquire_amount': 'str' + } + + attribute_map = { + 'orders': 'orders', + 'total_consume_amount': 'total_consume_amount', + 'total_acquire_amount': 'total_acquire_amount' + } + + def __init__(self, orders=None, total_consume_amount=None, total_acquire_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FlashSwapMultiCurrencyPreviewOrder], str, str, Configuration) -> None + """FlashSwapMultiCurrencyOneToManyOrderPreviewRespData - 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._orders = None + self._total_consume_amount = None + self._total_acquire_amount = None + self.discriminator = None + + self.orders = orders + self.total_consume_amount = total_consume_amount + self.total_acquire_amount = total_acquire_amount + + @property + def orders(self): + """Gets the orders of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + + Preview order list # noqa: E501 + + :return: The orders of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + :rtype: list[FlashSwapMultiCurrencyPreviewOrder] + """ + return self._orders + + @orders.setter + def orders(self, orders): + """Sets the orders of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. + + Preview order list # noqa: E501 + + :param orders: The orders of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + :type: list[FlashSwapMultiCurrencyPreviewOrder] + """ + if self.local_vars_configuration.client_side_validation and orders is None: # noqa: E501 + raise ValueError("Invalid value for `orders`, must not be `None`") # noqa: E501 + + self._orders = orders + + @property + def total_consume_amount(self): + """Gets the total_consume_amount of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + + Total consumed amount # noqa: E501 + + :return: The total_consume_amount of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._total_consume_amount + + @total_consume_amount.setter + def total_consume_amount(self, total_consume_amount): + """Sets the total_consume_amount of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. + + Total consumed amount # noqa: E501 + + :param total_consume_amount: The total_consume_amount of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_consume_amount is None: # noqa: E501 + raise ValueError("Invalid value for `total_consume_amount`, must not be `None`") # noqa: E501 + + self._total_consume_amount = total_consume_amount + + @property + def total_acquire_amount(self): + """Gets the total_acquire_amount of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + + Total amount received # noqa: E501 + + :return: The total_acquire_amount of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._total_acquire_amount + + @total_acquire_amount.setter + def total_acquire_amount(self, total_acquire_amount): + """Sets the total_acquire_amount of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. + + Total amount received # noqa: E501 + + :param total_acquire_amount: The total_acquire_amount of this FlashSwapMultiCurrencyOneToManyOrderPreviewRespData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_acquire_amount is None: # noqa: E501 + raise ValueError("Invalid value for `total_acquire_amount`, must not be `None`") # noqa: E501 + + self._total_acquire_amount = total_acquire_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, FlashSwapMultiCurrencyOneToManyOrderPreviewRespData): + 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, FlashSwapMultiCurrencyOneToManyOrderPreviewRespData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_order.py b/gate_api/models/flash_swap_multi_currency_order.py new file mode 100644 index 00000000..7afb5da9 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_order.py @@ -0,0 +1,626 @@ +# 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 FlashSwapMultiCurrencyOrder(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', + 'user_id': 'int', + 'source': 'str', + 'app_id': 'str', + 'client_req_id': 'str', + 'sell_asset': 'str', + 'sell_amount': 'str', + 'sell_amount_show': 'str', + 'buy_asset': 'str', + 'buy_amount': 'str', + 'buy_amount_show': 'str', + 'price': 'str', + 'status': 'int', + 'quote_id': 'str', + 'failed_code': 'int', + 'failed_reason': 'str', + 'create_time': 'str', + 'create_time_ms': 'int', + 'error': 'ErrCodeMsg' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'user_id', + 'source': 'source', + 'app_id': 'app_id', + 'client_req_id': 'client_req_id', + 'sell_asset': 'sell_asset', + 'sell_amount': 'sell_amount', + 'sell_amount_show': 'sell_amount_show', + 'buy_asset': 'buy_asset', + 'buy_amount': 'buy_amount', + 'buy_amount_show': 'buy_amount_show', + 'price': 'price', + 'status': 'status', + 'quote_id': 'quote_id', + 'failed_code': 'failed_code', + 'failed_reason': 'failed_reason', + 'create_time': 'create_time', + 'create_time_ms': 'create_time_ms', + 'error': 'error' + } + + def __init__(self, id=None, user_id=None, source=None, app_id=None, client_req_id=None, sell_asset=None, sell_amount=None, sell_amount_show=None, buy_asset=None, buy_amount=None, buy_amount_show=None, price=None, status=None, quote_id=None, failed_code=None, failed_reason=None, create_time=None, create_time_ms=None, error=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, str, str, str, int, str, int, str, str, int, ErrCodeMsg, Configuration) -> None + """FlashSwapMultiCurrencyOrder - 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._source = None + self._app_id = None + self._client_req_id = None + self._sell_asset = None + self._sell_amount = None + self._sell_amount_show = None + self._buy_asset = None + self._buy_amount = None + self._buy_amount_show = None + self._price = None + self._status = None + self._quote_id = None + self._failed_code = None + self._failed_reason = None + self._create_time = None + self._create_time_ms = None + self._error = None + self.discriminator = None + + if id is not None: + self.id = id + if user_id is not None: + self.user_id = user_id + if source is not None: + self.source = source + if app_id is not None: + self.app_id = app_id + if client_req_id is not None: + self.client_req_id = client_req_id + if sell_asset is not None: + self.sell_asset = sell_asset + if sell_amount is not None: + self.sell_amount = sell_amount + if sell_amount_show is not None: + self.sell_amount_show = sell_amount_show + if buy_asset is not None: + self.buy_asset = buy_asset + if buy_amount is not None: + self.buy_amount = buy_amount + if buy_amount_show is not None: + self.buy_amount_show = buy_amount_show + if price is not None: + self.price = price + if status is not None: + self.status = status + if quote_id is not None: + self.quote_id = quote_id + if failed_code is not None: + self.failed_code = failed_code + if failed_reason is not None: + self.failed_reason = failed_reason + if create_time is not None: + self.create_time = create_time + if create_time_ms is not None: + self.create_time_ms = create_time_ms + self.error = error + + @property + def id(self): + """Gets the id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FlashSwapMultiCurrencyOrder. + + Order ID # noqa: E501 + + :param id: The id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this FlashSwapMultiCurrencyOrder. + + User ID # noqa: E501 + + :param user_id: The user_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def source(self): + """Gets the source of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Request source # noqa: E501 + + :return: The source of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this FlashSwapMultiCurrencyOrder. + + Request source # noqa: E501 + + :param source: The source of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._source = source + + @property + def app_id(self): + """Gets the app_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Application ID # noqa: E501 + + :return: The app_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._app_id + + @app_id.setter + def app_id(self, app_id): + """Sets the app_id of this FlashSwapMultiCurrencyOrder. + + Application ID # noqa: E501 + + :param app_id: The app_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._app_id = app_id + + @property + def client_req_id(self): + """Gets the client_req_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Client request ID # noqa: E501 + + :return: The client_req_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._client_req_id + + @client_req_id.setter + def client_req_id(self, client_req_id): + """Sets the client_req_id of this FlashSwapMultiCurrencyOrder. + + Client request ID # noqa: E501 + + :param client_req_id: The client_req_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._client_req_id = client_req_id + + @property + def sell_asset(self): + """Gets the sell_asset of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Currency to sell # noqa: E501 + + :return: The sell_asset of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._sell_asset + + @sell_asset.setter + def sell_asset(self, sell_asset): + """Sets the sell_asset of this FlashSwapMultiCurrencyOrder. + + Currency to sell # noqa: E501 + + :param sell_asset: The sell_asset of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._sell_asset = sell_asset + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Sell amount # noqa: E501 + + :return: The sell_amount of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapMultiCurrencyOrder. + + Sell amount # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._sell_amount = sell_amount + + @property + def sell_amount_show(self): + """Gets the sell_amount_show of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Sell amount display value # noqa: E501 + + :return: The sell_amount_show of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._sell_amount_show + + @sell_amount_show.setter + def sell_amount_show(self, sell_amount_show): + """Sets the sell_amount_show of this FlashSwapMultiCurrencyOrder. + + Sell amount display value # noqa: E501 + + :param sell_amount_show: The sell_amount_show of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._sell_amount_show = sell_amount_show + + @property + def buy_asset(self): + """Gets the buy_asset of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Currency to buy # noqa: E501 + + :return: The buy_asset of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._buy_asset + + @buy_asset.setter + def buy_asset(self, buy_asset): + """Sets the buy_asset of this FlashSwapMultiCurrencyOrder. + + Currency to buy # noqa: E501 + + :param buy_asset: The buy_asset of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._buy_asset = buy_asset + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Buy amount # noqa: E501 + + :return: The buy_amount of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapMultiCurrencyOrder. + + Buy amount # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._buy_amount = buy_amount + + @property + def buy_amount_show(self): + """Gets the buy_amount_show of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Buy amount display value # noqa: E501 + + :return: The buy_amount_show of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._buy_amount_show + + @buy_amount_show.setter + def buy_amount_show(self, buy_amount_show): + """Sets the buy_amount_show of this FlashSwapMultiCurrencyOrder. + + Buy amount display value # noqa: E501 + + :param buy_amount_show: The buy_amount_show of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._buy_amount_show = buy_amount_show + + @property + def price(self): + """Gets the price of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Exchange price # noqa: E501 + + :return: The price of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FlashSwapMultiCurrencyOrder. + + Exchange price # noqa: E501 + + :param price: The price of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def status(self): + """Gets the status of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Order Status # noqa: E501 + + :return: The status of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FlashSwapMultiCurrencyOrder. + + Order Status # noqa: E501 + + :param status: The status of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def quote_id(self): + """Gets the quote_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Quote ID # noqa: E501 + + :return: The quote_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._quote_id + + @quote_id.setter + def quote_id(self, quote_id): + """Sets the quote_id of this FlashSwapMultiCurrencyOrder. + + Quote ID # noqa: E501 + + :param quote_id: The quote_id of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._quote_id = quote_id + + @property + def failed_code(self): + """Gets the failed_code of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Failure error code, 0 means success # noqa: E501 + + :return: The failed_code of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: int + """ + return self._failed_code + + @failed_code.setter + def failed_code(self, failed_code): + """Sets the failed_code of this FlashSwapMultiCurrencyOrder. + + Failure error code, 0 means success # noqa: E501 + + :param failed_code: The failed_code of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: int + """ + + self._failed_code = failed_code + + @property + def failed_reason(self): + """Gets the failed_reason of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Failure Reason # noqa: E501 + + :return: The failed_reason of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._failed_reason + + @failed_reason.setter + def failed_reason(self, failed_reason): + """Sets the failed_reason of this FlashSwapMultiCurrencyOrder. + + Failure Reason # noqa: E501 + + :param failed_reason: The failed_reason of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._failed_reason = failed_reason + + @property + def create_time(self): + """Gets the create_time of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FlashSwapMultiCurrencyOrder. + + Created time # noqa: E501 + + :param create_time: The create_time of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def create_time_ms(self): + """Gets the create_time_ms of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + Creation timestamp (in milliseconds) # noqa: E501 + + :return: The create_time_ms of this FlashSwapMultiCurrencyOrder. # 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 FlashSwapMultiCurrencyOrder. + + Creation timestamp (in milliseconds) # noqa: E501 + + :param create_time_ms: The create_time_ms of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: int + """ + + self._create_time_ms = create_time_ms + + @property + def error(self): + """Gets the error of this FlashSwapMultiCurrencyOrder. # noqa: E501 + + + :return: The error of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :rtype: ErrCodeMsg + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this FlashSwapMultiCurrencyOrder. + + + :param error: The error of this FlashSwapMultiCurrencyOrder. # noqa: E501 + :type: ErrCodeMsg + """ + if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 + raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 + + self._error = error + + 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, FlashSwapMultiCurrencyOrder): + 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, FlashSwapMultiCurrencyOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_preview_order.py b/gate_api/models/flash_swap_multi_currency_preview_order.py new file mode 100644 index 00000000..54463cf6 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_preview_order.py @@ -0,0 +1,458 @@ +# 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 FlashSwapMultiCurrencyPreviewOrder(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 = { + 'quote_id': 'str', + 'hedge_type': 'int', + 'sell_asset': 'str', + 'sell_amount': 'str', + 'sell_amount_show': 'str', + 'buy_asset': 'str', + 'buy_amount': 'str', + 'buy_amount_show': 'str', + 'price': 'str', + 'price_diff': 'str', + 'reverse_price': 'str', + 'valid_timestamp': 'int', + 'error': 'ErrCodeMsg' + } + + attribute_map = { + 'quote_id': 'quote_id', + 'hedge_type': 'hedge_type', + 'sell_asset': 'sell_asset', + 'sell_amount': 'sell_amount', + 'sell_amount_show': 'sell_amount_show', + 'buy_asset': 'buy_asset', + 'buy_amount': 'buy_amount', + 'buy_amount_show': 'buy_amount_show', + 'price': 'price', + 'price_diff': 'price_diff', + 'reverse_price': 'reverse_price', + 'valid_timestamp': 'valid_timestamp', + 'error': 'error' + } + + def __init__(self, quote_id=None, hedge_type=None, sell_asset=None, sell_amount=None, sell_amount_show=None, buy_asset=None, buy_amount=None, buy_amount_show=None, price=None, price_diff=None, reverse_price=None, valid_timestamp=None, error=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, str, str, str, str, str, str, str, int, ErrCodeMsg, Configuration) -> None + """FlashSwapMultiCurrencyPreviewOrder - 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._quote_id = None + self._hedge_type = None + self._sell_asset = None + self._sell_amount = None + self._sell_amount_show = None + self._buy_asset = None + self._buy_amount = None + self._buy_amount_show = None + self._price = None + self._price_diff = None + self._reverse_price = None + self._valid_timestamp = None + self._error = None + self.discriminator = None + + if quote_id is not None: + self.quote_id = quote_id + if hedge_type is not None: + self.hedge_type = hedge_type + if sell_asset is not None: + self.sell_asset = sell_asset + if sell_amount is not None: + self.sell_amount = sell_amount + if sell_amount_show is not None: + self.sell_amount_show = sell_amount_show + if buy_asset is not None: + self.buy_asset = buy_asset + if buy_amount is not None: + self.buy_amount = buy_amount + if buy_amount_show is not None: + self.buy_amount_show = buy_amount_show + if price is not None: + self.price = price + if price_diff is not None: + self.price_diff = price_diff + if reverse_price is not None: + self.reverse_price = reverse_price + if valid_timestamp is not None: + self.valid_timestamp = valid_timestamp + self.error = error + + @property + def quote_id(self): + """Gets the quote_id of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Quote ID # noqa: E501 + + :return: The quote_id of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._quote_id + + @quote_id.setter + def quote_id(self, quote_id): + """Sets the quote_id of this FlashSwapMultiCurrencyPreviewOrder. + + Quote ID # noqa: E501 + + :param quote_id: The quote_id of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._quote_id = quote_id + + @property + def hedge_type(self): + """Gets the hedge_type of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Hedge type # noqa: E501 + + :return: The hedge_type of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: int + """ + return self._hedge_type + + @hedge_type.setter + def hedge_type(self, hedge_type): + """Sets the hedge_type of this FlashSwapMultiCurrencyPreviewOrder. + + Hedge type # noqa: E501 + + :param hedge_type: The hedge_type of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: int + """ + + self._hedge_type = hedge_type + + @property + def sell_asset(self): + """Gets the sell_asset of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Currency to sell # noqa: E501 + + :return: The sell_asset of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._sell_asset + + @sell_asset.setter + def sell_asset(self, sell_asset): + """Sets the sell_asset of this FlashSwapMultiCurrencyPreviewOrder. + + Currency to sell # noqa: E501 + + :param sell_asset: The sell_asset of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._sell_asset = sell_asset + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Sell amount # noqa: E501 + + :return: The sell_amount of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapMultiCurrencyPreviewOrder. + + Sell amount # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._sell_amount = sell_amount + + @property + def sell_amount_show(self): + """Gets the sell_amount_show of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Sell amount display value # noqa: E501 + + :return: The sell_amount_show of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._sell_amount_show + + @sell_amount_show.setter + def sell_amount_show(self, sell_amount_show): + """Sets the sell_amount_show of this FlashSwapMultiCurrencyPreviewOrder. + + Sell amount display value # noqa: E501 + + :param sell_amount_show: The sell_amount_show of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._sell_amount_show = sell_amount_show + + @property + def buy_asset(self): + """Gets the buy_asset of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Currency to buy # noqa: E501 + + :return: The buy_asset of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._buy_asset + + @buy_asset.setter + def buy_asset(self, buy_asset): + """Sets the buy_asset of this FlashSwapMultiCurrencyPreviewOrder. + + Currency to buy # noqa: E501 + + :param buy_asset: The buy_asset of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._buy_asset = buy_asset + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Buy amount # noqa: E501 + + :return: The buy_amount of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapMultiCurrencyPreviewOrder. + + Buy amount # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._buy_amount = buy_amount + + @property + def buy_amount_show(self): + """Gets the buy_amount_show of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Buy amount display value # noqa: E501 + + :return: The buy_amount_show of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._buy_amount_show + + @buy_amount_show.setter + def buy_amount_show(self, buy_amount_show): + """Sets the buy_amount_show of this FlashSwapMultiCurrencyPreviewOrder. + + Buy amount display value # noqa: E501 + + :param buy_amount_show: The buy_amount_show of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._buy_amount_show = buy_amount_show + + @property + def price(self): + """Gets the price of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Exchange price # noqa: E501 + + :return: The price of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FlashSwapMultiCurrencyPreviewOrder. + + Exchange price # noqa: E501 + + :param price: The price of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def price_diff(self): + """Gets the price_diff of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Spread percentage # noqa: E501 + + :return: The price_diff of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._price_diff + + @price_diff.setter + def price_diff(self, price_diff): + """Sets the price_diff of this FlashSwapMultiCurrencyPreviewOrder. + + Spread percentage # noqa: E501 + + :param price_diff: The price_diff of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._price_diff = price_diff + + @property + def reverse_price(self): + """Gets the reverse_price of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Reverse price # noqa: E501 + + :return: The reverse_price of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: str + """ + return self._reverse_price + + @reverse_price.setter + def reverse_price(self, reverse_price): + """Sets the reverse_price of this FlashSwapMultiCurrencyPreviewOrder. + + Reverse price # noqa: E501 + + :param reverse_price: The reverse_price of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: str + """ + + self._reverse_price = reverse_price + + @property + def valid_timestamp(self): + """Gets the valid_timestamp of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + Quote expiration timestamp (in seconds) # noqa: E501 + + :return: The valid_timestamp of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: int + """ + return self._valid_timestamp + + @valid_timestamp.setter + def valid_timestamp(self, valid_timestamp): + """Sets the valid_timestamp of this FlashSwapMultiCurrencyPreviewOrder. + + Quote expiration timestamp (in seconds) # noqa: E501 + + :param valid_timestamp: The valid_timestamp of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: int + """ + + self._valid_timestamp = valid_timestamp + + @property + def error(self): + """Gets the error of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + + + :return: The error of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :rtype: ErrCodeMsg + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this FlashSwapMultiCurrencyPreviewOrder. + + + :param error: The error of this FlashSwapMultiCurrencyPreviewOrder. # noqa: E501 + :type: ErrCodeMsg + """ + if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 + raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 + + self._error = error + + 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, FlashSwapMultiCurrencyPreviewOrder): + 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, FlashSwapMultiCurrencyPreviewOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_multi_currency_preview_param.py b/gate_api/models/flash_swap_multi_currency_preview_param.py new file mode 100644 index 00000000..b297eca8 --- /dev/null +++ b/gate_api/models/flash_swap_multi_currency_preview_param.py @@ -0,0 +1,209 @@ +# 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 FlashSwapMultiCurrencyPreviewParam(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 = { + 'sell_asset': 'str', + 'sell_amount': 'str', + 'buy_asset': 'str', + 'buy_amount': 'str' + } + + attribute_map = { + 'sell_asset': 'sell_asset', + 'sell_amount': 'sell_amount', + 'buy_asset': 'buy_asset', + 'buy_amount': 'buy_amount' + } + + def __init__(self, sell_asset=None, sell_amount=None, buy_asset=None, buy_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """FlashSwapMultiCurrencyPreviewParam - 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._sell_asset = None + self._sell_amount = None + self._buy_asset = None + self._buy_amount = None + self.discriminator = None + + self.sell_asset = sell_asset + if sell_amount is not None: + self.sell_amount = sell_amount + self.buy_asset = buy_asset + if buy_amount is not None: + self.buy_amount = buy_amount + + @property + def sell_asset(self): + """Gets the sell_asset of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + + Currency to sell # noqa: E501 + + :return: The sell_asset of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + :rtype: str + """ + return self._sell_asset + + @sell_asset.setter + def sell_asset(self, sell_asset): + """Sets the sell_asset of this FlashSwapMultiCurrencyPreviewParam. + + Currency to sell # noqa: E501 + + :param sell_asset: The sell_asset of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sell_asset is None: # noqa: E501 + raise ValueError("Invalid value for `sell_asset`, must not be `None`") # noqa: E501 + + self._sell_asset = sell_asset + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + + Sell amount # noqa: E501 + + :return: The sell_amount of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapMultiCurrencyPreviewParam. + + Sell amount # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + :type: str + """ + + self._sell_amount = sell_amount + + @property + def buy_asset(self): + """Gets the buy_asset of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + + Currency to buy # noqa: E501 + + :return: The buy_asset of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + :rtype: str + """ + return self._buy_asset + + @buy_asset.setter + def buy_asset(self, buy_asset): + """Sets the buy_asset of this FlashSwapMultiCurrencyPreviewParam. + + Currency to buy # noqa: E501 + + :param buy_asset: The buy_asset of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_asset is None: # noqa: E501 + raise ValueError("Invalid value for `buy_asset`, must not be `None`") # noqa: E501 + + self._buy_asset = buy_asset + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + + Buy amount # noqa: E501 + + :return: The buy_amount of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapMultiCurrencyPreviewParam. + + Buy amount # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapMultiCurrencyPreviewParam. # noqa: E501 + :type: str + """ + + self._buy_amount = buy_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, FlashSwapMultiCurrencyPreviewParam): + 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, FlashSwapMultiCurrencyPreviewParam): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_create_req.py b/gate_api/models/flash_swap_order_create_req.py new file mode 100644 index 00000000..a93603bb --- /dev/null +++ b/gate_api/models/flash_swap_order_create_req.py @@ -0,0 +1,323 @@ +# 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 FlashSwapOrderCreateReq(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 = { + 'quote_id': 'str', + 'hedge_type': 'int', + 'sell_asset': 'str', + 'sell_amount': 'str', + 'buy_asset': 'str', + 'buy_amount': 'str', + 'client_req_id': 'str', + 'request_time_ms': 'int' + } + + attribute_map = { + 'quote_id': 'quote_id', + 'hedge_type': 'hedge_type', + 'sell_asset': 'sell_asset', + 'sell_amount': 'sell_amount', + 'buy_asset': 'buy_asset', + 'buy_amount': 'buy_amount', + 'client_req_id': 'client_req_id', + 'request_time_ms': 'request_time_ms' + } + + def __init__(self, quote_id=None, hedge_type=None, sell_asset=None, sell_amount=None, buy_asset=None, buy_amount=None, client_req_id=None, request_time_ms=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, str, str, str, int, Configuration) -> None + """FlashSwapOrderCreateReq - 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._quote_id = None + self._hedge_type = None + self._sell_asset = None + self._sell_amount = None + self._buy_asset = None + self._buy_amount = None + self._client_req_id = None + self._request_time_ms = None + self.discriminator = None + + if quote_id is not None: + self.quote_id = quote_id + if hedge_type is not None: + self.hedge_type = hedge_type + self.sell_asset = sell_asset + self.sell_amount = sell_amount + self.buy_asset = buy_asset + self.buy_amount = buy_amount + if client_req_id is not None: + self.client_req_id = client_req_id + if request_time_ms is not None: + self.request_time_ms = request_time_ms + + @property + def quote_id(self): + """Gets the quote_id of this FlashSwapOrderCreateReq. # noqa: E501 + + Quote ID returned by the preview endpoint # noqa: E501 + + :return: The quote_id of this FlashSwapOrderCreateReq. # noqa: E501 + :rtype: str + """ + return self._quote_id + + @quote_id.setter + def quote_id(self, quote_id): + """Sets the quote_id of this FlashSwapOrderCreateReq. + + Quote ID returned by the preview endpoint # noqa: E501 + + :param quote_id: The quote_id of this FlashSwapOrderCreateReq. # noqa: E501 + :type: str + """ + + self._quote_id = quote_id + + @property + def hedge_type(self): + """Gets the hedge_type of this FlashSwapOrderCreateReq. # noqa: E501 + + Hedge type # noqa: E501 + + :return: The hedge_type of this FlashSwapOrderCreateReq. # noqa: E501 + :rtype: int + """ + return self._hedge_type + + @hedge_type.setter + def hedge_type(self, hedge_type): + """Sets the hedge_type of this FlashSwapOrderCreateReq. + + Hedge type # noqa: E501 + + :param hedge_type: The hedge_type of this FlashSwapOrderCreateReq. # noqa: E501 + :type: int + """ + + self._hedge_type = hedge_type + + @property + def sell_asset(self): + """Gets the sell_asset of this FlashSwapOrderCreateReq. # noqa: E501 + + Currency to sell # noqa: E501 + + :return: The sell_asset of this FlashSwapOrderCreateReq. # noqa: E501 + :rtype: str + """ + return self._sell_asset + + @sell_asset.setter + def sell_asset(self, sell_asset): + """Sets the sell_asset of this FlashSwapOrderCreateReq. + + Currency to sell # noqa: E501 + + :param sell_asset: The sell_asset of this FlashSwapOrderCreateReq. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sell_asset is None: # noqa: E501 + raise ValueError("Invalid value for `sell_asset`, must not be `None`") # noqa: E501 + + self._sell_asset = sell_asset + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapOrderCreateReq. # noqa: E501 + + Sell amount # noqa: E501 + + :return: The sell_amount of this FlashSwapOrderCreateReq. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapOrderCreateReq. + + Sell amount # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapOrderCreateReq. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sell_amount is None: # noqa: E501 + raise ValueError("Invalid value for `sell_amount`, must not be `None`") # noqa: E501 + + self._sell_amount = sell_amount + + @property + def buy_asset(self): + """Gets the buy_asset of this FlashSwapOrderCreateReq. # noqa: E501 + + Currency to buy # noqa: E501 + + :return: The buy_asset of this FlashSwapOrderCreateReq. # noqa: E501 + :rtype: str + """ + return self._buy_asset + + @buy_asset.setter + def buy_asset(self, buy_asset): + """Sets the buy_asset of this FlashSwapOrderCreateReq. + + Currency to buy # noqa: E501 + + :param buy_asset: The buy_asset of this FlashSwapOrderCreateReq. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_asset is None: # noqa: E501 + raise ValueError("Invalid value for `buy_asset`, must not be `None`") # noqa: E501 + + self._buy_asset = buy_asset + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapOrderCreateReq. # noqa: E501 + + Buy amount # noqa: E501 + + :return: The buy_amount of this FlashSwapOrderCreateReq. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapOrderCreateReq. + + Buy amount # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapOrderCreateReq. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_amount is None: # noqa: E501 + raise ValueError("Invalid value for `buy_amount`, must not be `None`") # noqa: E501 + + self._buy_amount = buy_amount + + @property + def client_req_id(self): + """Gets the client_req_id of this FlashSwapOrderCreateReq. # noqa: E501 + + Client request ID for idempotency check # noqa: E501 + + :return: The client_req_id of this FlashSwapOrderCreateReq. # noqa: E501 + :rtype: str + """ + return self._client_req_id + + @client_req_id.setter + def client_req_id(self, client_req_id): + """Sets the client_req_id of this FlashSwapOrderCreateReq. + + Client request ID for idempotency check # noqa: E501 + + :param client_req_id: The client_req_id of this FlashSwapOrderCreateReq. # noqa: E501 + :type: str + """ + + self._client_req_id = client_req_id + + @property + def request_time_ms(self): + """Gets the request_time_ms of this FlashSwapOrderCreateReq. # noqa: E501 + + Request timestamp (in milliseconds) # noqa: E501 + + :return: The request_time_ms of this FlashSwapOrderCreateReq. # noqa: E501 + :rtype: int + """ + return self._request_time_ms + + @request_time_ms.setter + def request_time_ms(self, request_time_ms): + """Sets the request_time_ms of this FlashSwapOrderCreateReq. + + Request timestamp (in milliseconds) # noqa: E501 + + :param request_time_ms: The request_time_ms of this FlashSwapOrderCreateReq. # noqa: E501 + :type: int + """ + + self._request_time_ms = request_time_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, FlashSwapOrderCreateReq): + 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, FlashSwapOrderCreateReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_create_resp.py b/gate_api/models/flash_swap_order_create_resp.py new file mode 100644 index 00000000..b2122c1f --- /dev/null +++ b/gate_api/models/flash_swap_order_create_resp.py @@ -0,0 +1,208 @@ +# 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 FlashSwapOrderCreateResp(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'FlashSwapOrderCreateRespData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, FlashSwapOrderCreateRespData, int, Configuration) -> None + """FlashSwapOrderCreateResp - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this FlashSwapOrderCreateResp. # noqa: E501 + + Response code, 0 means success # noqa: E501 + + :return: The code of this FlashSwapOrderCreateResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this FlashSwapOrderCreateResp. + + Response code, 0 means success # noqa: E501 + + :param code: The code of this FlashSwapOrderCreateResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this FlashSwapOrderCreateResp. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this FlashSwapOrderCreateResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FlashSwapOrderCreateResp. + + Response message # noqa: E501 + + :param message: The message of this FlashSwapOrderCreateResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this FlashSwapOrderCreateResp. # noqa: E501 + + + :return: The data of this FlashSwapOrderCreateResp. # noqa: E501 + :rtype: FlashSwapOrderCreateRespData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FlashSwapOrderCreateResp. + + + :param data: The data of this FlashSwapOrderCreateResp. # noqa: E501 + :type: FlashSwapOrderCreateRespData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this FlashSwapOrderCreateResp. # noqa: E501 + + Response timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this FlashSwapOrderCreateResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this FlashSwapOrderCreateResp. + + Response timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this FlashSwapOrderCreateResp. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, FlashSwapOrderCreateResp): + 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, FlashSwapOrderCreateResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_create_resp_data.py b/gate_api/models/flash_swap_order_create_resp_data.py new file mode 100644 index 00000000..4dace233 --- /dev/null +++ b/gate_api/models/flash_swap_order_create_resp_data.py @@ -0,0 +1,628 @@ +# 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 FlashSwapOrderCreateRespData(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', + 'user_id': 'int', + 'source': 'str', + 'app_id': 'str', + 'client_req_id': 'str', + 'sell_asset': 'str', + 'sell_amount': 'str', + 'sell_amount_show': 'str', + 'buy_asset': 'str', + 'buy_amount': 'str', + 'buy_amount_show': 'str', + 'price': 'str', + 'status': 'int', + 'quote_id': 'str', + 'failed_code': 'int', + 'failed_reason': 'str', + 'create_time': 'str', + 'create_time_ms': 'int', + 'account_mode': 'int' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'user_id', + 'source': 'source', + 'app_id': 'app_id', + 'client_req_id': 'client_req_id', + 'sell_asset': 'sell_asset', + 'sell_amount': 'sell_amount', + 'sell_amount_show': 'sell_amount_show', + 'buy_asset': 'buy_asset', + 'buy_amount': 'buy_amount', + 'buy_amount_show': 'buy_amount_show', + 'price': 'price', + 'status': 'status', + 'quote_id': 'quote_id', + 'failed_code': 'failed_code', + 'failed_reason': 'failed_reason', + 'create_time': 'create_time', + 'create_time_ms': 'create_time_ms', + 'account_mode': 'account_mode' + } + + def __init__(self, id=None, user_id=None, source=None, app_id=None, client_req_id=None, sell_asset=None, sell_amount=None, sell_amount_show=None, buy_asset=None, buy_amount=None, buy_amount_show=None, price=None, status=None, quote_id=None, failed_code=None, failed_reason=None, create_time=None, create_time_ms=None, account_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, str, str, str, int, str, int, str, str, int, int, Configuration) -> None + """FlashSwapOrderCreateRespData - 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._source = None + self._app_id = None + self._client_req_id = None + self._sell_asset = None + self._sell_amount = None + self._sell_amount_show = None + self._buy_asset = None + self._buy_amount = None + self._buy_amount_show = None + self._price = None + self._status = None + self._quote_id = None + self._failed_code = None + self._failed_reason = None + self._create_time = None + self._create_time_ms = None + self._account_mode = None + self.discriminator = None + + if id is not None: + self.id = id + if user_id is not None: + self.user_id = user_id + if source is not None: + self.source = source + if app_id is not None: + self.app_id = app_id + if client_req_id is not None: + self.client_req_id = client_req_id + if sell_asset is not None: + self.sell_asset = sell_asset + if sell_amount is not None: + self.sell_amount = sell_amount + if sell_amount_show is not None: + self.sell_amount_show = sell_amount_show + if buy_asset is not None: + self.buy_asset = buy_asset + if buy_amount is not None: + self.buy_amount = buy_amount + if buy_amount_show is not None: + self.buy_amount_show = buy_amount_show + if price is not None: + self.price = price + if status is not None: + self.status = status + if quote_id is not None: + self.quote_id = quote_id + if failed_code is not None: + self.failed_code = failed_code + if failed_reason is not None: + self.failed_reason = failed_reason + if create_time is not None: + self.create_time = create_time + if create_time_ms is not None: + self.create_time_ms = create_time_ms + self.account_mode = account_mode + + @property + def id(self): + """Gets the id of this FlashSwapOrderCreateRespData. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FlashSwapOrderCreateRespData. + + Order ID # noqa: E501 + + :param id: The id of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this FlashSwapOrderCreateRespData. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this FlashSwapOrderCreateRespData. + + User ID # noqa: E501 + + :param user_id: The user_id of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def source(self): + """Gets the source of this FlashSwapOrderCreateRespData. # noqa: E501 + + Request source # noqa: E501 + + :return: The source of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this FlashSwapOrderCreateRespData. + + Request source # noqa: E501 + + :param source: The source of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._source = source + + @property + def app_id(self): + """Gets the app_id of this FlashSwapOrderCreateRespData. # noqa: E501 + + Application ID # noqa: E501 + + :return: The app_id of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._app_id + + @app_id.setter + def app_id(self, app_id): + """Sets the app_id of this FlashSwapOrderCreateRespData. + + Application ID # noqa: E501 + + :param app_id: The app_id of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._app_id = app_id + + @property + def client_req_id(self): + """Gets the client_req_id of this FlashSwapOrderCreateRespData. # noqa: E501 + + Client request ID # noqa: E501 + + :return: The client_req_id of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._client_req_id + + @client_req_id.setter + def client_req_id(self, client_req_id): + """Sets the client_req_id of this FlashSwapOrderCreateRespData. + + Client request ID # noqa: E501 + + :param client_req_id: The client_req_id of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._client_req_id = client_req_id + + @property + def sell_asset(self): + """Gets the sell_asset of this FlashSwapOrderCreateRespData. # noqa: E501 + + Currency to sell # noqa: E501 + + :return: The sell_asset of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._sell_asset + + @sell_asset.setter + def sell_asset(self, sell_asset): + """Sets the sell_asset of this FlashSwapOrderCreateRespData. + + Currency to sell # noqa: E501 + + :param sell_asset: The sell_asset of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._sell_asset = sell_asset + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapOrderCreateRespData. # noqa: E501 + + Sell amount # noqa: E501 + + :return: The sell_amount of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapOrderCreateRespData. + + Sell amount # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._sell_amount = sell_amount + + @property + def sell_amount_show(self): + """Gets the sell_amount_show of this FlashSwapOrderCreateRespData. # noqa: E501 + + Sell amount display value # noqa: E501 + + :return: The sell_amount_show of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._sell_amount_show + + @sell_amount_show.setter + def sell_amount_show(self, sell_amount_show): + """Sets the sell_amount_show of this FlashSwapOrderCreateRespData. + + Sell amount display value # noqa: E501 + + :param sell_amount_show: The sell_amount_show of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._sell_amount_show = sell_amount_show + + @property + def buy_asset(self): + """Gets the buy_asset of this FlashSwapOrderCreateRespData. # noqa: E501 + + Currency to buy # noqa: E501 + + :return: The buy_asset of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._buy_asset + + @buy_asset.setter + def buy_asset(self, buy_asset): + """Sets the buy_asset of this FlashSwapOrderCreateRespData. + + Currency to buy # noqa: E501 + + :param buy_asset: The buy_asset of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._buy_asset = buy_asset + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapOrderCreateRespData. # noqa: E501 + + Buy amount # noqa: E501 + + :return: The buy_amount of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapOrderCreateRespData. + + Buy amount # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._buy_amount = buy_amount + + @property + def buy_amount_show(self): + """Gets the buy_amount_show of this FlashSwapOrderCreateRespData. # noqa: E501 + + Buy amount display value # noqa: E501 + + :return: The buy_amount_show of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._buy_amount_show + + @buy_amount_show.setter + def buy_amount_show(self, buy_amount_show): + """Sets the buy_amount_show of this FlashSwapOrderCreateRespData. + + Buy amount display value # noqa: E501 + + :param buy_amount_show: The buy_amount_show of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._buy_amount_show = buy_amount_show + + @property + def price(self): + """Gets the price of this FlashSwapOrderCreateRespData. # noqa: E501 + + Exchange price # noqa: E501 + + :return: The price of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FlashSwapOrderCreateRespData. + + Exchange price # noqa: E501 + + :param price: The price of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def status(self): + """Gets the status of this FlashSwapOrderCreateRespData. # noqa: E501 + + Order Status # noqa: E501 + + :return: The status of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FlashSwapOrderCreateRespData. + + Order Status # noqa: E501 + + :param status: The status of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def quote_id(self): + """Gets the quote_id of this FlashSwapOrderCreateRespData. # noqa: E501 + + Quote ID # noqa: E501 + + :return: The quote_id of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._quote_id + + @quote_id.setter + def quote_id(self, quote_id): + """Sets the quote_id of this FlashSwapOrderCreateRespData. + + Quote ID # noqa: E501 + + :param quote_id: The quote_id of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._quote_id = quote_id + + @property + def failed_code(self): + """Gets the failed_code of this FlashSwapOrderCreateRespData. # noqa: E501 + + Failure error code, 0 means success # noqa: E501 + + :return: The failed_code of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._failed_code + + @failed_code.setter + def failed_code(self, failed_code): + """Sets the failed_code of this FlashSwapOrderCreateRespData. + + Failure error code, 0 means success # noqa: E501 + + :param failed_code: The failed_code of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: int + """ + + self._failed_code = failed_code + + @property + def failed_reason(self): + """Gets the failed_reason of this FlashSwapOrderCreateRespData. # noqa: E501 + + Failure Reason # noqa: E501 + + :return: The failed_reason of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._failed_reason + + @failed_reason.setter + def failed_reason(self, failed_reason): + """Sets the failed_reason of this FlashSwapOrderCreateRespData. + + Failure Reason # noqa: E501 + + :param failed_reason: The failed_reason of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._failed_reason = failed_reason + + @property + def create_time(self): + """Gets the create_time of this FlashSwapOrderCreateRespData. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FlashSwapOrderCreateRespData. + + Created time # noqa: E501 + + :param create_time: The create_time of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def create_time_ms(self): + """Gets the create_time_ms of this FlashSwapOrderCreateRespData. # noqa: E501 + + Creation timestamp (in milliseconds) # noqa: E501 + + :return: The create_time_ms of this FlashSwapOrderCreateRespData. # 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 FlashSwapOrderCreateRespData. + + Creation timestamp (in milliseconds) # noqa: E501 + + :param create_time_ms: The create_time_ms of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: int + """ + + self._create_time_ms = create_time_ms + + @property + def account_mode(self): + """Gets the account_mode of this FlashSwapOrderCreateRespData. # noqa: E501 + + Account Mode # noqa: E501 + + :return: The account_mode of this FlashSwapOrderCreateRespData. # noqa: E501 + :rtype: int + """ + return self._account_mode + + @account_mode.setter + def account_mode(self, account_mode): + """Sets the account_mode of this FlashSwapOrderCreateRespData. + + Account Mode # noqa: E501 + + :param account_mode: The account_mode of this FlashSwapOrderCreateRespData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and account_mode is None: # noqa: E501 + raise ValueError("Invalid value for `account_mode`, must not be `None`") # noqa: E501 + + self._account_mode = account_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, FlashSwapOrderCreateRespData): + 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, FlashSwapOrderCreateRespData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_preview_resp.py b/gate_api/models/flash_swap_order_preview_resp.py new file mode 100644 index 00000000..c0548249 --- /dev/null +++ b/gate_api/models/flash_swap_order_preview_resp.py @@ -0,0 +1,208 @@ +# 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 FlashSwapOrderPreviewResp(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'FlashSwapOrderPreviewRespData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, FlashSwapOrderPreviewRespData, int, Configuration) -> None + """FlashSwapOrderPreviewResp - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this FlashSwapOrderPreviewResp. # noqa: E501 + + Response code, 0 means success # noqa: E501 + + :return: The code of this FlashSwapOrderPreviewResp. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this FlashSwapOrderPreviewResp. + + Response code, 0 means success # noqa: E501 + + :param code: The code of this FlashSwapOrderPreviewResp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this FlashSwapOrderPreviewResp. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this FlashSwapOrderPreviewResp. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FlashSwapOrderPreviewResp. + + Response message # noqa: E501 + + :param message: The message of this FlashSwapOrderPreviewResp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this FlashSwapOrderPreviewResp. # noqa: E501 + + + :return: The data of this FlashSwapOrderPreviewResp. # noqa: E501 + :rtype: FlashSwapOrderPreviewRespData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FlashSwapOrderPreviewResp. + + + :param data: The data of this FlashSwapOrderPreviewResp. # noqa: E501 + :type: FlashSwapOrderPreviewRespData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this FlashSwapOrderPreviewResp. # noqa: E501 + + Response timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this FlashSwapOrderPreviewResp. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this FlashSwapOrderPreviewResp. + + Response timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this FlashSwapOrderPreviewResp. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, FlashSwapOrderPreviewResp): + 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, FlashSwapOrderPreviewResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_preview_resp_data.py b/gate_api/models/flash_swap_order_preview_resp_data.py new file mode 100644 index 00000000..ce3b52e7 --- /dev/null +++ b/gate_api/models/flash_swap_order_preview_resp_data.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 FlashSwapOrderPreviewRespData(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 = { + 'quote_id': 'str', + 'hedge_type': 'int', + 'sell_asset': 'str', + 'sell_amount': 'str', + 'sell_amount_show': 'str', + 'buy_asset': 'str', + 'buy_amount': 'str', + 'buy_amount_show': 'str', + 'price': 'str', + 'price_diff': 'str', + 'reverse_price': 'str', + 'valid_timestamp': 'int' + } + + attribute_map = { + 'quote_id': 'quote_id', + 'hedge_type': 'hedge_type', + 'sell_asset': 'sell_asset', + 'sell_amount': 'sell_amount', + 'sell_amount_show': 'sell_amount_show', + 'buy_asset': 'buy_asset', + 'buy_amount': 'buy_amount', + 'buy_amount_show': 'buy_amount_show', + 'price': 'price', + 'price_diff': 'price_diff', + 'reverse_price': 'reverse_price', + 'valid_timestamp': 'valid_timestamp' + } + + def __init__(self, quote_id=None, hedge_type=None, sell_asset=None, sell_amount=None, sell_amount_show=None, buy_asset=None, buy_amount=None, buy_amount_show=None, price=None, price_diff=None, reverse_price=None, valid_timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, str, str, str, str, str, str, str, int, Configuration) -> None + """FlashSwapOrderPreviewRespData - 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._quote_id = None + self._hedge_type = None + self._sell_asset = None + self._sell_amount = None + self._sell_amount_show = None + self._buy_asset = None + self._buy_amount = None + self._buy_amount_show = None + self._price = None + self._price_diff = None + self._reverse_price = None + self._valid_timestamp = None + self.discriminator = None + + if quote_id is not None: + self.quote_id = quote_id + if hedge_type is not None: + self.hedge_type = hedge_type + if sell_asset is not None: + self.sell_asset = sell_asset + if sell_amount is not None: + self.sell_amount = sell_amount + if sell_amount_show is not None: + self.sell_amount_show = sell_amount_show + if buy_asset is not None: + self.buy_asset = buy_asset + if buy_amount is not None: + self.buy_amount = buy_amount + if buy_amount_show is not None: + self.buy_amount_show = buy_amount_show + if price is not None: + self.price = price + if price_diff is not None: + self.price_diff = price_diff + if reverse_price is not None: + self.reverse_price = reverse_price + if valid_timestamp is not None: + self.valid_timestamp = valid_timestamp + + @property + def quote_id(self): + """Gets the quote_id of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Quote ID, valid for one minute # noqa: E501 + + :return: The quote_id of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._quote_id + + @quote_id.setter + def quote_id(self, quote_id): + """Sets the quote_id of this FlashSwapOrderPreviewRespData. + + Quote ID, valid for one minute # noqa: E501 + + :param quote_id: The quote_id of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._quote_id = quote_id + + @property + def hedge_type(self): + """Gets the hedge_type of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Hedge type # noqa: E501 + + :return: The hedge_type of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: int + """ + return self._hedge_type + + @hedge_type.setter + def hedge_type(self, hedge_type): + """Sets the hedge_type of this FlashSwapOrderPreviewRespData. + + Hedge type # noqa: E501 + + :param hedge_type: The hedge_type of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: int + """ + + self._hedge_type = hedge_type + + @property + def sell_asset(self): + """Gets the sell_asset of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Currency to sell # noqa: E501 + + :return: The sell_asset of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._sell_asset + + @sell_asset.setter + def sell_asset(self, sell_asset): + """Sets the sell_asset of this FlashSwapOrderPreviewRespData. + + Currency to sell # noqa: E501 + + :param sell_asset: The sell_asset of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._sell_asset = sell_asset + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Sell amount # noqa: E501 + + :return: The sell_amount of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapOrderPreviewRespData. + + Sell amount # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._sell_amount = sell_amount + + @property + def sell_amount_show(self): + """Gets the sell_amount_show of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Sell amount display value # noqa: E501 + + :return: The sell_amount_show of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._sell_amount_show + + @sell_amount_show.setter + def sell_amount_show(self, sell_amount_show): + """Sets the sell_amount_show of this FlashSwapOrderPreviewRespData. + + Sell amount display value # noqa: E501 + + :param sell_amount_show: The sell_amount_show of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._sell_amount_show = sell_amount_show + + @property + def buy_asset(self): + """Gets the buy_asset of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Currency to buy # noqa: E501 + + :return: The buy_asset of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._buy_asset + + @buy_asset.setter + def buy_asset(self, buy_asset): + """Sets the buy_asset of this FlashSwapOrderPreviewRespData. + + Currency to buy # noqa: E501 + + :param buy_asset: The buy_asset of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._buy_asset = buy_asset + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Buy amount # noqa: E501 + + :return: The buy_amount of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapOrderPreviewRespData. + + Buy amount # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._buy_amount = buy_amount + + @property + def buy_amount_show(self): + """Gets the buy_amount_show of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Buy amount display value # noqa: E501 + + :return: The buy_amount_show of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._buy_amount_show + + @buy_amount_show.setter + def buy_amount_show(self, buy_amount_show): + """Sets the buy_amount_show of this FlashSwapOrderPreviewRespData. + + Buy amount display value # noqa: E501 + + :param buy_amount_show: The buy_amount_show of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._buy_amount_show = buy_amount_show + + @property + def price(self): + """Gets the price of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Exchange price # noqa: E501 + + :return: The price of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FlashSwapOrderPreviewRespData. + + Exchange price # noqa: E501 + + :param price: The price of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def price_diff(self): + """Gets the price_diff of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Spread percentage # noqa: E501 + + :return: The price_diff of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._price_diff + + @price_diff.setter + def price_diff(self, price_diff): + """Sets the price_diff of this FlashSwapOrderPreviewRespData. + + Spread percentage # noqa: E501 + + :param price_diff: The price_diff of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._price_diff = price_diff + + @property + def reverse_price(self): + """Gets the reverse_price of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Reverse price # noqa: E501 + + :return: The reverse_price of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: str + """ + return self._reverse_price + + @reverse_price.setter + def reverse_price(self, reverse_price): + """Sets the reverse_price of this FlashSwapOrderPreviewRespData. + + Reverse price # noqa: E501 + + :param reverse_price: The reverse_price of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: str + """ + + self._reverse_price = reverse_price + + @property + def valid_timestamp(self): + """Gets the valid_timestamp of this FlashSwapOrderPreviewRespData. # noqa: E501 + + Quote expiration timestamp (in seconds) # noqa: E501 + + :return: The valid_timestamp of this FlashSwapOrderPreviewRespData. # noqa: E501 + :rtype: int + """ + return self._valid_timestamp + + @valid_timestamp.setter + def valid_timestamp(self, valid_timestamp): + """Sets the valid_timestamp of this FlashSwapOrderPreviewRespData. + + Quote expiration timestamp (in seconds) # noqa: E501 + + :param valid_timestamp: The valid_timestamp of this FlashSwapOrderPreviewRespData. # noqa: E501 + :type: int + """ + + self._valid_timestamp = valid_timestamp + + 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, FlashSwapOrderPreviewRespData): + 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, FlashSwapOrderPreviewRespData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py index cffe827b..1d88bae1 100644 --- a/gate_api/models/futures_batch_amend_order_request.py +++ b/gate_api/models/futures_batch_amend_order_request.py @@ -37,7 +37,8 @@ class FuturesBatchAmendOrderRequest(object): 'text': 'str', 'size': 'str', 'price': 'str', - 'amend_text': 'str' + 'amend_text': 'str', + 'action_mode': 'str' } attribute_map = { @@ -45,11 +46,12 @@ class FuturesBatchAmendOrderRequest(object): 'text': 'text', 'size': 'size', 'price': 'price', - 'amend_text': 'amend_text' + 'amend_text': 'amend_text', + 'action_mode': 'action_mode' } - def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, Configuration) -> None + def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, Configuration) -> None """FuturesBatchAmendOrderRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -60,6 +62,7 @@ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=N self._size = None self._price = None self._amend_text = None + self._action_mode = None self.discriminator = None if order_id is not None: @@ -72,6 +75,8 @@ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=N 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): @@ -188,6 +193,29 @@ def amend_text(self, amend_text): self._amend_text = amend_text + @property + def action_mode(self): + """Gets the action_mode of this FuturesBatchAmendOrderRequest. # noqa: E501 + + 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) # noqa: E501 + + :return: The action_mode of this FuturesBatchAmendOrderRequest. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this FuturesBatchAmendOrderRequest. + + 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) # noqa: E501 + + :param action_mode: The action_mode of this FuturesBatchAmendOrderRequest. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/futures_direction.py b/gate_api/models/futures_direction.py new file mode 100644 index 00000000..20c07672 --- /dev/null +++ b/gate_api/models/futures_direction.py @@ -0,0 +1,102 @@ +# 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 FuturesDirection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + LONG = "long" + SHORT = "short" + NEUTRAL = "neutral" + + allowable_values = [LONG, SHORT, NEUTRAL] # noqa: E501 + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + # type: (Configuration) -> None + """FuturesDirection - 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.discriminator = None + + 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, FuturesDirection): + 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, FuturesDirection): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_grid_create_params.py b/gate_api/models/futures_grid_create_params.py new file mode 100644 index 00000000..93291375 --- /dev/null +++ b/gate_api/models/futures_grid_create_params.py @@ -0,0 +1,422 @@ +# 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 FuturesGridCreateParams(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 = { + 'money': 'str', + 'low_price': 'str', + 'high_price': 'str', + 'grid_num': 'int', + 'price_type': 'int', + 'leverage': 'str', + 'direction': 'FuturesDirection', + 'trigger_price': 'str', + 'stop_profit': 'str', + 'stop_loss': 'str', + 'profit_sharing_ratio': 'str', + 'is_use_base': 'bool' + } + + attribute_map = { + 'money': 'money', + 'low_price': 'low_price', + 'high_price': 'high_price', + 'grid_num': 'grid_num', + 'price_type': 'price_type', + 'leverage': 'leverage', + 'direction': 'direction', + 'trigger_price': 'trigger_price', + 'stop_profit': 'stop_profit', + 'stop_loss': 'stop_loss', + 'profit_sharing_ratio': 'profit_sharing_ratio', + 'is_use_base': 'is_use_base' + } + + def __init__(self, money=None, low_price=None, high_price=None, grid_num=None, price_type=None, leverage=None, direction=None, trigger_price=None, stop_profit=None, stop_loss=None, profit_sharing_ratio=None, is_use_base=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, int, str, FuturesDirection, str, str, str, str, bool, Configuration) -> None + """FuturesGridCreateParams - 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._money = None + self._low_price = None + self._high_price = None + self._grid_num = None + self._price_type = None + self._leverage = None + self._direction = None + self._trigger_price = None + self._stop_profit = None + self._stop_loss = None + self._profit_sharing_ratio = None + self._is_use_base = None + self.discriminator = None + + self.money = money + self.low_price = low_price + self.high_price = high_price + self.grid_num = grid_num + self.price_type = price_type + self.leverage = leverage + if direction is not None: + self.direction = direction + if trigger_price is not None: + self.trigger_price = trigger_price + if stop_profit is not None: + self.stop_profit = stop_profit + if stop_loss is not None: + self.stop_loss = stop_loss + if profit_sharing_ratio is not None: + self.profit_sharing_ratio = profit_sharing_ratio + if is_use_base is not None: + self.is_use_base = is_use_base + + @property + def money(self): + """Gets the money of this FuturesGridCreateParams. # noqa: E501 + + + :return: The money of this FuturesGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this FuturesGridCreateParams. + + + :param money: The money of this FuturesGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and money is None: # noqa: E501 + raise ValueError("Invalid value for `money`, must not be `None`") # noqa: E501 + + self._money = money + + @property + def low_price(self): + """Gets the low_price of this FuturesGridCreateParams. # noqa: E501 + + + :return: The low_price of this FuturesGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._low_price + + @low_price.setter + def low_price(self, low_price): + """Sets the low_price of this FuturesGridCreateParams. + + + :param low_price: The low_price of this FuturesGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and low_price is None: # noqa: E501 + raise ValueError("Invalid value for `low_price`, must not be `None`") # noqa: E501 + + self._low_price = low_price + + @property + def high_price(self): + """Gets the high_price of this FuturesGridCreateParams. # noqa: E501 + + + :return: The high_price of this FuturesGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._high_price + + @high_price.setter + def high_price(self, high_price): + """Sets the high_price of this FuturesGridCreateParams. + + + :param high_price: The high_price of this FuturesGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and high_price is None: # noqa: E501 + raise ValueError("Invalid value for `high_price`, must not be `None`") # noqa: E501 + + self._high_price = high_price + + @property + def grid_num(self): + """Gets the grid_num of this FuturesGridCreateParams. # noqa: E501 + + + :return: The grid_num of this FuturesGridCreateParams. # noqa: E501 + :rtype: int + """ + return self._grid_num + + @grid_num.setter + def grid_num(self, grid_num): + """Sets the grid_num of this FuturesGridCreateParams. + + + :param grid_num: The grid_num of this FuturesGridCreateParams. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and grid_num is None: # noqa: E501 + raise ValueError("Invalid value for `grid_num`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + grid_num is not None and grid_num < 1): # noqa: E501 + raise ValueError("Invalid value for `grid_num`, must be a value greater than or equal to `1`") # noqa: E501 + + self._grid_num = grid_num + + @property + def price_type(self): + """Gets the price_type of this FuturesGridCreateParams. # noqa: E501 + + + :return: The price_type of this FuturesGridCreateParams. # noqa: E501 + :rtype: int + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this FuturesGridCreateParams. + + + :param price_type: The price_type of this FuturesGridCreateParams. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and price_type is None: # noqa: E501 + raise ValueError("Invalid value for `price_type`, must not be `None`") # noqa: E501 + allowed_values = [0, 1] # 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}" # noqa: E501 + .format(price_type, allowed_values) + ) + + self._price_type = price_type + + @property + def leverage(self): + """Gets the leverage of this FuturesGridCreateParams. # noqa: E501 + + + :return: The leverage of this FuturesGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this FuturesGridCreateParams. + + + :param leverage: The leverage of this FuturesGridCreateParams. # 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 + + @property + def direction(self): + """Gets the direction of this FuturesGridCreateParams. # noqa: E501 + + + :return: The direction of this FuturesGridCreateParams. # noqa: E501 + :rtype: FuturesDirection + """ + return self._direction + + @direction.setter + def direction(self, direction): + """Sets the direction of this FuturesGridCreateParams. + + + :param direction: The direction of this FuturesGridCreateParams. # noqa: E501 + :type: FuturesDirection + """ + + self._direction = direction + + @property + def trigger_price(self): + """Gets the trigger_price of this FuturesGridCreateParams. # noqa: E501 + + + :return: The trigger_price of this FuturesGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this FuturesGridCreateParams. + + + :param trigger_price: The trigger_price of this FuturesGridCreateParams. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def stop_profit(self): + """Gets the stop_profit of this FuturesGridCreateParams. # noqa: E501 + + + :return: The stop_profit of this FuturesGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_profit + + @stop_profit.setter + def stop_profit(self, stop_profit): + """Sets the stop_profit of this FuturesGridCreateParams. + + + :param stop_profit: The stop_profit of this FuturesGridCreateParams. # noqa: E501 + :type: str + """ + + self._stop_profit = stop_profit + + @property + def stop_loss(self): + """Gets the stop_loss of this FuturesGridCreateParams. # noqa: E501 + + + :return: The stop_loss of this FuturesGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_loss + + @stop_loss.setter + def stop_loss(self, stop_loss): + """Sets the stop_loss of this FuturesGridCreateParams. + + + :param stop_loss: The stop_loss of this FuturesGridCreateParams. # noqa: E501 + :type: str + """ + + self._stop_loss = stop_loss + + @property + def profit_sharing_ratio(self): + """Gets the profit_sharing_ratio of this FuturesGridCreateParams. # noqa: E501 + + + :return: The profit_sharing_ratio of this FuturesGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._profit_sharing_ratio + + @profit_sharing_ratio.setter + def profit_sharing_ratio(self, profit_sharing_ratio): + """Sets the profit_sharing_ratio of this FuturesGridCreateParams. + + + :param profit_sharing_ratio: The profit_sharing_ratio of this FuturesGridCreateParams. # noqa: E501 + :type: str + """ + + self._profit_sharing_ratio = profit_sharing_ratio + + @property + def is_use_base(self): + """Gets the is_use_base of this FuturesGridCreateParams. # noqa: E501 + + + :return: The is_use_base of this FuturesGridCreateParams. # noqa: E501 + :rtype: bool + """ + return self._is_use_base + + @is_use_base.setter + def is_use_base(self, is_use_base): + """Sets the is_use_base of this FuturesGridCreateParams. + + + :param is_use_base: The is_use_base of this FuturesGridCreateParams. # noqa: E501 + :type: bool + """ + + self._is_use_base = is_use_base + + 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, FuturesGridCreateParams): + 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, FuturesGridCreateParams): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_grid_create_request.py b/gate_api/models/futures_grid_create_request.py new file mode 100644 index 00000000..d8dc038d --- /dev/null +++ b/gate_api/models/futures_grid_create_request.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 FuturesGridCreateRequest(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 = { + 'strategy_type': 'str', + 'market': 'str', + 'create_params': 'FuturesGridCreateParams' + } + + attribute_map = { + 'strategy_type': 'strategy_type', + 'market': 'market', + 'create_params': 'create_params' + } + + def __init__(self, strategy_type=None, market=None, create_params=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, FuturesGridCreateParams, Configuration) -> None + """FuturesGridCreateRequest - 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._strategy_type = None + self._market = None + self._create_params = None + self.discriminator = None + + self.strategy_type = strategy_type + self.market = market + self.create_params = create_params + + @property + def strategy_type(self): + """Gets the strategy_type of this FuturesGridCreateRequest. # noqa: E501 + + + :return: The strategy_type of this FuturesGridCreateRequest. # noqa: E501 + :rtype: str + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this FuturesGridCreateRequest. + + + :param strategy_type: The strategy_type of this FuturesGridCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + allowed_values = ["futures_grid"] # 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}" # noqa: E501 + .format(strategy_type, allowed_values) + ) + + self._strategy_type = strategy_type + + @property + def market(self): + """Gets the market of this FuturesGridCreateRequest. # noqa: E501 + + + :return: The market of this FuturesGridCreateRequest. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this FuturesGridCreateRequest. + + + :param market: The market of this FuturesGridCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def create_params(self): + """Gets the create_params of this FuturesGridCreateRequest. # noqa: E501 + + + :return: The create_params of this FuturesGridCreateRequest. # noqa: E501 + :rtype: FuturesGridCreateParams + """ + return self._create_params + + @create_params.setter + def create_params(self, create_params): + """Sets the create_params of this FuturesGridCreateRequest. + + + :param create_params: The create_params of this FuturesGridCreateRequest. # noqa: E501 + :type: FuturesGridCreateParams + """ + if self.local_vars_configuration.client_side_validation and create_params is None: # noqa: E501 + raise ValueError("Invalid value for `create_params`, must not be `None`") # noqa: E501 + + self._create_params = create_params + + 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, FuturesGridCreateRequest): + 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, FuturesGridCreateRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py index 1ba42b72..991aa8b8 100644 --- a/gate_api/models/futures_initial_order.py +++ b/gate_api/models/futures_initial_order.py @@ -35,6 +35,7 @@ class FuturesInitialOrder(object): openapi_types = { 'contract': 'str', 'size': 'int', + 'amount': 'str', 'price': 'str', 'close': 'bool', 'tif': 'str', @@ -48,6 +49,7 @@ class FuturesInitialOrder(object): attribute_map = { 'contract': 'contract', 'size': 'size', + 'amount': 'amount', 'price': 'price', 'close': 'close', 'tif': 'tif', @@ -58,8 +60,8 @@ class FuturesInitialOrder(object): '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 - # type: (str, int, str, bool, str, str, bool, str, bool, bool, Configuration) -> None + def __init__(self, contract=None, size=None, amount=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, str, bool, str, str, bool, str, bool, bool, Configuration) -> None """FuturesInitialOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -67,6 +69,7 @@ def __init__(self, contract=None, size=None, price=None, close=False, tif='gtc', self._contract = None self._size = None + self._amount = None self._price = None self._close = None self._tif = None @@ -80,6 +83,8 @@ def __init__(self, contract=None, size=None, price=None, close=False, tif='gtc', self.contract = contract if size is not None: self.size = size + if amount is not None: + self.amount = amount self.price = price if close is not None: self.close = close @@ -144,6 +149,29 @@ def size(self, size): self._size = size + @property + def amount(self): + """Gets the amount of this FuturesInitialOrder. # noqa: E501 + + Same as `size`; used for decimal contract size. When both `size` and `amount` are provided, `amount` takes precedence. # noqa: E501 + + :return: The amount of this FuturesInitialOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this FuturesInitialOrder. + + Same as `size`; used for decimal contract size. When both `size` and `amount` are provided, `amount` takes precedence. # noqa: E501 + + :param amount: The amount of this FuturesInitialOrder. # noqa: E501 + :type: str + """ + + self._amount = amount + @property def price(self): """Gets the price of this FuturesInitialOrder. # noqa: E501 diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py index 2e19a2ee..99ad5d73 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -61,10 +61,13 @@ class FuturesOrder(object): 'stp_act': 'str', 'amend_text': 'str', 'pid': 'int', - 'order_value': 'str', - 'trade_value': 'str', 'market_order_slip_ratio': 'str', - 'pos_margin_mode': 'str' + 'pos_margin_mode': 'str', + 'action_mode': 'str', + 'tpsl_tp_trigger_price': 'str', + 'tpsl_sl_trigger_price': 'str', + 'tpsl_tp_bbo_type': 'str', + 'tpsl_sl_bbo_type': 'str' } attribute_map = { @@ -96,14 +99,17 @@ class FuturesOrder(object): 'stp_act': 'stp_act', 'amend_text': 'amend_text', 'pid': 'pid', - 'order_value': 'order_value', - 'trade_value': 'trade_value', 'market_order_slip_ratio': 'market_order_slip_ratio', - 'pos_margin_mode': 'pos_margin_mode' + 'pos_margin_mode': 'pos_margin_mode', + 'action_mode': 'action_mode', + 'tpsl_tp_trigger_price': 'tpsl_tp_trigger_price', + 'tpsl_sl_trigger_price': 'tpsl_sl_trigger_price', + 'tpsl_tp_bbo_type': 'tpsl_tp_bbo_type', + 'tpsl_sl_bbo_type': 'tpsl_sl_bbo_type' } - 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, pid=None, order_value=None, trade_value=None, market_order_slip_ratio=None, pos_margin_mode=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, float, float, float, str, str, str, str, str, str, bool, bool, bool, bool, bool, str, str, str, str, str, str, int, str, int, str, str, int, str, str, 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, pid=None, market_order_slip_ratio=None, pos_margin_mode=None, action_mode=None, tpsl_tp_trigger_price=None, tpsl_sl_trigger_price=None, tpsl_tp_bbo_type=None, tpsl_sl_bbo_type=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, float, float, float, str, str, str, str, str, str, bool, bool, bool, bool, bool, str, str, str, str, str, str, int, str, int, str, str, int, str, str, str, str, str, str, str, Configuration) -> None """FuturesOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -137,10 +143,13 @@ def __init__(self, id=None, user=None, create_time=None, update_time=None, finis self._stp_act = None self._amend_text = None self._pid = None - self._order_value = None - self._trade_value = None self._market_order_slip_ratio = None self._pos_margin_mode = None + self._action_mode = None + self._tpsl_tp_trigger_price = None + self._tpsl_sl_trigger_price = None + self._tpsl_tp_bbo_type = None + self._tpsl_sl_bbo_type = None self.discriminator = None if id is not None: @@ -196,14 +205,20 @@ def __init__(self, id=None, user=None, create_time=None, update_time=None, finis self.amend_text = amend_text if pid is not None: self.pid = pid - if order_value is not None: - self.order_value = order_value - if trade_value is not None: - self.trade_value = trade_value if market_order_slip_ratio is not None: self.market_order_slip_ratio = market_order_slip_ratio if pos_margin_mode is not None: self.pos_margin_mode = pos_margin_mode + if action_mode is not None: + self.action_mode = action_mode + if tpsl_tp_trigger_price is not None: + self.tpsl_tp_trigger_price = tpsl_tp_trigger_price + if tpsl_sl_trigger_price is not None: + self.tpsl_sl_trigger_price = tpsl_sl_trigger_price + if tpsl_tp_bbo_type is not None: + self.tpsl_tp_bbo_type = tpsl_tp_bbo_type + if tpsl_sl_bbo_type is not None: + self.tpsl_sl_bbo_type = tpsl_sl_bbo_type @property def id(self): @@ -886,96 +901,165 @@ def pid(self, pid): self._pid = pid @property - def order_value(self): - """Gets the order_value of this FuturesOrder. # noqa: E501 + def market_order_slip_ratio(self): + """Gets the market_order_slip_ratio of this FuturesOrder. # noqa: E501 - order's value # noqa: E501 + Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used # noqa: E501 - :return: The order_value of this FuturesOrder. # noqa: E501 + :return: The market_order_slip_ratio of this FuturesOrder. # noqa: E501 :rtype: str """ - return self._order_value + return self._market_order_slip_ratio - @order_value.setter - def order_value(self, order_value): - """Sets the order_value of this FuturesOrder. + @market_order_slip_ratio.setter + def market_order_slip_ratio(self, market_order_slip_ratio): + """Sets the market_order_slip_ratio of this FuturesOrder. - order's value # noqa: E501 + Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used # noqa: E501 - :param order_value: The order_value of this FuturesOrder. # noqa: E501 + :param market_order_slip_ratio: The market_order_slip_ratio of this FuturesOrder. # noqa: E501 :type: str """ - self._order_value = order_value + self._market_order_slip_ratio = market_order_slip_ratio @property - def trade_value(self): - """Gets the trade_value of this FuturesOrder. # noqa: E501 + def pos_margin_mode(self): + """Gets the pos_margin_mode of this FuturesOrder. # noqa: E501 - trade value # noqa: E501 + Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode # noqa: E501 - :return: The trade_value of this FuturesOrder. # noqa: E501 + :return: The pos_margin_mode of this FuturesOrder. # noqa: E501 :rtype: str """ - return self._trade_value + return self._pos_margin_mode - @trade_value.setter - def trade_value(self, trade_value): - """Sets the trade_value of this FuturesOrder. + @pos_margin_mode.setter + def pos_margin_mode(self, pos_margin_mode): + """Sets the pos_margin_mode of this FuturesOrder. - trade value # noqa: E501 + Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode # noqa: E501 - :param trade_value: The trade_value of this FuturesOrder. # noqa: E501 + :param pos_margin_mode: The pos_margin_mode of this FuturesOrder. # noqa: E501 :type: str """ - self._trade_value = trade_value + self._pos_margin_mode = pos_margin_mode @property - def market_order_slip_ratio(self): - """Gets the market_order_slip_ratio of this FuturesOrder. # noqa: E501 + def action_mode(self): + """Gets the action_mode of this FuturesOrder. # noqa: E501 - Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used # noqa: E501 + 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) # noqa: E501 - :return: The market_order_slip_ratio of this FuturesOrder. # noqa: E501 + :return: The action_mode of this FuturesOrder. # noqa: E501 :rtype: str """ - return self._market_order_slip_ratio + return self._action_mode - @market_order_slip_ratio.setter - def market_order_slip_ratio(self, market_order_slip_ratio): - """Sets the market_order_slip_ratio of this FuturesOrder. + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this FuturesOrder. - Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used # noqa: E501 + 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) # noqa: E501 - :param market_order_slip_ratio: The market_order_slip_ratio of this FuturesOrder. # noqa: E501 + :param action_mode: The action_mode of this FuturesOrder. # noqa: E501 :type: str """ - self._market_order_slip_ratio = market_order_slip_ratio + self._action_mode = action_mode @property - def pos_margin_mode(self): - """Gets the pos_margin_mode of this FuturesOrder. # noqa: E501 + def tpsl_tp_trigger_price(self): + """Gets the tpsl_tp_trigger_price of this FuturesOrder. # noqa: E501 - Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode # noqa: E501 + Take profit price # noqa: E501 - :return: The pos_margin_mode of this FuturesOrder. # noqa: E501 + :return: The tpsl_tp_trigger_price of this FuturesOrder. # noqa: E501 :rtype: str """ - return self._pos_margin_mode + return self._tpsl_tp_trigger_price - @pos_margin_mode.setter - def pos_margin_mode(self, pos_margin_mode): - """Sets the pos_margin_mode of this FuturesOrder. + @tpsl_tp_trigger_price.setter + def tpsl_tp_trigger_price(self, tpsl_tp_trigger_price): + """Sets the tpsl_tp_trigger_price of this FuturesOrder. - Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode # noqa: E501 + Take profit price # noqa: E501 - :param pos_margin_mode: The pos_margin_mode of this FuturesOrder. # noqa: E501 + :param tpsl_tp_trigger_price: The tpsl_tp_trigger_price of this FuturesOrder. # noqa: E501 :type: str """ - self._pos_margin_mode = pos_margin_mode + self._tpsl_tp_trigger_price = tpsl_tp_trigger_price + + @property + def tpsl_sl_trigger_price(self): + """Gets the tpsl_sl_trigger_price of this FuturesOrder. # noqa: E501 + + Stop loss price # noqa: E501 + + :return: The tpsl_sl_trigger_price of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._tpsl_sl_trigger_price + + @tpsl_sl_trigger_price.setter + def tpsl_sl_trigger_price(self, tpsl_sl_trigger_price): + """Sets the tpsl_sl_trigger_price of this FuturesOrder. + + Stop loss price # noqa: E501 + + :param tpsl_sl_trigger_price: The tpsl_sl_trigger_price of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._tpsl_sl_trigger_price = tpsl_sl_trigger_price + + @property + def tpsl_tp_bbo_type(self): + """Gets the tpsl_tp_bbo_type of this FuturesOrder. # noqa: E501 + + Take profit BBO type # noqa: E501 + + :return: The tpsl_tp_bbo_type of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._tpsl_tp_bbo_type + + @tpsl_tp_bbo_type.setter + def tpsl_tp_bbo_type(self, tpsl_tp_bbo_type): + """Sets the tpsl_tp_bbo_type of this FuturesOrder. + + Take profit BBO type # noqa: E501 + + :param tpsl_tp_bbo_type: The tpsl_tp_bbo_type of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._tpsl_tp_bbo_type = tpsl_tp_bbo_type + + @property + def tpsl_sl_bbo_type(self): + """Gets the tpsl_sl_bbo_type of this FuturesOrder. # noqa: E501 + + Stop loss BBO type # noqa: E501 + + :return: The tpsl_sl_bbo_type of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._tpsl_sl_bbo_type + + @tpsl_sl_bbo_type.setter + def tpsl_sl_bbo_type(self, tpsl_sl_bbo_type): + """Sets the tpsl_sl_bbo_type of this FuturesOrder. + + Stop loss BBO type # noqa: E501 + + :param tpsl_sl_bbo_type: The tpsl_sl_bbo_type of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._tpsl_sl_bbo_type = tpsl_sl_bbo_type def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py index fe5c6a47..777547a6 100644 --- a/gate_api/models/futures_order_amendment.py +++ b/gate_api/models/futures_order_amendment.py @@ -36,18 +36,20 @@ class FuturesOrderAmendment(object): 'size': 'str', 'price': 'str', 'amend_text': 'str', - 'text': 'str' + 'text': 'str', + 'action_mode': 'str' } attribute_map = { 'size': 'size', 'price': 'price', 'amend_text': 'amend_text', - 'text': 'text' + 'text': 'text', + 'action_mode': 'action_mode' } - def __init__(self, size=None, price=None, amend_text=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None + def __init__(self, size=None, price=None, amend_text=None, text=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None """FuturesOrderAmendment - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -57,6 +59,7 @@ def __init__(self, size=None, price=None, amend_text=None, text=None, local_vars self._price = None self._amend_text = None self._text = None + self._action_mode = None self.discriminator = None if size is not None: @@ -67,6 +70,8 @@ def __init__(self, size=None, price=None, amend_text=None, text=None, local_vars self.amend_text = amend_text if text is not None: self.text = text + if action_mode is not None: + self.action_mode = action_mode @property def size(self): @@ -160,6 +165,29 @@ def text(self, text): self._text = text + @property + def action_mode(self): + """Gets the action_mode of this FuturesOrderAmendment. # noqa: E501 + + 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) # noqa: E501 + + :return: The action_mode of this FuturesOrderAmendment. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this FuturesOrderAmendment. + + 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) # noqa: E501 + + :param action_mode: The action_mode of this FuturesOrderAmendment. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/futures_order_timerange.py b/gate_api/models/futures_order_timerange.py new file mode 100644 index 00000000..eee7da69 --- /dev/null +++ b/gate_api/models/futures_order_timerange.py @@ -0,0 +1,1024 @@ +# 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 FuturesOrderTimerange(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', + 'user': 'int', + 'create_time': 'float', + 'update_time': 'str', + 'finish_time': 'str', + 'finish_as': 'str', + 'status': 'str', + 'contract': 'str', + 'size': 'str', + 'iceberg': 'str', + 'price': 'str', + 'close': 'bool', + 'is_close': 'bool', + 'reduce_only': 'bool', + 'is_reduce_only': 'bool', + 'is_liq': 'bool', + 'tif': 'str', + 'left': 'str', + 'fill_price': 'str', + 'text': 'str', + 'tkfr': 'str', + 'mkfr': 'str', + 'refu': 'int', + 'auto_size': 'str', + 'stp_id': 'int', + 'stp_act': 'str', + 'amend_text': 'str', + 'pid': 'int', + 'market_order_slip_ratio': 'str', + 'pos_margin_mode': 'str', + 'tpsl_tp_trigger_price': 'str', + 'tpsl_sl_trigger_price': 'str' + } + + attribute_map = { + 'id': 'id', + 'user': 'user', + 'create_time': 'create_time', + 'update_time': 'update_time', + 'finish_time': 'finish_time', + 'finish_as': 'finish_as', + 'status': 'status', + 'contract': 'contract', + 'size': 'size', + 'iceberg': 'iceberg', + 'price': 'price', + 'close': 'close', + 'is_close': 'is_close', + 'reduce_only': 'reduce_only', + 'is_reduce_only': 'is_reduce_only', + 'is_liq': 'is_liq', + 'tif': 'tif', + 'left': 'left', + 'fill_price': 'fill_price', + 'text': 'text', + 'tkfr': 'tkfr', + 'mkfr': 'mkfr', + 'refu': 'refu', + 'auto_size': 'auto_size', + 'stp_id': 'stp_id', + 'stp_act': 'stp_act', + 'amend_text': 'amend_text', + 'pid': 'pid', + 'market_order_slip_ratio': 'market_order_slip_ratio', + 'pos_margin_mode': 'pos_margin_mode', + 'tpsl_tp_trigger_price': 'tpsl_tp_trigger_price', + 'tpsl_sl_trigger_price': 'tpsl_sl_trigger_price' + } + + 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, pid=None, market_order_slip_ratio=None, pos_margin_mode=None, tpsl_tp_trigger_price=None, tpsl_sl_trigger_price=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, float, str, str, str, str, str, str, str, str, bool, bool, bool, bool, bool, str, str, str, str, str, str, int, str, int, str, str, int, str, str, str, str, Configuration) -> None + """FuturesOrderTimerange - 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 = None + self._create_time = None + self._update_time = None + self._finish_time = None + self._finish_as = None + self._status = None + self._contract = None + self._size = None + self._iceberg = None + self._price = None + self._close = None + self._is_close = None + self._reduce_only = None + self._is_reduce_only = None + self._is_liq = None + self._tif = None + self._left = None + self._fill_price = None + self._text = None + self._tkfr = None + self._mkfr = None + self._refu = None + self._auto_size = None + self._stp_id = None + self._stp_act = None + self._amend_text = None + self._pid = None + self._market_order_slip_ratio = None + self._pos_margin_mode = None + self._tpsl_tp_trigger_price = None + self._tpsl_sl_trigger_price = None + self.discriminator = None + + if id is not None: + self.id = id + if user is not None: + 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: + self.finish_as = finish_as + if status is not None: + self.status = status + self.contract = contract + self.size = size + if iceberg is not None: + self.iceberg = iceberg + self.price = price + if close is not None: + self.close = close + if is_close is not None: + self.is_close = is_close + if reduce_only is not None: + self.reduce_only = reduce_only + if is_reduce_only is not None: + self.is_reduce_only = is_reduce_only + if is_liq is not None: + self.is_liq = is_liq + if tif is not None: + self.tif = tif + if left is not None: + self.left = left + if fill_price is not None: + self.fill_price = fill_price + if text is not None: + self.text = text + if tkfr is not None: + self.tkfr = tkfr + if mkfr is not None: + self.mkfr = mkfr + if refu is not None: + self.refu = refu + if auto_size is not None: + self.auto_size = auto_size + if stp_id is not None: + self.stp_id = stp_id + if stp_act is not None: + self.stp_act = stp_act + if amend_text is not None: + self.amend_text = amend_text + if pid is not None: + self.pid = pid + if market_order_slip_ratio is not None: + self.market_order_slip_ratio = market_order_slip_ratio + if pos_margin_mode is not None: + self.pos_margin_mode = pos_margin_mode + if tpsl_tp_trigger_price is not None: + self.tpsl_tp_trigger_price = tpsl_tp_trigger_price + if tpsl_sl_trigger_price is not None: + self.tpsl_sl_trigger_price = tpsl_sl_trigger_price + + @property + def id(self): + """Gets the id of this FuturesOrderTimerange. # noqa: E501 + + Futures order ID # noqa: E501 + + :return: The id of this FuturesOrderTimerange. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FuturesOrderTimerange. + + Futures order ID # noqa: E501 + + :param id: The id of this FuturesOrderTimerange. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def user(self): + """Gets the user of this FuturesOrderTimerange. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this FuturesOrderTimerange. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this FuturesOrderTimerange. + + User ID # noqa: E501 + + :param user: The user of this FuturesOrderTimerange. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def create_time(self): + """Gets the create_time of this FuturesOrderTimerange. # noqa: E501 + + Creation time of order # noqa: E501 + + :return: The create_time of this FuturesOrderTimerange. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FuturesOrderTimerange. + + Creation time of order # noqa: E501 + + :param create_time: The create_time of this FuturesOrderTimerange. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this FuturesOrderTimerange. # noqa: E501 + + OrderUpdateTime # noqa: E501 + + :return: The update_time of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this FuturesOrderTimerange. + + OrderUpdateTime # noqa: E501 + + :param update_time: The update_time of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._update_time = update_time + + @property + def finish_time(self): + """Gets the finish_time of this FuturesOrderTimerange. # noqa: E501 + + Order finished time. Not returned if order is open # noqa: E501 + + :return: The finish_time of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._finish_time + + @finish_time.setter + def finish_time(self, finish_time): + """Sets the finish_time of this FuturesOrderTimerange. + + Order finished time. Not returned if order is open # noqa: E501 + + :param finish_time: The finish_time of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._finish_time = finish_time + + @property + def finish_as(self): + """Gets the finish_as of this FuturesOrderTimerange. # 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 FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this FuturesOrderTimerange. + + 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 FuturesOrderTimerange. # noqa: E501 + :type: str + """ + 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}" # noqa: E501 + .format(finish_as, allowed_values) + ) + + self._finish_as = finish_as + + @property + def status(self): + """Gets the status of this FuturesOrderTimerange. # noqa: E501 + + Order status - `open`: Pending - `finished`: Completed # noqa: E501 + + :return: The status of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FuturesOrderTimerange. + + Order status - `open`: Pending - `finished`: Completed # noqa: E501 + + :param status: The status of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + 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}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def contract(self): + """Gets the contract of this FuturesOrderTimerange. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesOrderTimerange. + + Futures contract # noqa: E501 + + :param contract: The contract of this FuturesOrderTimerange. # 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 FuturesOrderTimerange. # 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 FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this FuturesOrderTimerange. + + Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501 + + :param size: The size of this FuturesOrderTimerange. # 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 iceberg(self): + """Gets the iceberg of this FuturesOrderTimerange. # 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 FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._iceberg + + @iceberg.setter + def iceberg(self, iceberg): + """Sets the iceberg of this FuturesOrderTimerange. + + 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 FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._iceberg = iceberg + + @property + def price(self): + """Gets the price of this FuturesOrderTimerange. # noqa: E501 + + Required. Order Price; a price of 0 with `tif` as `ioc` represents a market order. # noqa: E501 + + :return: The price of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FuturesOrderTimerange. + + Required. Order Price; a price of 0 with `tif` as `ioc` represents a market order. # noqa: E501 + + :param price: The price of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 + raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 + + self._price = price + + @property + def close(self): + """Gets the close of this FuturesOrderTimerange. # noqa: E501 + + Set as `true` to close the position, with `size` set to 0 # noqa: E501 + + :return: The close of this FuturesOrderTimerange. # noqa: E501 + :rtype: bool + """ + return self._close + + @close.setter + def close(self, close): + """Sets the close of this FuturesOrderTimerange. + + Set as `true` to close the position, with `size` set to 0 # noqa: E501 + + :param close: The close of this FuturesOrderTimerange. # noqa: E501 + :type: bool + """ + + self._close = close + + @property + def is_close(self): + """Gets the is_close of this FuturesOrderTimerange. # noqa: E501 + + Is the order to close position # noqa: E501 + + :return: The is_close of this FuturesOrderTimerange. # noqa: E501 + :rtype: bool + """ + return self._is_close + + @is_close.setter + def is_close(self, is_close): + """Sets the is_close of this FuturesOrderTimerange. + + Is the order to close position # noqa: E501 + + :param is_close: The is_close of this FuturesOrderTimerange. # noqa: E501 + :type: bool + """ + + self._is_close = is_close + + @property + def reduce_only(self): + """Gets the reduce_only of this FuturesOrderTimerange. # noqa: E501 + + Set as `true` to be reduce-only order # noqa: E501 + + :return: The reduce_only of this FuturesOrderTimerange. # noqa: E501 + :rtype: bool + """ + return self._reduce_only + + @reduce_only.setter + def reduce_only(self, reduce_only): + """Sets the reduce_only of this FuturesOrderTimerange. + + Set as `true` to be reduce-only order # noqa: E501 + + :param reduce_only: The reduce_only of this FuturesOrderTimerange. # noqa: E501 + :type: bool + """ + + self._reduce_only = reduce_only + + @property + def is_reduce_only(self): + """Gets the is_reduce_only of this FuturesOrderTimerange. # noqa: E501 + + Is the order reduce-only # noqa: E501 + + :return: The is_reduce_only of this FuturesOrderTimerange. # noqa: E501 + :rtype: bool + """ + return self._is_reduce_only + + @is_reduce_only.setter + def is_reduce_only(self, is_reduce_only): + """Sets the is_reduce_only of this FuturesOrderTimerange. + + Is the order reduce-only # noqa: E501 + + :param is_reduce_only: The is_reduce_only of this FuturesOrderTimerange. # noqa: E501 + :type: bool + """ + + self._is_reduce_only = is_reduce_only + + @property + def is_liq(self): + """Gets the is_liq of this FuturesOrderTimerange. # noqa: E501 + + Is the order for liquidation # noqa: E501 + + :return: The is_liq of this FuturesOrderTimerange. # noqa: E501 + :rtype: bool + """ + return self._is_liq + + @is_liq.setter + def is_liq(self, is_liq): + """Sets the is_liq of this FuturesOrderTimerange. + + Is the order for liquidation # noqa: E501 + + :param is_liq: The is_liq of this FuturesOrderTimerange. # noqa: E501 + :type: bool + """ + + self._is_liq = is_liq + + @property + def tif(self): + """Gets the tif of this FuturesOrderTimerange. # 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 # noqa: E501 + + :return: The tif of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._tif + + @tif.setter + def tif(self, tif): + """Sets the tif of this FuturesOrderTimerange. + + 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 # noqa: E501 + + :param tif: The tif of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + 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}" # noqa: E501 + .format(tif, allowed_values) + ) + + self._tif = tif + + @property + def left(self): + """Gets the left of this FuturesOrderTimerange. # noqa: E501 + + Unfilled quantity # noqa: E501 + + :return: The left of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this FuturesOrderTimerange. + + Unfilled quantity # noqa: E501 + + :param left: The left of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._left = left + + @property + def fill_price(self): + """Gets the fill_price of this FuturesOrderTimerange. # noqa: E501 + + Fill price # noqa: E501 + + :return: The fill_price of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this FuturesOrderTimerange. + + Fill price # noqa: E501 + + :param fill_price: The fill_price of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def text(self): + """Gets the text of this FuturesOrderTimerange. # 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 - clear: Contract delisting withdrawal # noqa: E501 + + :return: The text of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this FuturesOrderTimerange. + + 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 - clear: Contract delisting withdrawal # noqa: E501 + + :param text: The text of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def tkfr(self): + """Gets the tkfr of this FuturesOrderTimerange. # noqa: E501 + + Taker fee # noqa: E501 + + :return: The tkfr of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._tkfr + + @tkfr.setter + def tkfr(self, tkfr): + """Sets the tkfr of this FuturesOrderTimerange. + + Taker fee # noqa: E501 + + :param tkfr: The tkfr of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._tkfr = tkfr + + @property + def mkfr(self): + """Gets the mkfr of this FuturesOrderTimerange. # noqa: E501 + + Maker fee # noqa: E501 + + :return: The mkfr of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._mkfr + + @mkfr.setter + def mkfr(self, mkfr): + """Sets the mkfr of this FuturesOrderTimerange. + + Maker fee # noqa: E501 + + :param mkfr: The mkfr of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._mkfr = mkfr + + @property + def refu(self): + """Gets the refu of this FuturesOrderTimerange. # noqa: E501 + + Referrer user ID # noqa: E501 + + :return: The refu of this FuturesOrderTimerange. # noqa: E501 + :rtype: int + """ + return self._refu + + @refu.setter + def refu(self, refu): + """Sets the refu of this FuturesOrderTimerange. + + Referrer user ID # noqa: E501 + + :param refu: The refu of this FuturesOrderTimerange. # noqa: E501 + :type: int + """ + + self._refu = refu + + @property + def auto_size(self): + """Gets the auto_size of this FuturesOrderTimerange. # 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 + + :return: The auto_size of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._auto_size + + @auto_size.setter + def auto_size(self, auto_size): + """Sets the auto_size of this FuturesOrderTimerange. + + 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 + + :param auto_size: The auto_size of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + 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}" # noqa: E501 + .format(auto_size, allowed_values) + ) + + self._auto_size = auto_size + + @property + def stp_id(self): + """Gets the stp_id of this FuturesOrderTimerange. # 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 FuturesOrderTimerange. # noqa: E501 + :rtype: int + """ + return self._stp_id + + @stp_id.setter + def stp_id(self, stp_id): + """Sets the stp_id of this FuturesOrderTimerange. + + 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 FuturesOrderTimerange. # noqa: E501 + :type: int + """ + + self._stp_id = stp_id + + @property + def stp_act(self): + """Gets the stp_act of this FuturesOrderTimerange. # 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 FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._stp_act + + @stp_act.setter + def stp_act(self, stp_act): + """Sets the stp_act of this FuturesOrderTimerange. + + 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 FuturesOrderTimerange. # noqa: E501 + :type: str + """ + 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}" # noqa: E501 + .format(stp_act, allowed_values) + ) + + self._stp_act = stp_act + + @property + def amend_text(self): + """Gets the amend_text of this FuturesOrderTimerange. # noqa: E501 + + The custom data that the user remarked when amending the order # noqa: E501 + + :return: The amend_text of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this FuturesOrderTimerange. + + The custom data that the user remarked when amending the order # noqa: E501 + + :param amend_text: The amend_text of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + @property + def pid(self): + """Gets the pid of this FuturesOrderTimerange. # noqa: E501 + + Position ID # noqa: E501 + + :return: The pid of this FuturesOrderTimerange. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this FuturesOrderTimerange. + + Position ID # noqa: E501 + + :param pid: The pid of this FuturesOrderTimerange. # noqa: E501 + :type: int + """ + + self._pid = pid + + @property + def market_order_slip_ratio(self): + """Gets the market_order_slip_ratio of this FuturesOrderTimerange. # noqa: E501 + + Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used # noqa: E501 + + :return: The market_order_slip_ratio of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._market_order_slip_ratio + + @market_order_slip_ratio.setter + def market_order_slip_ratio(self, market_order_slip_ratio): + """Sets the market_order_slip_ratio of this FuturesOrderTimerange. + + Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used # noqa: E501 + + :param market_order_slip_ratio: The market_order_slip_ratio of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._market_order_slip_ratio = market_order_slip_ratio + + @property + def pos_margin_mode(self): + """Gets the pos_margin_mode of this FuturesOrderTimerange. # noqa: E501 + + Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode # noqa: E501 + + :return: The pos_margin_mode of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._pos_margin_mode + + @pos_margin_mode.setter + def pos_margin_mode(self, pos_margin_mode): + """Sets the pos_margin_mode of this FuturesOrderTimerange. + + Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode # noqa: E501 + + :param pos_margin_mode: The pos_margin_mode of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._pos_margin_mode = pos_margin_mode + + @property + def tpsl_tp_trigger_price(self): + """Gets the tpsl_tp_trigger_price of this FuturesOrderTimerange. # noqa: E501 + + Take profit price # noqa: E501 + + :return: The tpsl_tp_trigger_price of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._tpsl_tp_trigger_price + + @tpsl_tp_trigger_price.setter + def tpsl_tp_trigger_price(self, tpsl_tp_trigger_price): + """Sets the tpsl_tp_trigger_price of this FuturesOrderTimerange. + + Take profit price # noqa: E501 + + :param tpsl_tp_trigger_price: The tpsl_tp_trigger_price of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._tpsl_tp_trigger_price = tpsl_tp_trigger_price + + @property + def tpsl_sl_trigger_price(self): + """Gets the tpsl_sl_trigger_price of this FuturesOrderTimerange. # noqa: E501 + + Stop loss price # noqa: E501 + + :return: The tpsl_sl_trigger_price of this FuturesOrderTimerange. # noqa: E501 + :rtype: str + """ + return self._tpsl_sl_trigger_price + + @tpsl_sl_trigger_price.setter + def tpsl_sl_trigger_price(self, tpsl_sl_trigger_price): + """Sets the tpsl_sl_trigger_price of this FuturesOrderTimerange. + + Stop loss price # noqa: E501 + + :param tpsl_sl_trigger_price: The tpsl_sl_trigger_price of this FuturesOrderTimerange. # noqa: E501 + :type: str + """ + + self._tpsl_sl_trigger_price = tpsl_sl_trigger_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, FuturesOrderTimerange): + 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, FuturesOrderTimerange): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py index 14e16ae0..625fbf97 100644 --- a/gate_api/models/futures_price_triggered_order.py +++ b/gate_api/models/futures_price_triggered_order.py @@ -36,6 +36,7 @@ class FuturesPriceTriggeredOrder(object): 'initial': 'FuturesInitialOrder', 'trigger': 'FuturesPriceTrigger', 'id': 'int', + 'id_string': 'str', 'user': 'int', 'create_time': 'float', 'finish_time': 'float', @@ -44,13 +45,15 @@ class FuturesPriceTriggeredOrder(object): 'finish_as': 'str', 'reason': 'str', 'order_type': 'str', - 'me_order_id': 'int' + 'me_order_id': 'int', + 'pos_margin_mode': 'str' } attribute_map = { 'initial': 'initial', 'trigger': 'trigger', 'id': 'id', + 'id_string': 'id_string', 'user': 'user', 'create_time': 'create_time', 'finish_time': 'finish_time', @@ -59,11 +62,12 @@ 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', + 'pos_margin_mode': 'pos_margin_mode' } - 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 + def __init__(self, initial=None, trigger=None, id=None, id_string=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, pos_margin_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (FuturesInitialOrder, FuturesPriceTrigger, int, str, int, float, float, int, str, str, str, str, int, str, Configuration) -> None """FuturesPriceTriggeredOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -72,6 +76,7 @@ def __init__(self, initial=None, trigger=None, id=None, user=None, create_time=N self._initial = None self._trigger = None self._id = None + self._id_string = None self._user = None self._create_time = None self._finish_time = None @@ -81,12 +86,15 @@ def __init__(self, initial=None, trigger=None, id=None, user=None, create_time=N self._reason = None self._order_type = None self._me_order_id = None + self._pos_margin_mode = None self.discriminator = None self.initial = initial self.trigger = trigger if id is not None: self.id = id + if id_string is not None: + self.id_string = id_string if user is not None: self.user = user if create_time is not None: @@ -105,6 +113,8 @@ def __init__(self, initial=None, trigger=None, id=None, user=None, create_time=N self.order_type = order_type if me_order_id is not None: self.me_order_id = me_order_id + if pos_margin_mode is not None: + self.pos_margin_mode = pos_margin_mode @property def initial(self): @@ -175,6 +185,29 @@ def id(self, id): self._id = id + @property + def id_string(self): + """Gets the id_string of this FuturesPriceTriggeredOrder. # noqa: E501 + + String form of the auto order ID; the same order as numeric `id`, as the decimal string of `id` to avoid int64 precision loss in JavaScript and similar environments. Prefer this field to display the order ID or when a string unique identifier is needed; one-to-one with `id`. Same meaning as the field of the same name in futures price-trigger REST APIs and in `futures.orders` / `futures.autoorders` WebSocket pushes. # noqa: E501 + + :return: The id_string of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._id_string + + @id_string.setter + def id_string(self, id_string): + """Sets the id_string of this FuturesPriceTriggeredOrder. + + String form of the auto order ID; the same order as numeric `id`, as the decimal string of `id` to avoid int64 precision loss in JavaScript and similar environments. Prefer this field to display the order ID or when a string unique identifier is needed; one-to-one with `id`. Same meaning as the field of the same name in futures price-trigger REST APIs and in `futures.orders` / `futures.autoorders` WebSocket pushes. # noqa: E501 + + :param id_string: The id_string of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: str + """ + + self._id_string = id_string + @property def user(self): """Gets the user of this FuturesPriceTriggeredOrder. # noqa: E501 @@ -394,6 +427,35 @@ def me_order_id(self, me_order_id): self._me_order_id = me_order_id + @property + def pos_margin_mode(self): + """Gets the pos_margin_mode of this FuturesPriceTriggeredOrder. # noqa: E501 + + Position margin mode: `isolated` (isolated margin) or `cross` (cross margin). Returned by the server in simple split-position mode; when writing, use only the values below. # noqa: E501 + + :return: The pos_margin_mode of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._pos_margin_mode + + @pos_margin_mode.setter + def pos_margin_mode(self, pos_margin_mode): + """Sets the pos_margin_mode of this FuturesPriceTriggeredOrder. + + Position margin mode: `isolated` (isolated margin) or `cross` (cross margin). Returned by the server in simple split-position mode; when writing, use only the values below. # noqa: E501 + + :param pos_margin_mode: The pos_margin_mode of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: str + """ + allowed_values = ["isolated", "cross"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and pos_margin_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `pos_margin_mode` ({0}), must be one of {1}" # noqa: E501 + .format(pos_margin_mode, allowed_values) + ) + + self._pos_margin_mode = pos_margin_mode + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/futures_update_price_triggered_order.py b/gate_api/models/futures_update_price_triggered_order.py index 8ea93e2d..20c846d2 100644 --- a/gate_api/models/futures_update_price_triggered_order.py +++ b/gate_api/models/futures_update_price_triggered_order.py @@ -36,6 +36,7 @@ class FuturesUpdatePriceTriggeredOrder(object): 'settle': 'str', 'order_id': 'int', 'size': 'int', + 'amount': 'str', 'price': 'str', 'trigger_price': 'str', 'price_type': 'int', @@ -47,6 +48,7 @@ class FuturesUpdatePriceTriggeredOrder(object): 'settle': 'settle', 'order_id': 'order_id', 'size': 'size', + 'amount': 'amount', 'price': 'price', 'trigger_price': 'trigger_price', 'price_type': 'price_type', @@ -54,8 +56,8 @@ class FuturesUpdatePriceTriggeredOrder(object): 'close': 'close' } - def __init__(self, settle=None, order_id=None, size=None, price=None, trigger_price=None, price_type=None, auto_size=None, close=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, int, str, str, int, str, bool, Configuration) -> None + def __init__(self, settle=None, order_id=None, size=None, amount=None, price=None, trigger_price=None, price_type=None, auto_size=None, close=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, int, str, str, str, int, str, bool, Configuration) -> None """FuturesUpdatePriceTriggeredOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -64,6 +66,7 @@ def __init__(self, settle=None, order_id=None, size=None, price=None, trigger_pr self._settle = None self._order_id = None self._size = None + self._amount = None self._price = None self._trigger_price = None self._price_type = None @@ -76,6 +79,8 @@ def __init__(self, settle=None, order_id=None, size=None, price=None, trigger_pr self.order_id = order_id if size is not None: self.size = size + if amount is not None: + self.amount = amount if price is not None: self.price = price if trigger_price is not None: @@ -158,6 +163,29 @@ def size(self, size): self._size = size + @property + def amount(self): + """Gets the amount of this FuturesUpdatePriceTriggeredOrder. # noqa: E501 + + Same as `size`; used for decimal contract size. When both `size` and `amount` are provided, `amount` takes precedence. # noqa: E501 + + :return: The amount of this FuturesUpdatePriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this FuturesUpdatePriceTriggeredOrder. + + Same as `size`; used for decimal contract size. When both `size` and `amount` are provided, `amount` takes precedence. # noqa: E501 + + :param amount: The amount of this FuturesUpdatePriceTriggeredOrder. # noqa: E501 + :type: str + """ + + self._amount = amount + @property def price(self): """Gets the price of this FuturesUpdatePriceTriggeredOrder. # noqa: E501 diff --git a/gate_api/models/gate_error_response.py b/gate_api/models/gate_error_response.py new file mode 100644 index 00000000..97ec5856 --- /dev/null +++ b/gate_api/models/gate_error_response.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 GateErrorResponse(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 = { + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'label': 'label', + 'message': 'message' + } + + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """GateErrorResponse - 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._label = None + self._message = None + self.discriminator = None + + if label is not None: + self.label = label + if message is not None: + self.message = message + + @property + def label(self): + """Gets the label of this GateErrorResponse. # noqa: E501 + + Error label # noqa: E501 + + :return: The label of this GateErrorResponse. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this GateErrorResponse. + + Error label # noqa: E501 + + :param label: The label of this GateErrorResponse. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this GateErrorResponse. # noqa: E501 + + Detailed error message # noqa: E501 + + :return: The message of this GateErrorResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this GateErrorResponse. + + Detailed error message # noqa: E501 + + :param message: The message of this GateErrorResponse. # 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, GateErrorResponse): + 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, GateErrorResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/get_beginner_task_list_error.py b/gate_api/models/get_beginner_task_list_error.py new file mode 100644 index 00000000..e12c7b39 --- /dev/null +++ b/gate_api/models/get_beginner_task_list_error.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 GetBeginnerTaskListError(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 = { + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'label': 'label', + 'message': 'message' + } + + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """GetBeginnerTaskListError - 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._label = None + self._message = None + self.discriminator = None + + if label is not None: + self.label = label + if message is not None: + self.message = message + + @property + def label(self): + """Gets the label of this GetBeginnerTaskListError. # noqa: E501 + + Error identifier code # noqa: E501 + + :return: The label of this GetBeginnerTaskListError. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this GetBeginnerTaskListError. + + Error identifier code # noqa: E501 + + :param label: The label of this GetBeginnerTaskListError. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this GetBeginnerTaskListError. # noqa: E501 + + Error details # noqa: E501 + + :return: The message of this GetBeginnerTaskListError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this GetBeginnerTaskListError. + + Error details # noqa: E501 + + :param message: The message of this GetBeginnerTaskListError. # 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, GetBeginnerTaskListError): + 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, GetBeginnerTaskListError): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/get_chase_order_detail_resp.py b/gate_api/models/get_chase_order_detail_resp.py new file mode 100644 index 00000000..c3836d26 --- /dev/null +++ b/gate_api/models/get_chase_order_detail_resp.py @@ -0,0 +1,121 @@ +# 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 GetChaseOrderDetailResp(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': 'ChaseOrder' + } + + attribute_map = { + 'order': 'order' + } + + def __init__(self, order=None, local_vars_configuration=None): # noqa: E501 + # type: (ChaseOrder, Configuration) -> None + """GetChaseOrderDetailResp - 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 = None + self.discriminator = None + + if order is not None: + self.order = order + + @property + def order(self): + """Gets the order of this GetChaseOrderDetailResp. # noqa: E501 + + + :return: The order of this GetChaseOrderDetailResp. # noqa: E501 + :rtype: ChaseOrder + """ + return self._order + + @order.setter + def order(self, order): + """Sets the order of this GetChaseOrderDetailResp. + + + :param order: The order of this GetChaseOrderDetailResp. # noqa: E501 + :type: ChaseOrder + """ + + self._order = order + + 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, GetChaseOrderDetailResp): + 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, GetChaseOrderDetailResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/get_chase_orders_resp.py b/gate_api/models/get_chase_orders_resp.py new file mode 100644 index 00000000..bdbb47e3 --- /dev/null +++ b/gate_api/models/get_chase_orders_resp.py @@ -0,0 +1,121 @@ +# 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 GetChaseOrdersResp(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 = { + 'orders': 'list[ChaseOrder]' + } + + attribute_map = { + 'orders': 'orders' + } + + def __init__(self, orders=None, local_vars_configuration=None): # noqa: E501 + # type: (list[ChaseOrder], Configuration) -> None + """GetChaseOrdersResp - 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._orders = None + self.discriminator = None + + if orders is not None: + self.orders = orders + + @property + def orders(self): + """Gets the orders of this GetChaseOrdersResp. # noqa: E501 + + + :return: The orders of this GetChaseOrdersResp. # noqa: E501 + :rtype: list[ChaseOrder] + """ + return self._orders + + @orders.setter + def orders(self, orders): + """Sets the orders of this GetChaseOrdersResp. + + + :param orders: The orders of this GetChaseOrdersResp. # noqa: E501 + :type: list[ChaseOrder] + """ + + self._orders = orders + + 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, GetChaseOrdersResp): + 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, GetChaseOrdersResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/get_chats_list_request.py b/gate_api/models/get_chats_list_request.py index 30abce0c..7c418379 100644 --- a/gate_api/models/get_chats_list_request.py +++ b/gate_api/models/get_chats_list_request.py @@ -56,7 +56,8 @@ def __init__(self, txid=None, lastreceived=None, firstreceived=None, local_vars_ self._firstreceived = None self.discriminator = None - self.txid = txid + if txid is not None: + self.txid = txid if lastreceived is not None: self.lastreceived = lastreceived if firstreceived is not None: @@ -66,7 +67,7 @@ def __init__(self, txid=None, lastreceived=None, firstreceived=None, local_vars_ def txid(self): """Gets the txid of this GetChatsListRequest. # noqa: E501 - Order ID # noqa: E501 + Order ID; omit or `0` to return the latest order with chat for the user. # noqa: E501 :return: The txid of this GetChatsListRequest. # noqa: E501 :rtype: int @@ -77,13 +78,11 @@ def txid(self): def txid(self, txid): """Sets the txid of this GetChatsListRequest. - Order ID # noqa: E501 + Order ID; omit or `0` to return the latest order with chat for the user. # noqa: E501 :param txid: The txid of this GetChatsListRequest. # noqa: E501 :type: int """ - if self.local_vars_configuration.client_side_validation and txid is None: # noqa: E501 - raise ValueError("Invalid value for `txid`, must not be `None`") # noqa: E501 self._txid = txid @@ -91,7 +90,7 @@ def txid(self, txid): def lastreceived(self): """Gets the lastreceived of this GetChatsListRequest. # noqa: E501 - Pagination timestamp (forward) # noqa: E501 + Timestamp of the last received message for backward incremental fetch; omit on first load. # noqa: E501 :return: The lastreceived of this GetChatsListRequest. # noqa: E501 :rtype: int @@ -102,7 +101,7 @@ def lastreceived(self): def lastreceived(self, lastreceived): """Sets the lastreceived of this GetChatsListRequest. - Pagination timestamp (forward) # noqa: E501 + Timestamp of the last received message for backward incremental fetch; omit on first load. # noqa: E501 :param lastreceived: The lastreceived of this GetChatsListRequest. # noqa: E501 :type: int @@ -114,7 +113,7 @@ def lastreceived(self, lastreceived): def firstreceived(self): """Gets the firstreceived of this GetChatsListRequest. # noqa: E501 - Pagination timestamp (backward) # noqa: E501 + Timestamp of first received message for paging backward; omit on first load. # noqa: E501 :return: The firstreceived of this GetChatsListRequest. # noqa: E501 :rtype: int @@ -125,7 +124,7 @@ def firstreceived(self): def firstreceived(self, firstreceived): """Sets the firstreceived of this GetChatsListRequest. - Pagination timestamp (backward) # noqa: E501 + Timestamp of first received message for paging backward; omit on first load. # noqa: E501 :param firstreceived: The firstreceived of this GetChatsListRequest. # noqa: E501 :type: int diff --git a/gate_api/models/get_completed_transaction_list_request.py b/gate_api/models/get_completed_transaction_list_request.py index a92d9702..3d6551b4 100644 --- a/gate_api/models/get_completed_transaction_list_request.py +++ b/gate_api/models/get_completed_transaction_list_request.py @@ -100,7 +100,7 @@ def __init__(self, crypto_currency=None, fiat_currency=None, select_type=None, s def crypto_currency(self): """Gets the crypto_currency of this GetCompletedTransactionListRequest. # noqa: E501 - Cryptocurrency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 :return: The crypto_currency of this GetCompletedTransactionListRequest. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def crypto_currency(self): def crypto_currency(self, crypto_currency): """Sets the crypto_currency of this GetCompletedTransactionListRequest. - Cryptocurrency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 :param crypto_currency: The crypto_currency of this GetCompletedTransactionListRequest. # noqa: E501 :type: str @@ -150,7 +150,7 @@ def fiat_currency(self, fiat_currency): def select_type(self): """Gets the select_type of this GetCompletedTransactionListRequest. # noqa: E501 - Buy/Sell (sell=Sell, buy=Buy, others=All) # noqa: E501 + Order side filter: `buy` buy orders; `sell` sell orders; empty: all. # noqa: E501 :return: The select_type of this GetCompletedTransactionListRequest. # noqa: E501 :rtype: str @@ -161,7 +161,7 @@ def select_type(self): def select_type(self, select_type): """Sets the select_type of this GetCompletedTransactionListRequest. - Buy/Sell (sell=Sell, buy=Buy, others=All) # noqa: E501 + Order side filter: `buy` buy orders; `sell` sell orders; empty: all. # noqa: E501 :param select_type: The select_type of this GetCompletedTransactionListRequest. # noqa: E501 :type: str @@ -173,7 +173,7 @@ def select_type(self, select_type): def status(self): """Gets the status of this GetCompletedTransactionListRequest. # noqa: E501 - Order Status (dispute: Disputed Order; closed: ACCEPT, BCLOSED; cancel: CANCEL, BECANCEL, SCLOSED, SCANCEL; locked: LOCKED; open: OPEN; paid: PAID; completed: CANCEL, BECANCEL, SCLOSED, SCANCEL, ACCEPT, BCLOSED) # noqa: E501 + Order status filter. `closed`: filled (`ACCEPT`, `BCLOSED`); `cancel`: canceled (`CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`); `locked`: locked (`LOCKED`); `open`: unpaid (`OPEN`); `paid`: paid (`PAID`); `completed`: finished or canceled (`CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`, `ACCEPT`, `BCLOSED`); Empty or omitted uses the endpoint default range. # noqa: E501 :return: The status of this GetCompletedTransactionListRequest. # noqa: E501 :rtype: str @@ -184,7 +184,7 @@ def status(self): def status(self, status): """Sets the status of this GetCompletedTransactionListRequest. - Order Status (dispute: Disputed Order; closed: ACCEPT, BCLOSED; cancel: CANCEL, BECANCEL, SCLOSED, SCANCEL; locked: LOCKED; open: OPEN; paid: PAID; completed: CANCEL, BECANCEL, SCLOSED, SCANCEL, ACCEPT, BCLOSED) # noqa: E501 + Order status filter. `closed`: filled (`ACCEPT`, `BCLOSED`); `cancel`: canceled (`CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`); `locked`: locked (`LOCKED`); `open`: unpaid (`OPEN`); `paid`: paid (`PAID`); `completed`: finished or canceled (`CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`, `ACCEPT`, `BCLOSED`); Empty or omitted uses the endpoint default range. # noqa: E501 :param status: The status of this GetCompletedTransactionListRequest. # noqa: E501 :type: str @@ -265,7 +265,7 @@ def end_time(self, end_time): def query_dispute(self): """Gets the query_dispute of this GetCompletedTransactionListRequest. # noqa: E501 - 1: Include appeal status, 0: None # noqa: E501 + Whether to flag dispute status in the response. `1`: yes; `0`: no. # noqa: E501 :return: The query_dispute of this GetCompletedTransactionListRequest. # noqa: E501 :rtype: int @@ -276,7 +276,7 @@ def query_dispute(self): def query_dispute(self, query_dispute): """Sets the query_dispute of this GetCompletedTransactionListRequest. - 1: Include appeal status, 0: None # noqa: E501 + Whether to flag dispute status in the response. `1`: yes; `0`: no. # noqa: E501 :param query_dispute: The query_dispute of this GetCompletedTransactionListRequest. # noqa: E501 :type: int @@ -288,7 +288,7 @@ def query_dispute(self, query_dispute): def page(self): """Gets the page of this GetCompletedTransactionListRequest. # noqa: E501 - page number # noqa: E501 + Page number starting at 1; values below 1 are treated as 1. # noqa: E501 :return: The page of this GetCompletedTransactionListRequest. # noqa: E501 :rtype: int @@ -299,7 +299,7 @@ def page(self): def page(self, page): """Sets the page of this GetCompletedTransactionListRequest. - page number # noqa: E501 + Page number starting at 1; values below 1 are treated as 1. # noqa: E501 :param page: The page of this GetCompletedTransactionListRequest. # noqa: E501 :type: int @@ -311,7 +311,7 @@ def page(self, page): def per_page(self): """Gets the per_page of this GetCompletedTransactionListRequest. # noqa: E501 - Number of orders per page # noqa: E501 + Orders per page; default 10, max 200. # noqa: E501 :return: The per_page of this GetCompletedTransactionListRequest. # noqa: E501 :rtype: int @@ -322,7 +322,7 @@ def per_page(self): def per_page(self, per_page): """Sets the per_page of this GetCompletedTransactionListRequest. - Number of orders per page # noqa: E501 + Orders per page; default 10, max 200. # noqa: E501 :param per_page: The per_page of this GetCompletedTransactionListRequest. # noqa: E501 :type: int diff --git a/gate_api/models/get_counterparty_user_info_request.py b/gate_api/models/get_counterparty_user_info_request.py index d1019b1d..c9968a5c 100644 --- a/gate_api/models/get_counterparty_user_info_request.py +++ b/gate_api/models/get_counterparty_user_info_request.py @@ -56,7 +56,7 @@ def __init__(self, biz_uid=None, local_vars_configuration=None): # noqa: E501 def biz_uid(self): """Gets the biz_uid of this GetCounterpartyUserInfoRequest. # noqa: E501 - Counterparty UID (encrypted) # noqa: E501 + Counterparty crypto UID from order list or detail field `its_uid`. # noqa: E501 :return: The biz_uid of this GetCounterpartyUserInfoRequest. # noqa: E501 :rtype: str @@ -67,7 +67,7 @@ def biz_uid(self): def biz_uid(self, biz_uid): """Sets the biz_uid of this GetCounterpartyUserInfoRequest. - Counterparty UID (encrypted) # noqa: E501 + Counterparty crypto UID from order list or detail field `its_uid`. # noqa: E501 :param biz_uid: The biz_uid of this GetCounterpartyUserInfoRequest. # noqa: E501 :type: str diff --git a/gate_api/models/get_my_activity_entry_response.py b/gate_api/models/get_my_activity_entry_response.py new file mode 100644 index 00000000..6922d14f --- /dev/null +++ b/gate_api/models/get_my_activity_entry_response.py @@ -0,0 +1,209 @@ +# 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 GetMyActivityEntryResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'GetMyActivityEntryResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, GetMyActivityEntryResponseData, int, Configuration) -> None + """GetMyActivityEntryResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this GetMyActivityEntryResponse. # noqa: E501 + + Response status code, 0 means success # noqa: E501 + + :return: The code of this GetMyActivityEntryResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this GetMyActivityEntryResponse. + + Response status code, 0 means success # noqa: E501 + + :param code: The code of this GetMyActivityEntryResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this GetMyActivityEntryResponse. # noqa: E501 + + 响应消息,成功时为 \"success\" # noqa: E501 + + :return: The message of this GetMyActivityEntryResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this GetMyActivityEntryResponse. + + 响应消息,成功时为 \"success\" # noqa: E501 + + :param message: The message of this GetMyActivityEntryResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this GetMyActivityEntryResponse. # noqa: E501 + + + :return: The data of this GetMyActivityEntryResponse. # noqa: E501 + :rtype: GetMyActivityEntryResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this GetMyActivityEntryResponse. + + + :param data: The data of this GetMyActivityEntryResponse. # noqa: E501 + :type: GetMyActivityEntryResponseData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this GetMyActivityEntryResponse. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this GetMyActivityEntryResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this GetMyActivityEntryResponse. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this GetMyActivityEntryResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, GetMyActivityEntryResponse): + 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, GetMyActivityEntryResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/get_my_activity_entry_response_data.py b/gate_api/models/get_my_activity_entry_response_data.py new file mode 100644 index 00000000..466154b5 --- /dev/null +++ b/gate_api/models/get_my_activity_entry_response_data.py @@ -0,0 +1,269 @@ +# 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 GetMyActivityEntryResponseData(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 = { + 'icon_url': 'str', + 'icon_url_dark': 'str', + 'source_type': 'str', + 'title': 'str', + 'url_type': 'str', + 'url': 'str' + } + + attribute_map = { + 'icon_url': 'icon_url', + 'icon_url_dark': 'icon_url_dark', + 'source_type': 'source_type', + 'title': 'title', + 'url_type': 'url_type', + 'url': 'url' + } + + def __init__(self, icon_url=None, icon_url_dark=None, source_type=None, title=None, url_type=None, url=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """GetMyActivityEntryResponseData - 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._icon_url = None + self._icon_url_dark = None + self._source_type = None + self._title = None + self._url_type = None + self._url = None + self.discriminator = None + + self.icon_url = icon_url + self.icon_url_dark = icon_url_dark + self.source_type = source_type + self.title = title + self.url_type = url_type + self.url = url + + @property + def icon_url(self): + """Gets the icon_url of this GetMyActivityEntryResponseData. # noqa: E501 + + Activity entry icon URL (light mode) # noqa: E501 + + :return: The icon_url of this GetMyActivityEntryResponseData. # noqa: E501 + :rtype: str + """ + return self._icon_url + + @icon_url.setter + def icon_url(self, icon_url): + """Sets the icon_url of this GetMyActivityEntryResponseData. + + Activity entry icon URL (light mode) # noqa: E501 + + :param icon_url: The icon_url of this GetMyActivityEntryResponseData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and icon_url is None: # noqa: E501 + raise ValueError("Invalid value for `icon_url`, must not be `None`") # noqa: E501 + + self._icon_url = icon_url + + @property + def icon_url_dark(self): + """Gets the icon_url_dark of this GetMyActivityEntryResponseData. # noqa: E501 + + Activity entry icon URL (dark mode) # noqa: E501 + + :return: The icon_url_dark of this GetMyActivityEntryResponseData. # noqa: E501 + :rtype: str + """ + return self._icon_url_dark + + @icon_url_dark.setter + def icon_url_dark(self, icon_url_dark): + """Sets the icon_url_dark of this GetMyActivityEntryResponseData. + + Activity entry icon URL (dark mode) # noqa: E501 + + :param icon_url_dark: The icon_url_dark of this GetMyActivityEntryResponseData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and icon_url_dark is None: # noqa: E501 + raise ValueError("Invalid value for `icon_url_dark`, must not be `None`") # noqa: E501 + + self._icon_url_dark = icon_url_dark + + @property + def source_type(self): + """Gets the source_type of this GetMyActivityEntryResponseData. # noqa: E501 + + Source type, e.g., activity for campaign # noqa: E501 + + :return: The source_type of this GetMyActivityEntryResponseData. # noqa: E501 + :rtype: str + """ + return self._source_type + + @source_type.setter + def source_type(self, source_type): + """Sets the source_type of this GetMyActivityEntryResponseData. + + Source type, e.g., activity for campaign # noqa: E501 + + :param source_type: The source_type of this GetMyActivityEntryResponseData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and source_type is None: # noqa: E501 + raise ValueError("Invalid value for `source_type`, must not be `None`") # noqa: E501 + + self._source_type = source_type + + @property + def title(self): + """Gets the title of this GetMyActivityEntryResponseData. # noqa: E501 + + Activity entry title # noqa: E501 + + :return: The title of this GetMyActivityEntryResponseData. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this GetMyActivityEntryResponseData. + + Activity entry title # noqa: E501 + + :param title: The title of this GetMyActivityEntryResponseData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + + self._title = title + + @property + def url_type(self): + """Gets the url_type of this GetMyActivityEntryResponseData. # noqa: E501 + + Redirect link type, e.g., h5 for H5 page # noqa: E501 + + :return: The url_type of this GetMyActivityEntryResponseData. # noqa: E501 + :rtype: str + """ + return self._url_type + + @url_type.setter + def url_type(self, url_type): + """Sets the url_type of this GetMyActivityEntryResponseData. + + Redirect link type, e.g., h5 for H5 page # noqa: E501 + + :param url_type: The url_type of this GetMyActivityEntryResponseData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url_type is None: # noqa: E501 + raise ValueError("Invalid value for `url_type`, must not be `None`") # noqa: E501 + + self._url_type = url_type + + @property + def url(self): + """Gets the url of this GetMyActivityEntryResponseData. # noqa: E501 + + Activity entry redirect URL # noqa: E501 + + :return: The url of this GetMyActivityEntryResponseData. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GetMyActivityEntryResponseData. + + Activity entry redirect URL # noqa: E501 + + :param url: The url of this GetMyActivityEntryResponseData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + 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, GetMyActivityEntryResponseData): + 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, GetMyActivityEntryResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/get_myself_payment_request.py b/gate_api/models/get_myself_payment_request.py index f1db1520..520c5634 100644 --- a/gate_api/models/get_myself_payment_request.py +++ b/gate_api/models/get_myself_payment_request.py @@ -57,7 +57,7 @@ def __init__(self, fiat=None, local_vars_configuration=None): # noqa: E501 def fiat(self): """Gets the fiat of this GetMyselfPaymentRequest. # noqa: E501 - Fiat currency # noqa: E501 + Fiat currency; omit to return all available payment methods. # noqa: E501 :return: The fiat of this GetMyselfPaymentRequest. # noqa: E501 :rtype: str @@ -68,7 +68,7 @@ def fiat(self): def fiat(self, fiat): """Sets the fiat of this GetMyselfPaymentRequest. - Fiat currency # noqa: E501 + Fiat currency; omit to return all available payment methods. # noqa: E501 :param fiat: The fiat of this GetMyselfPaymentRequest. # noqa: E501 :type: str diff --git a/gate_api/models/get_pending_transaction_list_request.py b/gate_api/models/get_pending_transaction_list_request.py index f1fb4598..ca40692f 100644 --- a/gate_api/models/get_pending_transaction_list_request.py +++ b/gate_api/models/get_pending_transaction_list_request.py @@ -90,7 +90,7 @@ def __init__(self, crypto_currency=None, fiat_currency=None, order_tab=None, sel def crypto_currency(self): """Gets the crypto_currency of this GetPendingTransactionListRequest. # noqa: E501 - Cryptocurrency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 :return: The crypto_currency of this GetPendingTransactionListRequest. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def crypto_currency(self): def crypto_currency(self, crypto_currency): """Sets the crypto_currency of this GetPendingTransactionListRequest. - Cryptocurrency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 :param crypto_currency: The crypto_currency of this GetPendingTransactionListRequest. # noqa: E501 :type: str @@ -140,7 +140,7 @@ def fiat_currency(self, fiat_currency): def order_tab(self): """Gets the order_tab of this GetPendingTransactionListRequest. # noqa: E501 - Order tab, default: pending (pending: In Progress (pending: AND status in ('OPEN','PAID', 'LOCKED', 'TEMP')); dispute: In Dispute (status in ('ACCEPT','BCLOSED', 'CANCEL', 'BECANCEL', 'SCLOSED', 'SCANCEL'))) # noqa: E501 + Order tab: `pending` in progress (`OPEN`, `PAID`, `LOCKED`, `TEMP`); `dispute` in dispute; default `pending`. # noqa: E501 :return: The order_tab of this GetPendingTransactionListRequest. # noqa: E501 :rtype: str @@ -151,11 +151,17 @@ def order_tab(self): def order_tab(self, order_tab): """Sets the order_tab of this GetPendingTransactionListRequest. - Order tab, default: pending (pending: In Progress (pending: AND status in ('OPEN','PAID', 'LOCKED', 'TEMP')); dispute: In Dispute (status in ('ACCEPT','BCLOSED', 'CANCEL', 'BECANCEL', 'SCLOSED', 'SCANCEL'))) # noqa: E501 + Order tab: `pending` in progress (`OPEN`, `PAID`, `LOCKED`, `TEMP`); `dispute` in dispute; default `pending`. # noqa: E501 :param order_tab: The order_tab of this GetPendingTransactionListRequest. # noqa: E501 :type: str """ + allowed_values = ["pending", "dispute"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and order_tab not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `order_tab` ({0}), must be one of {1}" # noqa: E501 + .format(order_tab, allowed_values) + ) self._order_tab = order_tab @@ -163,7 +169,7 @@ def order_tab(self, order_tab): def select_type(self): """Gets the select_type of this GetPendingTransactionListRequest. # noqa: E501 - Buy/Sell (sell=Sell, buy=Buy, others=All) # noqa: E501 + Order side filter: `buy` buy orders; `sell` sell orders; empty: all. # noqa: E501 :return: The select_type of this GetPendingTransactionListRequest. # noqa: E501 :rtype: str @@ -174,7 +180,7 @@ def select_type(self): def select_type(self, select_type): """Sets the select_type of this GetPendingTransactionListRequest. - Buy/Sell (sell=Sell, buy=Buy, others=All) # noqa: E501 + Order side filter: `buy` buy orders; `sell` sell orders; empty: all. # noqa: E501 :param select_type: The select_type of this GetPendingTransactionListRequest. # noqa: E501 :type: str @@ -186,7 +192,7 @@ def select_type(self, select_type): def status(self): """Gets the status of this GetPendingTransactionListRequest. # noqa: E501 - Order Status (dispute: Disputed Order; closed: ACCEPT, BCLOSED; cancel: CANCEL, BECANCEL, SCLOSED, SCANCEL; locked: LOCKED; open: OPEN; paid: PAID; completed: CANCEL, BECANCEL, SCLOSED, SCANCEL, ACCEPT, BCLOSED) # noqa: E501 + Order status filter. `open` unpaid (`OPEN`); `paid` paid (`PAID`); `locked` locked (`LOCKED`); `dispute` in dispute; empty or omitted uses the default range for `order_tab`. # noqa: E501 :return: The status of this GetPendingTransactionListRequest. # noqa: E501 :rtype: str @@ -197,7 +203,7 @@ def status(self): def status(self, status): """Sets the status of this GetPendingTransactionListRequest. - Order Status (dispute: Disputed Order; closed: ACCEPT, BCLOSED; cancel: CANCEL, BECANCEL, SCLOSED, SCANCEL; locked: LOCKED; open: OPEN; paid: PAID; completed: CANCEL, BECANCEL, SCLOSED, SCANCEL, ACCEPT, BCLOSED) # noqa: E501 + Order status filter. `open` unpaid (`OPEN`); `paid` paid (`PAID`); `locked` locked (`LOCKED`); `dispute` in dispute; empty or omitted uses the default range for `order_tab`. # noqa: E501 :param status: The status of this GetPendingTransactionListRequest. # noqa: E501 :type: str diff --git a/gate_api/models/get_transaction_details_request.py b/gate_api/models/get_transaction_details_request.py index bd952686..41be6e32 100644 --- a/gate_api/models/get_transaction_details_request.py +++ b/gate_api/models/get_transaction_details_request.py @@ -86,7 +86,7 @@ def txid(self, txid): def channel(self): """Gets the channel of this GetTransactionDetailsRequest. # noqa: E501 - Empty or web3 # noqa: E501 + Channel tag: omit or empty for normal P2P; use `web3` for Web3 orders. # noqa: E501 :return: The channel of this GetTransactionDetailsRequest. # noqa: E501 :rtype: str @@ -97,7 +97,7 @@ def channel(self): def channel(self, channel): """Sets the channel of this GetTransactionDetailsRequest. - Empty or web3 # noqa: E501 + Channel tag: omit or empty for normal P2P; use `web3` for Web3 orders. # noqa: E501 :param channel: The channel of this GetTransactionDetailsRequest. # noqa: E501 :type: str diff --git a/gate_api/models/get_user_coupon_detail_response.py b/gate_api/models/get_user_coupon_detail_response.py new file mode 100644 index 00000000..0afc11a3 --- /dev/null +++ b/gate_api/models/get_user_coupon_detail_response.py @@ -0,0 +1,209 @@ +# 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 GetUserCouponDetailResponse(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'GetUserCouponDetailResponseData' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, code=None, label=None, message=None, data=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, GetUserCouponDetailResponseData, Configuration) -> None + """GetUserCouponDetailResponse - 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._code = None + self._label = None + self._message = None + self._data = None + self.discriminator = None + + if code is not None: + self.code = code + if label is not None: + self.label = label + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def code(self): + """Gets the code of this GetUserCouponDetailResponse. # noqa: E501 + + Response code. `0` = success; `2002` = user not logged in; `50105` = parameter validation failed; `10001` = coupon record does not exist or does not belong to current user; `10000` = invalid parameter (e.g., task coupon missing coupon_info) # noqa: E501 + + :return: The code of this GetUserCouponDetailResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this GetUserCouponDetailResponse. + + Response code. `0` = success; `2002` = user not logged in; `50105` = parameter validation failed; `10001` = coupon record does not exist or does not belong to current user; `10000` = invalid parameter (e.g., task coupon missing coupon_info) # noqa: E501 + + :param code: The code of this GetUserCouponDetailResponse. # noqa: E501 + :type: int + """ + allowed_values = [0, 2002, 50105, 10001, 10000] # noqa: E501 + if self.local_vars_configuration.client_side_validation and code not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `code` ({0}), must be one of {1}" # noqa: E501 + .format(code, allowed_values) + ) + + self._code = code + + @property + def label(self): + """Gets the label of this GetUserCouponDetailResponse. # noqa: E501 + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :return: The label of this GetUserCouponDetailResponse. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this GetUserCouponDetailResponse. + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :param label: The label of this GetUserCouponDetailResponse. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this GetUserCouponDetailResponse. # noqa: E501 + + + :return: The message of this GetUserCouponDetailResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this GetUserCouponDetailResponse. + + + :param message: The message of this GetUserCouponDetailResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this GetUserCouponDetailResponse. # noqa: E501 + + + :return: The data of this GetUserCouponDetailResponse. # noqa: E501 + :rtype: GetUserCouponDetailResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this GetUserCouponDetailResponse. + + + :param data: The data of this GetUserCouponDetailResponse. # noqa: E501 + :type: GetUserCouponDetailResponseData + """ + + self._data = data + + 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, GetUserCouponDetailResponse): + 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, GetUserCouponDetailResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/get_user_coupon_detail_response_data.py b/gate_api/models/get_user_coupon_detail_response_data.py new file mode 100644 index 00000000..5697d2b3 --- /dev/null +++ b/gate_api/models/get_user_coupon_detail_response_data.py @@ -0,0 +1,857 @@ +# 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 GetUserCouponDetailResponseData(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', + 'details_id': 'int', + 'coupon_type': 'str', + 'name': 'str', + 'amount': 'str', + 'origin_amount': 'str', + 'currency': 'str', + 'rule_new': 'str', + 'status': 'str', + 'jump_url': 'ListUserCouponsResponseDataJumpUrl', + 'help_url': 'ListUserCouponsResponseDataHelpUrl', + 'expire_time': 'int', + 'expire_time_order_by': 'int', + 'expire_second': 'int', + 'has_usage_history': 'bool', + 'has_progress': 'bool', + 'progress_config': 'ListUserCouponsResponseDataProgressConfig', + 'activation_info': 'object', + 'is_task_coupon': 'int', + 'upgrade_toast': 'bool', + 'from_task': 'bool', + 'task_title': 'str', + 'task_desc': 'str', + 'task_start_at': 'int', + 'task_expire_at': 'int', + 'task_completed_at': 'int', + 'extra': 'list[list[object]]' + } + + attribute_map = { + 'id': 'id', + 'details_id': 'details_id', + 'coupon_type': 'coupon_type', + 'name': 'name', + 'amount': 'amount', + 'origin_amount': 'origin_amount', + 'currency': 'currency', + 'rule_new': 'rule_new', + 'status': 'status', + 'jump_url': 'jump_url', + 'help_url': 'help_url', + 'expire_time': 'expire_time', + 'expire_time_order_by': 'expire_time_order_by', + 'expire_second': 'expire_second', + 'has_usage_history': 'has_usage_history', + 'has_progress': 'has_progress', + 'progress_config': 'progress_config', + 'activation_info': 'activation_info', + 'is_task_coupon': 'is_task_coupon', + 'upgrade_toast': 'upgrade_toast', + 'from_task': 'from_task', + 'task_title': 'task_title', + 'task_desc': 'task_desc', + 'task_start_at': 'task_start_at', + 'task_expire_at': 'task_expire_at', + 'task_completed_at': 'task_completed_at', + 'extra': 'extra' + } + + def __init__(self, id=None, details_id=None, coupon_type=None, name=None, amount=None, origin_amount=None, currency=None, rule_new=None, status=None, jump_url=None, help_url=None, expire_time=None, expire_time_order_by=None, expire_second=None, has_usage_history=None, has_progress=None, progress_config=None, activation_info=None, is_task_coupon=None, upgrade_toast=None, from_task=None, task_title=None, task_desc=None, task_start_at=None, task_expire_at=None, task_completed_at=None, extra=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, ListUserCouponsResponseDataJumpUrl, ListUserCouponsResponseDataHelpUrl, int, int, int, bool, bool, ListUserCouponsResponseDataProgressConfig, object, int, bool, bool, str, str, int, int, int, list[list[object]], Configuration) -> None + """GetUserCouponDetailResponseData - 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._details_id = None + self._coupon_type = None + self._name = None + self._amount = None + self._origin_amount = None + self._currency = None + self._rule_new = None + self._status = None + self._jump_url = None + self._help_url = None + self._expire_time = None + self._expire_time_order_by = None + self._expire_second = None + self._has_usage_history = None + self._has_progress = None + self._progress_config = None + self._activation_info = None + self._is_task_coupon = None + self._upgrade_toast = None + self._from_task = None + self._task_title = None + self._task_desc = None + self._task_start_at = None + self._task_expire_at = None + self._task_completed_at = None + self._extra = None + self.discriminator = None + + if id is not None: + self.id = id + if details_id is not None: + self.details_id = details_id + if coupon_type is not None: + self.coupon_type = coupon_type + if name is not None: + self.name = name + if amount is not None: + self.amount = amount + if origin_amount is not None: + self.origin_amount = origin_amount + if currency is not None: + self.currency = currency + if rule_new is not None: + self.rule_new = rule_new + if status is not None: + self.status = status + if jump_url is not None: + self.jump_url = jump_url + if help_url is not None: + self.help_url = help_url + if expire_time is not None: + self.expire_time = expire_time + if expire_time_order_by is not None: + self.expire_time_order_by = expire_time_order_by + if expire_second is not None: + self.expire_second = expire_second + if has_usage_history is not None: + self.has_usage_history = has_usage_history + if has_progress is not None: + self.has_progress = has_progress + if progress_config is not None: + self.progress_config = progress_config + if activation_info is not None: + self.activation_info = activation_info + if is_task_coupon is not None: + self.is_task_coupon = is_task_coupon + if upgrade_toast is not None: + self.upgrade_toast = upgrade_toast + if from_task is not None: + self.from_task = from_task + if task_title is not None: + self.task_title = task_title + if task_desc is not None: + self.task_desc = task_desc + if task_start_at is not None: + self.task_start_at = task_start_at + if task_expire_at is not None: + self.task_expire_at = task_expire_at + if task_completed_at is not None: + self.task_completed_at = task_completed_at + if extra is not None: + self.extra = extra + + @property + def id(self): + """Gets the id of this GetUserCouponDetailResponseData. # noqa: E501 + + Coupon distribution record ID (coupon_send_issuing_log.id) # noqa: E501 + + :return: The id of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this GetUserCouponDetailResponseData. + + Coupon distribution record ID (coupon_send_issuing_log.id) # noqa: E501 + + :param id: The id of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def details_id(self): + """Gets the details_id of this GetUserCouponDetailResponseData. # noqa: E501 + + User coupon detail table primary key (separate table per type). This field is 0 for task coupons # noqa: E501 + + :return: The details_id of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._details_id + + @details_id.setter + def details_id(self, details_id): + """Sets the details_id of this GetUserCouponDetailResponseData. + + User coupon detail table primary key (separate table per type). This field is 0 for task coupons # noqa: E501 + + :param details_id: The details_id of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + + self._details_id = details_id + + @property + def coupon_type(self): + """Gets the coupon_type of this GetUserCouponDetailResponseData. # noqa: E501 + + Coupon type, enum values same as the `coupon_type` parameter # noqa: E501 + + :return: The coupon_type of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._coupon_type + + @coupon_type.setter + def coupon_type(self, coupon_type): + """Sets the coupon_type of this GetUserCouponDetailResponseData. + + Coupon type, enum values same as the `coupon_type` parameter # noqa: E501 + + :param coupon_type: The coupon_type of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + + self._coupon_type = coupon_type + + @property + def name(self): + """Gets the name of this GetUserCouponDetailResponseData. # noqa: E501 + + Coupon display name (i18n translated) # noqa: E501 + + :return: The name of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GetUserCouponDetailResponseData. + + Coupon display name (i18n translated) # noqa: E501 + + :param name: The name of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def amount(self): + """Gets the amount of this GetUserCouponDetailResponseData. # noqa: E501 + + Coupon denomination (formatted string with thousand separators). Meaning by type: point card = balance, interest rate boost coupon = rate percentage (e.g., '5%'), VIP trial card = VIP level number, position voucher = face value x leverage, others = face value # noqa: E501 + + :return: The amount of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this GetUserCouponDetailResponseData. + + Coupon denomination (formatted string with thousand separators). Meaning by type: point card = balance, interest rate boost coupon = rate percentage (e.g., '5%'), VIP trial card = VIP level number, position voucher = face value x leverage, others = face value # noqa: E501 + + :param amount: The amount of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def origin_amount(self): + """Gets the origin_amount of this GetUserCouponDetailResponseData. # noqa: E501 + + Original denomination (string with trailing zeros removed). Only returned for point card type, other types do not have this field # noqa: E501 + + :return: The origin_amount of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._origin_amount + + @origin_amount.setter + def origin_amount(self, origin_amount): + """Sets the origin_amount of this GetUserCouponDetailResponseData. + + Original denomination (string with trailing zeros removed). Only returned for point card type, other types do not have this field # noqa: E501 + + :param origin_amount: The origin_amount of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + + self._origin_amount = origin_amount + + @property + def currency(self): + """Gets the currency of this GetUserCouponDetailResponseData. # noqa: E501 + + Denomination unit. Point card = 'POINT', interest rate boost coupon = 'APR', VIP trial card = 'VIP', Alpha cash coupon = base currency, others = uppercase currency symbol (e.g., 'USDT'/'GT') # noqa: E501 + + :return: The currency of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this GetUserCouponDetailResponseData. + + Denomination unit. Point card = 'POINT', interest rate boost coupon = 'APR', VIP trial card = 'VIP', Alpha cash coupon = base currency, others = uppercase currency symbol (e.g., 'USDT'/'GT') # noqa: E501 + + :param currency: The currency of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def rule_new(self): + """Gets the rule_new of this GetUserCouponDetailResponseData. # noqa: E501 + + Coupon usage rule text (i18n translated). Only has value in the detail endpoint, fixed as empty string in the list endpoint # noqa: E501 + + :return: The rule_new of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._rule_new + + @rule_new.setter + def rule_new(self, rule_new): + """Sets the rule_new of this GetUserCouponDetailResponseData. + + Coupon usage rule text (i18n translated). Only has value in the detail endpoint, fixed as empty string in the list endpoint # noqa: E501 + + :param rule_new: The rule_new of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + + self._rule_new = rule_new + + @property + def status(self): + """Gets the status of this GetUserCouponDetailResponseData. # noqa: E501 + + Coupon status. Regular coupon: NOT_ACTIVE (pending activation), ACTIVATED (activated), TO_BE_USED (to be used), EXPIRED (expired), RECYCLED (recycled), INVALID (invalidated), USED (used), UNKNOWN (unknown), LOCKED (locked, P2P only). Task coupon: TASK_START (task not started), TASK_WAIT (task in progress), TASK_DONE (task completed, processing), TASK_EXPIRED (task not completed, expired), TASK_NOT_STARTED_EXPIRED (not started, expired), TASK_RECEIVE_SUCCESS (reward claimed successfully), TASK_RECEIVE_FAIL (reward claim failed) # noqa: E501 + + :return: The status of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this GetUserCouponDetailResponseData. + + Coupon status. Regular coupon: NOT_ACTIVE (pending activation), ACTIVATED (activated), TO_BE_USED (to be used), EXPIRED (expired), RECYCLED (recycled), INVALID (invalidated), USED (used), UNKNOWN (unknown), LOCKED (locked, P2P only). Task coupon: TASK_START (task not started), TASK_WAIT (task in progress), TASK_DONE (task completed, processing), TASK_EXPIRED (task not completed, expired), TASK_NOT_STARTED_EXPIRED (not started, expired), TASK_RECEIVE_SUCCESS (reward claimed successfully), TASK_RECEIVE_FAIL (reward claim failed) # noqa: E501 + + :param status: The status of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + allowed_values = ["NOT_ACTIVE", "ACTIVATED", "TO_BE_USED", "EXPIRED", "RECYCLED", "INVALID", "USED", "UNKNOWN", "LOCKED", "TASK_START", "TASK_WAIT", "TASK_DONE", "TASK_EXPIRED", "TASK_NOT_STARTED_EXPIRED", "TASK_RECEIVE_SUCCESS", "TASK_RECEIVE_FAIL"] # 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}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def jump_url(self): + """Gets the jump_url of this GetUserCouponDetailResponseData. # noqa: E501 + + + :return: The jump_url of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: ListUserCouponsResponseDataJumpUrl + """ + return self._jump_url + + @jump_url.setter + def jump_url(self, jump_url): + """Sets the jump_url of this GetUserCouponDetailResponseData. + + + :param jump_url: The jump_url of this GetUserCouponDetailResponseData. # noqa: E501 + :type: ListUserCouponsResponseDataJumpUrl + """ + + self._jump_url = jump_url + + @property + def help_url(self): + """Gets the help_url of this GetUserCouponDetailResponseData. # noqa: E501 + + + :return: The help_url of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: ListUserCouponsResponseDataHelpUrl + """ + return self._help_url + + @help_url.setter + def help_url(self, help_url): + """Sets the help_url of this GetUserCouponDetailResponseData. + + + :param help_url: The help_url of this GetUserCouponDetailResponseData. # noqa: E501 + :type: ListUserCouponsResponseDataHelpUrl + """ + + self._help_url = help_url + + @property + def expire_time(self): + """Gets the expire_time of this GetUserCouponDetailResponseData. # noqa: E501 + + Expiration time (Unix timestamp). Some types replace this with actual expiration time after activation/use. Point card type returns 0. Rules by type: cash=not_received_expired_timest; contract_bonus=uses expired_timest after activation/use; contract_bonus_new=always uses expired_timest; position_voucher/tradfi_position_voucher=uses expire_time after use; robot_bonus=not_received_expired_timest; commission_rebate=uses use_deadline after use; crypto_loan_interest=not_using_expired_timest; copy_trading=not_using_expired_timest; alpha_voucher=not_received_expired_timest; etf_voucher=not_using_expired_timest # noqa: E501 + + :return: The expire_time of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._expire_time + + @expire_time.setter + def expire_time(self, expire_time): + """Sets the expire_time of this GetUserCouponDetailResponseData. + + Expiration time (Unix timestamp). Some types replace this with actual expiration time after activation/use. Point card type returns 0. Rules by type: cash=not_received_expired_timest; contract_bonus=uses expired_timest after activation/use; contract_bonus_new=always uses expired_timest; position_voucher/tradfi_position_voucher=uses expire_time after use; robot_bonus=not_received_expired_timest; commission_rebate=uses use_deadline after use; crypto_loan_interest=not_using_expired_timest; copy_trading=not_using_expired_timest; alpha_voucher=not_received_expired_timest; etf_voucher=not_using_expired_timest # noqa: E501 + + :param expire_time: The expire_time of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + + self._expire_time = expire_time + + @property + def expire_time_order_by(self): + """Gets the expire_time_order_by of this GetUserCouponDetailResponseData. # noqa: E501 + + Sorting expiration time (from the original expiration time of the distribution record, unaffected by activation) # noqa: E501 + + :return: The expire_time_order_by of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._expire_time_order_by + + @expire_time_order_by.setter + def expire_time_order_by(self, expire_time_order_by): + """Sets the expire_time_order_by of this GetUserCouponDetailResponseData. + + Sorting expiration time (from the original expiration time of the distribution record, unaffected by activation) # noqa: E501 + + :param expire_time_order_by: The expire_time_order_by of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + + self._expire_time_order_by = expire_time_order_by + + @property + def expire_second(self): + """Gets the expire_second of this GetUserCouponDetailResponseData. # noqa: E501 + + Seconds remaining until expiration, returns 0 if expired or point card type # noqa: E501 + + :return: The expire_second of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._expire_second + + @expire_second.setter + def expire_second(self, expire_second): + """Sets the expire_second of this GetUserCouponDetailResponseData. + + Seconds remaining until expiration, returns 0 if expired or point card type # noqa: E501 + + :param expire_second: The expire_second of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + + self._expire_second = expire_second + + @property + def has_usage_history(self): + """Gets the has_usage_history of this GetUserCouponDetailResponseData. # noqa: E501 + + Whether there is a usage history. Fixed as true for point card type, determined by type for others # noqa: E501 + + :return: The has_usage_history of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: bool + """ + return self._has_usage_history + + @has_usage_history.setter + def has_usage_history(self, has_usage_history): + """Sets the has_usage_history of this GetUserCouponDetailResponseData. + + Whether there is a usage history. Fixed as true for point card type, determined by type for others # noqa: E501 + + :param has_usage_history: The has_usage_history of this GetUserCouponDetailResponseData. # noqa: E501 + :type: bool + """ + + self._has_usage_history = has_usage_history + + @property + def has_progress(self): + """Gets the has_progress of this GetUserCouponDetailResponseData. # noqa: E501 + + Whether to display a progress bar. Only true for commission_rebate, interest_voucher, and qualifying task coupons # noqa: E501 + + :return: The has_progress of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: bool + """ + return self._has_progress + + @has_progress.setter + def has_progress(self, has_progress): + """Sets the has_progress of this GetUserCouponDetailResponseData. + + Whether to display a progress bar. Only true for commission_rebate, interest_voucher, and qualifying task coupons # noqa: E501 + + :param has_progress: The has_progress of this GetUserCouponDetailResponseData. # noqa: E501 + :type: bool + """ + + self._has_progress = has_progress + + @property + def progress_config(self): + """Gets the progress_config of this GetUserCouponDetailResponseData. # noqa: E501 + + + :return: The progress_config of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: ListUserCouponsResponseDataProgressConfig + """ + return self._progress_config + + @progress_config.setter + def progress_config(self, progress_config): + """Sets the progress_config of this GetUserCouponDetailResponseData. + + + :param progress_config: The progress_config of this GetUserCouponDetailResponseData. # noqa: E501 + :type: ListUserCouponsResponseDataProgressConfig + """ + + self._progress_config = progress_config + + @property + def activation_info(self): + """Gets the activation_info of this GetUserCouponDetailResponseData. # noqa: E501 + + Type-specific activation information. Types without specific fields return empty object {}. Fields by type: interest_voucher={supported_pairs (applicable trading pairs), transaction_type}; contract_bonus_new={received_expired_hour (valid hours after activation)}; contract_bonus={check_unified_account_mode, received_expired_days (valid days after activation), abtest}; commission_rebate={market (spot/margin/futures/alpha/etf/tradfi), market_name (market display name)}; robot_bonus={designated_bots (ENABLED = designated strategies only / DISABLED = unrestricted)}; position_voucher={symbols (applicable trading pairs, empty = unrestricted), leverage, need_user_funds (0 = no user funds required / 1 = user funds required), user_funds_amount, position_bonus (original face value)}; tradfi_position_voucher={symbols, leverage, position_bonus}; etf_voucher={currency_markets (ETF market list, comma-separated), amount (original face value)} # noqa: E501 + + :return: The activation_info of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: object + """ + return self._activation_info + + @activation_info.setter + def activation_info(self, activation_info): + """Sets the activation_info of this GetUserCouponDetailResponseData. + + Type-specific activation information. Types without specific fields return empty object {}. Fields by type: interest_voucher={supported_pairs (applicable trading pairs), transaction_type}; contract_bonus_new={received_expired_hour (valid hours after activation)}; contract_bonus={check_unified_account_mode, received_expired_days (valid days after activation), abtest}; commission_rebate={market (spot/margin/futures/alpha/etf/tradfi), market_name (market display name)}; robot_bonus={designated_bots (ENABLED = designated strategies only / DISABLED = unrestricted)}; position_voucher={symbols (applicable trading pairs, empty = unrestricted), leverage, need_user_funds (0 = no user funds required / 1 = user funds required), user_funds_amount, position_bonus (original face value)}; tradfi_position_voucher={symbols, leverage, position_bonus}; etf_voucher={currency_markets (ETF market list, comma-separated), amount (original face value)} # noqa: E501 + + :param activation_info: The activation_info of this GetUserCouponDetailResponseData. # noqa: E501 + :type: object + """ + + self._activation_info = activation_info + + @property + def is_task_coupon(self): + """Gets the is_task_coupon of this GetUserCouponDetailResponseData. # noqa: E501 + + Whether it is a task coupon. `0` = regular coupon; `1` = task coupon # noqa: E501 + + :return: The is_task_coupon of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._is_task_coupon + + @is_task_coupon.setter + def is_task_coupon(self, is_task_coupon): + """Sets the is_task_coupon of this GetUserCouponDetailResponseData. + + Whether it is a task coupon. `0` = regular coupon; `1` = task coupon # noqa: E501 + + :param is_task_coupon: The is_task_coupon of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and is_task_coupon not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `is_task_coupon` ({0}), must be one of {1}" # noqa: E501 + .format(is_task_coupon, allowed_values) + ) + + self._is_task_coupon = is_task_coupon + + @property + def upgrade_toast(self): + """Gets the upgrade_toast of this GetUserCouponDetailResponseData. # noqa: E501 + + Whether to prompt the user to upgrade the App (true when the app version is too old to support the coupon) # noqa: E501 + + :return: The upgrade_toast of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: bool + """ + return self._upgrade_toast + + @upgrade_toast.setter + def upgrade_toast(self, upgrade_toast): + """Sets the upgrade_toast of this GetUserCouponDetailResponseData. + + Whether to prompt the user to upgrade the App (true when the app version is too old to support the coupon) # noqa: E501 + + :param upgrade_toast: The upgrade_toast of this GetUserCouponDetailResponseData. # noqa: E501 + :type: bool + """ + + self._upgrade_toast = upgrade_toast + + @property + def from_task(self): + """Gets the from_task of this GetUserCouponDetailResponseData. # noqa: E501 + + [Detail endpoint only] Whether this regular coupon was obtained by completing a task (a sub-coupon automatically issued after task completion). Regular coupons may be true, task coupons are always false # noqa: E501 + + :return: The from_task of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: bool + """ + return self._from_task + + @from_task.setter + def from_task(self, from_task): + """Sets the from_task of this GetUserCouponDetailResponseData. + + [Detail endpoint only] Whether this regular coupon was obtained by completing a task (a sub-coupon automatically issued after task completion). Regular coupons may be true, task coupons are always false # noqa: E501 + + :param from_task: The from_task of this GetUserCouponDetailResponseData. # noqa: E501 + :type: bool + """ + + self._from_task = from_task + + @property + def task_title(self): + """Gets the task_title of this GetUserCouponDetailResponseData. # noqa: E501 + + Task title. Task coupons have value; regular coupons return empty string (but task_title is not assigned when from_task=true) # noqa: E501 + + :return: The task_title of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._task_title + + @task_title.setter + def task_title(self, task_title): + """Sets the task_title of this GetUserCouponDetailResponseData. + + Task title. Task coupons have value; regular coupons return empty string (but task_title is not assigned when from_task=true) # noqa: E501 + + :param task_title: The task_title of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + + self._task_title = task_title + + @property + def task_desc(self): + """Gets the task_desc of this GetUserCouponDetailResponseData. # noqa: E501 + + Task description. Task coupons have value; regular coupons return empty string # noqa: E501 + + :return: The task_desc of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: str + """ + return self._task_desc + + @task_desc.setter + def task_desc(self, task_desc): + """Sets the task_desc of this GetUserCouponDetailResponseData. + + Task description. Task coupons have value; regular coupons return empty string # noqa: E501 + + :param task_desc: The task_desc of this GetUserCouponDetailResponseData. # noqa: E501 + :type: str + """ + + self._task_desc = task_desc + + @property + def task_start_at(self): + """Gets the task_start_at of this GetUserCouponDetailResponseData. # noqa: E501 + + Task start timestamp (Unix). Task coupon: has value when in TASK_EXPIRED status, otherwise 0; regular coupon (from_task=true): start time of the source task # noqa: E501 + + :return: The task_start_at of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._task_start_at + + @task_start_at.setter + def task_start_at(self, task_start_at): + """Sets the task_start_at of this GetUserCouponDetailResponseData. + + Task start timestamp (Unix). Task coupon: has value when in TASK_EXPIRED status, otherwise 0; regular coupon (from_task=true): start time of the source task # noqa: E501 + + :param task_start_at: The task_start_at of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + + self._task_start_at = task_start_at + + @property + def task_expire_at(self): + """Gets the task_expire_at of this GetUserCouponDetailResponseData. # noqa: E501 + + Task validity expiration timestamp (Unix). Task coupon: claim validity deadline (0 means unlimited); regular coupon: fixed at 0 # noqa: E501 + + :return: The task_expire_at of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._task_expire_at + + @task_expire_at.setter + def task_expire_at(self, task_expire_at): + """Sets the task_expire_at of this GetUserCouponDetailResponseData. + + Task validity expiration timestamp (Unix). Task coupon: claim validity deadline (0 means unlimited); regular coupon: fixed at 0 # noqa: E501 + + :param task_expire_at: The task_expire_at of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + + self._task_expire_at = task_expire_at + + @property + def task_completed_at(self): + """Gets the task_completed_at of this GetUserCouponDetailResponseData. # noqa: E501 + + Task completion timestamp (Unix). Task coupon: task completion time (0 means not completed); regular coupon (from_task=true): completion time of the source task # noqa: E501 + + :return: The task_completed_at of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: int + """ + return self._task_completed_at + + @task_completed_at.setter + def task_completed_at(self, task_completed_at): + """Sets the task_completed_at of this GetUserCouponDetailResponseData. + + Task completion timestamp (Unix). Task coupon: task completion time (0 means not completed); regular coupon (from_task=true): completion time of the source task # noqa: E501 + + :param task_completed_at: The task_completed_at of this GetUserCouponDetailResponseData. # noqa: E501 + :type: int + """ + + self._task_completed_at = task_completed_at + + @property + def extra(self): + """Gets the extra of this GetUserCouponDetailResponseData. # noqa: E501 + + [Detail endpoint only] Coupon detail attributes organized by display blocks. The frontend renders them as separate sections. Point card type always returns empty array []. Other types return a 2D array composed of blocks: block 1 = coupon name/source/status, block 2 = coupon core attributes, block 3 = time information. Each item contains: type (display type: string/timestamp/day/hour/status/btn), key (label text, i18n translated), value (string or integer, timestamp type is Unix timestamp) # noqa: E501 + + :return: The extra of this GetUserCouponDetailResponseData. # noqa: E501 + :rtype: list[list[object]] + """ + return self._extra + + @extra.setter + def extra(self, extra): + """Sets the extra of this GetUserCouponDetailResponseData. + + [Detail endpoint only] Coupon detail attributes organized by display blocks. The frontend renders them as separate sections. Point card type always returns empty array []. Other types return a 2D array composed of blocks: block 1 = coupon name/source/status, block 2 = coupon core attributes, block 3 = time information. Each item contains: type (display type: string/timestamp/day/hour/status/btn), key (label text, i18n translated), value (string or integer, timestamp type is Unix timestamp) # noqa: E501 + + :param extra: The extra of this GetUserCouponDetailResponseData. # noqa: E501 + :type: list[list[object]] + """ + + self._extra = extra + + 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, GetUserCouponDetailResponseData): + 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, GetUserCouponDetailResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/get_user_identity_error.py b/gate_api/models/get_user_identity_error.py new file mode 100644 index 00000000..b4ebcd98 --- /dev/null +++ b/gate_api/models/get_user_identity_error.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 GetUserIdentityError(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 = { + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'label': 'label', + 'message': 'message' + } + + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """GetUserIdentityError - 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._label = None + self._message = None + self.discriminator = None + + if label is not None: + self.label = label + if message is not None: + self.message = message + + @property + def label(self): + """Gets the label of this GetUserIdentityError. # noqa: E501 + + Error identifier code # noqa: E501 + + :return: The label of this GetUserIdentityError. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this GetUserIdentityError. + + Error identifier code # noqa: E501 + + :param label: The label of this GetUserIdentityError. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this GetUserIdentityError. # noqa: E501 + + Error details # noqa: E501 + + :return: The message of this GetUserIdentityError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this GetUserIdentityError. + + Error details # noqa: E501 + + :param message: The message of this GetUserIdentityError. # 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, GetUserIdentityError): + 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, GetUserIdentityError): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/hodler_airdrop_v4_error_response.py b/gate_api/models/hodler_airdrop_v4_error_response.py new file mode 100644 index 00000000..4bbd9f3a --- /dev/null +++ b/gate_api/models/hodler_airdrop_v4_error_response.py @@ -0,0 +1,159 @@ +# 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 HodlerAirdropV4ErrorResponse(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 = { + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'label': 'label', + 'message': 'message' + } + + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """HodlerAirdropV4ErrorResponse - 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._label = None + self._message = None + self.discriminator = None + + self.label = label + self.message = message + + @property + def label(self): + """Gets the label of this HodlerAirdropV4ErrorResponse. # noqa: E501 + + Error label # noqa: E501 + + :return: The label of this HodlerAirdropV4ErrorResponse. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this HodlerAirdropV4ErrorResponse. + + Error label # noqa: E501 + + :param label: The label of this HodlerAirdropV4ErrorResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 + raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 + allowed_values = ["INVALID_PARAM_VALUE", "UNAUTHORIZED", "FORBIDDEN", "INELIGIBLE", "KYC_REQUIRED", "RISK_CONTROL", "SERVER_ERROR"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and label not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `label` ({0}), must be one of {1}" # noqa: E501 + .format(label, allowed_values) + ) + + self._label = label + + @property + def message(self): + """Gets the message of this HodlerAirdropV4ErrorResponse. # noqa: E501 + + Error messages (multilingual) # noqa: E501 + + :return: The message of this HodlerAirdropV4ErrorResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this HodlerAirdropV4ErrorResponse. + + Error messages (multilingual) # noqa: E501 + + :param message: The message of this HodlerAirdropV4ErrorResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + 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, HodlerAirdropV4ErrorResponse): + 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, HodlerAirdropV4ErrorResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/hodler_airdrop_v4_order_request.py b/gate_api/models/hodler_airdrop_v4_order_request.py new file mode 100644 index 00000000..d7499f14 --- /dev/null +++ b/gate_api/models/hodler_airdrop_v4_order_request.py @@ -0,0 +1,127 @@ +# 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 HodlerAirdropV4OrderRequest(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 = { + 'hodler_id': 'int' + } + + attribute_map = { + 'hodler_id': 'hodler_id' + } + + def __init__(self, hodler_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """HodlerAirdropV4OrderRequest - 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._hodler_id = None + self.discriminator = None + + self.hodler_id = hodler_id + + @property + def hodler_id(self): + """Gets the hodler_id of this HodlerAirdropV4OrderRequest. # noqa: E501 + + Activity ID, required # noqa: E501 + + :return: The hodler_id of this HodlerAirdropV4OrderRequest. # noqa: E501 + :rtype: int + """ + return self._hodler_id + + @hodler_id.setter + def hodler_id(self, hodler_id): + """Sets the hodler_id of this HodlerAirdropV4OrderRequest. + + Activity ID, required # noqa: E501 + + :param hodler_id: The hodler_id of this HodlerAirdropV4OrderRequest. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and hodler_id is None: # noqa: E501 + raise ValueError("Invalid value for `hodler_id`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + hodler_id is not None and hodler_id < 1): # noqa: E501 + raise ValueError("Invalid value for `hodler_id`, must be a value greater than or equal to `1`") # noqa: E501 + + self._hodler_id = hodler_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, HodlerAirdropV4OrderRequest): + 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, HodlerAirdropV4OrderRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/hodler_airdrop_v4_order_response.py b/gate_api/models/hodler_airdrop_v4_order_response.py new file mode 100644 index 00000000..0c12c0ab --- /dev/null +++ b/gate_api/models/hodler_airdrop_v4_order_response.py @@ -0,0 +1,124 @@ +# 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 HodlerAirdropV4OrderResponse(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 = { + 'interest_coin': 'list[str]' + } + + attribute_map = { + 'interest_coin': 'interest_coin' + } + + def __init__(self, interest_coin=None, local_vars_configuration=None): # noqa: E501 + # type: (list[str], Configuration) -> None + """HodlerAirdropV4OrderResponse - 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._interest_coin = None + self.discriminator = None + + self.interest_coin = interest_coin + + @property + def interest_coin(self): + """Gets the interest_coin of this HodlerAirdropV4OrderResponse. # noqa: E501 + + Get the list of airdropped currencies # noqa: E501 + + :return: The interest_coin of this HodlerAirdropV4OrderResponse. # noqa: E501 + :rtype: list[str] + """ + return self._interest_coin + + @interest_coin.setter + def interest_coin(self, interest_coin): + """Sets the interest_coin of this HodlerAirdropV4OrderResponse. + + Get the list of airdropped currencies # noqa: E501 + + :param interest_coin: The interest_coin of this HodlerAirdropV4OrderResponse. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and interest_coin is None: # noqa: E501 + raise ValueError("Invalid value for `interest_coin`, must not be `None`") # noqa: E501 + + self._interest_coin = interest_coin + + 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, HodlerAirdropV4OrderResponse): + 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, HodlerAirdropV4OrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/hodler_airdrop_v4_project_item.py b/gate_api/models/hodler_airdrop_v4_project_item.py new file mode 100644 index 00000000..b3294dcb --- /dev/null +++ b/gate_api/models/hodler_airdrop_v4_project_item.py @@ -0,0 +1,388 @@ +# 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 HodlerAirdropV4ProjectItem(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 = { + 'hodler_id': 'str', + 'name': 'str', + 'asset': 'str', + 'status': 'str', + 'total_amount': 'str', + 'open_timest': 'str', + 'close_timest': 'str', + 'per_gt_reward_token': 'str', + 'user_count': 'str', + 'max_queue_amount': 'str' + } + + attribute_map = { + 'hodler_id': 'hodler_id', + 'name': 'name', + 'asset': 'asset', + 'status': 'status', + 'total_amount': 'total_amount', + 'open_timest': 'open_timest', + 'close_timest': 'close_timest', + 'per_gt_reward_token': 'per_gt_reward_token', + 'user_count': 'user_count', + 'max_queue_amount': 'max_queue_amount' + } + + def __init__(self, hodler_id=None, name=None, asset=None, status=None, total_amount=None, open_timest=None, close_timest=None, per_gt_reward_token=None, user_count=None, max_queue_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """HodlerAirdropV4ProjectItem - 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._hodler_id = None + self._name = None + self._asset = None + self._status = None + self._total_amount = None + self._open_timest = None + self._close_timest = None + self._per_gt_reward_token = None + self._user_count = None + self._max_queue_amount = None + self.discriminator = None + + self.hodler_id = hodler_id + self.name = name + self.asset = asset + self.status = status + self.total_amount = total_amount + self.open_timest = open_timest + self.close_timest = close_timest + if per_gt_reward_token is not None: + self.per_gt_reward_token = per_gt_reward_token + if user_count is not None: + self.user_count = user_count + if max_queue_amount is not None: + self.max_queue_amount = max_queue_amount + + @property + def hodler_id(self): + """Gets the hodler_id of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Product ID # noqa: E501 + + :return: The hodler_id of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._hodler_id + + @hodler_id.setter + def hodler_id(self, hodler_id): + """Sets the hodler_id of this HodlerAirdropV4ProjectItem. + + Product ID # noqa: E501 + + :param hodler_id: The hodler_id of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and hodler_id is None: # noqa: E501 + raise ValueError("Invalid value for `hodler_id`, must not be `None`") # noqa: E501 + + self._hodler_id = hodler_id + + @property + def name(self): + """Gets the name of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Product Name # noqa: E501 + + :return: The name of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this HodlerAirdropV4ProjectItem. + + Product Name # noqa: E501 + + :param name: The name of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def asset(self): + """Gets the asset of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Airdrop currency # noqa: E501 + + :return: The asset of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this HodlerAirdropV4ProjectItem. + + Airdrop currency # noqa: E501 + + :param asset: The asset of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def status(self): + """Gets the status of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Project status # noqa: E501 + + :return: The status of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this HodlerAirdropV4ProjectItem. + + Project status # noqa: E501 + + :param status: The status of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["UNDERWAY", "PREHEAT", "FINISH"] # 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}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def total_amount(self): + """Gets the total_amount of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Total airdrop amount # noqa: E501 + + :return: The total_amount of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._total_amount + + @total_amount.setter + def total_amount(self, total_amount): + """Sets the total_amount of this HodlerAirdropV4ProjectItem. + + Total airdrop amount # noqa: E501 + + :param total_amount: The total_amount of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_amount is None: # noqa: E501 + raise ValueError("Invalid value for `total_amount`, must not be `None`") # noqa: E501 + + self._total_amount = total_amount + + @property + def open_timest(self): + """Gets the open_timest of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Event start time, format Y-m-d H:i:s, UTC # noqa: E501 + + :return: The open_timest of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._open_timest + + @open_timest.setter + def open_timest(self, open_timest): + """Sets the open_timest of this HodlerAirdropV4ProjectItem. + + Event start time, format Y-m-d H:i:s, UTC # noqa: E501 + + :param open_timest: The open_timest of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and open_timest is None: # noqa: E501 + raise ValueError("Invalid value for `open_timest`, must not be `None`") # noqa: E501 + + self._open_timest = open_timest + + @property + def close_timest(self): + """Gets the close_timest of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Event end time, format Y-m-d H:i:s, UTC # noqa: E501 + + :return: The close_timest of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._close_timest + + @close_timest.setter + def close_timest(self, close_timest): + """Sets the close_timest of this HodlerAirdropV4ProjectItem. + + Event end time, format Y-m-d H:i:s, UTC # noqa: E501 + + :param close_timest: The close_timest of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and close_timest is None: # noqa: E501 + raise ValueError("Invalid value for `close_timest`, must not be `None`") # noqa: E501 + + self._close_timest = close_timest + + @property + def per_gt_reward_token(self): + """Gets the per_gt_reward_token of this HodlerAirdropV4ProjectItem. # noqa: E501 + + The number of airdrop coins that can be obtained for each GT. When the calculation is in progress, an empty string is returned. # noqa: E501 + + :return: The per_gt_reward_token of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._per_gt_reward_token + + @per_gt_reward_token.setter + def per_gt_reward_token(self, per_gt_reward_token): + """Sets the per_gt_reward_token of this HodlerAirdropV4ProjectItem. + + The number of airdrop coins that can be obtained for each GT. When the calculation is in progress, an empty string is returned. # noqa: E501 + + :param per_gt_reward_token: The per_gt_reward_token of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + + self._per_gt_reward_token = per_gt_reward_token + + @property + def user_count(self): + """Gets the user_count of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Number of participants # noqa: E501 + + :return: The user_count of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._user_count + + @user_count.setter + def user_count(self, user_count): + """Sets the user_count of this HodlerAirdropV4ProjectItem. + + Number of participants # noqa: E501 + + :param user_count: The user_count of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + + self._user_count = user_count + + @property + def max_queue_amount(self): + """Gets the max_queue_amount of this HodlerAirdropV4ProjectItem. # noqa: E501 + + Personal GT limit # noqa: E501 + + :return: The max_queue_amount of this HodlerAirdropV4ProjectItem. # noqa: E501 + :rtype: str + """ + return self._max_queue_amount + + @max_queue_amount.setter + def max_queue_amount(self, max_queue_amount): + """Sets the max_queue_amount of this HodlerAirdropV4ProjectItem. + + Personal GT limit # noqa: E501 + + :param max_queue_amount: The max_queue_amount of this HodlerAirdropV4ProjectItem. # noqa: E501 + :type: str + """ + + self._max_queue_amount = max_queue_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, HodlerAirdropV4ProjectItem): + 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, HodlerAirdropV4ProjectItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/hodler_airdrop_v4_user_airdrop_record.py b/gate_api/models/hodler_airdrop_v4_user_airdrop_record.py new file mode 100644 index 00000000..6d6158fa --- /dev/null +++ b/gate_api/models/hodler_airdrop_v4_user_airdrop_record.py @@ -0,0 +1,266 @@ +# 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 HodlerAirdropV4UserAirdropRecord(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 = { + 'hodler_id': 'str', + 'asset': 'str', + 'receive_amount_base': 'str', + 'receive_amount_ext': 'str', + 'delivery_timest': 'str', + 'exchange': 'str' + } + + attribute_map = { + 'hodler_id': 'hodler_id', + 'asset': 'asset', + 'receive_amount_base': 'receive_amount_base', + 'receive_amount_ext': 'receive_amount_ext', + 'delivery_timest': 'delivery_timest', + 'exchange': 'exchange' + } + + def __init__(self, hodler_id=None, asset=None, receive_amount_base=None, receive_amount_ext=None, delivery_timest=None, exchange=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """HodlerAirdropV4UserAirdropRecord - 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._hodler_id = None + self._asset = None + self._receive_amount_base = None + self._receive_amount_ext = None + self._delivery_timest = None + self._exchange = None + self.discriminator = None + + self.hodler_id = hodler_id + self.asset = asset + if receive_amount_base is not None: + self.receive_amount_base = receive_amount_base + if receive_amount_ext is not None: + self.receive_amount_ext = receive_amount_ext + self.delivery_timest = delivery_timest + if exchange is not None: + self.exchange = exchange + + @property + def hodler_id(self): + """Gets the hodler_id of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + + Product ID # noqa: E501 + + :return: The hodler_id of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :rtype: str + """ + return self._hodler_id + + @hodler_id.setter + def hodler_id(self, hodler_id): + """Sets the hodler_id of this HodlerAirdropV4UserAirdropRecord. + + Product ID # noqa: E501 + + :param hodler_id: The hodler_id of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and hodler_id is None: # noqa: E501 + raise ValueError("Invalid value for `hodler_id`, must not be `None`") # noqa: E501 + + self._hodler_id = hodler_id + + @property + def asset(self): + """Gets the asset of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + + Airdrop currency # noqa: E501 + + :return: The asset of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this HodlerAirdropV4UserAirdropRecord. + + Airdrop currency # noqa: E501 + + :param asset: The asset of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def receive_amount_base(self): + """Gets the receive_amount_base of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + + Basic airdrop amount # noqa: E501 + + :return: The receive_amount_base of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :rtype: str + """ + return self._receive_amount_base + + @receive_amount_base.setter + def receive_amount_base(self, receive_amount_base): + """Sets the receive_amount_base of this HodlerAirdropV4UserAirdropRecord. + + Basic airdrop amount # noqa: E501 + + :param receive_amount_base: The receive_amount_base of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :type: str + """ + + self._receive_amount_base = receive_amount_base + + @property + def receive_amount_ext(self): + """Gets the receive_amount_ext of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + + Additional airdrop amount (Yubibao bonus) # noqa: E501 + + :return: The receive_amount_ext of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :rtype: str + """ + return self._receive_amount_ext + + @receive_amount_ext.setter + def receive_amount_ext(self, receive_amount_ext): + """Sets the receive_amount_ext of this HodlerAirdropV4UserAirdropRecord. + + Additional airdrop amount (Yubibao bonus) # noqa: E501 + + :param receive_amount_ext: The receive_amount_ext of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :type: str + """ + + self._receive_amount_ext = receive_amount_ext + + @property + def delivery_timest(self): + """Gets the delivery_timest of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + + Airdrop distribution time, format Y-m-d H:i:s, UTC; may be an empty string when not distributed # noqa: E501 + + :return: The delivery_timest of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :rtype: str + """ + return self._delivery_timest + + @delivery_timest.setter + def delivery_timest(self, delivery_timest): + """Sets the delivery_timest of this HodlerAirdropV4UserAirdropRecord. + + Airdrop distribution time, format Y-m-d H:i:s, UTC; may be an empty string when not distributed # noqa: E501 + + :param delivery_timest: The delivery_timest of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and delivery_timest is None: # noqa: E501 + raise ValueError("Invalid value for `delivery_timest`, must not be `None`") # noqa: E501 + + self._delivery_timest = delivery_timest + + @property + def exchange(self): + """Gets the exchange of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + + Automatic exchange status, 0 has not been exchanged, 1 has been exchanged for GT # noqa: E501 + + :return: The exchange of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :rtype: str + """ + return self._exchange + + @exchange.setter + def exchange(self, exchange): + """Sets the exchange of this HodlerAirdropV4UserAirdropRecord. + + Automatic exchange status, 0 has not been exchanged, 1 has been exchanged for GT # noqa: E501 + + :param exchange: The exchange of this HodlerAirdropV4UserAirdropRecord. # noqa: E501 + :type: str + """ + + self._exchange = exchange + + 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, HodlerAirdropV4UserAirdropRecord): + 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, HodlerAirdropV4UserAirdropRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/hodler_airdrop_v4_user_order_record.py b/gate_api/models/hodler_airdrop_v4_user_order_record.py new file mode 100644 index 00000000..9d01dd5b --- /dev/null +++ b/gate_api/models/hodler_airdrop_v4_user_order_record.py @@ -0,0 +1,266 @@ +# 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 HodlerAirdropV4UserOrderRecord(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 = { + 'hodler_id': 'str', + 'asset': 'str', + 'user_gt_avg_amount': 'str', + 'receive_amount_base': 'str', + 'receive_amount_ext': 'str', + 'close_timest': 'str' + } + + attribute_map = { + 'hodler_id': 'hodler_id', + 'asset': 'asset', + 'user_gt_avg_amount': 'user_gt_avg_amount', + 'receive_amount_base': 'receive_amount_base', + 'receive_amount_ext': 'receive_amount_ext', + 'close_timest': 'close_timest' + } + + def __init__(self, hodler_id=None, asset=None, user_gt_avg_amount=None, receive_amount_base=None, receive_amount_ext=None, close_timest=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """HodlerAirdropV4UserOrderRecord - 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._hodler_id = None + self._asset = None + self._user_gt_avg_amount = None + self._receive_amount_base = None + self._receive_amount_ext = None + self._close_timest = None + self.discriminator = None + + self.hodler_id = hodler_id + self.asset = asset + if user_gt_avg_amount is not None: + self.user_gt_avg_amount = user_gt_avg_amount + if receive_amount_base is not None: + self.receive_amount_base = receive_amount_base + if receive_amount_ext is not None: + self.receive_amount_ext = receive_amount_ext + self.close_timest = close_timest + + @property + def hodler_id(self): + """Gets the hodler_id of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + + Product ID # noqa: E501 + + :return: The hodler_id of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :rtype: str + """ + return self._hodler_id + + @hodler_id.setter + def hodler_id(self, hodler_id): + """Sets the hodler_id of this HodlerAirdropV4UserOrderRecord. + + Product ID # noqa: E501 + + :param hodler_id: The hodler_id of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and hodler_id is None: # noqa: E501 + raise ValueError("Invalid value for `hodler_id`, must not be `None`") # noqa: E501 + + self._hodler_id = hodler_id + + @property + def asset(self): + """Gets the asset of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + + Airdrop currency # noqa: E501 + + :return: The asset of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this HodlerAirdropV4UserOrderRecord. + + Airdrop currency # noqa: E501 + + :param asset: The asset of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def user_gt_avg_amount(self): + """Gets the user_gt_avg_amount of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + + Effective number of GT positions (average number of GT held when participating in the event) # noqa: E501 + + :return: The user_gt_avg_amount of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :rtype: str + """ + return self._user_gt_avg_amount + + @user_gt_avg_amount.setter + def user_gt_avg_amount(self, user_gt_avg_amount): + """Sets the user_gt_avg_amount of this HodlerAirdropV4UserOrderRecord. + + Effective number of GT positions (average number of GT held when participating in the event) # noqa: E501 + + :param user_gt_avg_amount: The user_gt_avg_amount of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :type: str + """ + + self._user_gt_avg_amount = user_gt_avg_amount + + @property + def receive_amount_base(self): + """Gets the receive_amount_base of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + + Basic airdrop amount, it will be an empty string before the end of the activity # noqa: E501 + + :return: The receive_amount_base of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :rtype: str + """ + return self._receive_amount_base + + @receive_amount_base.setter + def receive_amount_base(self, receive_amount_base): + """Sets the receive_amount_base of this HodlerAirdropV4UserOrderRecord. + + Basic airdrop amount, it will be an empty string before the end of the activity # noqa: E501 + + :param receive_amount_base: The receive_amount_base of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :type: str + """ + + self._receive_amount_base = receive_amount_base + + @property + def receive_amount_ext(self): + """Gets the receive_amount_ext of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + + Additional airdrop amount (Yubibao bonus), it will be an empty string before the end of the event # noqa: E501 + + :return: The receive_amount_ext of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :rtype: str + """ + return self._receive_amount_ext + + @receive_amount_ext.setter + def receive_amount_ext(self, receive_amount_ext): + """Sets the receive_amount_ext of this HodlerAirdropV4UserOrderRecord. + + Additional airdrop amount (Yubibao bonus), it will be an empty string before the end of the event # noqa: E501 + + :param receive_amount_ext: The receive_amount_ext of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :type: str + """ + + self._receive_amount_ext = receive_amount_ext + + @property + def close_timest(self): + """Gets the close_timest of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + + Event end time, format Y-m-d H:i:s, UTC # noqa: E501 + + :return: The close_timest of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :rtype: str + """ + return self._close_timest + + @close_timest.setter + def close_timest(self, close_timest): + """Sets the close_timest of this HodlerAirdropV4UserOrderRecord. + + Event end time, format Y-m-d H:i:s, UTC # noqa: E501 + + :param close_timest: The close_timest of this HodlerAirdropV4UserOrderRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and close_timest is None: # noqa: E501 + raise ValueError("Invalid value for `close_timest`, must not be `None`") # noqa: E501 + + self._close_timest = close_timest + + 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, HodlerAirdropV4UserOrderRecord): + 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, HodlerAirdropV4UserOrderRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/infinite_grid_create_params.py b/gate_api/models/infinite_grid_create_params.py new file mode 100644 index 00000000..2d83765a --- /dev/null +++ b/gate_api/models/infinite_grid_create_params.py @@ -0,0 +1,375 @@ +# 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 InfiniteGridCreateParams(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 = { + 'money': 'str', + 'price_floor': 'str', + 'profit_per_grid': 'str', + 'grid_num': 'int', + 'price_type': 'int', + 'trigger_price': 'str', + 'stop_profit': 'str', + 'stop_loss': 'str', + 'profit_sharing_ratio': 'str', + 'is_use_base': 'bool' + } + + attribute_map = { + 'money': 'money', + 'price_floor': 'price_floor', + 'profit_per_grid': 'profit_per_grid', + 'grid_num': 'grid_num', + 'price_type': 'price_type', + 'trigger_price': 'trigger_price', + 'stop_profit': 'stop_profit', + 'stop_loss': 'stop_loss', + 'profit_sharing_ratio': 'profit_sharing_ratio', + 'is_use_base': 'is_use_base' + } + + def __init__(self, money=None, price_floor=None, profit_per_grid=None, grid_num=None, price_type=None, trigger_price=None, stop_profit=None, stop_loss=None, profit_sharing_ratio=None, is_use_base=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, int, str, str, str, str, bool, Configuration) -> None + """InfiniteGridCreateParams - 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._money = None + self._price_floor = None + self._profit_per_grid = None + self._grid_num = None + self._price_type = None + self._trigger_price = None + self._stop_profit = None + self._stop_loss = None + self._profit_sharing_ratio = None + self._is_use_base = None + self.discriminator = None + + self.money = money + self.price_floor = price_floor + self.profit_per_grid = profit_per_grid + if grid_num is not None: + self.grid_num = grid_num + if price_type is not None: + self.price_type = price_type + if trigger_price is not None: + self.trigger_price = trigger_price + if stop_profit is not None: + self.stop_profit = stop_profit + if stop_loss is not None: + self.stop_loss = stop_loss + if profit_sharing_ratio is not None: + self.profit_sharing_ratio = profit_sharing_ratio + if is_use_base is not None: + self.is_use_base = is_use_base + + @property + def money(self): + """Gets the money of this InfiniteGridCreateParams. # noqa: E501 + + + :return: The money of this InfiniteGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this InfiniteGridCreateParams. + + + :param money: The money of this InfiniteGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and money is None: # noqa: E501 + raise ValueError("Invalid value for `money`, must not be `None`") # noqa: E501 + + self._money = money + + @property + def price_floor(self): + """Gets the price_floor of this InfiniteGridCreateParams. # noqa: E501 + + price floor # noqa: E501 + + :return: The price_floor of this InfiniteGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._price_floor + + @price_floor.setter + def price_floor(self, price_floor): + """Sets the price_floor of this InfiniteGridCreateParams. + + price floor # noqa: E501 + + :param price_floor: The price_floor of this InfiniteGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price_floor is None: # noqa: E501 + raise ValueError("Invalid value for `price_floor`, must not be `None`") # noqa: E501 + + self._price_floor = price_floor + + @property + def profit_per_grid(self): + """Gets the profit_per_grid of this InfiniteGridCreateParams. # noqa: E501 + + Profit per square # noqa: E501 + + :return: The profit_per_grid of this InfiniteGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._profit_per_grid + + @profit_per_grid.setter + def profit_per_grid(self, profit_per_grid): + """Sets the profit_per_grid of this InfiniteGridCreateParams. + + Profit per square # noqa: E501 + + :param profit_per_grid: The profit_per_grid of this InfiniteGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and profit_per_grid is None: # noqa: E501 + raise ValueError("Invalid value for `profit_per_grid`, must not be `None`") # noqa: E501 + + self._profit_per_grid = profit_per_grid + + @property + def grid_num(self): + """Gets the grid_num of this InfiniteGridCreateParams. # noqa: E501 + + Optional; may be omitted like in the app. # noqa: E501 + + :return: The grid_num of this InfiniteGridCreateParams. # noqa: E501 + :rtype: int + """ + return self._grid_num + + @grid_num.setter + def grid_num(self, grid_num): + """Sets the grid_num of this InfiniteGridCreateParams. + + Optional; may be omitted like in the app. # noqa: E501 + + :param grid_num: The grid_num of this InfiniteGridCreateParams. # noqa: E501 + :type: int + """ + if (self.local_vars_configuration.client_side_validation and + grid_num is not None and grid_num < 1): # noqa: E501 + raise ValueError("Invalid value for `grid_num`, must be a value greater than or equal to `1`") # noqa: E501 + + self._grid_num = grid_num + + @property + def price_type(self): + """Gets the price_type of this InfiniteGridCreateParams. # noqa: E501 + + Optional. `0` arithmetic grid; `1` geometric; omit for server defaults. # noqa: E501 + + :return: The price_type of this InfiniteGridCreateParams. # noqa: E501 + :rtype: int + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this InfiniteGridCreateParams. + + Optional. `0` arithmetic grid; `1` geometric; omit for server defaults. # noqa: E501 + + :param price_type: The price_type of this InfiniteGridCreateParams. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # 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}" # noqa: E501 + .format(price_type, allowed_values) + ) + + self._price_type = price_type + + @property + def trigger_price(self): + """Gets the trigger_price of this InfiniteGridCreateParams. # noqa: E501 + + + :return: The trigger_price of this InfiniteGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this InfiniteGridCreateParams. + + + :param trigger_price: The trigger_price of this InfiniteGridCreateParams. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def stop_profit(self): + """Gets the stop_profit of this InfiniteGridCreateParams. # noqa: E501 + + + :return: The stop_profit of this InfiniteGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_profit + + @stop_profit.setter + def stop_profit(self, stop_profit): + """Sets the stop_profit of this InfiniteGridCreateParams. + + + :param stop_profit: The stop_profit of this InfiniteGridCreateParams. # noqa: E501 + :type: str + """ + + self._stop_profit = stop_profit + + @property + def stop_loss(self): + """Gets the stop_loss of this InfiniteGridCreateParams. # noqa: E501 + + + :return: The stop_loss of this InfiniteGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_loss + + @stop_loss.setter + def stop_loss(self, stop_loss): + """Sets the stop_loss of this InfiniteGridCreateParams. + + + :param stop_loss: The stop_loss of this InfiniteGridCreateParams. # noqa: E501 + :type: str + """ + + self._stop_loss = stop_loss + + @property + def profit_sharing_ratio(self): + """Gets the profit_sharing_ratio of this InfiniteGridCreateParams. # noqa: E501 + + + :return: The profit_sharing_ratio of this InfiniteGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._profit_sharing_ratio + + @profit_sharing_ratio.setter + def profit_sharing_ratio(self, profit_sharing_ratio): + """Sets the profit_sharing_ratio of this InfiniteGridCreateParams. + + + :param profit_sharing_ratio: The profit_sharing_ratio of this InfiniteGridCreateParams. # noqa: E501 + :type: str + """ + + self._profit_sharing_ratio = profit_sharing_ratio + + @property + def is_use_base(self): + """Gets the is_use_base of this InfiniteGridCreateParams. # noqa: E501 + + + :return: The is_use_base of this InfiniteGridCreateParams. # noqa: E501 + :rtype: bool + """ + return self._is_use_base + + @is_use_base.setter + def is_use_base(self, is_use_base): + """Sets the is_use_base of this InfiniteGridCreateParams. + + + :param is_use_base: The is_use_base of this InfiniteGridCreateParams. # noqa: E501 + :type: bool + """ + + self._is_use_base = is_use_base + + 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, InfiniteGridCreateParams): + 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, InfiniteGridCreateParams): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/infinite_grid_create_request.py b/gate_api/models/infinite_grid_create_request.py new file mode 100644 index 00000000..4ef37580 --- /dev/null +++ b/gate_api/models/infinite_grid_create_request.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 InfiniteGridCreateRequest(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 = { + 'strategy_type': 'str', + 'market': 'str', + 'create_params': 'InfiniteGridCreateParams' + } + + attribute_map = { + 'strategy_type': 'strategy_type', + 'market': 'market', + 'create_params': 'create_params' + } + + def __init__(self, strategy_type=None, market=None, create_params=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, InfiniteGridCreateParams, Configuration) -> None + """InfiniteGridCreateRequest - 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._strategy_type = None + self._market = None + self._create_params = None + self.discriminator = None + + self.strategy_type = strategy_type + self.market = market + self.create_params = create_params + + @property + def strategy_type(self): + """Gets the strategy_type of this InfiniteGridCreateRequest. # noqa: E501 + + + :return: The strategy_type of this InfiniteGridCreateRequest. # noqa: E501 + :rtype: str + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this InfiniteGridCreateRequest. + + + :param strategy_type: The strategy_type of this InfiniteGridCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + allowed_values = ["infinite_grid"] # 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}" # noqa: E501 + .format(strategy_type, allowed_values) + ) + + self._strategy_type = strategy_type + + @property + def market(self): + """Gets the market of this InfiniteGridCreateRequest. # noqa: E501 + + + :return: The market of this InfiniteGridCreateRequest. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this InfiniteGridCreateRequest. + + + :param market: The market of this InfiniteGridCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def create_params(self): + """Gets the create_params of this InfiniteGridCreateRequest. # noqa: E501 + + + :return: The create_params of this InfiniteGridCreateRequest. # noqa: E501 + :rtype: InfiniteGridCreateParams + """ + return self._create_params + + @create_params.setter + def create_params(self, create_params): + """Sets the create_params of this InfiniteGridCreateRequest. + + + :param create_params: The create_params of this InfiniteGridCreateRequest. # noqa: E501 + :type: InfiniteGridCreateParams + """ + if self.local_vars_configuration.client_side_validation and create_params is None: # noqa: E501 + raise ValueError("Invalid value for `create_params`, must not be `None`") # noqa: E501 + + self._create_params = create_params + + 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, InfiniteGridCreateRequest): + 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, InfiniteGridCreateRequest): + 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 index c7a3935a..5bebd104 100644 --- a/gate_api/models/inline_response200.py +++ b/gate_api/models/inline_response200.py @@ -33,46 +33,191 @@ class InlineResponse200(object): and the value is json key in definition. """ openapi_types = { - 'order': 'TrailOrder' + 'exchange_type': 'str', + 'spot_maker_fee': 'str', + 'spot_taker_fee': 'str', + 'future_maker_fee': 'str', + 'future_taker_fee': 'str', + 'special_fee_list': 'list[CrossexSpecialFee]' } attribute_map = { - 'order': 'order' + 'exchange_type': 'exchange_type', + 'spot_maker_fee': 'spot_maker_fee', + 'spot_taker_fee': 'spot_taker_fee', + 'future_maker_fee': 'future_maker_fee', + 'future_taker_fee': 'future_taker_fee', + 'special_fee_list': 'special_fee_list' } - def __init__(self, order=None, local_vars_configuration=None): # noqa: E501 - # type: (TrailOrder, Configuration) -> None + def __init__(self, exchange_type=None, spot_maker_fee=None, spot_taker_fee=None, future_maker_fee=None, future_taker_fee=None, special_fee_list=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, list[CrossexSpecialFee], 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._order = None + self._exchange_type = None + self._spot_maker_fee = None + self._spot_taker_fee = None + self._future_maker_fee = None + self._future_taker_fee = None + self._special_fee_list = None self.discriminator = None - if order is not None: - self.order = order + if exchange_type is not None: + self.exchange_type = exchange_type + self.spot_maker_fee = spot_maker_fee + self.spot_taker_fee = spot_taker_fee + self.future_maker_fee = future_maker_fee + self.future_taker_fee = future_taker_fee + self.special_fee_list = special_fee_list @property - def order(self): - """Gets the order of this InlineResponse200. # noqa: E501 + def exchange_type(self): + """Gets the exchange_type of this InlineResponse200. # noqa: E501 + Exchange # noqa: E501 - :return: The order of this InlineResponse200. # noqa: E501 - :rtype: TrailOrder + :return: The exchange_type of this InlineResponse200. # noqa: E501 + :rtype: str """ - return self._order + return self._exchange_type - @order.setter - def order(self, order): - """Sets the order of this InlineResponse200. + @exchange_type.setter + def exchange_type(self, exchange_type): + """Sets the exchange_type of this InlineResponse200. + Exchange # noqa: E501 - :param order: The order of this InlineResponse200. # noqa: E501 - :type: TrailOrder + :param exchange_type: The exchange_type of this InlineResponse200. # noqa: E501 + :type: str """ - self._order = order + self._exchange_type = exchange_type + + @property + def spot_maker_fee(self): + """Gets the spot_maker_fee of this InlineResponse200. # noqa: E501 + + spotMakerfee rate # noqa: E501 + + :return: The spot_maker_fee of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._spot_maker_fee + + @spot_maker_fee.setter + def spot_maker_fee(self, spot_maker_fee): + """Sets the spot_maker_fee of this InlineResponse200. + + spotMakerfee rate # noqa: E501 + + :param spot_maker_fee: The spot_maker_fee of this InlineResponse200. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and spot_maker_fee is None: # noqa: E501 + raise ValueError("Invalid value for `spot_maker_fee`, must not be `None`") # noqa: E501 + + self._spot_maker_fee = spot_maker_fee + + @property + def spot_taker_fee(self): + """Gets the spot_taker_fee of this InlineResponse200. # noqa: E501 + + spotTakerfee rate # noqa: E501 + + :return: The spot_taker_fee of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._spot_taker_fee + + @spot_taker_fee.setter + def spot_taker_fee(self, spot_taker_fee): + """Sets the spot_taker_fee of this InlineResponse200. + + spotTakerfee rate # noqa: E501 + + :param spot_taker_fee: The spot_taker_fee of this InlineResponse200. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and spot_taker_fee is None: # noqa: E501 + raise ValueError("Invalid value for `spot_taker_fee`, must not be `None`") # noqa: E501 + + self._spot_taker_fee = spot_taker_fee + + @property + def future_maker_fee(self): + """Gets the future_maker_fee of this InlineResponse200. # noqa: E501 + + contractMakerfee rate # noqa: E501 + + :return: The future_maker_fee of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._future_maker_fee + + @future_maker_fee.setter + def future_maker_fee(self, future_maker_fee): + """Sets the future_maker_fee of this InlineResponse200. + + contractMakerfee rate # noqa: E501 + + :param future_maker_fee: The future_maker_fee of this InlineResponse200. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and future_maker_fee is None: # noqa: E501 + raise ValueError("Invalid value for `future_maker_fee`, must not be `None`") # noqa: E501 + + self._future_maker_fee = future_maker_fee + + @property + def future_taker_fee(self): + """Gets the future_taker_fee of this InlineResponse200. # noqa: E501 + + contractTakerfee rate # noqa: E501 + + :return: The future_taker_fee of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._future_taker_fee + + @future_taker_fee.setter + def future_taker_fee(self, future_taker_fee): + """Sets the future_taker_fee of this InlineResponse200. + + contractTakerfee rate # noqa: E501 + + :param future_taker_fee: The future_taker_fee of this InlineResponse200. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and future_taker_fee is None: # noqa: E501 + raise ValueError("Invalid value for `future_taker_fee`, must not be `None`") # noqa: E501 + + self._future_taker_fee = future_taker_fee + + @property + def special_fee_list(self): + """Gets the special_fee_list of this InlineResponse200. # noqa: E501 + + + :return: The special_fee_list of this InlineResponse200. # noqa: E501 + :rtype: list[CrossexSpecialFee] + """ + return self._special_fee_list + + @special_fee_list.setter + def special_fee_list(self, special_fee_list): + """Sets the special_fee_list of this InlineResponse200. + + + :param special_fee_list: The special_fee_list of this InlineResponse200. # noqa: E501 + :type: list[CrossexSpecialFee] + """ + if self.local_vars_configuration.client_side_validation and special_fee_list is None: # noqa: E501 + raise ValueError("Invalid value for `special_fee_list`, must not be `None`") # noqa: E501 + + self._special_fee_list = special_fee_list def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/inline_response20017_data_list.py b/gate_api/models/inline_response20017_data_list.py deleted file mode 100644 index 1a3f99b2..00000000 --- a/gate_api/models/inline_response20017_data_list.py +++ /dev/null @@ -1,1801 +0,0 @@ -# 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 InlineResponse20017DataList(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_buy': 'int', - 'timest': 'str', - 'timest_expire': 'str', - 'type': 'str', - 'trade_type': 'str', - 'timestamp': 'int', - 'rate': 'str', - 'amount': 'str', - 'total': 'str', - 'txid': 'int', - 'status': 'str', - 'order_status': 'str', - 'its_realname': 'str', - 'its_uid': 'str', - 'its_nick': 'str', - 'user_note': 'str', - 'show_bank': 'str', - 'bankname': 'str', - 'bankbranch': 'str', - 'seller_realname': 'str', - 'buyer_realname': 'str', - 'bankid': 'str', - 'bank_holder_realname': 'str', - 'show_ali': 'int', - 'aliname': 'str', - 'show_wechat': 'int', - 'wename': 'str', - 'is_alicode': 'int', - 'dispute_time': 'int', - 'cancelable': 'int', - 'black_uid': 'str', - 'black_name': 'str', - 'memo': 'str', - 'is_follow': 'int', - 'is_black': 'bool', - 'currency_type': 'str', - 'want_type': 'str', - 'is_hedge': 'int', - 'hide_payment': 'int', - 'sel_paytype': 'str', - 'show_others': 'int', - 'pay_others': 'list[str]', - 'trade_tips': 'str', - 'appeal_unread': 'int', - 'im_unread': 'int', - 'in_dispute': 'bool', - 'reason_id': 'str', - 'reason_memo': 'str', - 'cancel_time': 'str', - 'seller_confirm': 'int', - 'toast_id': 'int', - 'dispute_reback': 'int', - 'score': 'str', - 'message': 'str', - 'release_coin_switch': 'int', - 'tier': 'int', - 'blue_vip': 'int', - 'od_time': 'int', - 'order_type': 'int', - 'order_tag': 'list[str]', - 'convert_info': 'InlineResponse20017DataConvertInfo' - } - - attribute_map = { - 'type_buy': 'type_buy', - 'timest': 'timest', - 'timest_expire': 'timest_expire', - 'type': 'type', - 'trade_type': 'trade_type', - 'timestamp': 'timestamp', - 'rate': 'rate', - 'amount': 'amount', - 'total': 'total', - 'txid': 'txid', - 'status': 'status', - 'order_status': 'order_status', - 'its_realname': 'its_realname', - 'its_uid': 'its_uid', - 'its_nick': 'its_nick', - 'user_note': 'user_note', - 'show_bank': 'show_bank', - 'bankname': 'bankname', - 'bankbranch': 'bankbranch', - 'seller_realname': 'sellerRealname', - 'buyer_realname': 'buyerRealname', - 'bankid': 'bankid', - 'bank_holder_realname': 'bank_holder_realname', - 'show_ali': 'show_ali', - 'aliname': 'aliname', - 'show_wechat': 'show_wechat', - 'wename': 'wename', - 'is_alicode': 'is_alicode', - 'dispute_time': 'dispute_time', - 'cancelable': 'cancelable', - 'black_uid': 'black_uid', - 'black_name': 'black_name', - 'memo': 'memo', - 'is_follow': 'is_follow', - 'is_black': 'is_black', - 'currency_type': 'currencyType', - 'want_type': 'want_type', - 'is_hedge': 'is_hedge', - 'hide_payment': 'hide_payment', - 'sel_paytype': 'sel_paytype', - 'show_others': 'show_others', - 'pay_others': 'pay_others', - 'trade_tips': 'trade_tips', - 'appeal_unread': 'appeal_unread', - 'im_unread': 'im_unread', - 'in_dispute': 'in_dispute', - 'reason_id': 'reason_id', - 'reason_memo': 'reason_memo', - 'cancel_time': 'cancel_time', - 'seller_confirm': 'seller_confirm', - 'toast_id': 'toast_id', - 'dispute_reback': 'dispute_reback', - 'score': 'score', - 'message': 'message', - 'release_coin_switch': 'release_coin_switch', - 'tier': 'tier', - 'blue_vip': 'blue_vip', - 'od_time': 'od_time', - 'order_type': 'order_type', - 'order_tag': 'order_tag', - 'convert_info': 'convert_info' - } - - def __init__(self, type_buy=None, timest=None, timest_expire=None, type=None, trade_type=None, timestamp=None, rate=None, amount=None, total=None, txid=None, status=None, order_status=None, its_realname=None, its_uid=None, its_nick=None, user_note=None, show_bank=None, bankname=None, bankbranch=None, seller_realname=None, buyer_realname=None, bankid=None, bank_holder_realname=None, show_ali=None, aliname=None, show_wechat=None, wename=None, is_alicode=None, dispute_time=None, cancelable=None, black_uid=None, black_name=None, memo=None, is_follow=None, is_black=None, currency_type=None, want_type=None, is_hedge=None, hide_payment=None, sel_paytype=None, show_others=None, pay_others=None, trade_tips=None, appeal_unread=None, im_unread=None, in_dispute=None, reason_id=None, reason_memo=None, cancel_time=None, seller_confirm=None, toast_id=None, dispute_reback=None, score=None, message=None, release_coin_switch=None, tier=None, blue_vip=None, od_time=None, order_type=None, order_tag=None, convert_info=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, int, str, str, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, int, str, int, str, int, int, int, str, str, str, int, bool, str, str, int, int, str, int, list[str], str, int, int, bool, str, str, str, int, int, int, str, str, int, int, int, int, int, list[str], InlineResponse20017DataConvertInfo, Configuration) -> None - """InlineResponse20017DataList - 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_buy = None - self._timest = None - self._timest_expire = None - self._type = None - self._trade_type = None - self._timestamp = None - self._rate = None - self._amount = None - self._total = None - self._txid = None - self._status = None - self._order_status = None - self._its_realname = None - self._its_uid = None - self._its_nick = None - self._user_note = None - self._show_bank = None - self._bankname = None - self._bankbranch = None - self._seller_realname = None - self._buyer_realname = None - self._bankid = None - self._bank_holder_realname = None - self._show_ali = None - self._aliname = None - self._show_wechat = None - self._wename = None - self._is_alicode = None - self._dispute_time = None - self._cancelable = None - self._black_uid = None - self._black_name = None - self._memo = None - self._is_follow = None - self._is_black = None - self._currency_type = None - self._want_type = None - self._is_hedge = None - self._hide_payment = None - self._sel_paytype = None - self._show_others = None - self._pay_others = None - self._trade_tips = None - self._appeal_unread = None - self._im_unread = None - self._in_dispute = None - self._reason_id = None - self._reason_memo = None - self._cancel_time = None - self._seller_confirm = None - self._toast_id = None - self._dispute_reback = None - self._score = None - self._message = None - self._release_coin_switch = None - self._tier = None - self._blue_vip = None - self._od_time = None - self._order_type = None - self._order_tag = None - self._convert_info = None - self.discriminator = None - - if type_buy is not None: - self.type_buy = type_buy - if timest is not None: - self.timest = timest - if timest_expire is not None: - self.timest_expire = timest_expire - if type is not None: - self.type = type - if trade_type is not None: - self.trade_type = trade_type - if timestamp is not None: - self.timestamp = timestamp - if rate is not None: - self.rate = rate - if amount is not None: - self.amount = amount - if total is not None: - self.total = total - if txid is not None: - self.txid = txid - if status is not None: - self.status = status - if order_status is not None: - self.order_status = order_status - if its_realname is not None: - self.its_realname = its_realname - if its_uid is not None: - self.its_uid = its_uid - if its_nick is not None: - self.its_nick = its_nick - if user_note is not None: - self.user_note = user_note - if show_bank is not None: - self.show_bank = show_bank - if bankname is not None: - self.bankname = bankname - if bankbranch is not None: - self.bankbranch = bankbranch - if seller_realname is not None: - self.seller_realname = seller_realname - if buyer_realname is not None: - self.buyer_realname = buyer_realname - if bankid is not None: - self.bankid = bankid - if bank_holder_realname is not None: - self.bank_holder_realname = bank_holder_realname - if show_ali is not None: - self.show_ali = show_ali - if aliname is not None: - self.aliname = aliname - if show_wechat is not None: - self.show_wechat = show_wechat - if wename is not None: - self.wename = wename - if is_alicode is not None: - self.is_alicode = is_alicode - if dispute_time is not None: - self.dispute_time = dispute_time - if cancelable is not None: - self.cancelable = cancelable - if black_uid is not None: - self.black_uid = black_uid - if black_name is not None: - self.black_name = black_name - if memo is not None: - self.memo = memo - if is_follow is not None: - self.is_follow = is_follow - if is_black is not None: - self.is_black = is_black - if currency_type is not None: - self.currency_type = currency_type - if want_type is not None: - self.want_type = want_type - if is_hedge is not None: - self.is_hedge = is_hedge - if hide_payment is not None: - self.hide_payment = hide_payment - if sel_paytype is not None: - self.sel_paytype = sel_paytype - if show_others is not None: - self.show_others = show_others - if pay_others is not None: - self.pay_others = pay_others - if trade_tips is not None: - self.trade_tips = trade_tips - if appeal_unread is not None: - self.appeal_unread = appeal_unread - if im_unread is not None: - self.im_unread = im_unread - if in_dispute is not None: - self.in_dispute = in_dispute - if reason_id is not None: - self.reason_id = reason_id - if reason_memo is not None: - self.reason_memo = reason_memo - if cancel_time is not None: - self.cancel_time = cancel_time - if seller_confirm is not None: - self.seller_confirm = seller_confirm - if toast_id is not None: - self.toast_id = toast_id - if dispute_reback is not None: - self.dispute_reback = dispute_reback - if score is not None: - self.score = score - if message is not None: - self.message = message - if release_coin_switch is not None: - self.release_coin_switch = release_coin_switch - if tier is not None: - self.tier = tier - if blue_vip is not None: - self.blue_vip = blue_vip - if od_time is not None: - self.od_time = od_time - if order_type is not None: - self.order_type = order_type - if order_tag is not None: - self.order_tag = order_tag - if convert_info is not None: - self.convert_info = convert_info - - @property - def type_buy(self): - """Gets the type_buy of this InlineResponse20017DataList. # noqa: E501 - - 1=Buy, 0=Sell # noqa: E501 - - :return: The type_buy of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._type_buy - - @type_buy.setter - def type_buy(self, type_buy): - """Sets the type_buy of this InlineResponse20017DataList. - - 1=Buy, 0=Sell # noqa: E501 - - :param type_buy: The type_buy of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._type_buy = type_buy - - @property - def timest(self): - """Gets the timest of this InlineResponse20017DataList. # noqa: E501 - - Creation time of order # noqa: E501 - - :return: The timest of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._timest - - @timest.setter - def timest(self, timest): - """Sets the timest of this InlineResponse20017DataList. - - Creation time of order # noqa: E501 - - :param timest: The timest of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._timest = timest - - @property - def timest_expire(self): - """Gets the timest_expire of this InlineResponse20017DataList. # noqa: E501 - - Order expiration time # noqa: E501 - - :return: The timest_expire of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._timest_expire - - @timest_expire.setter - def timest_expire(self, timest_expire): - """Sets the timest_expire of this InlineResponse20017DataList. - - Order expiration time # noqa: E501 - - :param timest_expire: The timest_expire of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._timest_expire = timest_expire - - @property - def type(self): - """Gets the type of this InlineResponse20017DataList. # noqa: E501 - - Buy/Sell order # noqa: E501 - - :return: The type of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this InlineResponse20017DataList. - - Buy/Sell order # noqa: E501 - - :param type: The type of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def trade_type(self): - """Gets the trade_type of this InlineResponse20017DataList. # noqa: E501 - - Buy/Sell order # noqa: E501 - - :return: The trade_type of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._trade_type - - @trade_type.setter - def trade_type(self, trade_type): - """Sets the trade_type of this InlineResponse20017DataList. - - Buy/Sell order # noqa: E501 - - :param trade_type: The trade_type of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._trade_type = trade_type - - @property - def timestamp(self): - """Gets the timestamp of this InlineResponse20017DataList. # noqa: E501 - - Order creation timestamp # noqa: E501 - - :return: The timestamp of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20017DataList. - - Order creation timestamp # noqa: E501 - - :param timestamp: The timestamp of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._timestamp = timestamp - - @property - def rate(self): - """Gets the rate of this InlineResponse20017DataList. # noqa: E501 - - Exchange rate # noqa: E501 - - :return: The rate of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._rate - - @rate.setter - def rate(self, rate): - """Sets the rate of this InlineResponse20017DataList. - - Exchange rate # noqa: E501 - - :param rate: The rate of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._rate = rate - - @property - def amount(self): - """Gets the amount of this InlineResponse20017DataList. # noqa: E501 - - Size # noqa: E501 - - :return: The amount of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this InlineResponse20017DataList. - - Size # noqa: E501 - - :param amount: The amount of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def total(self): - """Gets the total of this InlineResponse20017DataList. # noqa: E501 - - Total amount # noqa: E501 - - :return: The total of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this InlineResponse20017DataList. - - Total amount # noqa: E501 - - :param total: The total of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._total = total - - @property - def txid(self): - """Gets the txid of this InlineResponse20017DataList. # noqa: E501 - - Order ID # noqa: E501 - - :return: The txid of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._txid - - @txid.setter - def txid(self, txid): - """Sets the txid of this InlineResponse20017DataList. - - Order ID # noqa: E501 - - :param txid: The txid of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._txid = txid - - @property - def status(self): - """Gets the status of this InlineResponse20017DataList. # noqa: E501 - - Order Status # noqa: E501 - - :return: The status of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this InlineResponse20017DataList. - - Order Status # noqa: E501 - - :param status: The status of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def order_status(self): - """Gets the order_status of this InlineResponse20017DataList. # noqa: E501 - - Order status (database value) # noqa: E501 - - :return: The order_status of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._order_status - - @order_status.setter - def order_status(self, order_status): - """Sets the order_status of this InlineResponse20017DataList. - - Order status (database value) # noqa: E501 - - :param order_status: The order_status of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._order_status = order_status - - @property - def its_realname(self): - """Gets the its_realname of this InlineResponse20017DataList. # noqa: E501 - - Counterparty username # noqa: E501 - - :return: The its_realname of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._its_realname - - @its_realname.setter - def its_realname(self, its_realname): - """Sets the its_realname of this InlineResponse20017DataList. - - Counterparty username # noqa: E501 - - :param its_realname: The its_realname of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._its_realname = its_realname - - @property - def its_uid(self): - """Gets the its_uid of this InlineResponse20017DataList. # noqa: E501 - - Counterparty UID # noqa: E501 - - :return: The its_uid of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._its_uid - - @its_uid.setter - def its_uid(self, its_uid): - """Sets the its_uid of this InlineResponse20017DataList. - - Counterparty UID # noqa: E501 - - :param its_uid: The its_uid of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._its_uid = its_uid - - @property - def its_nick(self): - """Gets the its_nick of this InlineResponse20017DataList. # noqa: E501 - - Counterparty nickname # noqa: E501 - - :return: The its_nick of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._its_nick - - @its_nick.setter - def its_nick(self, its_nick): - """Sets the its_nick of this InlineResponse20017DataList. - - Counterparty nickname # noqa: E501 - - :param its_nick: The its_nick of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._its_nick = its_nick - - @property - def user_note(self): - """Gets the user_note of this InlineResponse20017DataList. # noqa: E501 - - User note # noqa: E501 - - :return: The user_note of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._user_note - - @user_note.setter - def user_note(self, user_note): - """Sets the user_note of this InlineResponse20017DataList. - - User note # noqa: E501 - - :param user_note: The user_note of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._user_note = user_note - - @property - def show_bank(self): - """Gets the show_bank of this InlineResponse20017DataList. # noqa: E501 - - Whether to display bank # noqa: E501 - - :return: The show_bank of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._show_bank - - @show_bank.setter - def show_bank(self, show_bank): - """Sets the show_bank of this InlineResponse20017DataList. - - Whether to display bank # noqa: E501 - - :param show_bank: The show_bank of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._show_bank = show_bank - - @property - def bankname(self): - """Gets the bankname of this InlineResponse20017DataList. # noqa: E501 - - Bank name # noqa: E501 - - :return: The bankname of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._bankname - - @bankname.setter - def bankname(self, bankname): - """Sets the bankname of this InlineResponse20017DataList. - - Bank name # noqa: E501 - - :param bankname: The bankname of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._bankname = bankname - - @property - def bankbranch(self): - """Gets the bankbranch of this InlineResponse20017DataList. # noqa: E501 - - Bank branch name # noqa: E501 - - :return: The bankbranch of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._bankbranch - - @bankbranch.setter - def bankbranch(self, bankbranch): - """Sets the bankbranch of this InlineResponse20017DataList. - - Bank branch name # noqa: E501 - - :param bankbranch: The bankbranch of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._bankbranch = bankbranch - - @property - def seller_realname(self): - """Gets the seller_realname of this InlineResponse20017DataList. # noqa: E501 - - Seller name # noqa: E501 - - :return: The seller_realname of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._seller_realname - - @seller_realname.setter - def seller_realname(self, seller_realname): - """Sets the seller_realname of this InlineResponse20017DataList. - - Seller name # noqa: E501 - - :param seller_realname: The seller_realname of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._seller_realname = seller_realname - - @property - def buyer_realname(self): - """Gets the buyer_realname of this InlineResponse20017DataList. # noqa: E501 - - Buyer name # noqa: E501 - - :return: The buyer_realname of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._buyer_realname - - @buyer_realname.setter - def buyer_realname(self, buyer_realname): - """Sets the buyer_realname of this InlineResponse20017DataList. - - Buyer name # noqa: E501 - - :param buyer_realname: The buyer_realname of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._buyer_realname = buyer_realname - - @property - def bankid(self): - """Gets the bankid of this InlineResponse20017DataList. # noqa: E501 - - Bank ID # noqa: E501 - - :return: The bankid of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._bankid - - @bankid.setter - def bankid(self, bankid): - """Sets the bankid of this InlineResponse20017DataList. - - Bank ID # noqa: E501 - - :param bankid: The bankid of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._bankid = bankid - - @property - def bank_holder_realname(self): - """Gets the bank_holder_realname of this InlineResponse20017DataList. # noqa: E501 - - Bank cardholder name # noqa: E501 - - :return: The bank_holder_realname of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._bank_holder_realname - - @bank_holder_realname.setter - def bank_holder_realname(self, bank_holder_realname): - """Sets the bank_holder_realname of this InlineResponse20017DataList. - - Bank cardholder name # noqa: E501 - - :param bank_holder_realname: The bank_holder_realname of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._bank_holder_realname = bank_holder_realname - - @property - def show_ali(self): - """Gets the show_ali of this InlineResponse20017DataList. # noqa: E501 - - Whether to display Alipay # noqa: E501 - - :return: The show_ali of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._show_ali - - @show_ali.setter - def show_ali(self, show_ali): - """Sets the show_ali of this InlineResponse20017DataList. - - Whether to display Alipay # noqa: E501 - - :param show_ali: The show_ali of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._show_ali = show_ali - - @property - def aliname(self): - """Gets the aliname of this InlineResponse20017DataList. # noqa: E501 - - Alipay account name # noqa: E501 - - :return: The aliname of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._aliname - - @aliname.setter - def aliname(self, aliname): - """Sets the aliname of this InlineResponse20017DataList. - - Alipay account name # noqa: E501 - - :param aliname: The aliname of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._aliname = aliname - - @property - def show_wechat(self): - """Gets the show_wechat of this InlineResponse20017DataList. # noqa: E501 - - Whether to display WeChat # noqa: E501 - - :return: The show_wechat of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._show_wechat - - @show_wechat.setter - def show_wechat(self, show_wechat): - """Sets the show_wechat of this InlineResponse20017DataList. - - Whether to display WeChat # noqa: E501 - - :param show_wechat: The show_wechat of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._show_wechat = show_wechat - - @property - def wename(self): - """Gets the wename of this InlineResponse20017DataList. # noqa: E501 - - WeChat account name # noqa: E501 - - :return: The wename of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._wename - - @wename.setter - def wename(self, wename): - """Sets the wename of this InlineResponse20017DataList. - - WeChat account name # noqa: E501 - - :param wename: The wename of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._wename = wename - - @property - def is_alicode(self): - """Gets the is_alicode of this InlineResponse20017DataList. # noqa: E501 - - Whether Alipay QR code exists # noqa: E501 - - :return: The is_alicode of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._is_alicode - - @is_alicode.setter - def is_alicode(self, is_alicode): - """Sets the is_alicode of this InlineResponse20017DataList. - - Whether Alipay QR code exists # noqa: E501 - - :param is_alicode: The is_alicode of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._is_alicode = is_alicode - - @property - def dispute_time(self): - """Gets the dispute_time of this InlineResponse20017DataList. # noqa: E501 - - Appeal time # noqa: E501 - - :return: The dispute_time of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._dispute_time - - @dispute_time.setter - def dispute_time(self, dispute_time): - """Sets the dispute_time of this InlineResponse20017DataList. - - Appeal time # noqa: E501 - - :param dispute_time: The dispute_time of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._dispute_time = dispute_time - - @property - def cancelable(self): - """Gets the cancelable of this InlineResponse20017DataList. # noqa: E501 - - Whether cancellable # noqa: E501 - - :return: The cancelable of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._cancelable - - @cancelable.setter - def cancelable(self, cancelable): - """Sets the cancelable of this InlineResponse20017DataList. - - Whether cancellable # noqa: E501 - - :param cancelable: The cancelable of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._cancelable = cancelable - - @property - def black_uid(self): - """Gets the black_uid of this InlineResponse20017DataList. # noqa: E501 - - Blacklist UID # noqa: E501 - - :return: The black_uid of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._black_uid - - @black_uid.setter - def black_uid(self, black_uid): - """Sets the black_uid of this InlineResponse20017DataList. - - Blacklist UID # noqa: E501 - - :param black_uid: The black_uid of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._black_uid = black_uid - - @property - def black_name(self): - """Gets the black_name of this InlineResponse20017DataList. # noqa: E501 - - Blacklist username # noqa: E501 - - :return: The black_name of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._black_name - - @black_name.setter - def black_name(self, black_name): - """Sets the black_name of this InlineResponse20017DataList. - - Blacklist username # noqa: E501 - - :param black_name: The black_name of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._black_name = black_name - - @property - def memo(self): - """Gets the memo of this InlineResponse20017DataList. # noqa: E501 - - Blacklist note # noqa: E501 - - :return: The memo of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._memo - - @memo.setter - def memo(self, memo): - """Sets the memo of this InlineResponse20017DataList. - - Blacklist note # noqa: E501 - - :param memo: The memo of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._memo = memo - - @property - def is_follow(self): - """Gets the is_follow of this InlineResponse20017DataList. # noqa: E501 - - Whether following # noqa: E501 - - :return: The is_follow of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._is_follow - - @is_follow.setter - def is_follow(self, is_follow): - """Sets the is_follow of this InlineResponse20017DataList. - - Whether following # noqa: E501 - - :param is_follow: The is_follow of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._is_follow = is_follow - - @property - def is_black(self): - """Gets the is_black of this InlineResponse20017DataList. # noqa: E501 - - Whether blocked # noqa: E501 - - :return: The is_black of this InlineResponse20017DataList. # noqa: E501 - :rtype: bool - """ - return self._is_black - - @is_black.setter - def is_black(self, is_black): - """Sets the is_black of this InlineResponse20017DataList. - - Whether blocked # noqa: E501 - - :param is_black: The is_black of this InlineResponse20017DataList. # noqa: E501 - :type: bool - """ - - self._is_black = is_black - - @property - def currency_type(self): - """Gets the currency_type of this InlineResponse20017DataList. # noqa: E501 - - Virtual currency # noqa: E501 - - :return: The currency_type of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._currency_type - - @currency_type.setter - def currency_type(self, currency_type): - """Sets the currency_type of this InlineResponse20017DataList. - - Virtual currency # noqa: E501 - - :param currency_type: The currency_type of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._currency_type = currency_type - - @property - def want_type(self): - """Gets the want_type of this InlineResponse20017DataList. # noqa: E501 - - Fiat currency # noqa: E501 - - :return: The want_type of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._want_type - - @want_type.setter - def want_type(self, want_type): - """Sets the want_type of this InlineResponse20017DataList. - - Fiat currency # noqa: E501 - - :param want_type: The want_type of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._want_type = want_type - - @property - def is_hedge(self): - """Gets the is_hedge of this InlineResponse20017DataList. # noqa: E501 - - Whether auto delegation # noqa: E501 - - :return: The is_hedge of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._is_hedge - - @is_hedge.setter - def is_hedge(self, is_hedge): - """Sets the is_hedge of this InlineResponse20017DataList. - - Whether auto delegation # noqa: E501 - - :param is_hedge: The is_hedge of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._is_hedge = is_hedge - - @property - def hide_payment(self): - """Gets the hide_payment of this InlineResponse20017DataList. # noqa: E501 - - Whether to hide payment method # noqa: E501 - - :return: The hide_payment of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._hide_payment - - @hide_payment.setter - def hide_payment(self, hide_payment): - """Sets the hide_payment of this InlineResponse20017DataList. - - Whether to hide payment method # noqa: E501 - - :param hide_payment: The hide_payment of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._hide_payment = hide_payment - - @property - def sel_paytype(self): - """Gets the sel_paytype of this InlineResponse20017DataList. # noqa: E501 - - Payment type # noqa: E501 - - :return: The sel_paytype of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._sel_paytype - - @sel_paytype.setter - def sel_paytype(self, sel_paytype): - """Sets the sel_paytype of this InlineResponse20017DataList. - - Payment type # noqa: E501 - - :param sel_paytype: The sel_paytype of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._sel_paytype = sel_paytype - - @property - def show_others(self): - """Gets the show_others of this InlineResponse20017DataList. # noqa: E501 - - Whether to display other payment methods # noqa: E501 - - :return: The show_others of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._show_others - - @show_others.setter - def show_others(self, show_others): - """Sets the show_others of this InlineResponse20017DataList. - - Whether to display other payment methods # noqa: E501 - - :param show_others: The show_others of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._show_others = show_others - - @property - def pay_others(self): - """Gets the pay_others of this InlineResponse20017DataList. # noqa: E501 - - Other payment methods # noqa: E501 - - :return: The pay_others of this InlineResponse20017DataList. # noqa: E501 - :rtype: list[str] - """ - return self._pay_others - - @pay_others.setter - def pay_others(self, pay_others): - """Sets the pay_others of this InlineResponse20017DataList. - - Other payment methods # noqa: E501 - - :param pay_others: The pay_others of this InlineResponse20017DataList. # noqa: E501 - :type: list[str] - """ - - self._pay_others = pay_others - - @property - def trade_tips(self): - """Gets the trade_tips of this InlineResponse20017DataList. # noqa: E501 - - Trading tip # noqa: E501 - - :return: The trade_tips of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._trade_tips - - @trade_tips.setter - def trade_tips(self, trade_tips): - """Sets the trade_tips of this InlineResponse20017DataList. - - Trading tip # noqa: E501 - - :param trade_tips: The trade_tips of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._trade_tips = trade_tips - - @property - def appeal_unread(self): - """Gets the appeal_unread of this InlineResponse20017DataList. # noqa: E501 - - Unread appeals # noqa: E501 - - :return: The appeal_unread of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._appeal_unread - - @appeal_unread.setter - def appeal_unread(self, appeal_unread): - """Sets the appeal_unread of this InlineResponse20017DataList. - - Unread appeals # noqa: E501 - - :param appeal_unread: The appeal_unread of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._appeal_unread = appeal_unread - - @property - def im_unread(self): - """Gets the im_unread of this InlineResponse20017DataList. # noqa: E501 - - IM unread # noqa: E501 - - :return: The im_unread of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._im_unread - - @im_unread.setter - def im_unread(self, im_unread): - """Sets the im_unread of this InlineResponse20017DataList. - - IM unread # noqa: E501 - - :param im_unread: The im_unread of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._im_unread = im_unread - - @property - def in_dispute(self): - """Gets the in_dispute of this InlineResponse20017DataList. # noqa: E501 - - Whether in dispute # noqa: E501 - - :return: The in_dispute of this InlineResponse20017DataList. # noqa: E501 - :rtype: bool - """ - return self._in_dispute - - @in_dispute.setter - def in_dispute(self, in_dispute): - """Sets the in_dispute of this InlineResponse20017DataList. - - Whether in dispute # noqa: E501 - - :param in_dispute: The in_dispute of this InlineResponse20017DataList. # noqa: E501 - :type: bool - """ - - self._in_dispute = in_dispute - - @property - def reason_id(self): - """Gets the reason_id of this InlineResponse20017DataList. # noqa: E501 - - Cancellation reason ID # noqa: E501 - - :return: The reason_id of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._reason_id - - @reason_id.setter - def reason_id(self, reason_id): - """Sets the reason_id of this InlineResponse20017DataList. - - Cancellation reason ID # noqa: E501 - - :param reason_id: The reason_id of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._reason_id = reason_id - - @property - def reason_memo(self): - """Gets the reason_memo of this InlineResponse20017DataList. # noqa: E501 - - Cancellation reason note # noqa: E501 - - :return: The reason_memo of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._reason_memo - - @reason_memo.setter - def reason_memo(self, reason_memo): - """Sets the reason_memo of this InlineResponse20017DataList. - - Cancellation reason note # noqa: E501 - - :param reason_memo: The reason_memo of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._reason_memo = reason_memo - - @property - def cancel_time(self): - """Gets the cancel_time of this InlineResponse20017DataList. # noqa: E501 - - Cancellation time # noqa: E501 - - :return: The cancel_time of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._cancel_time - - @cancel_time.setter - def cancel_time(self, cancel_time): - """Sets the cancel_time of this InlineResponse20017DataList. - - Cancellation time # noqa: E501 - - :param cancel_time: The cancel_time of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._cancel_time = cancel_time - - @property - def seller_confirm(self): - """Gets the seller_confirm of this InlineResponse20017DataList. # noqa: E501 - - Whether seller confirmed the reason # noqa: E501 - - :return: The seller_confirm of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._seller_confirm - - @seller_confirm.setter - def seller_confirm(self, seller_confirm): - """Sets the seller_confirm of this InlineResponse20017DataList. - - Whether seller confirmed the reason # noqa: E501 - - :param seller_confirm: The seller_confirm of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._seller_confirm = seller_confirm - - @property - def toast_id(self): - """Gets the toast_id of this InlineResponse20017DataList. # noqa: E501 - - Popup ID # noqa: E501 - - :return: The toast_id of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._toast_id - - @toast_id.setter - def toast_id(self, toast_id): - """Sets the toast_id of this InlineResponse20017DataList. - - Popup ID # noqa: E501 - - :param toast_id: The toast_id of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._toast_id = toast_id - - @property - def dispute_reback(self): - """Gets the dispute_reback of this InlineResponse20017DataList. # noqa: E501 - - Customer service has new reply to appeal # noqa: E501 - - :return: The dispute_reback of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._dispute_reback - - @dispute_reback.setter - def dispute_reback(self, dispute_reback): - """Sets the dispute_reback of this InlineResponse20017DataList. - - Customer service has new reply to appeal # noqa: E501 - - :param dispute_reback: The dispute_reback of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._dispute_reback = dispute_reback - - @property - def score(self): - """Gets the score of this InlineResponse20017DataList. # noqa: E501 - - Rating # noqa: E501 - - :return: The score of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._score - - @score.setter - def score(self, score): - """Sets the score of this InlineResponse20017DataList. - - Rating # noqa: E501 - - :param score: The score of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._score = score - - @property - def message(self): - """Gets the message of this InlineResponse20017DataList. # noqa: E501 - - Review content # noqa: E501 - - :return: The message of this InlineResponse20017DataList. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this InlineResponse20017DataList. - - Review content # noqa: E501 - - :param message: The message of this InlineResponse20017DataList. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def release_coin_switch(self): - """Gets the release_coin_switch of this InlineResponse20017DataList. # noqa: E501 - - Coin release switch configuration # noqa: E501 - - :return: The release_coin_switch of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._release_coin_switch - - @release_coin_switch.setter - def release_coin_switch(self, release_coin_switch): - """Sets the release_coin_switch of this InlineResponse20017DataList. - - Coin release switch configuration # noqa: E501 - - :param release_coin_switch: The release_coin_switch of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._release_coin_switch = release_coin_switch - - @property - def tier(self): - """Gets the tier of this InlineResponse20017DataList. # noqa: E501 - - VIP level # noqa: E501 - - :return: The tier of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._tier - - @tier.setter - def tier(self, tier): - """Sets the tier of this InlineResponse20017DataList. - - VIP level # noqa: E501 - - :param tier: The tier of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._tier = tier - - @property - def blue_vip(self): - """Gets the blue_vip of this InlineResponse20017DataList. # noqa: E501 - - Blue V Crown Shield # noqa: E501 - - :return: The blue_vip of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._blue_vip - - @blue_vip.setter - def blue_vip(self, blue_vip): - """Sets the blue_vip of this InlineResponse20017DataList. - - Blue V Crown Shield # noqa: E501 - - :param blue_vip: The blue_vip of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._blue_vip = blue_vip - - @property - def od_time(self): - """Gets the od_time of this InlineResponse20017DataList. # noqa: E501 - - Countdown time # noqa: E501 - - :return: The od_time of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._od_time - - @od_time.setter - def od_time(self, od_time): - """Sets the od_time of this InlineResponse20017DataList. - - Countdown time # noqa: E501 - - :param od_time: The od_time of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._od_time = od_time - - @property - def order_type(self): - """Gets the order_type of this InlineResponse20017DataList. # noqa: E501 - - Order Type # noqa: E501 - - :return: The order_type of this InlineResponse20017DataList. # noqa: E501 - :rtype: int - """ - return self._order_type - - @order_type.setter - def order_type(self, order_type): - """Sets the order_type of this InlineResponse20017DataList. - - Order Type # noqa: E501 - - :param order_type: The order_type of this InlineResponse20017DataList. # noqa: E501 - :type: int - """ - - self._order_type = order_type - - @property - def order_tag(self): - """Gets the order_tag of this InlineResponse20017DataList. # noqa: E501 - - Order tags # noqa: E501 - - :return: The order_tag of this InlineResponse20017DataList. # noqa: E501 - :rtype: list[str] - """ - return self._order_tag - - @order_tag.setter - def order_tag(self, order_tag): - """Sets the order_tag of this InlineResponse20017DataList. - - Order tags # noqa: E501 - - :param order_tag: The order_tag of this InlineResponse20017DataList. # noqa: E501 - :type: list[str] - """ - - self._order_tag = order_tag - - @property - def convert_info(self): - """Gets the convert_info of this InlineResponse20017DataList. # noqa: E501 - - - :return: The convert_info of this InlineResponse20017DataList. # noqa: E501 - :rtype: InlineResponse20017DataConvertInfo - """ - return self._convert_info - - @convert_info.setter - def convert_info(self, convert_info): - """Sets the convert_info of this InlineResponse20017DataList. - - - :param convert_info: The convert_info of this InlineResponse20017DataList. # noqa: E501 - :type: InlineResponse20017DataConvertInfo - """ - - self._convert_info = convert_info - - 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, InlineResponse20017DataList): - 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, InlineResponse20017DataList): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20018_data.py b/gate_api/models/inline_response20018_data.py deleted file mode 100644 index 9c76bf0c..00000000 --- a/gate_api/models/inline_response20018_data.py +++ /dev/null @@ -1,2111 +0,0 @@ -# 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 InlineResponse20018Data(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_sell': 'int', - 'txid': 'int', - 'orderid': 'int', - 'timest': 'int', - 'last_pay_time': 'int', - 'remain_pay_time': 'int', - 'currency_type': 'str', - 'want_type': 'str', - 'rate': 'str', - 'amount': 'str', - 'total': 'str', - 'status': 'str', - 'reason_id': 'str', - 'reason_desc': 'str', - 'toast_id': 'int', - 'cancel_time': 'str', - 'seller_confirm': 'int', - 'in_appeal': 'int', - 'dispute_time': 'int', - 'cancelable': 'int', - 'hide_payment': 'int', - 'trade_tips': 'str', - 'show_bank': 'str', - 'bankname': 'str', - 'bankbranch': 'str', - 'bankid': 'str', - 'bank_holder_realname': 'str', - 'show_ali': 'str', - 'aliname': 'str', - 'is_alicode': 'int', - 'show_wechat': 'str', - 'wename': 'str', - 'show_others': 'str', - 'pay_others': 'list[str]', - 'sel_paytype': 'str', - 'its_uid': 'str', - 'its_is_blue_vip': 'int', - 'its_tier': 'int', - 'its_avatar': 'str', - 'its_nickname': 'str', - 'its_realname': 'str', - 'is_follow': 'int', - 'is_black': 'int', - 'have_traded': 'int', - 'appeal_unread': 'int', - 'appeal_allow_cancel': 'int', - 'appeal_verdict_has_open': 'str', - 'im_unread': 'int', - 'message': 'str', - 'score': 'str', - 'payment_voucher_url': 'list[str]', - 'complete_number': 'int', - 'complete_rate_month': 'str', - 'check_journal_account': 'bool', - 'show_journal_account': 'bool', - 'is_freeze_guarantee': 'int', - 'usdt_left_guarantee': 'str', - 'guarantee_curr_type': 'str', - 'timest_paid': 'int', - 'state': 'str', - 'release_coin_switch': 'int', - 'own_realname': 'str', - 'confirmation_use_time_month': 'int', - 'is_risk_user': 'int', - 'is_xt': 'int', - 'order_type': 'int', - 'symbol': 'str', - 'is_show_receive': 'int', - 'is_taker': 'int', - 'is_online': 'int', - 'show_seller_contact_info': 'bool', - 'supported_pay_types': 'list[str]' - } - - attribute_map = { - 'is_sell': 'is_sell', - 'txid': 'txid', - 'orderid': 'orderid', - 'timest': 'timest', - 'last_pay_time': 'last_pay_time', - 'remain_pay_time': 'remain_pay_time', - 'currency_type': 'currencyType', - 'want_type': 'want_type', - 'rate': 'rate', - 'amount': 'amount', - 'total': 'total', - 'status': 'status', - 'reason_id': 'reason_id', - 'reason_desc': 'reason_desc', - 'toast_id': 'toast_id', - 'cancel_time': 'cancel_time', - 'seller_confirm': 'seller_confirm', - 'in_appeal': 'in_appeal', - 'dispute_time': 'dispute_time', - 'cancelable': 'cancelable', - 'hide_payment': 'hide_payment', - 'trade_tips': 'trade_tips', - 'show_bank': 'show_bank', - 'bankname': 'bankname', - 'bankbranch': 'bankbranch', - 'bankid': 'bankid', - 'bank_holder_realname': 'bank_holder_realname', - 'show_ali': 'show_ali', - 'aliname': 'aliname', - 'is_alicode': 'is_alicode', - 'show_wechat': 'show_wechat', - 'wename': 'wename', - 'show_others': 'show_others', - 'pay_others': 'pay_others', - 'sel_paytype': 'sel_paytype', - 'its_uid': 'its_uid', - 'its_is_blue_vip': 'its_is_blue_vip', - 'its_tier': 'its_tier', - 'its_avatar': 'its_avatar', - 'its_nickname': 'its_nickname', - 'its_realname': 'its_realname', - 'is_follow': 'is_follow', - 'is_black': 'is_black', - 'have_traded': 'have_traded', - 'appeal_unread': 'appeal_unread', - 'appeal_allow_cancel': 'appeal_allow_cancel', - 'appeal_verdict_has_open': 'appeal_verdict_has_open', - 'im_unread': 'im_unread', - 'message': 'message', - 'score': 'score', - 'payment_voucher_url': 'payment_voucher_url', - 'complete_number': 'complete_number', - 'complete_rate_month': 'complete_rate_month', - 'check_journal_account': 'check_journal_account', - 'show_journal_account': 'show_journal_account', - 'is_freeze_guarantee': 'is_freeze_guarantee', - 'usdt_left_guarantee': 'usdt_left_guarantee', - 'guarantee_curr_type': 'guarantee_curr_type', - 'timest_paid': 'timest_paid', - 'state': 'state', - 'release_coin_switch': 'release_coin_switch', - 'own_realname': 'own_realname', - 'confirmation_use_time_month': 'confirmation_use_time_month', - 'is_risk_user': 'is_risk_user', - 'is_xt': 'is_xt', - 'order_type': 'order_type', - 'symbol': 'symbol', - 'is_show_receive': 'is_show_receive', - 'is_taker': 'is_taker', - 'is_online': 'is_online', - 'show_seller_contact_info': 'show_seller_contact_info', - 'supported_pay_types': 'supported_pay_types' - } - - def __init__(self, is_sell=None, txid=None, orderid=None, timest=None, last_pay_time=None, remain_pay_time=None, currency_type=None, want_type=None, rate=None, amount=None, total=None, status=None, reason_id=None, reason_desc=None, toast_id=None, cancel_time=None, seller_confirm=None, in_appeal=None, dispute_time=None, cancelable=None, hide_payment=None, trade_tips=None, show_bank=None, bankname=None, bankbranch=None, bankid=None, bank_holder_realname=None, show_ali=None, aliname=None, is_alicode=None, show_wechat=None, wename=None, show_others=None, pay_others=None, sel_paytype=None, its_uid=None, its_is_blue_vip=None, its_tier=None, its_avatar=None, its_nickname=None, its_realname=None, is_follow=None, is_black=None, have_traded=None, appeal_unread=None, appeal_allow_cancel=None, appeal_verdict_has_open=None, im_unread=None, message=None, score=None, payment_voucher_url=None, complete_number=None, complete_rate_month=None, check_journal_account=None, show_journal_account=None, is_freeze_guarantee=None, usdt_left_guarantee=None, guarantee_curr_type=None, timest_paid=None, state=None, release_coin_switch=None, own_realname=None, confirmation_use_time_month=None, is_risk_user=None, is_xt=None, order_type=None, symbol=None, is_show_receive=None, is_taker=None, is_online=None, show_seller_contact_info=None, supported_pay_types=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, int, int, int, str, str, str, str, str, str, str, str, int, str, int, int, int, int, int, str, str, str, str, str, str, str, str, int, str, str, str, list[str], str, str, int, int, str, str, str, int, int, int, int, int, str, int, str, str, list[str], int, str, bool, bool, int, str, str, int, str, int, str, int, int, int, int, str, int, int, int, bool, list[str], Configuration) -> None - """InlineResponse20018Data - 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_sell = None - self._txid = None - self._orderid = None - self._timest = None - self._last_pay_time = None - self._remain_pay_time = None - self._currency_type = None - self._want_type = None - self._rate = None - self._amount = None - self._total = None - self._status = None - self._reason_id = None - self._reason_desc = None - self._toast_id = None - self._cancel_time = None - self._seller_confirm = None - self._in_appeal = None - self._dispute_time = None - self._cancelable = None - self._hide_payment = None - self._trade_tips = None - self._show_bank = None - self._bankname = None - self._bankbranch = None - self._bankid = None - self._bank_holder_realname = None - self._show_ali = None - self._aliname = None - self._is_alicode = None - self._show_wechat = None - self._wename = None - self._show_others = None - self._pay_others = None - self._sel_paytype = None - self._its_uid = None - self._its_is_blue_vip = None - self._its_tier = None - self._its_avatar = None - self._its_nickname = None - self._its_realname = None - self._is_follow = None - self._is_black = None - self._have_traded = None - self._appeal_unread = None - self._appeal_allow_cancel = None - self._appeal_verdict_has_open = None - self._im_unread = None - self._message = None - self._score = None - self._payment_voucher_url = None - self._complete_number = None - self._complete_rate_month = None - self._check_journal_account = None - self._show_journal_account = None - self._is_freeze_guarantee = None - self._usdt_left_guarantee = None - self._guarantee_curr_type = None - self._timest_paid = None - self._state = None - self._release_coin_switch = None - self._own_realname = None - self._confirmation_use_time_month = None - self._is_risk_user = None - self._is_xt = None - self._order_type = None - self._symbol = None - self._is_show_receive = None - self._is_taker = None - self._is_online = None - self._show_seller_contact_info = None - self._supported_pay_types = None - self.discriminator = None - - if is_sell is not None: - self.is_sell = is_sell - if txid is not None: - self.txid = txid - if orderid is not None: - self.orderid = orderid - if timest is not None: - self.timest = timest - if last_pay_time is not None: - self.last_pay_time = last_pay_time - if remain_pay_time is not None: - self.remain_pay_time = remain_pay_time - if currency_type is not None: - self.currency_type = currency_type - if want_type is not None: - self.want_type = want_type - if rate is not None: - self.rate = rate - if amount is not None: - self.amount = amount - if total is not None: - self.total = total - if status is not None: - self.status = status - if reason_id is not None: - self.reason_id = reason_id - if reason_desc is not None: - self.reason_desc = reason_desc - if toast_id is not None: - self.toast_id = toast_id - if cancel_time is not None: - self.cancel_time = cancel_time - if seller_confirm is not None: - self.seller_confirm = seller_confirm - if in_appeal is not None: - self.in_appeal = in_appeal - if dispute_time is not None: - self.dispute_time = dispute_time - if cancelable is not None: - self.cancelable = cancelable - if hide_payment is not None: - self.hide_payment = hide_payment - if trade_tips is not None: - self.trade_tips = trade_tips - if show_bank is not None: - self.show_bank = show_bank - if bankname is not None: - self.bankname = bankname - if bankbranch is not None: - self.bankbranch = bankbranch - if bankid is not None: - self.bankid = bankid - if bank_holder_realname is not None: - self.bank_holder_realname = bank_holder_realname - if show_ali is not None: - self.show_ali = show_ali - if aliname is not None: - self.aliname = aliname - if is_alicode is not None: - self.is_alicode = is_alicode - if show_wechat is not None: - self.show_wechat = show_wechat - if wename is not None: - self.wename = wename - if show_others is not None: - self.show_others = show_others - if pay_others is not None: - self.pay_others = pay_others - if sel_paytype is not None: - self.sel_paytype = sel_paytype - if its_uid is not None: - self.its_uid = its_uid - if its_is_blue_vip is not None: - self.its_is_blue_vip = its_is_blue_vip - if its_tier is not None: - self.its_tier = its_tier - if its_avatar is not None: - self.its_avatar = its_avatar - if its_nickname is not None: - self.its_nickname = its_nickname - if its_realname is not None: - self.its_realname = its_realname - if is_follow is not None: - self.is_follow = is_follow - if is_black is not None: - self.is_black = is_black - if have_traded is not None: - self.have_traded = have_traded - if appeal_unread is not None: - self.appeal_unread = appeal_unread - if appeal_allow_cancel is not None: - self.appeal_allow_cancel = appeal_allow_cancel - if appeal_verdict_has_open is not None: - self.appeal_verdict_has_open = appeal_verdict_has_open - if im_unread is not None: - self.im_unread = im_unread - if message is not None: - self.message = message - if score is not None: - self.score = score - if payment_voucher_url is not None: - self.payment_voucher_url = payment_voucher_url - if complete_number is not None: - self.complete_number = complete_number - if complete_rate_month is not None: - self.complete_rate_month = complete_rate_month - if check_journal_account is not None: - self.check_journal_account = check_journal_account - if show_journal_account is not None: - self.show_journal_account = show_journal_account - if is_freeze_guarantee is not None: - self.is_freeze_guarantee = is_freeze_guarantee - if usdt_left_guarantee is not None: - self.usdt_left_guarantee = usdt_left_guarantee - if guarantee_curr_type is not None: - self.guarantee_curr_type = guarantee_curr_type - if timest_paid is not None: - self.timest_paid = timest_paid - if state is not None: - self.state = state - if release_coin_switch is not None: - self.release_coin_switch = release_coin_switch - if own_realname is not None: - self.own_realname = own_realname - if confirmation_use_time_month is not None: - self.confirmation_use_time_month = confirmation_use_time_month - if is_risk_user is not None: - self.is_risk_user = is_risk_user - if is_xt is not None: - self.is_xt = is_xt - if order_type is not None: - self.order_type = order_type - if symbol is not None: - self.symbol = symbol - if is_show_receive is not None: - self.is_show_receive = is_show_receive - if is_taker is not None: - self.is_taker = is_taker - if is_online is not None: - self.is_online = is_online - if show_seller_contact_info is not None: - self.show_seller_contact_info = show_seller_contact_info - if supported_pay_types is not None: - self.supported_pay_types = supported_pay_types - - @property - def is_sell(self): - """Gets the is_sell of this InlineResponse20018Data. # noqa: E501 - - Whether sell order # noqa: E501 - - :return: The is_sell of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_sell - - @is_sell.setter - def is_sell(self, is_sell): - """Sets the is_sell of this InlineResponse20018Data. - - Whether sell order # noqa: E501 - - :param is_sell: The is_sell of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_sell = is_sell - - @property - def txid(self): - """Gets the txid of this InlineResponse20018Data. # noqa: E501 - - Order ID # noqa: E501 - - :return: The txid of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._txid - - @txid.setter - def txid(self, txid): - """Sets the txid of this InlineResponse20018Data. - - Order ID # noqa: E501 - - :param txid: The txid of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._txid = txid - - @property - def orderid(self): - """Gets the orderid of this InlineResponse20018Data. # noqa: E501 - - Order ID # noqa: E501 - - :return: The orderid of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._orderid - - @orderid.setter - def orderid(self, orderid): - """Sets the orderid of this InlineResponse20018Data. - - Order ID # noqa: E501 - - :param orderid: The orderid of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._orderid = orderid - - @property - def timest(self): - """Gets the timest of this InlineResponse20018Data. # noqa: E501 - - Order creation timestamp # noqa: E501 - - :return: The timest of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._timest - - @timest.setter - def timest(self, timest): - """Sets the timest of this InlineResponse20018Data. - - Order creation timestamp # noqa: E501 - - :param timest: The timest of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._timest = timest - - @property - def last_pay_time(self): - """Gets the last_pay_time of this InlineResponse20018Data. # noqa: E501 - - Payment deadline # noqa: E501 - - :return: The last_pay_time of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._last_pay_time - - @last_pay_time.setter - def last_pay_time(self, last_pay_time): - """Sets the last_pay_time of this InlineResponse20018Data. - - Payment deadline # noqa: E501 - - :param last_pay_time: The last_pay_time of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._last_pay_time = last_pay_time - - @property - def remain_pay_time(self): - """Gets the remain_pay_time of this InlineResponse20018Data. # noqa: E501 - - Remaining payment time # noqa: E501 - - :return: The remain_pay_time of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._remain_pay_time - - @remain_pay_time.setter - def remain_pay_time(self, remain_pay_time): - """Sets the remain_pay_time of this InlineResponse20018Data. - - Remaining payment time # noqa: E501 - - :param remain_pay_time: The remain_pay_time of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._remain_pay_time = remain_pay_time - - @property - def currency_type(self): - """Gets the currency_type of this InlineResponse20018Data. # noqa: E501 - - Cryptocurrency type # noqa: E501 - - :return: The currency_type of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._currency_type - - @currency_type.setter - def currency_type(self, currency_type): - """Sets the currency_type of this InlineResponse20018Data. - - Cryptocurrency type # noqa: E501 - - :param currency_type: The currency_type of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._currency_type = currency_type - - @property - def want_type(self): - """Gets the want_type of this InlineResponse20018Data. # noqa: E501 - - Fiat currency type # noqa: E501 - - :return: The want_type of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._want_type - - @want_type.setter - def want_type(self, want_type): - """Sets the want_type of this InlineResponse20018Data. - - Fiat currency type # noqa: E501 - - :param want_type: The want_type of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._want_type = want_type - - @property - def rate(self): - """Gets the rate of this InlineResponse20018Data. # noqa: E501 - - Price # noqa: E501 - - :return: The rate of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._rate - - @rate.setter - def rate(self, rate): - """Sets the rate of this InlineResponse20018Data. - - Price # noqa: E501 - - :param rate: The rate of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._rate = rate - - @property - def amount(self): - """Gets the amount of this InlineResponse20018Data. # noqa: E501 - - Size # noqa: E501 - - :return: The amount of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this InlineResponse20018Data. - - Size # noqa: E501 - - :param amount: The amount of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def total(self): - """Gets the total of this InlineResponse20018Data. # noqa: E501 - - Fiat amount # noqa: E501 - - :return: The total of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this InlineResponse20018Data. - - Fiat amount # noqa: E501 - - :param total: The total of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._total = total - - @property - def status(self): - """Gets the status of this InlineResponse20018Data. # noqa: E501 - - Order Status # noqa: E501 - - :return: The status of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this InlineResponse20018Data. - - Order Status # noqa: E501 - - :param status: The status of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def reason_id(self): - """Gets the reason_id of this InlineResponse20018Data. # noqa: E501 - - Cancellation reason ID # noqa: E501 - - :return: The reason_id of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._reason_id - - @reason_id.setter - def reason_id(self, reason_id): - """Sets the reason_id of this InlineResponse20018Data. - - Cancellation reason ID # noqa: E501 - - :param reason_id: The reason_id of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._reason_id = reason_id - - @property - def reason_desc(self): - """Gets the reason_desc of this InlineResponse20018Data. # noqa: E501 - - Cancellation reason # noqa: E501 - - :return: The reason_desc of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._reason_desc - - @reason_desc.setter - def reason_desc(self, reason_desc): - """Sets the reason_desc of this InlineResponse20018Data. - - Cancellation reason # noqa: E501 - - :param reason_desc: The reason_desc of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._reason_desc = reason_desc - - @property - def toast_id(self): - """Gets the toast_id of this InlineResponse20018Data. # noqa: E501 - - Popup ID # noqa: E501 - - :return: The toast_id of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._toast_id - - @toast_id.setter - def toast_id(self, toast_id): - """Sets the toast_id of this InlineResponse20018Data. - - Popup ID # noqa: E501 - - :param toast_id: The toast_id of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._toast_id = toast_id - - @property - def cancel_time(self): - """Gets the cancel_time of this InlineResponse20018Data. # noqa: E501 - - Cancellation time # noqa: E501 - - :return: The cancel_time of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._cancel_time - - @cancel_time.setter - def cancel_time(self, cancel_time): - """Sets the cancel_time of this InlineResponse20018Data. - - Cancellation time # noqa: E501 - - :param cancel_time: The cancel_time of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._cancel_time = cancel_time - - @property - def seller_confirm(self): - """Gets the seller_confirm of this InlineResponse20018Data. # noqa: E501 - - Whether seller confirmed the reason # noqa: E501 - - :return: The seller_confirm of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._seller_confirm - - @seller_confirm.setter - def seller_confirm(self, seller_confirm): - """Sets the seller_confirm of this InlineResponse20018Data. - - Whether seller confirmed the reason # noqa: E501 - - :param seller_confirm: The seller_confirm of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._seller_confirm = seller_confirm - - @property - def in_appeal(self): - """Gets the in_appeal of this InlineResponse20018Data. # noqa: E501 - - Whether in dispute # noqa: E501 - - :return: The in_appeal of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._in_appeal - - @in_appeal.setter - def in_appeal(self, in_appeal): - """Sets the in_appeal of this InlineResponse20018Data. - - Whether in dispute # noqa: E501 - - :param in_appeal: The in_appeal of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._in_appeal = in_appeal - - @property - def dispute_time(self): - """Gets the dispute_time of this InlineResponse20018Data. # noqa: E501 - - Appeal time limit # noqa: E501 - - :return: The dispute_time of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._dispute_time - - @dispute_time.setter - def dispute_time(self, dispute_time): - """Sets the dispute_time of this InlineResponse20018Data. - - Appeal time limit # noqa: E501 - - :param dispute_time: The dispute_time of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._dispute_time = dispute_time - - @property - def cancelable(self): - """Gets the cancelable of this InlineResponse20018Data. # noqa: E501 - - Whether order cancellation is allowed # noqa: E501 - - :return: The cancelable of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._cancelable - - @cancelable.setter - def cancelable(self, cancelable): - """Sets the cancelable of this InlineResponse20018Data. - - Whether order cancellation is allowed # noqa: E501 - - :param cancelable: The cancelable of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._cancelable = cancelable - - @property - def hide_payment(self): - """Gets the hide_payment of this InlineResponse20018Data. # noqa: E501 - - Whether to hide payment method # noqa: E501 - - :return: The hide_payment of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._hide_payment - - @hide_payment.setter - def hide_payment(self, hide_payment): - """Sets the hide_payment of this InlineResponse20018Data. - - Whether to hide payment method # noqa: E501 - - :param hide_payment: The hide_payment of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._hide_payment = hide_payment - - @property - def trade_tips(self): - """Gets the trade_tips of this InlineResponse20018Data. # noqa: E501 - - Trading terms # noqa: E501 - - :return: The trade_tips of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._trade_tips - - @trade_tips.setter - def trade_tips(self, trade_tips): - """Sets the trade_tips of this InlineResponse20018Data. - - Trading terms # noqa: E501 - - :param trade_tips: The trade_tips of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._trade_tips = trade_tips - - @property - def show_bank(self): - """Gets the show_bank of this InlineResponse20018Data. # noqa: E501 - - Whether to display bank # noqa: E501 - - :return: The show_bank of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._show_bank - - @show_bank.setter - def show_bank(self, show_bank): - """Sets the show_bank of this InlineResponse20018Data. - - Whether to display bank # noqa: E501 - - :param show_bank: The show_bank of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._show_bank = show_bank - - @property - def bankname(self): - """Gets the bankname of this InlineResponse20018Data. # noqa: E501 - - Bank name # noqa: E501 - - :return: The bankname of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._bankname - - @bankname.setter - def bankname(self, bankname): - """Sets the bankname of this InlineResponse20018Data. - - Bank name # noqa: E501 - - :param bankname: The bankname of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._bankname = bankname - - @property - def bankbranch(self): - """Gets the bankbranch of this InlineResponse20018Data. # noqa: E501 - - Bank branch name # noqa: E501 - - :return: The bankbranch of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._bankbranch - - @bankbranch.setter - def bankbranch(self, bankbranch): - """Sets the bankbranch of this InlineResponse20018Data. - - Bank branch name # noqa: E501 - - :param bankbranch: The bankbranch of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._bankbranch = bankbranch - - @property - def bankid(self): - """Gets the bankid of this InlineResponse20018Data. # noqa: E501 - - Bank ID # noqa: E501 - - :return: The bankid of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._bankid - - @bankid.setter - def bankid(self, bankid): - """Sets the bankid of this InlineResponse20018Data. - - Bank ID # noqa: E501 - - :param bankid: The bankid of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._bankid = bankid - - @property - def bank_holder_realname(self): - """Gets the bank_holder_realname of this InlineResponse20018Data. # noqa: E501 - - Bank cardholder name # noqa: E501 - - :return: The bank_holder_realname of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._bank_holder_realname - - @bank_holder_realname.setter - def bank_holder_realname(self, bank_holder_realname): - """Sets the bank_holder_realname of this InlineResponse20018Data. - - Bank cardholder name # noqa: E501 - - :param bank_holder_realname: The bank_holder_realname of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._bank_holder_realname = bank_holder_realname - - @property - def show_ali(self): - """Gets the show_ali of this InlineResponse20018Data. # noqa: E501 - - Whether to display Alipay # noqa: E501 - - :return: The show_ali of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._show_ali - - @show_ali.setter - def show_ali(self, show_ali): - """Sets the show_ali of this InlineResponse20018Data. - - Whether to display Alipay # noqa: E501 - - :param show_ali: The show_ali of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._show_ali = show_ali - - @property - def aliname(self): - """Gets the aliname of this InlineResponse20018Data. # noqa: E501 - - Alipay account name # noqa: E501 - - :return: The aliname of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._aliname - - @aliname.setter - def aliname(self, aliname): - """Sets the aliname of this InlineResponse20018Data. - - Alipay account name # noqa: E501 - - :param aliname: The aliname of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._aliname = aliname - - @property - def is_alicode(self): - """Gets the is_alicode of this InlineResponse20018Data. # noqa: E501 - - Whether Alipay QR code exists # noqa: E501 - - :return: The is_alicode of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_alicode - - @is_alicode.setter - def is_alicode(self, is_alicode): - """Sets the is_alicode of this InlineResponse20018Data. - - Whether Alipay QR code exists # noqa: E501 - - :param is_alicode: The is_alicode of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_alicode = is_alicode - - @property - def show_wechat(self): - """Gets the show_wechat of this InlineResponse20018Data. # noqa: E501 - - Whether to display WeChat # noqa: E501 - - :return: The show_wechat of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._show_wechat - - @show_wechat.setter - def show_wechat(self, show_wechat): - """Sets the show_wechat of this InlineResponse20018Data. - - Whether to display WeChat # noqa: E501 - - :param show_wechat: The show_wechat of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._show_wechat = show_wechat - - @property - def wename(self): - """Gets the wename of this InlineResponse20018Data. # noqa: E501 - - WeChat account name # noqa: E501 - - :return: The wename of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._wename - - @wename.setter - def wename(self, wename): - """Sets the wename of this InlineResponse20018Data. - - WeChat account name # noqa: E501 - - :param wename: The wename of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._wename = wename - - @property - def show_others(self): - """Gets the show_others of this InlineResponse20018Data. # noqa: E501 - - Whether to display other payment methods # noqa: E501 - - :return: The show_others of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._show_others - - @show_others.setter - def show_others(self, show_others): - """Sets the show_others of this InlineResponse20018Data. - - Whether to display other payment methods # noqa: E501 - - :param show_others: The show_others of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._show_others = show_others - - @property - def pay_others(self): - """Gets the pay_others of this InlineResponse20018Data. # noqa: E501 - - Other payment methods # noqa: E501 - - :return: The pay_others of this InlineResponse20018Data. # noqa: E501 - :rtype: list[str] - """ - return self._pay_others - - @pay_others.setter - def pay_others(self, pay_others): - """Sets the pay_others of this InlineResponse20018Data. - - Other payment methods # noqa: E501 - - :param pay_others: The pay_others of this InlineResponse20018Data. # noqa: E501 - :type: list[str] - """ - - self._pay_others = pay_others - - @property - def sel_paytype(self): - """Gets the sel_paytype of this InlineResponse20018Data. # noqa: E501 - - Payment type # noqa: E501 - - :return: The sel_paytype of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._sel_paytype - - @sel_paytype.setter - def sel_paytype(self, sel_paytype): - """Sets the sel_paytype of this InlineResponse20018Data. - - Payment type # noqa: E501 - - :param sel_paytype: The sel_paytype of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._sel_paytype = sel_paytype - - @property - def its_uid(self): - """Gets the its_uid of this InlineResponse20018Data. # noqa: E501 - - Counterparty UID # noqa: E501 - - :return: The its_uid of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._its_uid - - @its_uid.setter - def its_uid(self, its_uid): - """Sets the its_uid of this InlineResponse20018Data. - - Counterparty UID # noqa: E501 - - :param its_uid: The its_uid of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._its_uid = its_uid - - @property - def its_is_blue_vip(self): - """Gets the its_is_blue_vip of this InlineResponse20018Data. # noqa: E501 - - Whether counterparty is Blue V # noqa: E501 - - :return: The its_is_blue_vip of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._its_is_blue_vip - - @its_is_blue_vip.setter - def its_is_blue_vip(self, its_is_blue_vip): - """Sets the its_is_blue_vip of this InlineResponse20018Data. - - Whether counterparty is Blue V # noqa: E501 - - :param its_is_blue_vip: The its_is_blue_vip of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._its_is_blue_vip = its_is_blue_vip - - @property - def its_tier(self): - """Gets the its_tier of this InlineResponse20018Data. # noqa: E501 - - Counterparty VIP tier # noqa: E501 - - :return: The its_tier of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._its_tier - - @its_tier.setter - def its_tier(self, its_tier): - """Sets the its_tier of this InlineResponse20018Data. - - Counterparty VIP tier # noqa: E501 - - :param its_tier: The its_tier of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._its_tier = its_tier - - @property - def its_avatar(self): - """Gets the its_avatar of this InlineResponse20018Data. # noqa: E501 - - Counterparty avatar # noqa: E501 - - :return: The its_avatar of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._its_avatar - - @its_avatar.setter - def its_avatar(self, its_avatar): - """Sets the its_avatar of this InlineResponse20018Data. - - Counterparty avatar # noqa: E501 - - :param its_avatar: The its_avatar of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._its_avatar = its_avatar - - @property - def its_nickname(self): - """Gets the its_nickname of this InlineResponse20018Data. # noqa: E501 - - Counterparty nickname # noqa: E501 - - :return: The its_nickname of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._its_nickname - - @its_nickname.setter - def its_nickname(self, its_nickname): - """Sets the its_nickname of this InlineResponse20018Data. - - Counterparty nickname # noqa: E501 - - :param its_nickname: The its_nickname of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._its_nickname = its_nickname - - @property - def its_realname(self): - """Gets the its_realname of this InlineResponse20018Data. # noqa: E501 - - Counterparty username # noqa: E501 - - :return: The its_realname of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._its_realname - - @its_realname.setter - def its_realname(self, its_realname): - """Sets the its_realname of this InlineResponse20018Data. - - Counterparty username # noqa: E501 - - :param its_realname: The its_realname of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._its_realname = its_realname - - @property - def is_follow(self): - """Gets the is_follow of this InlineResponse20018Data. # noqa: E501 - - Whether following # noqa: E501 - - :return: The is_follow of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_follow - - @is_follow.setter - def is_follow(self, is_follow): - """Sets the is_follow of this InlineResponse20018Data. - - Whether following # noqa: E501 - - :param is_follow: The is_follow of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_follow = is_follow - - @property - def is_black(self): - """Gets the is_black of this InlineResponse20018Data. # noqa: E501 - - Whether blocked # noqa: E501 - - :return: The is_black of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_black - - @is_black.setter - def is_black(self, is_black): - """Sets the is_black of this InlineResponse20018Data. - - Whether blocked # noqa: E501 - - :param is_black: The is_black of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_black = is_black - - @property - def have_traded(self): - """Gets the have_traded of this InlineResponse20018Data. # noqa: E501 - - Whether traded before # noqa: E501 - - :return: The have_traded of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._have_traded - - @have_traded.setter - def have_traded(self, have_traded): - """Sets the have_traded of this InlineResponse20018Data. - - Whether traded before # noqa: E501 - - :param have_traded: The have_traded of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._have_traded = have_traded - - @property - def appeal_unread(self): - """Gets the appeal_unread of this InlineResponse20018Data. # noqa: E501 - - Unread appeals # noqa: E501 - - :return: The appeal_unread of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._appeal_unread - - @appeal_unread.setter - def appeal_unread(self, appeal_unread): - """Sets the appeal_unread of this InlineResponse20018Data. - - Unread appeals # noqa: E501 - - :param appeal_unread: The appeal_unread of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._appeal_unread = appeal_unread - - @property - def appeal_allow_cancel(self): - """Gets the appeal_allow_cancel of this InlineResponse20018Data. # noqa: E501 - - Whether appeal cancellation is allowed # noqa: E501 - - :return: The appeal_allow_cancel of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._appeal_allow_cancel - - @appeal_allow_cancel.setter - def appeal_allow_cancel(self, appeal_allow_cancel): - """Sets the appeal_allow_cancel of this InlineResponse20018Data. - - Whether appeal cancellation is allowed # noqa: E501 - - :param appeal_allow_cancel: The appeal_allow_cancel of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._appeal_allow_cancel = appeal_allow_cancel - - @property - def appeal_verdict_has_open(self): - """Gets the appeal_verdict_has_open of this InlineResponse20018Data. # noqa: E501 - - Appeal result (including pending appeals) # noqa: E501 - - :return: The appeal_verdict_has_open of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._appeal_verdict_has_open - - @appeal_verdict_has_open.setter - def appeal_verdict_has_open(self, appeal_verdict_has_open): - """Sets the appeal_verdict_has_open of this InlineResponse20018Data. - - Appeal result (including pending appeals) # noqa: E501 - - :param appeal_verdict_has_open: The appeal_verdict_has_open of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._appeal_verdict_has_open = appeal_verdict_has_open - - @property - def im_unread(self): - """Gets the im_unread of this InlineResponse20018Data. # noqa: E501 - - IM unread # noqa: E501 - - :return: The im_unread of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._im_unread - - @im_unread.setter - def im_unread(self, im_unread): - """Sets the im_unread of this InlineResponse20018Data. - - IM unread # noqa: E501 - - :param im_unread: The im_unread of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._im_unread = im_unread - - @property - def message(self): - """Gets the message of this InlineResponse20018Data. # noqa: E501 - - Review content # noqa: E501 - - :return: The message of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this InlineResponse20018Data. - - Review content # noqa: E501 - - :param message: The message of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def score(self): - """Gets the score of this InlineResponse20018Data. # noqa: E501 - - Rating # noqa: E501 - - :return: The score of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._score - - @score.setter - def score(self, score): - """Sets the score of this InlineResponse20018Data. - - Rating # noqa: E501 - - :param score: The score of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._score = score - - @property - def payment_voucher_url(self): - """Gets the payment_voucher_url of this InlineResponse20018Data. # noqa: E501 - - Payment voucher # noqa: E501 - - :return: The payment_voucher_url of this InlineResponse20018Data. # noqa: E501 - :rtype: list[str] - """ - return self._payment_voucher_url - - @payment_voucher_url.setter - def payment_voucher_url(self, payment_voucher_url): - """Sets the payment_voucher_url of this InlineResponse20018Data. - - Payment voucher # noqa: E501 - - :param payment_voucher_url: The payment_voucher_url of this InlineResponse20018Data. # noqa: E501 - :type: list[str] - """ - - self._payment_voucher_url = payment_voucher_url - - @property - def complete_number(self): - """Gets the complete_number of this InlineResponse20018Data. # noqa: E501 - - Counterparty transaction volume # noqa: E501 - - :return: The complete_number of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._complete_number - - @complete_number.setter - def complete_number(self, complete_number): - """Sets the complete_number of this InlineResponse20018Data. - - Counterparty transaction volume # noqa: E501 - - :param complete_number: The complete_number of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._complete_number = complete_number - - @property - def complete_rate_month(self): - """Gets the complete_rate_month of this InlineResponse20018Data. # noqa: E501 - - Counterparty completion rate # noqa: E501 - - :return: The complete_rate_month of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._complete_rate_month - - @complete_rate_month.setter - def complete_rate_month(self, complete_rate_month): - """Sets the complete_rate_month of this InlineResponse20018Data. - - Counterparty completion rate # noqa: E501 - - :param complete_rate_month: The complete_rate_month of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._complete_rate_month = complete_rate_month - - @property - def check_journal_account(self): - """Gets the check_journal_account of this InlineResponse20018Data. # noqa: E501 - - Whether transaction record is verified # noqa: E501 - - :return: The check_journal_account of this InlineResponse20018Data. # noqa: E501 - :rtype: bool - """ - return self._check_journal_account - - @check_journal_account.setter - def check_journal_account(self, check_journal_account): - """Sets the check_journal_account of this InlineResponse20018Data. - - Whether transaction record is verified # noqa: E501 - - :param check_journal_account: The check_journal_account of this InlineResponse20018Data. # noqa: E501 - :type: bool - """ - - self._check_journal_account = check_journal_account - - @property - def show_journal_account(self): - """Gets the show_journal_account of this InlineResponse20018Data. # noqa: E501 - - Whether to display transaction records # noqa: E501 - - :return: The show_journal_account of this InlineResponse20018Data. # noqa: E501 - :rtype: bool - """ - return self._show_journal_account - - @show_journal_account.setter - def show_journal_account(self, show_journal_account): - """Sets the show_journal_account of this InlineResponse20018Data. - - Whether to display transaction records # noqa: E501 - - :param show_journal_account: The show_journal_account of this InlineResponse20018Data. # noqa: E501 - :type: bool - """ - - self._show_journal_account = show_journal_account - - @property - def is_freeze_guarantee(self): - """Gets the is_freeze_guarantee of this InlineResponse20018Data. # noqa: E501 - - Whether margin is frozen # noqa: E501 - - :return: The is_freeze_guarantee of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_freeze_guarantee - - @is_freeze_guarantee.setter - def is_freeze_guarantee(self, is_freeze_guarantee): - """Sets the is_freeze_guarantee of this InlineResponse20018Data. - - Whether margin is frozen # noqa: E501 - - :param is_freeze_guarantee: The is_freeze_guarantee of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_freeze_guarantee = is_freeze_guarantee - - @property - def usdt_left_guarantee(self): - """Gets the usdt_left_guarantee of this InlineResponse20018Data. # noqa: E501 - - Remaining USDT margin # noqa: E501 - - :return: The usdt_left_guarantee of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._usdt_left_guarantee - - @usdt_left_guarantee.setter - def usdt_left_guarantee(self, usdt_left_guarantee): - """Sets the usdt_left_guarantee of this InlineResponse20018Data. - - Remaining USDT margin # noqa: E501 - - :param usdt_left_guarantee: The usdt_left_guarantee of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._usdt_left_guarantee = usdt_left_guarantee - - @property - def guarantee_curr_type(self): - """Gets the guarantee_curr_type of this InlineResponse20018Data. # noqa: E501 - - Margin currency type # noqa: E501 - - :return: The guarantee_curr_type of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._guarantee_curr_type - - @guarantee_curr_type.setter - def guarantee_curr_type(self, guarantee_curr_type): - """Sets the guarantee_curr_type of this InlineResponse20018Data. - - Margin currency type # noqa: E501 - - :param guarantee_curr_type: The guarantee_curr_type of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._guarantee_curr_type = guarantee_curr_type - - @property - def timest_paid(self): - """Gets the timest_paid of this InlineResponse20018Data. # noqa: E501 - - Payment time # noqa: E501 - - :return: The timest_paid of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._timest_paid - - @timest_paid.setter - def timest_paid(self, timest_paid): - """Sets the timest_paid of this InlineResponse20018Data. - - Payment time # noqa: E501 - - :param timest_paid: The timest_paid of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._timest_paid = timest_paid - - @property - def state(self): - """Gets the state of this InlineResponse20018Data. # noqa: E501 - - Order Status # noqa: E501 - - :return: The state of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this InlineResponse20018Data. - - Order Status # noqa: E501 - - :param state: The state of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._state = state - - @property - def release_coin_switch(self): - """Gets the release_coin_switch of this InlineResponse20018Data. # noqa: E501 - - Coin release switch configuration # noqa: E501 - - :return: The release_coin_switch of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._release_coin_switch - - @release_coin_switch.setter - def release_coin_switch(self, release_coin_switch): - """Sets the release_coin_switch of this InlineResponse20018Data. - - Coin release switch configuration # noqa: E501 - - :param release_coin_switch: The release_coin_switch of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._release_coin_switch = release_coin_switch - - @property - def own_realname(self): - """Gets the own_realname of this InlineResponse20018Data. # noqa: E501 - - Username # noqa: E501 - - :return: The own_realname of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._own_realname - - @own_realname.setter - def own_realname(self, own_realname): - """Sets the own_realname of this InlineResponse20018Data. - - Username # noqa: E501 - - :param own_realname: The own_realname of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._own_realname = own_realname - - @property - def confirmation_use_time_month(self): - """Gets the confirmation_use_time_month of this InlineResponse20018Data. # noqa: E501 - - Average confirmation time in last 30 days # noqa: E501 - - :return: The confirmation_use_time_month of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._confirmation_use_time_month - - @confirmation_use_time_month.setter - def confirmation_use_time_month(self, confirmation_use_time_month): - """Sets the confirmation_use_time_month of this InlineResponse20018Data. - - Average confirmation time in last 30 days # noqa: E501 - - :param confirmation_use_time_month: The confirmation_use_time_month of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._confirmation_use_time_month = confirmation_use_time_month - - @property - def is_risk_user(self): - """Gets the is_risk_user of this InlineResponse20018Data. # noqa: E501 - - Whether risk user # noqa: E501 - - :return: The is_risk_user of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_risk_user - - @is_risk_user.setter - def is_risk_user(self, is_risk_user): - """Sets the is_risk_user of this InlineResponse20018Data. - - Whether risk user # noqa: E501 - - :param is_risk_user: The is_risk_user of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_risk_user = is_risk_user - - @property - def is_xt(self): - """Gets the is_xt of this InlineResponse20018Data. # noqa: E501 - - Whether XT order # noqa: E501 - - :return: The is_xt of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_xt - - @is_xt.setter - def is_xt(self, is_xt): - """Sets the is_xt of this InlineResponse20018Data. - - Whether XT order # noqa: E501 - - :param is_xt: The is_xt of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_xt = is_xt - - @property - def order_type(self): - """Gets the order_type of this InlineResponse20018Data. # noqa: E501 - - Order Type # noqa: E501 - - :return: The order_type of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._order_type - - @order_type.setter - def order_type(self, order_type): - """Sets the order_type of this InlineResponse20018Data. - - Order Type # noqa: E501 - - :param order_type: The order_type of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._order_type = order_type - - @property - def symbol(self): - """Gets the symbol of this InlineResponse20018Data. # noqa: E501 - - Fiat currency symbol # noqa: E501 - - :return: The symbol of this InlineResponse20018Data. # noqa: E501 - :rtype: str - """ - return self._symbol - - @symbol.setter - def symbol(self, symbol): - """Sets the symbol of this InlineResponse20018Data. - - Fiat currency symbol # noqa: E501 - - :param symbol: The symbol of this InlineResponse20018Data. # noqa: E501 - :type: str - """ - - self._symbol = symbol - - @property - def is_show_receive(self): - """Gets the is_show_receive of this InlineResponse20018Data. # noqa: E501 - - Whether to show confirm receipt during appeal # noqa: E501 - - :return: The is_show_receive of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_show_receive - - @is_show_receive.setter - def is_show_receive(self, is_show_receive): - """Sets the is_show_receive of this InlineResponse20018Data. - - Whether to show confirm receipt during appeal # noqa: E501 - - :param is_show_receive: The is_show_receive of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_show_receive = is_show_receive - - @property - def is_taker(self): - """Gets the is_taker of this InlineResponse20018Data. # noqa: E501 - - Whether regular user # noqa: E501 - - :return: The is_taker of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_taker - - @is_taker.setter - def is_taker(self, is_taker): - """Sets the is_taker of this InlineResponse20018Data. - - Whether regular user # noqa: E501 - - :param is_taker: The is_taker of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_taker = is_taker - - @property - def is_online(self): - """Gets the is_online of this InlineResponse20018Data. # noqa: E501 - - Merchant online status # noqa: E501 - - :return: The is_online of this InlineResponse20018Data. # noqa: E501 - :rtype: int - """ - return self._is_online - - @is_online.setter - def is_online(self, is_online): - """Sets the is_online of this InlineResponse20018Data. - - Merchant online status # noqa: E501 - - :param is_online: The is_online of this InlineResponse20018Data. # noqa: E501 - :type: int - """ - - self._is_online = is_online - - @property - def show_seller_contact_info(self): - """Gets the show_seller_contact_info of this InlineResponse20018Data. # noqa: E501 - - Whether to display seller contact information # noqa: E501 - - :return: The show_seller_contact_info of this InlineResponse20018Data. # noqa: E501 - :rtype: bool - """ - return self._show_seller_contact_info - - @show_seller_contact_info.setter - def show_seller_contact_info(self, show_seller_contact_info): - """Sets the show_seller_contact_info of this InlineResponse20018Data. - - Whether to display seller contact information # noqa: E501 - - :param show_seller_contact_info: The show_seller_contact_info of this InlineResponse20018Data. # noqa: E501 - :type: bool - """ - - self._show_seller_contact_info = show_seller_contact_info - - @property - def supported_pay_types(self): - """Gets the supported_pay_types of this InlineResponse20018Data. # noqa: E501 - - Payment methods supported by current order # noqa: E501 - - :return: The supported_pay_types of this InlineResponse20018Data. # noqa: E501 - :rtype: list[str] - """ - return self._supported_pay_types - - @supported_pay_types.setter - def supported_pay_types(self, supported_pay_types): - """Sets the supported_pay_types of this InlineResponse20018Data. - - Payment methods supported by current order # noqa: E501 - - :param supported_pay_types: The supported_pay_types of this InlineResponse20018Data. # noqa: E501 - :type: list[str] - """ - - self._supported_pay_types = supported_pay_types - - 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, InlineResponse20018Data): - 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, InlineResponse20018Data): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20020.py b/gate_api/models/inline_response20020.py deleted file mode 100644 index 608eb8c6..00000000 --- a/gate_api/models/inline_response20020.py +++ /dev/null @@ -1,251 +0,0 @@ -# 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 InlineResponse20020(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 = { - 'timestamp': 'float', - 'method': 'str', - 'code': 'int', - 'message': 'str', - 'data': 'InlineResponse20020Data', - 'version': 'str' - } - - attribute_map = { - 'timestamp': 'timestamp', - 'method': 'method', - 'code': 'code', - 'message': 'message', - 'data': 'data', - 'version': 'version' - } - - def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20020Data, str, Configuration) -> None - """InlineResponse20020 - 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._timestamp = None - self._method = None - self._code = None - self._message = None - self._data = None - self._version = None - self.discriminator = None - - if timestamp is not None: - self.timestamp = timestamp - if method is not None: - self.method = method - if code is not None: - self.code = code - if message is not None: - self.message = message - if data is not None: - self.data = data - if version is not None: - self.version = version - - @property - def timestamp(self): - """Gets the timestamp of this InlineResponse20020. # noqa: E501 - - - :return: The timestamp of this InlineResponse20020. # noqa: E501 - :rtype: float - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20020. - - - :param timestamp: The timestamp of this InlineResponse20020. # noqa: E501 - :type: float - """ - - self._timestamp = timestamp - - @property - def method(self): - """Gets the method of this InlineResponse20020. # noqa: E501 - - - :return: The method of this InlineResponse20020. # noqa: E501 - :rtype: str - """ - return self._method - - @method.setter - def method(self, method): - """Sets the method of this InlineResponse20020. - - - :param method: The method of this InlineResponse20020. # noqa: E501 - :type: str - """ - - self._method = method - - @property - def code(self): - """Gets the code of this InlineResponse20020. # noqa: E501 - - - :return: The code of this InlineResponse20020. # noqa: E501 - :rtype: int - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this InlineResponse20020. - - - :param code: The code of this InlineResponse20020. # noqa: E501 - :type: int - """ - - self._code = code - - @property - def message(self): - """Gets the message of this InlineResponse20020. # noqa: E501 - - - :return: The message of this InlineResponse20020. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this InlineResponse20020. - - - :param message: The message of this InlineResponse20020. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def data(self): - """Gets the data of this InlineResponse20020. # noqa: E501 - - - :return: The data of this InlineResponse20020. # noqa: E501 - :rtype: InlineResponse20020Data - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this InlineResponse20020. - - - :param data: The data of this InlineResponse20020. # noqa: E501 - :type: InlineResponse20020Data - """ - - self._data = data - - @property - def version(self): - """Gets the version of this InlineResponse20020. # noqa: E501 - - - :return: The version of this InlineResponse20020. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this InlineResponse20020. - - - :param version: The version of this InlineResponse20020. # noqa: E501 - :type: str - """ - - self._version = version - - 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, InlineResponse20020): - 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, InlineResponse20020): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20023.py b/gate_api/models/inline_response20023.py deleted file mode 100644 index 877546eb..00000000 --- a/gate_api/models/inline_response20023.py +++ /dev/null @@ -1,251 +0,0 @@ -# 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 InlineResponse20023(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 = { - 'timestamp': 'float', - 'method': 'str', - 'code': 'int', - 'message': 'str', - 'data': 'list[InlineResponse20023Data]', - 'version': 'str' - } - - attribute_map = { - 'timestamp': 'timestamp', - 'method': 'method', - 'code': 'code', - 'message': 'message', - 'data': 'data', - 'version': 'version' - } - - def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, list[InlineResponse20023Data], str, Configuration) -> None - """InlineResponse20023 - 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._timestamp = None - self._method = None - self._code = None - self._message = None - self._data = None - self._version = None - self.discriminator = None - - if timestamp is not None: - self.timestamp = timestamp - if method is not None: - self.method = method - if code is not None: - self.code = code - if message is not None: - self.message = message - if data is not None: - self.data = data - if version is not None: - self.version = version - - @property - def timestamp(self): - """Gets the timestamp of this InlineResponse20023. # noqa: E501 - - - :return: The timestamp of this InlineResponse20023. # noqa: E501 - :rtype: float - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20023. - - - :param timestamp: The timestamp of this InlineResponse20023. # noqa: E501 - :type: float - """ - - self._timestamp = timestamp - - @property - def method(self): - """Gets the method of this InlineResponse20023. # noqa: E501 - - - :return: The method of this InlineResponse20023. # noqa: E501 - :rtype: str - """ - return self._method - - @method.setter - def method(self, method): - """Sets the method of this InlineResponse20023. - - - :param method: The method of this InlineResponse20023. # noqa: E501 - :type: str - """ - - self._method = method - - @property - def code(self): - """Gets the code of this InlineResponse20023. # noqa: E501 - - - :return: The code of this InlineResponse20023. # noqa: E501 - :rtype: int - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this InlineResponse20023. - - - :param code: The code of this InlineResponse20023. # noqa: E501 - :type: int - """ - - self._code = code - - @property - def message(self): - """Gets the message of this InlineResponse20023. # noqa: E501 - - - :return: The message of this InlineResponse20023. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this InlineResponse20023. - - - :param message: The message of this InlineResponse20023. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def data(self): - """Gets the data of this InlineResponse20023. # noqa: E501 - - - :return: The data of this InlineResponse20023. # noqa: E501 - :rtype: list[InlineResponse20023Data] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this InlineResponse20023. - - - :param data: The data of this InlineResponse20023. # noqa: E501 - :type: list[InlineResponse20023Data] - """ - - self._data = data - - @property - def version(self): - """Gets the version of this InlineResponse20023. # noqa: E501 - - - :return: The version of this InlineResponse20023. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this InlineResponse20023. - - - :param version: The version of this InlineResponse20023. # noqa: E501 - :type: str - """ - - self._version = version - - 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, InlineResponse20023): - 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, InlineResponse20023): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20024.py b/gate_api/models/inline_response20024.py deleted file mode 100644 index 2ea59116..00000000 --- a/gate_api/models/inline_response20024.py +++ /dev/null @@ -1,251 +0,0 @@ -# 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 InlineResponse20024(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 = { - 'timestamp': 'float', - 'method': 'str', - 'code': 'int', - 'message': 'str', - 'data': 'InlineResponse20024Data', - 'version': 'str' - } - - attribute_map = { - 'timestamp': 'timestamp', - 'method': 'method', - 'code': 'code', - 'message': 'message', - 'data': 'data', - 'version': 'version' - } - - def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20024Data, str, Configuration) -> None - """InlineResponse20024 - 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._timestamp = None - self._method = None - self._code = None - self._message = None - self._data = None - self._version = None - self.discriminator = None - - if timestamp is not None: - self.timestamp = timestamp - if method is not None: - self.method = method - if code is not None: - self.code = code - if message is not None: - self.message = message - if data is not None: - self.data = data - if version is not None: - self.version = version - - @property - def timestamp(self): - """Gets the timestamp of this InlineResponse20024. # noqa: E501 - - - :return: The timestamp of this InlineResponse20024. # noqa: E501 - :rtype: float - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20024. - - - :param timestamp: The timestamp of this InlineResponse20024. # noqa: E501 - :type: float - """ - - self._timestamp = timestamp - - @property - def method(self): - """Gets the method of this InlineResponse20024. # noqa: E501 - - - :return: The method of this InlineResponse20024. # noqa: E501 - :rtype: str - """ - return self._method - - @method.setter - def method(self, method): - """Sets the method of this InlineResponse20024. - - - :param method: The method of this InlineResponse20024. # noqa: E501 - :type: str - """ - - self._method = method - - @property - def code(self): - """Gets the code of this InlineResponse20024. # noqa: E501 - - - :return: The code of this InlineResponse20024. # noqa: E501 - :rtype: int - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this InlineResponse20024. - - - :param code: The code of this InlineResponse20024. # noqa: E501 - :type: int - """ - - self._code = code - - @property - def message(self): - """Gets the message of this InlineResponse20024. # noqa: E501 - - - :return: The message of this InlineResponse20024. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this InlineResponse20024. - - - :param message: The message of this InlineResponse20024. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def data(self): - """Gets the data of this InlineResponse20024. # noqa: E501 - - - :return: The data of this InlineResponse20024. # noqa: E501 - :rtype: InlineResponse20024Data - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this InlineResponse20024. - - - :param data: The data of this InlineResponse20024. # noqa: E501 - :type: InlineResponse20024Data - """ - - self._data = data - - @property - def version(self): - """Gets the version of this InlineResponse20024. # noqa: E501 - - - :return: The version of this InlineResponse20024. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this InlineResponse20024. - - - :param version: The version of this InlineResponse20024. # noqa: E501 - :type: str - """ - - self._version = version - - 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, InlineResponse20024): - 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, InlineResponse20024): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20025.py b/gate_api/models/inline_response20025.py deleted file mode 100644 index b2375261..00000000 --- a/gate_api/models/inline_response20025.py +++ /dev/null @@ -1,251 +0,0 @@ -# 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 InlineResponse20025(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 = { - 'timestamp': 'float', - 'method': 'str', - 'code': 'int', - 'message': 'str', - 'data': 'InlineResponse20025Data', - 'version': 'str' - } - - attribute_map = { - 'timestamp': 'timestamp', - 'method': 'method', - 'code': 'code', - 'message': 'message', - 'data': 'data', - 'version': 'version' - } - - def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20025Data, str, Configuration) -> None - """InlineResponse20025 - 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._timestamp = None - self._method = None - self._code = None - self._message = None - self._data = None - self._version = None - self.discriminator = None - - if timestamp is not None: - self.timestamp = timestamp - if method is not None: - self.method = method - if code is not None: - self.code = code - if message is not None: - self.message = message - if data is not None: - self.data = data - if version is not None: - self.version = version - - @property - def timestamp(self): - """Gets the timestamp of this InlineResponse20025. # noqa: E501 - - - :return: The timestamp of this InlineResponse20025. # noqa: E501 - :rtype: float - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20025. - - - :param timestamp: The timestamp of this InlineResponse20025. # noqa: E501 - :type: float - """ - - self._timestamp = timestamp - - @property - def method(self): - """Gets the method of this InlineResponse20025. # noqa: E501 - - - :return: The method of this InlineResponse20025. # noqa: E501 - :rtype: str - """ - return self._method - - @method.setter - def method(self, method): - """Sets the method of this InlineResponse20025. - - - :param method: The method of this InlineResponse20025. # noqa: E501 - :type: str - """ - - self._method = method - - @property - def code(self): - """Gets the code of this InlineResponse20025. # noqa: E501 - - - :return: The code of this InlineResponse20025. # noqa: E501 - :rtype: int - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this InlineResponse20025. - - - :param code: The code of this InlineResponse20025. # noqa: E501 - :type: int - """ - - self._code = code - - @property - def message(self): - """Gets the message of this InlineResponse20025. # noqa: E501 - - - :return: The message of this InlineResponse20025. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this InlineResponse20025. - - - :param message: The message of this InlineResponse20025. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def data(self): - """Gets the data of this InlineResponse20025. # noqa: E501 - - - :return: The data of this InlineResponse20025. # noqa: E501 - :rtype: InlineResponse20025Data - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this InlineResponse20025. - - - :param data: The data of this InlineResponse20025. # noqa: E501 - :type: InlineResponse20025Data - """ - - self._data = data - - @property - def version(self): - """Gets the version of this InlineResponse20025. # noqa: E501 - - - :return: The version of this InlineResponse20025. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this InlineResponse20025. - - - :param version: The version of this InlineResponse20025. # noqa: E501 - :type: str - """ - - self._version = version - - 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, InlineResponse20025): - 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, InlineResponse20025): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20026.py b/gate_api/models/inline_response20026.py deleted file mode 100644 index 9bc96957..00000000 --- a/gate_api/models/inline_response20026.py +++ /dev/null @@ -1,251 +0,0 @@ -# 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 InlineResponse20026(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 = { - 'timestamp': 'float', - 'method': 'str', - 'code': 'int', - 'message': 'str', - 'data': 'InlineResponse20026Data', - 'version': 'str' - } - - attribute_map = { - 'timestamp': 'timestamp', - 'method': 'method', - 'code': 'code', - 'message': 'message', - 'data': 'data', - 'version': 'version' - } - - def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20026Data, str, Configuration) -> None - """InlineResponse20026 - 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._timestamp = None - self._method = None - self._code = None - self._message = None - self._data = None - self._version = None - self.discriminator = None - - if timestamp is not None: - self.timestamp = timestamp - if method is not None: - self.method = method - if code is not None: - self.code = code - if message is not None: - self.message = message - if data is not None: - self.data = data - if version is not None: - self.version = version - - @property - def timestamp(self): - """Gets the timestamp of this InlineResponse20026. # noqa: E501 - - - :return: The timestamp of this InlineResponse20026. # noqa: E501 - :rtype: float - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20026. - - - :param timestamp: The timestamp of this InlineResponse20026. # noqa: E501 - :type: float - """ - - self._timestamp = timestamp - - @property - def method(self): - """Gets the method of this InlineResponse20026. # noqa: E501 - - - :return: The method of this InlineResponse20026. # noqa: E501 - :rtype: str - """ - return self._method - - @method.setter - def method(self, method): - """Sets the method of this InlineResponse20026. - - - :param method: The method of this InlineResponse20026. # noqa: E501 - :type: str - """ - - self._method = method - - @property - def code(self): - """Gets the code of this InlineResponse20026. # noqa: E501 - - - :return: The code of this InlineResponse20026. # noqa: E501 - :rtype: int - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this InlineResponse20026. - - - :param code: The code of this InlineResponse20026. # noqa: E501 - :type: int - """ - - self._code = code - - @property - def message(self): - """Gets the message of this InlineResponse20026. # noqa: E501 - - - :return: The message of this InlineResponse20026. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this InlineResponse20026. - - - :param message: The message of this InlineResponse20026. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def data(self): - """Gets the data of this InlineResponse20026. # noqa: E501 - - - :return: The data of this InlineResponse20026. # noqa: E501 - :rtype: InlineResponse20026Data - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this InlineResponse20026. - - - :param data: The data of this InlineResponse20026. # noqa: E501 - :type: InlineResponse20026Data - """ - - self._data = data - - @property - def version(self): - """Gets the version of this InlineResponse20026. # noqa: E501 - - - :return: The version of this InlineResponse20026. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this InlineResponse20026. - - - :param version: The version of this InlineResponse20026. # noqa: E501 - :type: str - """ - - self._version = version - - 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, InlineResponse20026): - 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, InlineResponse20026): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20037.py b/gate_api/models/inline_response20037.py deleted file mode 100644 index a99edc39..00000000 --- a/gate_api/models/inline_response20037.py +++ /dev/null @@ -1,238 +0,0 @@ -# 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 InlineResponse20037(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_maker_fee': 'str', - 'spot_taker_fee': 'str', - 'future_maker_fee': 'str', - 'future_taker_fee': 'str', - 'special_fee_list': 'list[InlineResponse20037SpecialFeeList]' - } - - attribute_map = { - 'spot_maker_fee': 'spot_maker_fee', - 'spot_taker_fee': 'spot_taker_fee', - 'future_maker_fee': 'future_maker_fee', - 'future_taker_fee': 'future_taker_fee', - 'special_fee_list': 'special_fee_list' - } - - def __init__(self, spot_maker_fee=None, spot_taker_fee=None, future_maker_fee=None, future_taker_fee=None, special_fee_list=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, list[InlineResponse20037SpecialFeeList], Configuration) -> None - """InlineResponse20037 - 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_maker_fee = None - self._spot_taker_fee = None - self._future_maker_fee = None - self._future_taker_fee = None - self._special_fee_list = None - self.discriminator = None - - self.spot_maker_fee = spot_maker_fee - self.spot_taker_fee = spot_taker_fee - self.future_maker_fee = future_maker_fee - self.future_taker_fee = future_taker_fee - self.special_fee_list = special_fee_list - - @property - def spot_maker_fee(self): - """Gets the spot_maker_fee of this InlineResponse20037. # noqa: E501 - - spotMakerfee rate # noqa: E501 - - :return: The spot_maker_fee of this InlineResponse20037. # noqa: E501 - :rtype: str - """ - return self._spot_maker_fee - - @spot_maker_fee.setter - def spot_maker_fee(self, spot_maker_fee): - """Sets the spot_maker_fee of this InlineResponse20037. - - spotMakerfee rate # noqa: E501 - - :param spot_maker_fee: The spot_maker_fee of this InlineResponse20037. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and spot_maker_fee is None: # noqa: E501 - raise ValueError("Invalid value for `spot_maker_fee`, must not be `None`") # noqa: E501 - - self._spot_maker_fee = spot_maker_fee - - @property - def spot_taker_fee(self): - """Gets the spot_taker_fee of this InlineResponse20037. # noqa: E501 - - spotTakerfee rate # noqa: E501 - - :return: The spot_taker_fee of this InlineResponse20037. # noqa: E501 - :rtype: str - """ - return self._spot_taker_fee - - @spot_taker_fee.setter - def spot_taker_fee(self, spot_taker_fee): - """Sets the spot_taker_fee of this InlineResponse20037. - - spotTakerfee rate # noqa: E501 - - :param spot_taker_fee: The spot_taker_fee of this InlineResponse20037. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and spot_taker_fee is None: # noqa: E501 - raise ValueError("Invalid value for `spot_taker_fee`, must not be `None`") # noqa: E501 - - self._spot_taker_fee = spot_taker_fee - - @property - def future_maker_fee(self): - """Gets the future_maker_fee of this InlineResponse20037. # noqa: E501 - - contractMakerfee rate # noqa: E501 - - :return: The future_maker_fee of this InlineResponse20037. # noqa: E501 - :rtype: str - """ - return self._future_maker_fee - - @future_maker_fee.setter - def future_maker_fee(self, future_maker_fee): - """Sets the future_maker_fee of this InlineResponse20037. - - contractMakerfee rate # noqa: E501 - - :param future_maker_fee: The future_maker_fee of this InlineResponse20037. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and future_maker_fee is None: # noqa: E501 - raise ValueError("Invalid value for `future_maker_fee`, must not be `None`") # noqa: E501 - - self._future_maker_fee = future_maker_fee - - @property - def future_taker_fee(self): - """Gets the future_taker_fee of this InlineResponse20037. # noqa: E501 - - contractTakerfee rate # noqa: E501 - - :return: The future_taker_fee of this InlineResponse20037. # noqa: E501 - :rtype: str - """ - return self._future_taker_fee - - @future_taker_fee.setter - def future_taker_fee(self, future_taker_fee): - """Sets the future_taker_fee of this InlineResponse20037. - - contractTakerfee rate # noqa: E501 - - :param future_taker_fee: The future_taker_fee of this InlineResponse20037. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and future_taker_fee is None: # noqa: E501 - raise ValueError("Invalid value for `future_taker_fee`, must not be `None`") # noqa: E501 - - self._future_taker_fee = future_taker_fee - - @property - def special_fee_list(self): - """Gets the special_fee_list of this InlineResponse20037. # noqa: E501 - - - :return: The special_fee_list of this InlineResponse20037. # noqa: E501 - :rtype: list[InlineResponse20037SpecialFeeList] - """ - return self._special_fee_list - - @special_fee_list.setter - def special_fee_list(self, special_fee_list): - """Sets the special_fee_list of this InlineResponse20037. - - - :param special_fee_list: The special_fee_list of this InlineResponse20037. # noqa: E501 - :type: list[InlineResponse20037SpecialFeeList] - """ - if self.local_vars_configuration.client_side_validation and special_fee_list is None: # noqa: E501 - raise ValueError("Invalid value for `special_fee_list`, must not be `None`") # noqa: E501 - - self._special_fee_list = special_fee_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, InlineResponse20037): - 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, InlineResponse20037): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20041.py b/gate_api/models/inline_response20041.py deleted file mode 100644 index 29bdcfdd..00000000 --- a/gate_api/models/inline_response20041.py +++ /dev/null @@ -1,849 +0,0 @@ -# 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 InlineResponse20041(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': 'str', - 'order_id': 'str', - 'text': 'str', - 'state': 'str', - 'symbol': 'str', - 'attribute': 'str', - 'exchange_type': 'str', - 'business_type': 'str', - 'qty': 'str', - 'quote_qty': 'str', - 'price': 'str', - 'time_in_force': 'str', - 'executed_qty': 'str', - 'executed_amount': 'str', - 'executed_avg_price': 'str', - 'fee_coin': 'str', - 'fee': 'str', - 'reduce_only': 'str', - 'leverage': 'str', - 'reason': 'str', - 'last_executed_qty': 'str', - 'last_executed_price': 'str', - 'last_executed_amount': 'str', - 'position_side': 'str', - 'create_time': 'str', - 'update_time': 'str' - } - - attribute_map = { - 'user_id': 'user_id', - 'order_id': 'order_id', - 'text': 'text', - 'state': 'state', - 'symbol': 'symbol', - 'attribute': 'attribute', - 'exchange_type': 'exchange_type', - 'business_type': 'business_type', - 'qty': 'qty', - 'quote_qty': 'quote_qty', - 'price': 'price', - 'time_in_force': 'time_in_force', - 'executed_qty': 'executed_qty', - 'executed_amount': 'executed_amount', - 'executed_avg_price': 'executed_avg_price', - 'fee_coin': 'fee_coin', - 'fee': 'fee', - 'reduce_only': 'reduce_only', - 'leverage': 'leverage', - 'reason': 'reason', - 'last_executed_qty': 'last_executed_qty', - 'last_executed_price': 'last_executed_price', - 'last_executed_amount': 'last_executed_amount', - 'position_side': 'position_side', - 'create_time': 'create_time', - 'update_time': 'update_time' - } - - def __init__(self, user_id=None, order_id=None, text=None, state=None, symbol=None, attribute=None, exchange_type=None, business_type=None, qty=None, quote_qty=None, price=None, time_in_force=None, executed_qty=None, executed_amount=None, executed_avg_price=None, fee_coin=None, fee=None, reduce_only=None, leverage=None, reason=None, last_executed_qty=None, last_executed_price=None, last_executed_amount=None, position_side=None, create_time=None, update_time=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 - """InlineResponse20041 - 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._order_id = None - self._text = None - self._state = None - self._symbol = None - self._attribute = None - self._exchange_type = None - self._business_type = None - self._qty = None - self._quote_qty = None - self._price = None - self._time_in_force = None - self._executed_qty = None - self._executed_amount = None - self._executed_avg_price = None - self._fee_coin = None - self._fee = None - self._reduce_only = None - self._leverage = None - self._reason = None - self._last_executed_qty = None - self._last_executed_price = None - self._last_executed_amount = None - self._position_side = None - self._create_time = None - self._update_time = None - self.discriminator = None - - self.user_id = user_id - self.order_id = order_id - self.text = text - self.state = state - self.symbol = symbol - self.attribute = attribute - self.exchange_type = exchange_type - self.business_type = business_type - self.qty = qty - self.quote_qty = quote_qty - self.price = price - self.time_in_force = time_in_force - self.executed_qty = executed_qty - self.executed_amount = executed_amount - self.executed_avg_price = executed_avg_price - self.fee_coin = fee_coin - self.fee = fee - self.reduce_only = reduce_only - self.leverage = leverage - self.reason = reason - self.last_executed_qty = last_executed_qty - self.last_executed_price = last_executed_price - self.last_executed_amount = last_executed_amount - self.position_side = position_side - self.create_time = create_time - self.update_time = update_time - - @property - def user_id(self): - """Gets the user_id of this InlineResponse20041. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this InlineResponse20041. - - User ID # noqa: E501 - - :param user_id: The user_id of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 - raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 - - self._user_id = user_id - - @property - def order_id(self): - """Gets the order_id of this InlineResponse20041. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this InlineResponse20041. - - Order ID # noqa: E501 - - :param order_id: The order_id of this InlineResponse20041. # 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 text(self): - """Gets the text of this InlineResponse20041. # noqa: E501 - - Client Order ID # noqa: E501 - - :return: The text of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this InlineResponse20041. - - Client Order ID # noqa: E501 - - :param text: The text of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 - raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 - - self._text = text - - @property - def state(self): - """Gets the state of this InlineResponse20041. # noqa: E501 - - Order Status # noqa: E501 - - :return: The state of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this InlineResponse20041. - - Order Status # noqa: E501 - - :param state: The state of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501 - raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 - - self._state = state - - @property - def symbol(self): - """Gets the symbol of this InlineResponse20041. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The symbol of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._symbol - - @symbol.setter - def symbol(self, symbol): - """Sets the symbol of this InlineResponse20041. - - Currency pair # noqa: E501 - - :param symbol: The symbol of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 - raise ValueError("Invalid value for `symbol`, must not be `None`") # noqa: E501 - - self._symbol = symbol - - @property - def attribute(self): - """Gets the attribute of this InlineResponse20041. # noqa: E501 - - Attribute COMMON: Normal Order, LIQ: Liquidation Takeover Order, REDUCE: Liquidation Reduce Order, ADL: Auto-Reduce # noqa: E501 - - :return: The attribute of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._attribute - - @attribute.setter - def attribute(self, attribute): - """Sets the attribute of this InlineResponse20041. - - Attribute COMMON: Normal Order, LIQ: Liquidation Takeover Order, REDUCE: Liquidation Reduce Order, ADL: Auto-Reduce # noqa: E501 - - :param attribute: The attribute of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and attribute is None: # noqa: E501 - raise ValueError("Invalid value for `attribute`, must not be `None`") # noqa: E501 - - self._attribute = attribute - - @property - def exchange_type(self): - """Gets the exchange_type of this InlineResponse20041. # noqa: E501 - - Exchange # noqa: E501 - - :return: The exchange_type of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._exchange_type - - @exchange_type.setter - def exchange_type(self, exchange_type): - """Sets the exchange_type of this InlineResponse20041. - - Exchange # noqa: E501 - - :param exchange_type: The exchange_type of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and exchange_type is None: # noqa: E501 - raise ValueError("Invalid value for `exchange_type`, must not be `None`") # noqa: E501 - - self._exchange_type = exchange_type - - @property - def business_type(self): - """Gets the business_type of this InlineResponse20041. # noqa: E501 - - Business Type # noqa: E501 - - :return: The business_type of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._business_type - - @business_type.setter - def business_type(self, business_type): - """Sets the business_type of this InlineResponse20041. - - Business Type # noqa: E501 - - :param business_type: The business_type of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and business_type is None: # noqa: E501 - raise ValueError("Invalid value for `business_type`, must not be `None`") # noqa: E501 - - self._business_type = business_type - - @property - def qty(self): - """Gets the qty of this InlineResponse20041. # noqa: E501 - - Base Currency Quantity # noqa: E501 - - :return: The qty of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._qty - - @qty.setter - def qty(self, qty): - """Sets the qty of this InlineResponse20041. - - Base Currency Quantity # noqa: E501 - - :param qty: The qty of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and qty is None: # noqa: E501 - raise ValueError("Invalid value for `qty`, must not be `None`") # noqa: E501 - - self._qty = qty - - @property - def quote_qty(self): - """Gets the quote_qty of this InlineResponse20041. # noqa: E501 - - Quote Currency Quantity # noqa: E501 - - :return: The quote_qty of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._quote_qty - - @quote_qty.setter - def quote_qty(self, quote_qty): - """Sets the quote_qty of this InlineResponse20041. - - Quote Currency Quantity # noqa: E501 - - :param quote_qty: The quote_qty of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and quote_qty is None: # noqa: E501 - raise ValueError("Invalid value for `quote_qty`, must not be `None`") # noqa: E501 - - self._quote_qty = quote_qty - - @property - def price(self): - """Gets the price of this InlineResponse20041. # noqa: E501 - - Price # noqa: E501 - - :return: The price of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this InlineResponse20041. - - Price # noqa: E501 - - :param price: The price of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 - raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 - - self._price = price - - @property - def time_in_force(self): - """Gets the time_in_force of this InlineResponse20041. # noqa: E501 - - Time in Force Strategy # noqa: E501 - - :return: The time_in_force of this InlineResponse20041. # 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 InlineResponse20041. - - Time in Force Strategy # noqa: E501 - - :param time_in_force: The time_in_force of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and time_in_force is None: # noqa: E501 - raise ValueError("Invalid value for `time_in_force`, must not be `None`") # noqa: E501 - - self._time_in_force = time_in_force - - @property - def executed_qty(self): - """Gets the executed_qty of this InlineResponse20041. # noqa: E501 - - Filled Quantity # noqa: E501 - - :return: The executed_qty of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._executed_qty - - @executed_qty.setter - def executed_qty(self, executed_qty): - """Sets the executed_qty of this InlineResponse20041. - - Filled Quantity # noqa: E501 - - :param executed_qty: The executed_qty of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and executed_qty is None: # noqa: E501 - raise ValueError("Invalid value for `executed_qty`, must not be `None`") # noqa: E501 - - self._executed_qty = executed_qty - - @property - def executed_amount(self): - """Gets the executed_amount of this InlineResponse20041. # noqa: E501 - - Filled Amount # noqa: E501 - - :return: The executed_amount of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._executed_amount - - @executed_amount.setter - def executed_amount(self, executed_amount): - """Sets the executed_amount of this InlineResponse20041. - - Filled Amount # noqa: E501 - - :param executed_amount: The executed_amount of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and executed_amount is None: # noqa: E501 - raise ValueError("Invalid value for `executed_amount`, must not be `None`") # noqa: E501 - - self._executed_amount = executed_amount - - @property - def executed_avg_price(self): - """Gets the executed_avg_price of this InlineResponse20041. # noqa: E501 - - Average Filled Price # noqa: E501 - - :return: The executed_avg_price of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._executed_avg_price - - @executed_avg_price.setter - def executed_avg_price(self, executed_avg_price): - """Sets the executed_avg_price of this InlineResponse20041. - - Average Filled Price # noqa: E501 - - :param executed_avg_price: The executed_avg_price of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and executed_avg_price is None: # noqa: E501 - raise ValueError("Invalid value for `executed_avg_price`, must not be `None`") # noqa: E501 - - self._executed_avg_price = executed_avg_price - - @property - def fee_coin(self): - """Gets the fee_coin of this InlineResponse20041. # noqa: E501 - - Fee currency # noqa: E501 - - :return: The fee_coin of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._fee_coin - - @fee_coin.setter - def fee_coin(self, fee_coin): - """Sets the fee_coin of this InlineResponse20041. - - Fee currency # noqa: E501 - - :param fee_coin: The fee_coin of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and fee_coin is None: # noqa: E501 - raise ValueError("Invalid value for `fee_coin`, must not be `None`") # noqa: E501 - - self._fee_coin = fee_coin - - @property - def fee(self): - """Gets the fee of this InlineResponse20041. # noqa: E501 - - fee # noqa: E501 - - :return: The fee of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this InlineResponse20041. - - fee # noqa: E501 - - :param fee: The fee of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and fee is None: # noqa: E501 - raise ValueError("Invalid value for `fee`, must not be `None`") # noqa: E501 - - self._fee = fee - - @property - def reduce_only(self): - """Gets the reduce_only of this InlineResponse20041. # noqa: E501 - - Reduce Position Only # noqa: E501 - - :return: The reduce_only of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._reduce_only - - @reduce_only.setter - def reduce_only(self, reduce_only): - """Sets the reduce_only of this InlineResponse20041. - - Reduce Position Only # noqa: E501 - - :param reduce_only: The reduce_only of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and reduce_only is None: # noqa: E501 - raise ValueError("Invalid value for `reduce_only`, must not be `None`") # noqa: E501 - - self._reduce_only = reduce_only - - @property - def leverage(self): - """Gets the leverage of this InlineResponse20041. # noqa: E501 - - leverage # noqa: E501 - - :return: The leverage of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this InlineResponse20041. - - leverage # noqa: E501 - - :param leverage: The leverage of this InlineResponse20041. # 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 - - @property - def reason(self): - """Gets the reason of this InlineResponse20041. # noqa: E501 - - Reason # noqa: E501 - - :return: The reason of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._reason - - @reason.setter - def reason(self, reason): - """Sets the reason of this InlineResponse20041. - - Reason # noqa: E501 - - :param reason: The reason of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and reason is None: # noqa: E501 - raise ValueError("Invalid value for `reason`, must not be `None`") # noqa: E501 - - self._reason = reason - - @property - def last_executed_qty(self): - """Gets the last_executed_qty of this InlineResponse20041. # noqa: E501 - - Latest Filled Quantity # noqa: E501 - - :return: The last_executed_qty of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._last_executed_qty - - @last_executed_qty.setter - def last_executed_qty(self, last_executed_qty): - """Sets the last_executed_qty of this InlineResponse20041. - - Latest Filled Quantity # noqa: E501 - - :param last_executed_qty: The last_executed_qty of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and last_executed_qty is None: # noqa: E501 - raise ValueError("Invalid value for `last_executed_qty`, must not be `None`") # noqa: E501 - - self._last_executed_qty = last_executed_qty - - @property - def last_executed_price(self): - """Gets the last_executed_price of this InlineResponse20041. # noqa: E501 - - Latest Filled Price # noqa: E501 - - :return: The last_executed_price of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._last_executed_price - - @last_executed_price.setter - def last_executed_price(self, last_executed_price): - """Sets the last_executed_price of this InlineResponse20041. - - Latest Filled Price # noqa: E501 - - :param last_executed_price: The last_executed_price of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and last_executed_price is None: # noqa: E501 - raise ValueError("Invalid value for `last_executed_price`, must not be `None`") # noqa: E501 - - self._last_executed_price = last_executed_price - - @property - def last_executed_amount(self): - """Gets the last_executed_amount of this InlineResponse20041. # noqa: E501 - - Latest Filled Amount # noqa: E501 - - :return: The last_executed_amount of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._last_executed_amount - - @last_executed_amount.setter - def last_executed_amount(self, last_executed_amount): - """Sets the last_executed_amount of this InlineResponse20041. - - Latest Filled Amount # noqa: E501 - - :param last_executed_amount: The last_executed_amount of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and last_executed_amount is None: # noqa: E501 - raise ValueError("Invalid value for `last_executed_amount`, must not be `None`") # noqa: E501 - - self._last_executed_amount = last_executed_amount - - @property - def position_side(self): - """Gets the position_side of this InlineResponse20041. # noqa: E501 - - Position Direction # noqa: E501 - - :return: The position_side of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._position_side - - @position_side.setter - def position_side(self, position_side): - """Sets the position_side of this InlineResponse20041. - - Position Direction # noqa: E501 - - :param position_side: The position_side of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and position_side is None: # noqa: E501 - raise ValueError("Invalid value for `position_side`, must not be `None`") # noqa: E501 - - self._position_side = position_side - - @property - def create_time(self): - """Gets the create_time of this InlineResponse20041. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this InlineResponse20041. - - Created time # noqa: E501 - - :param create_time: The create_time of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 - raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 - - self._create_time = create_time - - @property - def update_time(self): - """Gets the update_time of this InlineResponse20041. # noqa: E501 - - Update time # noqa: E501 - - :return: The update_time of this InlineResponse20041. # noqa: E501 - :rtype: str - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this InlineResponse20041. - - Update time # noqa: E501 - - :param update_time: The update_time of this InlineResponse20041. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and update_time is None: # noqa: E501 - raise ValueError("Invalid value for `update_time`, must not be `None`") # noqa: E501 - - 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, InlineResponse20041): - 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, InlineResponse20041): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2009_data.py b/gate_api/models/inline_response2009_data.py deleted file mode 100644 index b631df69..00000000 --- a/gate_api/models/inline_response2009_data.py +++ /dev/null @@ -1,286 +0,0 @@ -# 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 InlineResponse2009Data(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', - 'bank_account_name': 'str', - 'bank_name': 'str', - 'bank_country': 'str', - 'bank_address': 'str', - 'bank_code': 'str', - 'branch_code': 'str' - } - - attribute_map = { - 'id': 'id', - 'bank_account_name': 'bank_account_name', - 'bank_name': 'bank_name', - 'bank_country': 'bank_country', - 'bank_address': 'bank_address', - 'bank_code': 'bank_code', - 'branch_code': 'branch_code' - } - - def __init__(self, id=None, bank_account_name=None, bank_name=None, bank_country=None, bank_address=None, bank_code=None, branch_code=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, Configuration) -> None - """InlineResponse2009Data - 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._bank_account_name = None - self._bank_name = None - self._bank_country = None - self._bank_address = None - self._bank_code = None - self._branch_code = None - self.discriminator = None - - self.id = id - self.bank_account_name = bank_account_name - self.bank_name = bank_name - self.bank_country = bank_country - self.bank_address = bank_address - self.bank_code = bank_code - self.branch_code = branch_code - - @property - def id(self): - """Gets the id of this InlineResponse2009Data. # noqa: E501 - - Bank ID (required for order placement) # noqa: E501 - - :return: The id of this InlineResponse2009Data. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this InlineResponse2009Data. - - Bank ID (required for order placement) # noqa: E501 - - :param id: The id of this InlineResponse2009Data. # 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 bank_account_name(self): - """Gets the bank_account_name of this InlineResponse2009Data. # noqa: E501 - - - :return: The bank_account_name of this InlineResponse2009Data. # noqa: E501 - :rtype: str - """ - return self._bank_account_name - - @bank_account_name.setter - def bank_account_name(self, bank_account_name): - """Sets the bank_account_name of this InlineResponse2009Data. - - - :param bank_account_name: The bank_account_name of this InlineResponse2009Data. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and bank_account_name is None: # noqa: E501 - raise ValueError("Invalid value for `bank_account_name`, must not be `None`") # noqa: E501 - - self._bank_account_name = bank_account_name - - @property - def bank_name(self): - """Gets the bank_name of this InlineResponse2009Data. # noqa: E501 - - - :return: The bank_name of this InlineResponse2009Data. # noqa: E501 - :rtype: str - """ - return self._bank_name - - @bank_name.setter - def bank_name(self, bank_name): - """Sets the bank_name of this InlineResponse2009Data. - - - :param bank_name: The bank_name of this InlineResponse2009Data. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and bank_name is None: # noqa: E501 - raise ValueError("Invalid value for `bank_name`, must not be `None`") # noqa: E501 - - self._bank_name = bank_name - - @property - def bank_country(self): - """Gets the bank_country of this InlineResponse2009Data. # noqa: E501 - - - :return: The bank_country of this InlineResponse2009Data. # noqa: E501 - :rtype: str - """ - return self._bank_country - - @bank_country.setter - def bank_country(self, bank_country): - """Sets the bank_country of this InlineResponse2009Data. - - - :param bank_country: The bank_country of this InlineResponse2009Data. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and bank_country is None: # noqa: E501 - raise ValueError("Invalid value for `bank_country`, must not be `None`") # noqa: E501 - - self._bank_country = bank_country - - @property - def bank_address(self): - """Gets the bank_address of this InlineResponse2009Data. # noqa: E501 - - - :return: The bank_address of this InlineResponse2009Data. # noqa: E501 - :rtype: str - """ - return self._bank_address - - @bank_address.setter - def bank_address(self, bank_address): - """Sets the bank_address of this InlineResponse2009Data. - - - :param bank_address: The bank_address of this InlineResponse2009Data. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and bank_address is None: # noqa: E501 - raise ValueError("Invalid value for `bank_address`, must not be `None`") # noqa: E501 - - self._bank_address = bank_address - - @property - def bank_code(self): - """Gets the bank_code of this InlineResponse2009Data. # noqa: E501 - - - :return: The bank_code of this InlineResponse2009Data. # noqa: E501 - :rtype: str - """ - return self._bank_code - - @bank_code.setter - def bank_code(self, bank_code): - """Sets the bank_code of this InlineResponse2009Data. - - - :param bank_code: The bank_code of this InlineResponse2009Data. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and bank_code is None: # noqa: E501 - raise ValueError("Invalid value for `bank_code`, must not be `None`") # noqa: E501 - - self._bank_code = bank_code - - @property - def branch_code(self): - """Gets the branch_code of this InlineResponse2009Data. # noqa: E501 - - - :return: The branch_code of this InlineResponse2009Data. # noqa: E501 - :rtype: str - """ - return self._branch_code - - @branch_code.setter - def branch_code(self, branch_code): - """Sets the branch_code of this InlineResponse2009Data. - - - :param branch_code: The branch_code of this InlineResponse2009Data. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and branch_code is None: # noqa: E501 - raise ValueError("Invalid value for `branch_code`, must not be `None`") # noqa: E501 - - self._branch_code = branch_code - - 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, InlineResponse2009Data): - 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, InlineResponse2009Data): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ladder_apr.py b/gate_api/models/ladder_apr.py new file mode 100644 index 00000000..d406b3f5 --- /dev/null +++ b/gate_api/models/ladder_apr.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 LadderApr(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 = { + 'apr': 'str', + 'left': 'str', + 'right': 'str' + } + + attribute_map = { + 'apr': 'apr', + 'left': 'left', + 'right': 'right' + } + + def __init__(self, apr=None, left=None, right=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """LadderApr - 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._apr = None + self._left = None + self._right = None + self.discriminator = None + + self.apr = apr + self.left = left + self.right = right + + @property + def apr(self): + """Gets the apr of this LadderApr. # noqa: E501 + + Annualized interest rate # noqa: E501 + + :return: The apr of this LadderApr. # noqa: E501 + :rtype: str + """ + return self._apr + + @apr.setter + def apr(self, apr): + """Sets the apr of this LadderApr. + + Annualized interest rate # noqa: E501 + + :param apr: The apr of this LadderApr. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and apr is None: # noqa: E501 + raise ValueError("Invalid value for `apr`, must not be `None`") # noqa: E501 + + self._apr = apr + + @property + def left(self): + """Gets the left of this LadderApr. # noqa: E501 + + Range lower limit # noqa: E501 + + :return: The left of this LadderApr. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this LadderApr. + + Range lower limit # noqa: E501 + + :param left: The left of this LadderApr. # 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 right(self): + """Gets the right of this LadderApr. # noqa: E501 + + Range upper limit # noqa: E501 + + :return: The right of this LadderApr. # noqa: E501 + :rtype: str + """ + return self._right + + @right.setter + def right(self, right): + """Sets the right of this LadderApr. + + Range upper limit # noqa: E501 + + :param right: The right of this LadderApr. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and right is None: # noqa: E501 + raise ValueError("Invalid value for `right`, must not be `None`") # noqa: E501 + + self._right = right + + 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, LadderApr): + 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, LadderApr): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/launch_pool_v4_create_order_response.py b/gate_api/models/launch_pool_v4_create_order_response.py new file mode 100644 index 00000000..6c1ce7d8 --- /dev/null +++ b/gate_api/models/launch_pool_v4_create_order_response.py @@ -0,0 +1,124 @@ +# 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 LaunchPoolV4CreateOrderResponse(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 = { + 'flow_id': 'int' + } + + attribute_map = { + 'flow_id': 'flow_id' + } + + def __init__(self, flow_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """LaunchPoolV4CreateOrderResponse - 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._flow_id = None + self.discriminator = None + + self.flow_id = flow_id + + @property + def flow_id(self): + """Gets the flow_id of this LaunchPoolV4CreateOrderResponse. # noqa: E501 + + Order ID # noqa: E501 + + :return: The flow_id of this LaunchPoolV4CreateOrderResponse. # noqa: E501 + :rtype: int + """ + return self._flow_id + + @flow_id.setter + def flow_id(self, flow_id): + """Sets the flow_id of this LaunchPoolV4CreateOrderResponse. + + Order ID # noqa: E501 + + :param flow_id: The flow_id of this LaunchPoolV4CreateOrderResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and flow_id is None: # noqa: E501 + raise ValueError("Invalid value for `flow_id`, must not be `None`") # noqa: E501 + + self._flow_id = flow_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, LaunchPoolV4CreateOrderResponse): + 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, LaunchPoolV4CreateOrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/launch_pool_v4_error_response.py b/gate_api/models/launch_pool_v4_error_response.py new file mode 100644 index 00000000..83a7de6a --- /dev/null +++ b/gate_api/models/launch_pool_v4_error_response.py @@ -0,0 +1,159 @@ +# 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 LaunchPoolV4ErrorResponse(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 = { + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'label': 'label', + 'message': 'message' + } + + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """LaunchPoolV4ErrorResponse - 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._label = None + self._message = None + self.discriminator = None + + self.label = label + self.message = message + + @property + def label(self): + """Gets the label of this LaunchPoolV4ErrorResponse. # noqa: E501 + + Error label # noqa: E501 + + :return: The label of this LaunchPoolV4ErrorResponse. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this LaunchPoolV4ErrorResponse. + + Error label # noqa: E501 + + :param label: The label of this LaunchPoolV4ErrorResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 + raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 + allowed_values = ["INVALID_PARAM_VALUE", "INVALID_CREDENTIALS", "INSUFFICIENT_BALANCE", "PROJECT_NOT_FOUND"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and label not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `label` ({0}), must be one of {1}" # noqa: E501 + .format(label, allowed_values) + ) + + self._label = label + + @property + def message(self): + """Gets the message of this LaunchPoolV4ErrorResponse. # noqa: E501 + + Error message # noqa: E501 + + :return: The message of this LaunchPoolV4ErrorResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this LaunchPoolV4ErrorResponse. + + Error message # noqa: E501 + + :param message: The message of this LaunchPoolV4ErrorResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + 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, LaunchPoolV4ErrorResponse): + 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, LaunchPoolV4ErrorResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/launch_pool_v4_pledge_record.py b/gate_api/models/launch_pool_v4_pledge_record.py new file mode 100644 index 00000000..44611afd --- /dev/null +++ b/gate_api/models/launch_pool_v4_pledge_record.py @@ -0,0 +1,269 @@ +# 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 LaunchPoolV4PledgeRecord(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 = { + 'create_timest': 'str', + 'reward_coin': 'str', + 'coin': 'str', + 'type': 'int', + 'amount': 'str', + 'id': 'int' + } + + attribute_map = { + 'create_timest': 'create_timest', + 'reward_coin': 'reward_coin', + 'coin': 'coin', + 'type': 'type', + 'amount': 'amount', + 'id': 'id' + } + + def __init__(self, create_timest=None, reward_coin=None, coin=None, type=None, amount=None, id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, str, int, Configuration) -> None + """LaunchPoolV4PledgeRecord - 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._create_timest = None + self._reward_coin = None + self._coin = None + self._type = None + self._amount = None + self._id = None + self.discriminator = None + + self.create_timest = create_timest + self.reward_coin = reward_coin + self.coin = coin + self.type = type + self.amount = amount + self.id = id + + @property + def create_timest(self): + """Gets the create_timest of this LaunchPoolV4PledgeRecord. # noqa: E501 + + Creation date # noqa: E501 + + :return: The create_timest of this LaunchPoolV4PledgeRecord. # noqa: E501 + :rtype: str + """ + return self._create_timest + + @create_timest.setter + def create_timest(self, create_timest): + """Sets the create_timest of this LaunchPoolV4PledgeRecord. + + Creation date # noqa: E501 + + :param create_timest: The create_timest of this LaunchPoolV4PledgeRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and create_timest is None: # noqa: E501 + raise ValueError("Invalid value for `create_timest`, must not be `None`") # noqa: E501 + + self._create_timest = create_timest + + @property + def reward_coin(self): + """Gets the reward_coin of this LaunchPoolV4PledgeRecord. # noqa: E501 + + Reward currency # noqa: E501 + + :return: The reward_coin of this LaunchPoolV4PledgeRecord. # noqa: E501 + :rtype: str + """ + return self._reward_coin + + @reward_coin.setter + def reward_coin(self, reward_coin): + """Sets the reward_coin of this LaunchPoolV4PledgeRecord. + + Reward currency # noqa: E501 + + :param reward_coin: The reward_coin of this LaunchPoolV4PledgeRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and reward_coin is None: # noqa: E501 + raise ValueError("Invalid value for `reward_coin`, must not be `None`") # noqa: E501 + + self._reward_coin = reward_coin + + @property + def coin(self): + """Gets the coin of this LaunchPoolV4PledgeRecord. # noqa: E501 + + Collateral currency # noqa: E501 + + :return: The coin of this LaunchPoolV4PledgeRecord. # noqa: E501 + :rtype: str + """ + return self._coin + + @coin.setter + def coin(self, coin): + """Sets the coin of this LaunchPoolV4PledgeRecord. + + Collateral currency # noqa: E501 + + :param coin: The coin of this LaunchPoolV4PledgeRecord. # 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 type(self): + """Gets the type of this LaunchPoolV4PledgeRecord. # noqa: E501 + + Type: 1 for pledge, 2 for redemption # noqa: E501 + + :return: The type of this LaunchPoolV4PledgeRecord. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this LaunchPoolV4PledgeRecord. + + Type: 1 for pledge, 2 for redemption # noqa: E501 + + :param type: The type of this LaunchPoolV4PledgeRecord. # noqa: E501 + :type: int + """ + 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 amount(self): + """Gets the amount of this LaunchPoolV4PledgeRecord. # noqa: E501 + + Size # noqa: E501 + + :return: The amount of this LaunchPoolV4PledgeRecord. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this LaunchPoolV4PledgeRecord. + + Size # noqa: E501 + + :param amount: The amount of this LaunchPoolV4PledgeRecord. # 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 id(self): + """Gets the id of this LaunchPoolV4PledgeRecord. # noqa: E501 + + Record ID # noqa: E501 + + :return: The id of this LaunchPoolV4PledgeRecord. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this LaunchPoolV4PledgeRecord. + + Record ID # noqa: E501 + + :param id: The id of this LaunchPoolV4PledgeRecord. # noqa: E501 + :type: int + """ + 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 + + 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, LaunchPoolV4PledgeRecord): + 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, LaunchPoolV4PledgeRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/launch_pool_v4_project.py b/gate_api/models/launch_pool_v4_project.py new file mode 100644 index 00000000..64117a80 --- /dev/null +++ b/gate_api/models/launch_pool_v4_project.py @@ -0,0 +1,333 @@ +# 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 LaunchPoolV4Project(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': 'int', + 'name': 'str', + 'total_amount': 'str', + 'start_timest': 'int', + 'end_timest': 'int', + 'days': 'int', + 'project_state': 'int', + 'reward_pools': 'list[LaunchPoolV4RewardPool]' + } + + attribute_map = { + 'pid': 'pid', + 'name': 'name', + 'total_amount': 'total_amount', + 'start_timest': 'start_timest', + 'end_timest': 'end_timest', + 'days': 'days', + 'project_state': 'project_state', + 'reward_pools': 'reward_pools' + } + + def __init__(self, pid=None, name=None, total_amount=None, start_timest=None, end_timest=None, days=None, project_state=None, reward_pools=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, int, int, int, list[LaunchPoolV4RewardPool], Configuration) -> None + """LaunchPoolV4Project - 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._name = None + self._total_amount = None + self._start_timest = None + self._end_timest = None + self._days = None + self._project_state = None + self._reward_pools = None + self.discriminator = None + + self.pid = pid + self.name = name + self.total_amount = total_amount + self.start_timest = start_timest + self.end_timest = end_timest + self.days = days + self.project_state = project_state + self.reward_pools = reward_pools + + @property + def pid(self): + """Gets the pid of this LaunchPoolV4Project. # noqa: E501 + + Product ID # noqa: E501 + + :return: The pid of this LaunchPoolV4Project. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this LaunchPoolV4Project. + + Product ID # noqa: E501 + + :param pid: The pid of this LaunchPoolV4Project. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and pid is None: # noqa: E501 + raise ValueError("Invalid value for `pid`, must not be `None`") # noqa: E501 + + self._pid = pid + + @property + def name(self): + """Gets the name of this LaunchPoolV4Project. # noqa: E501 + + Product Name # noqa: E501 + + :return: The name of this LaunchPoolV4Project. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this LaunchPoolV4Project. + + Product Name # noqa: E501 + + :param name: The name of this LaunchPoolV4Project. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def total_amount(self): + """Gets the total_amount of this LaunchPoolV4Project. # noqa: E501 + + Total rewards # noqa: E501 + + :return: The total_amount of this LaunchPoolV4Project. # noqa: E501 + :rtype: str + """ + return self._total_amount + + @total_amount.setter + def total_amount(self, total_amount): + """Sets the total_amount of this LaunchPoolV4Project. + + Total rewards # noqa: E501 + + :param total_amount: The total_amount of this LaunchPoolV4Project. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and total_amount is None: # noqa: E501 + raise ValueError("Invalid value for `total_amount`, must not be `None`") # noqa: E501 + + self._total_amount = total_amount + + @property + def start_timest(self): + """Gets the start_timest of this LaunchPoolV4Project. # noqa: E501 + + Project start timestamp # noqa: E501 + + :return: The start_timest of this LaunchPoolV4Project. # noqa: E501 + :rtype: int + """ + return self._start_timest + + @start_timest.setter + def start_timest(self, start_timest): + """Sets the start_timest of this LaunchPoolV4Project. + + Project start timestamp # noqa: E501 + + :param start_timest: The start_timest of this LaunchPoolV4Project. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and start_timest is None: # noqa: E501 + raise ValueError("Invalid value for `start_timest`, must not be `None`") # noqa: E501 + + self._start_timest = start_timest + + @property + def end_timest(self): + """Gets the end_timest of this LaunchPoolV4Project. # noqa: E501 + + Project end timestamp # noqa: E501 + + :return: The end_timest of this LaunchPoolV4Project. # noqa: E501 + :rtype: int + """ + return self._end_timest + + @end_timest.setter + def end_timest(self, end_timest): + """Sets the end_timest of this LaunchPoolV4Project. + + Project end timestamp # noqa: E501 + + :param end_timest: The end_timest of this LaunchPoolV4Project. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and end_timest is None: # noqa: E501 + raise ValueError("Invalid value for `end_timest`, must not be `None`") # noqa: E501 + + self._end_timest = end_timest + + @property + def days(self): + """Gets the days of this LaunchPoolV4Project. # noqa: E501 + + Staking period (in days) # noqa: E501 + + :return: The days of this LaunchPoolV4Project. # noqa: E501 + :rtype: int + """ + return self._days + + @days.setter + def days(self, days): + """Sets the days of this LaunchPoolV4Project. + + Staking period (in days) # noqa: E501 + + :param days: The days of this LaunchPoolV4Project. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and days is None: # noqa: E501 + raise ValueError("Invalid value for `days`, must not be `None`") # noqa: E501 + + self._days = days + + @property + def project_state(self): + """Gets the project_state of this LaunchPoolV4Project. # noqa: E501 + + Project status: 1 for ongoing, 2 for warming up, 3 for ended # noqa: E501 + + :return: The project_state of this LaunchPoolV4Project. # noqa: E501 + :rtype: int + """ + return self._project_state + + @project_state.setter + def project_state(self, project_state): + """Sets the project_state of this LaunchPoolV4Project. + + Project status: 1 for ongoing, 2 for warming up, 3 for ended # noqa: E501 + + :param project_state: The project_state of this LaunchPoolV4Project. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and project_state is None: # noqa: E501 + raise ValueError("Invalid value for `project_state`, must not be `None`") # noqa: E501 + allowed_values = [1, 2, 3] # noqa: E501 + if self.local_vars_configuration.client_side_validation and project_state not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `project_state` ({0}), must be one of {1}" # noqa: E501 + .format(project_state, allowed_values) + ) + + self._project_state = project_state + + @property + def reward_pools(self): + """Gets the reward_pools of this LaunchPoolV4Project. # noqa: E501 + + Collateral currency list # noqa: E501 + + :return: The reward_pools of this LaunchPoolV4Project. # noqa: E501 + :rtype: list[LaunchPoolV4RewardPool] + """ + return self._reward_pools + + @reward_pools.setter + def reward_pools(self, reward_pools): + """Sets the reward_pools of this LaunchPoolV4Project. + + Collateral currency list # noqa: E501 + + :param reward_pools: The reward_pools of this LaunchPoolV4Project. # noqa: E501 + :type: list[LaunchPoolV4RewardPool] + """ + if self.local_vars_configuration.client_side_validation and reward_pools is None: # noqa: E501 + raise ValueError("Invalid value for `reward_pools`, must not be `None`") # noqa: E501 + + self._reward_pools = reward_pools + + 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, LaunchPoolV4Project): + 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, LaunchPoolV4Project): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/launch_pool_v4_reward_pool.py b/gate_api/models/launch_pool_v4_reward_pool.py new file mode 100644 index 00000000..2450e454 --- /dev/null +++ b/gate_api/models/launch_pool_v4_reward_pool.py @@ -0,0 +1,297 @@ +# 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 LaunchPoolV4RewardPool(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 = { + 'rid': 'int', + 'coin': 'str', + 'rate_year': 'str', + 'already_buy_total_amount': 'str', + 'personal_max_amount': 'str', + 'personal_min_amount': 'str', + 'transaction_config': 'list[TransactionConfig]' + } + + attribute_map = { + 'rid': 'rid', + 'coin': 'coin', + 'rate_year': 'rate_year', + 'already_buy_total_amount': 'already_buy_total_amount', + 'personal_max_amount': 'personal_max_amount', + 'personal_min_amount': 'personal_min_amount', + 'transaction_config': 'transaction_config' + } + + def __init__(self, rid=None, coin=None, rate_year=None, already_buy_total_amount=None, personal_max_amount=None, personal_min_amount=None, transaction_config=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, list[TransactionConfig], Configuration) -> None + """LaunchPoolV4RewardPool - 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._rid = None + self._coin = None + self._rate_year = None + self._already_buy_total_amount = None + self._personal_max_amount = None + self._personal_min_amount = None + self._transaction_config = None + self.discriminator = None + + self.rid = rid + self.coin = coin + self.rate_year = rate_year + self.already_buy_total_amount = already_buy_total_amount + self.personal_max_amount = personal_max_amount + self.personal_min_amount = personal_min_amount + if transaction_config is not None: + self.transaction_config = transaction_config + + @property + def rid(self): + """Gets the rid of this LaunchPoolV4RewardPool. # noqa: E501 + + Reward pool ID # noqa: E501 + + :return: The rid of this LaunchPoolV4RewardPool. # noqa: E501 + :rtype: int + """ + return self._rid + + @rid.setter + def rid(self, rid): + """Sets the rid of this LaunchPoolV4RewardPool. + + Reward pool ID # noqa: E501 + + :param rid: The rid of this LaunchPoolV4RewardPool. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and rid is None: # noqa: E501 + raise ValueError("Invalid value for `rid`, must not be `None`") # noqa: E501 + + self._rid = rid + + @property + def coin(self): + """Gets the coin of this LaunchPoolV4RewardPool. # noqa: E501 + + Collateral currency # noqa: E501 + + :return: The coin of this LaunchPoolV4RewardPool. # noqa: E501 + :rtype: str + """ + return self._coin + + @coin.setter + def coin(self, coin): + """Sets the coin of this LaunchPoolV4RewardPool. + + Collateral currency # noqa: E501 + + :param coin: The coin of this LaunchPoolV4RewardPool. # 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 rate_year(self): + """Gets the rate_year of this LaunchPoolV4RewardPool. # noqa: E501 + + Estimated APR # noqa: E501 + + :return: The rate_year of this LaunchPoolV4RewardPool. # noqa: E501 + :rtype: str + """ + return self._rate_year + + @rate_year.setter + def rate_year(self, rate_year): + """Sets the rate_year of this LaunchPoolV4RewardPool. + + Estimated APR # noqa: E501 + + :param rate_year: The rate_year of this LaunchPoolV4RewardPool. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and rate_year is None: # noqa: E501 + raise ValueError("Invalid value for `rate_year`, must not be `None`") # noqa: E501 + + self._rate_year = rate_year + + @property + def already_buy_total_amount(self): + """Gets the already_buy_total_amount of this LaunchPoolV4RewardPool. # noqa: E501 + + Total liquid staking amount # noqa: E501 + + :return: The already_buy_total_amount of this LaunchPoolV4RewardPool. # noqa: E501 + :rtype: str + """ + return self._already_buy_total_amount + + @already_buy_total_amount.setter + def already_buy_total_amount(self, already_buy_total_amount): + """Sets the already_buy_total_amount of this LaunchPoolV4RewardPool. + + Total liquid staking amount # noqa: E501 + + :param already_buy_total_amount: The already_buy_total_amount of this LaunchPoolV4RewardPool. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and already_buy_total_amount is None: # noqa: E501 + raise ValueError("Invalid value for `already_buy_total_amount`, must not be `None`") # noqa: E501 + + self._already_buy_total_amount = already_buy_total_amount + + @property + def personal_max_amount(self): + """Gets the personal_max_amount of this LaunchPoolV4RewardPool. # noqa: E501 + + Maximum individual pledge amount # noqa: E501 + + :return: The personal_max_amount of this LaunchPoolV4RewardPool. # noqa: E501 + :rtype: str + """ + return self._personal_max_amount + + @personal_max_amount.setter + def personal_max_amount(self, personal_max_amount): + """Sets the personal_max_amount of this LaunchPoolV4RewardPool. + + Maximum individual pledge amount # noqa: E501 + + :param personal_max_amount: The personal_max_amount of this LaunchPoolV4RewardPool. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and personal_max_amount is None: # noqa: E501 + raise ValueError("Invalid value for `personal_max_amount`, must not be `None`") # noqa: E501 + + self._personal_max_amount = personal_max_amount + + @property + def personal_min_amount(self): + """Gets the personal_min_amount of this LaunchPoolV4RewardPool. # noqa: E501 + + Minimum individual pledge amount # noqa: E501 + + :return: The personal_min_amount of this LaunchPoolV4RewardPool. # noqa: E501 + :rtype: str + """ + return self._personal_min_amount + + @personal_min_amount.setter + def personal_min_amount(self, personal_min_amount): + """Sets the personal_min_amount of this LaunchPoolV4RewardPool. + + Minimum individual pledge amount # noqa: E501 + + :param personal_min_amount: The personal_min_amount of this LaunchPoolV4RewardPool. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and personal_min_amount is None: # noqa: E501 + raise ValueError("Invalid value for `personal_min_amount`, must not be `None`") # noqa: E501 + + self._personal_min_amount = personal_min_amount + + @property + def transaction_config(self): + """Gets the transaction_config of this LaunchPoolV4RewardPool. # noqa: E501 + + Participation requirements # noqa: E501 + + :return: The transaction_config of this LaunchPoolV4RewardPool. # noqa: E501 + :rtype: list[TransactionConfig] + """ + return self._transaction_config + + @transaction_config.setter + def transaction_config(self, transaction_config): + """Sets the transaction_config of this LaunchPoolV4RewardPool. + + Participation requirements # noqa: E501 + + :param transaction_config: The transaction_config of this LaunchPoolV4RewardPool. # noqa: E501 + :type: list[TransactionConfig] + """ + + self._transaction_config = transaction_config + + 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, LaunchPoolV4RewardPool): + 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, LaunchPoolV4RewardPool): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/launch_pool_v4_reward_record.py b/gate_api/models/launch_pool_v4_reward_record.py new file mode 100644 index 00000000..07ef5803 --- /dev/null +++ b/gate_api/models/launch_pool_v4_reward_record.py @@ -0,0 +1,240 @@ +# 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 LaunchPoolV4RewardRecord(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 = { + 'reward_timest': 'str', + 'coin': 'str', + 'valid_mortgage_amount': 'str', + 'amount_base': 'str', + 'amount_ext': 'str' + } + + attribute_map = { + 'reward_timest': 'reward_timest', + 'coin': 'coin', + 'valid_mortgage_amount': 'valid_mortgage_amount', + 'amount_base': 'amount_base', + 'amount_ext': 'amount_ext' + } + + def __init__(self, reward_timest=None, coin=None, valid_mortgage_amount=None, amount_base=None, amount_ext=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """LaunchPoolV4RewardRecord - 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._reward_timest = None + self._coin = None + self._valid_mortgage_amount = None + self._amount_base = None + self._amount_ext = None + self.discriminator = None + + self.reward_timest = reward_timest + self.coin = coin + self.valid_mortgage_amount = valid_mortgage_amount + self.amount_base = amount_base + self.amount_ext = amount_ext + + @property + def reward_timest(self): + """Gets the reward_timest of this LaunchPoolV4RewardRecord. # noqa: E501 + + Reward date # noqa: E501 + + :return: The reward_timest of this LaunchPoolV4RewardRecord. # noqa: E501 + :rtype: str + """ + return self._reward_timest + + @reward_timest.setter + def reward_timest(self, reward_timest): + """Sets the reward_timest of this LaunchPoolV4RewardRecord. + + Reward date # noqa: E501 + + :param reward_timest: The reward_timest of this LaunchPoolV4RewardRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and reward_timest is None: # noqa: E501 + raise ValueError("Invalid value for `reward_timest`, must not be `None`") # noqa: E501 + + self._reward_timest = reward_timest + + @property + def coin(self): + """Gets the coin of this LaunchPoolV4RewardRecord. # noqa: E501 + + Reward currency # noqa: E501 + + :return: The coin of this LaunchPoolV4RewardRecord. # noqa: E501 + :rtype: str + """ + return self._coin + + @coin.setter + def coin(self, coin): + """Sets the coin of this LaunchPoolV4RewardRecord. + + Reward currency # noqa: E501 + + :param coin: The coin of this LaunchPoolV4RewardRecord. # 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 valid_mortgage_amount(self): + """Gets the valid_mortgage_amount of this LaunchPoolV4RewardRecord. # noqa: E501 + + Active pledge count # noqa: E501 + + :return: The valid_mortgage_amount of this LaunchPoolV4RewardRecord. # noqa: E501 + :rtype: str + """ + return self._valid_mortgage_amount + + @valid_mortgage_amount.setter + def valid_mortgage_amount(self, valid_mortgage_amount): + """Sets the valid_mortgage_amount of this LaunchPoolV4RewardRecord. + + Active pledge count # noqa: E501 + + :param valid_mortgage_amount: The valid_mortgage_amount of this LaunchPoolV4RewardRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and valid_mortgage_amount is None: # noqa: E501 + raise ValueError("Invalid value for `valid_mortgage_amount`, must not be `None`") # noqa: E501 + + self._valid_mortgage_amount = valid_mortgage_amount + + @property + def amount_base(self): + """Gets the amount_base of this LaunchPoolV4RewardRecord. # noqa: E501 + + Base airdrop # noqa: E501 + + :return: The amount_base of this LaunchPoolV4RewardRecord. # noqa: E501 + :rtype: str + """ + return self._amount_base + + @amount_base.setter + def amount_base(self, amount_base): + """Sets the amount_base of this LaunchPoolV4RewardRecord. + + Base airdrop # noqa: E501 + + :param amount_base: The amount_base of this LaunchPoolV4RewardRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount_base is None: # noqa: E501 + raise ValueError("Invalid value for `amount_base`, must not be `None`") # noqa: E501 + + self._amount_base = amount_base + + @property + def amount_ext(self): + """Gets the amount_ext of this LaunchPoolV4RewardRecord. # noqa: E501 + + Bonus airdrop # noqa: E501 + + :return: The amount_ext of this LaunchPoolV4RewardRecord. # noqa: E501 + :rtype: str + """ + return self._amount_ext + + @amount_ext.setter + def amount_ext(self, amount_ext): + """Sets the amount_ext of this LaunchPoolV4RewardRecord. + + Bonus airdrop # noqa: E501 + + :param amount_ext: The amount_ext of this LaunchPoolV4RewardRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount_ext is None: # noqa: E501 + raise ValueError("Invalid value for `amount_ext`, must not be `None`") # noqa: E501 + + self._amount_ext = amount_ext + + 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, LaunchPoolV4RewardRecord): + 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, LaunchPoolV4RewardRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_activities_response.py b/gate_api/models/list_activities_response.py new file mode 100644 index 00000000..7be58af1 --- /dev/null +++ b/gate_api/models/list_activities_response.py @@ -0,0 +1,209 @@ +# 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 ListActivitiesResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'ListActivitiesResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, ListActivitiesResponseData, int, Configuration) -> None + """ListActivitiesResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ListActivitiesResponse. # noqa: E501 + + Response status code, 0 means success # noqa: E501 + + :return: The code of this ListActivitiesResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListActivitiesResponse. + + Response status code, 0 means success # noqa: E501 + + :param code: The code of this ListActivitiesResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this ListActivitiesResponse. # noqa: E501 + + 响应消息,成功时为 \"success\" # noqa: E501 + + :return: The message of this ListActivitiesResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListActivitiesResponse. + + 响应消息,成功时为 \"success\" # noqa: E501 + + :param message: The message of this ListActivitiesResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ListActivitiesResponse. # noqa: E501 + + + :return: The data of this ListActivitiesResponse. # noqa: E501 + :rtype: ListActivitiesResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListActivitiesResponse. + + + :param data: The data of this ListActivitiesResponse. # noqa: E501 + :type: ListActivitiesResponseData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ListActivitiesResponse. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ListActivitiesResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ListActivitiesResponse. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ListActivitiesResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ListActivitiesResponse): + 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, ListActivitiesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_activities_response_data.py b/gate_api/models/list_activities_response_data.py new file mode 100644 index 00000000..2ee64414 --- /dev/null +++ b/gate_api/models/list_activities_response_data.py @@ -0,0 +1,269 @@ +# 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 ListActivitiesResponseData(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[ListActivitiesResponseDataList]', + 'page': 'int', + 'page_size': 'int', + 'page_count': 'int', + 'total_count': 'int', + 'url': 'str' + } + + attribute_map = { + 'list': 'list', + 'page': 'page', + 'page_size': 'pageSize', + 'page_count': 'pageCount', + 'total_count': 'totalCount', + 'url': 'url' + } + + def __init__(self, list=None, page=None, page_size=None, page_count=None, total_count=None, url=None, local_vars_configuration=None): # noqa: E501 + # type: (list[ListActivitiesResponseDataList], int, int, int, int, str, Configuration) -> None + """ListActivitiesResponseData - 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._page = None + self._page_size = None + self._page_count = None + self._total_count = None + self._url = None + self.discriminator = None + + self.list = list + self.page = page + self.page_size = page_size + self.page_count = page_count + self.total_count = total_count + self.url = url + + @property + def list(self): + """Gets the list of this ListActivitiesResponseData. # noqa: E501 + + Activity list # noqa: E501 + + :return: The list of this ListActivitiesResponseData. # noqa: E501 + :rtype: list[ListActivitiesResponseDataList] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this ListActivitiesResponseData. + + Activity list # noqa: E501 + + :param list: The list of this ListActivitiesResponseData. # noqa: E501 + :type: list[ListActivitiesResponseDataList] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + self._list = list + + @property + def page(self): + """Gets the page of this ListActivitiesResponseData. # noqa: E501 + + Current page number # noqa: E501 + + :return: The page of this ListActivitiesResponseData. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this ListActivitiesResponseData. + + Current page number # noqa: E501 + + :param page: The page of this ListActivitiesResponseData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page is None: # noqa: E501 + raise ValueError("Invalid value for `page`, must not be `None`") # noqa: E501 + + self._page = page + + @property + def page_size(self): + """Gets the page_size of this ListActivitiesResponseData. # noqa: E501 + + Items per page # noqa: E501 + + :return: The page_size of this ListActivitiesResponseData. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListActivitiesResponseData. + + Items per page # noqa: E501 + + :param page_size: The page_size of this ListActivitiesResponseData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page_size is None: # noqa: E501 + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + @property + def page_count(self): + """Gets the page_count of this ListActivitiesResponseData. # noqa: E501 + + Total pages # noqa: E501 + + :return: The page_count of this ListActivitiesResponseData. # noqa: E501 + :rtype: int + """ + return self._page_count + + @page_count.setter + def page_count(self, page_count): + """Sets the page_count of this ListActivitiesResponseData. + + Total pages # noqa: E501 + + :param page_count: The page_count of this ListActivitiesResponseData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and page_count is None: # noqa: E501 + raise ValueError("Invalid value for `page_count`, must not be `None`") # noqa: E501 + + self._page_count = page_count + + @property + def total_count(self): + """Gets the total_count of this ListActivitiesResponseData. # noqa: E501 + + Total Records # noqa: E501 + + :return: The total_count of this ListActivitiesResponseData. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListActivitiesResponseData. + + Total Records # noqa: E501 + + :param total_count: The total_count of this ListActivitiesResponseData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total_count is None: # noqa: E501 + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def url(self): + """Gets the url of this ListActivitiesResponseData. # noqa: E501 + + Activity Center page link # noqa: E501 + + :return: The url of this ListActivitiesResponseData. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ListActivitiesResponseData. + + Activity Center page link # noqa: E501 + + :param url: The url of this ListActivitiesResponseData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + 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, ListActivitiesResponseData): + 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, ListActivitiesResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_activities_response_data_list.py b/gate_api/models/list_activities_response_data_list.py new file mode 100644 index 00000000..7a2d2fe2 --- /dev/null +++ b/gate_api/models/list_activities_response_data_list.py @@ -0,0 +1,675 @@ +# 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 ListActivitiesResponseDataList(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_id': 'int', + 'type_name': 'str', + 'competition_name': 'str', + 'start_at': 'int', + 'end_at': 'int', + 'img': 'str', + 'img_dark': 'str', + 'url': 'str', + 'hot': 'int', + 'master_one_line': 'str', + 'master_two_line': 'str', + 'slave_one_line': 'str', + 'slave_two_line': 'str', + 'competition_title': 'str', + 'top_id': 'int', + 'parent_id': 'int', + 'new_img': 'str', + 'new_img_dark': 'str', + 'tag': 'list[str]' + } + + attribute_map = { + 'id': 'id', + 'type_id': 'type_id', + 'type_name': 'type_name', + 'competition_name': 'competition_name', + 'start_at': 'start_at', + 'end_at': 'end_at', + 'img': 'img', + 'img_dark': 'img_dark', + 'url': 'url', + 'hot': 'hot', + 'master_one_line': 'master_one_line', + 'master_two_line': 'master_two_line', + 'slave_one_line': 'slave_one_line', + 'slave_two_line': 'slave_two_line', + 'competition_title': 'competition_title', + 'top_id': 'top_id', + 'parent_id': 'parent_id', + 'new_img': 'new_img', + 'new_img_dark': 'new_img_dark', + 'tag': 'tag' + } + + def __init__(self, id=None, type_id=None, type_name=None, competition_name=None, start_at=None, end_at=None, img=None, img_dark=None, url=None, hot=None, master_one_line=None, master_two_line=None, slave_one_line=None, slave_two_line=None, competition_title=None, top_id=None, parent_id=None, new_img=None, new_img_dark=None, tag=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, int, int, str, str, str, int, str, str, str, str, str, int, int, str, str, list[str], Configuration) -> None + """ListActivitiesResponseDataList - 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_id = None + self._type_name = None + self._competition_name = None + self._start_at = None + self._end_at = None + self._img = None + self._img_dark = None + self._url = None + self._hot = None + self._master_one_line = None + self._master_two_line = None + self._slave_one_line = None + self._slave_two_line = None + self._competition_title = None + self._top_id = None + self._parent_id = None + self._new_img = None + self._new_img_dark = None + self._tag = None + self.discriminator = None + + self.id = id + self.type_id = type_id + self.type_name = type_name + self.competition_name = competition_name + self.start_at = start_at + self.end_at = end_at + self.img = img + self.img_dark = img_dark + self.url = url + self.hot = hot + self.master_one_line = master_one_line + self.master_two_line = master_two_line + self.slave_one_line = slave_one_line + self.slave_two_line = slave_two_line + self.competition_title = competition_title + self.top_id = top_id + self.parent_id = parent_id + self.new_img = new_img + self.new_img_dark = new_img_dark + self.tag = tag + + @property + def id(self): + """Gets the id of this ListActivitiesResponseDataList. # noqa: E501 + + Activity ID # noqa: E501 + + :return: The id of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListActivitiesResponseDataList. + + Activity ID # noqa: E501 + + :param id: The id of this ListActivitiesResponseDataList. # noqa: E501 + :type: int + """ + 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 type_id(self): + """Gets the type_id of this ListActivitiesResponseDataList. # noqa: E501 + + Activity type ID # noqa: E501 + + :return: The type_id of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: int + """ + return self._type_id + + @type_id.setter + def type_id(self, type_id): + """Sets the type_id of this ListActivitiesResponseDataList. + + Activity type ID # noqa: E501 + + :param type_id: The type_id of this ListActivitiesResponseDataList. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and type_id is None: # noqa: E501 + raise ValueError("Invalid value for `type_id`, must not be `None`") # noqa: E501 + + self._type_id = type_id + + @property + def type_name(self): + """Gets the type_name of this ListActivitiesResponseDataList. # noqa: E501 + + Activity type name # noqa: E501 + + :return: The type_name of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._type_name + + @type_name.setter + def type_name(self, type_name): + """Sets the type_name of this ListActivitiesResponseDataList. + + Activity type name # noqa: E501 + + :param type_name: The type_name of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type_name is None: # noqa: E501 + raise ValueError("Invalid value for `type_name`, must not be `None`") # noqa: E501 + + self._type_name = type_name + + @property + def competition_name(self): + """Gets the competition_name of this ListActivitiesResponseDataList. # noqa: E501 + + Activity name # noqa: E501 + + :return: The competition_name of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._competition_name + + @competition_name.setter + def competition_name(self, competition_name): + """Sets the competition_name of this ListActivitiesResponseDataList. + + Activity name # noqa: E501 + + :param competition_name: The competition_name of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and competition_name is None: # noqa: E501 + raise ValueError("Invalid value for `competition_name`, must not be `None`") # noqa: E501 + + self._competition_name = competition_name + + @property + def start_at(self): + """Gets the start_at of this ListActivitiesResponseDataList. # noqa: E501 + + Activity start time (Unix timestamp, in seconds) # noqa: E501 + + :return: The start_at of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: int + """ + return self._start_at + + @start_at.setter + def start_at(self, start_at): + """Sets the start_at of this ListActivitiesResponseDataList. + + Activity start time (Unix timestamp, in seconds) # noqa: E501 + + :param start_at: The start_at of this ListActivitiesResponseDataList. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and start_at is None: # noqa: E501 + raise ValueError("Invalid value for `start_at`, must not be `None`") # noqa: E501 + + self._start_at = start_at + + @property + def end_at(self): + """Gets the end_at of this ListActivitiesResponseDataList. # noqa: E501 + + Activity end time (Unix timestamp, in seconds) # noqa: E501 + + :return: The end_at of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: int + """ + return self._end_at + + @end_at.setter + def end_at(self, end_at): + """Sets the end_at of this ListActivitiesResponseDataList. + + Activity end time (Unix timestamp, in seconds) # noqa: E501 + + :param end_at: The end_at of this ListActivitiesResponseDataList. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and end_at is None: # noqa: E501 + raise ValueError("Invalid value for `end_at`, must not be `None`") # noqa: E501 + + self._end_at = end_at + + @property + def img(self): + """Gets the img of this ListActivitiesResponseDataList. # noqa: E501 + + Activity image URL (light mode) # noqa: E501 + + :return: The img of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._img + + @img.setter + def img(self, img): + """Sets the img of this ListActivitiesResponseDataList. + + Activity image URL (light mode) # noqa: E501 + + :param img: The img of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and img is None: # noqa: E501 + raise ValueError("Invalid value for `img`, must not be `None`") # noqa: E501 + + self._img = img + + @property + def img_dark(self): + """Gets the img_dark of this ListActivitiesResponseDataList. # noqa: E501 + + Activity image URL (dark mode) # noqa: E501 + + :return: The img_dark of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._img_dark + + @img_dark.setter + def img_dark(self, img_dark): + """Sets the img_dark of this ListActivitiesResponseDataList. + + Activity image URL (dark mode) # noqa: E501 + + :param img_dark: The img_dark of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and img_dark is None: # noqa: E501 + raise ValueError("Invalid value for `img_dark`, must not be `None`") # noqa: E501 + + self._img_dark = img_dark + + @property + def url(self): + """Gets the url of this ListActivitiesResponseDataList. # noqa: E501 + + Activity redirect link # noqa: E501 + + :return: The url of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ListActivitiesResponseDataList. + + Activity redirect link # noqa: E501 + + :param url: The url of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def hot(self): + """Gets the hot of this ListActivitiesResponseDataList. # noqa: E501 + + Popularity score # noqa: E501 + + :return: The hot of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: int + """ + return self._hot + + @hot.setter + def hot(self, hot): + """Sets the hot of this ListActivitiesResponseDataList. + + Popularity score # noqa: E501 + + :param hot: The hot of this ListActivitiesResponseDataList. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and hot is None: # noqa: E501 + raise ValueError("Invalid value for `hot`, must not be `None`") # noqa: E501 + + self._hot = hot + + @property + def master_one_line(self): + """Gets the master_one_line of this ListActivitiesResponseDataList. # noqa: E501 + + Main title first line # noqa: E501 + + :return: The master_one_line of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._master_one_line + + @master_one_line.setter + def master_one_line(self, master_one_line): + """Sets the master_one_line of this ListActivitiesResponseDataList. + + Main title first line # noqa: E501 + + :param master_one_line: The master_one_line of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and master_one_line is None: # noqa: E501 + raise ValueError("Invalid value for `master_one_line`, must not be `None`") # noqa: E501 + + self._master_one_line = master_one_line + + @property + def master_two_line(self): + """Gets the master_two_line of this ListActivitiesResponseDataList. # noqa: E501 + + Main title second line # noqa: E501 + + :return: The master_two_line of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._master_two_line + + @master_two_line.setter + def master_two_line(self, master_two_line): + """Sets the master_two_line of this ListActivitiesResponseDataList. + + Main title second line # noqa: E501 + + :param master_two_line: The master_two_line of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and master_two_line is None: # noqa: E501 + raise ValueError("Invalid value for `master_two_line`, must not be `None`") # noqa: E501 + + self._master_two_line = master_two_line + + @property + def slave_one_line(self): + """Gets the slave_one_line of this ListActivitiesResponseDataList. # noqa: E501 + + Subtitle first line # noqa: E501 + + :return: The slave_one_line of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._slave_one_line + + @slave_one_line.setter + def slave_one_line(self, slave_one_line): + """Sets the slave_one_line of this ListActivitiesResponseDataList. + + Subtitle first line # noqa: E501 + + :param slave_one_line: The slave_one_line of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and slave_one_line is None: # noqa: E501 + raise ValueError("Invalid value for `slave_one_line`, must not be `None`") # noqa: E501 + + self._slave_one_line = slave_one_line + + @property + def slave_two_line(self): + """Gets the slave_two_line of this ListActivitiesResponseDataList. # noqa: E501 + + Subtitle second line # noqa: E501 + + :return: The slave_two_line of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._slave_two_line + + @slave_two_line.setter + def slave_two_line(self, slave_two_line): + """Sets the slave_two_line of this ListActivitiesResponseDataList. + + Subtitle second line # noqa: E501 + + :param slave_two_line: The slave_two_line of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and slave_two_line is None: # noqa: E501 + raise ValueError("Invalid value for `slave_two_line`, must not be `None`") # noqa: E501 + + self._slave_two_line = slave_two_line + + @property + def competition_title(self): + """Gets the competition_title of this ListActivitiesResponseDataList. # noqa: E501 + + Activity title # noqa: E501 + + :return: The competition_title of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._competition_title + + @competition_title.setter + def competition_title(self, competition_title): + """Sets the competition_title of this ListActivitiesResponseDataList. + + Activity title # noqa: E501 + + :param competition_title: The competition_title of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and competition_title is None: # noqa: E501 + raise ValueError("Invalid value for `competition_title`, must not be `None`") # noqa: E501 + + self._competition_title = competition_title + + @property + def top_id(self): + """Gets the top_id of this ListActivitiesResponseDataList. # noqa: E501 + + Pin ID, 0 means not pinned # noqa: E501 + + :return: The top_id of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: int + """ + return self._top_id + + @top_id.setter + def top_id(self, top_id): + """Sets the top_id of this ListActivitiesResponseDataList. + + Pin ID, 0 means not pinned # noqa: E501 + + :param top_id: The top_id of this ListActivitiesResponseDataList. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and top_id is None: # noqa: E501 + raise ValueError("Invalid value for `top_id`, must not be `None`") # noqa: E501 + + self._top_id = top_id + + @property + def parent_id(self): + """Gets the parent_id of this ListActivitiesResponseDataList. # noqa: E501 + + Parent activity ID, 0 means no parent activity # noqa: E501 + + :return: The parent_id of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: int + """ + return self._parent_id + + @parent_id.setter + def parent_id(self, parent_id): + """Sets the parent_id of this ListActivitiesResponseDataList. + + Parent activity ID, 0 means no parent activity # noqa: E501 + + :param parent_id: The parent_id of this ListActivitiesResponseDataList. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and parent_id is None: # noqa: E501 + raise ValueError("Invalid value for `parent_id`, must not be `None`") # noqa: E501 + + self._parent_id = parent_id + + @property + def new_img(self): + """Gets the new_img of this ListActivitiesResponseDataList. # noqa: E501 + + New activity image URL (light mode) # noqa: E501 + + :return: The new_img of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._new_img + + @new_img.setter + def new_img(self, new_img): + """Sets the new_img of this ListActivitiesResponseDataList. + + New activity image URL (light mode) # noqa: E501 + + :param new_img: The new_img of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and new_img is None: # noqa: E501 + raise ValueError("Invalid value for `new_img`, must not be `None`") # noqa: E501 + + self._new_img = new_img + + @property + def new_img_dark(self): + """Gets the new_img_dark of this ListActivitiesResponseDataList. # noqa: E501 + + New activity image URL (dark mode) # noqa: E501 + + :return: The new_img_dark of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._new_img_dark + + @new_img_dark.setter + def new_img_dark(self, new_img_dark): + """Sets the new_img_dark of this ListActivitiesResponseDataList. + + New activity image URL (dark mode) # noqa: E501 + + :param new_img_dark: The new_img_dark of this ListActivitiesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and new_img_dark is None: # noqa: E501 + raise ValueError("Invalid value for `new_img_dark`, must not be `None`") # noqa: E501 + + self._new_img_dark = new_img_dark + + @property + def tag(self): + """Gets the tag of this ListActivitiesResponseDataList. # noqa: E501 + + Activity tag list # noqa: E501 + + :return: The tag of this ListActivitiesResponseDataList. # noqa: E501 + :rtype: list[str] + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this ListActivitiesResponseDataList. + + Activity tag list # noqa: E501 + + :param tag: The tag of this ListActivitiesResponseDataList. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and tag is None: # noqa: E501 + raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 + + self._tag = tag + + 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, ListActivitiesResponseDataList): + 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, ListActivitiesResponseDataList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_activity_types_response.py b/gate_api/models/list_activity_types_response.py new file mode 100644 index 00000000..9dfae25b --- /dev/null +++ b/gate_api/models/list_activity_types_response.py @@ -0,0 +1,209 @@ +# 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 ListActivityTypesResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'ListActivityTypesResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, ListActivityTypesResponseData, int, Configuration) -> None + """ListActivityTypesResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ListActivityTypesResponse. # noqa: E501 + + Response status code, 0 means success # noqa: E501 + + :return: The code of this ListActivityTypesResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListActivityTypesResponse. + + Response status code, 0 means success # noqa: E501 + + :param code: The code of this ListActivityTypesResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this ListActivityTypesResponse. # noqa: E501 + + 响应消息,成功时为 \"success\" # noqa: E501 + + :return: The message of this ListActivityTypesResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListActivityTypesResponse. + + 响应消息,成功时为 \"success\" # noqa: E501 + + :param message: The message of this ListActivityTypesResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ListActivityTypesResponse. # noqa: E501 + + + :return: The data of this ListActivityTypesResponse. # noqa: E501 + :rtype: ListActivityTypesResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListActivityTypesResponse. + + + :param data: The data of this ListActivityTypesResponse. # noqa: E501 + :type: ListActivityTypesResponseData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ListActivityTypesResponse. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this ListActivityTypesResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ListActivityTypesResponse. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this ListActivityTypesResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ListActivityTypesResponse): + 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, ListActivityTypesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_activity_types_response_data.py b/gate_api/models/list_activity_types_response_data.py new file mode 100644 index 00000000..fcb8a81c --- /dev/null +++ b/gate_api/models/list_activity_types_response_data.py @@ -0,0 +1,124 @@ +# 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 ListActivityTypesResponseData(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[ListActivityTypesResponseDataList]' + } + + attribute_map = { + 'list': 'list' + } + + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[ListActivityTypesResponseDataList], Configuration) -> None + """ListActivityTypesResponseData - 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 + + self.list = list + + @property + def list(self): + """Gets the list of this ListActivityTypesResponseData. # noqa: E501 + + Activity type list # noqa: E501 + + :return: The list of this ListActivityTypesResponseData. # noqa: E501 + :rtype: list[ListActivityTypesResponseDataList] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this ListActivityTypesResponseData. + + Activity type list # noqa: E501 + + :param list: The list of this ListActivityTypesResponseData. # noqa: E501 + :type: list[ListActivityTypesResponseDataList] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + 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, ListActivityTypesResponseData): + 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, ListActivityTypesResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_activity_types_response_data_list.py b/gate_api/models/list_activity_types_response_data_list.py new file mode 100644 index 00000000..9fc060d3 --- /dev/null +++ b/gate_api/models/list_activity_types_response_data_list.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 ListActivityTypesResponseDataList(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', + 'name': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name' + } + + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """ListActivityTypesResponseDataList - 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._name = None + self.discriminator = None + + self.id = id + self.name = name + + @property + def id(self): + """Gets the id of this ListActivityTypesResponseDataList. # noqa: E501 + + Activity type ID # noqa: E501 + + :return: The id of this ListActivityTypesResponseDataList. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListActivityTypesResponseDataList. + + Activity type ID # noqa: E501 + + :param id: The id of this ListActivityTypesResponseDataList. # noqa: E501 + :type: int + """ + 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 name(self): + """Gets the name of this ListActivityTypesResponseDataList. # noqa: E501 + + Activity type name # noqa: E501 + + :return: The name of this ListActivityTypesResponseDataList. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListActivityTypesResponseDataList. + + Activity type name # noqa: E501 + + :param name: The name of this ListActivityTypesResponseDataList. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + 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, ListActivityTypesResponseDataList): + 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, ListActivityTypesResponseDataList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_earn_fixed_term_history_response.py b/gate_api/models/list_earn_fixed_term_history_response.py new file mode 100644 index 00000000..1326f78b --- /dev/null +++ b/gate_api/models/list_earn_fixed_term_history_response.py @@ -0,0 +1,205 @@ +# 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 ListEarnFixedTermHistoryResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'ListEarnFixedTermHistoryResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, ListEarnFixedTermHistoryResponseData, int, Configuration) -> None + """ListEarnFixedTermHistoryResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ListEarnFixedTermHistoryResponse. # noqa: E501 + + Return code, 0 means success # noqa: E501 + + :return: The code of this ListEarnFixedTermHistoryResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListEarnFixedTermHistoryResponse. + + Return code, 0 means success # noqa: E501 + + :param code: The code of this ListEarnFixedTermHistoryResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this ListEarnFixedTermHistoryResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this ListEarnFixedTermHistoryResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListEarnFixedTermHistoryResponse. + + Response message # noqa: E501 + + :param message: The message of this ListEarnFixedTermHistoryResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ListEarnFixedTermHistoryResponse. # noqa: E501 + + + :return: The data of this ListEarnFixedTermHistoryResponse. # noqa: E501 + :rtype: ListEarnFixedTermHistoryResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListEarnFixedTermHistoryResponse. + + + :param data: The data of this ListEarnFixedTermHistoryResponse. # noqa: E501 + :type: ListEarnFixedTermHistoryResponseData + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ListEarnFixedTermHistoryResponse. # noqa: E501 + + Response timestamp (in seconds) # noqa: E501 + + :return: The timestamp of this ListEarnFixedTermHistoryResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ListEarnFixedTermHistoryResponse. + + Response timestamp (in seconds) # noqa: E501 + + :param timestamp: The timestamp of this ListEarnFixedTermHistoryResponse. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, ListEarnFixedTermHistoryResponse): + 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, ListEarnFixedTermHistoryResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_earn_fixed_term_history_response_data.py b/gate_api/models/list_earn_fixed_term_history_response_data.py new file mode 100644 index 00000000..3f9dada1 --- /dev/null +++ b/gate_api/models/list_earn_fixed_term_history_response_data.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 ListEarnFixedTermHistoryResponseData(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[FixedTermHistoryRecord]', + 'total': 'int' + } + + attribute_map = { + 'list': 'list', + 'total': 'total' + } + + def __init__(self, list=None, total=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FixedTermHistoryRecord], int, Configuration) -> None + """ListEarnFixedTermHistoryResponseData - 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._total = None + self.discriminator = None + + if list is not None: + self.list = list + if total is not None: + self.total = total + + @property + def list(self): + """Gets the list of this ListEarnFixedTermHistoryResponseData. # noqa: E501 + + + :return: The list of this ListEarnFixedTermHistoryResponseData. # noqa: E501 + :rtype: list[FixedTermHistoryRecord] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this ListEarnFixedTermHistoryResponseData. + + + :param list: The list of this ListEarnFixedTermHistoryResponseData. # noqa: E501 + :type: list[FixedTermHistoryRecord] + """ + + self._list = list + + @property + def total(self): + """Gets the total of this ListEarnFixedTermHistoryResponseData. # noqa: E501 + + Total Records # noqa: E501 + + :return: The total of this ListEarnFixedTermHistoryResponseData. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListEarnFixedTermHistoryResponseData. + + Total Records # noqa: E501 + + :param total: The total of this ListEarnFixedTermHistoryResponseData. # noqa: E501 + :type: int + """ + + self._total = total + + 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, ListEarnFixedTermHistoryResponseData): + 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, ListEarnFixedTermHistoryResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_earn_fixed_term_lends_response.py b/gate_api/models/list_earn_fixed_term_lends_response.py new file mode 100644 index 00000000..702359f9 --- /dev/null +++ b/gate_api/models/list_earn_fixed_term_lends_response.py @@ -0,0 +1,209 @@ +# 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 ListEarnFixedTermLendsResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'ListEarnFixedTermLendsResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, ListEarnFixedTermLendsResponseData, int, Configuration) -> None + """ListEarnFixedTermLendsResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ListEarnFixedTermLendsResponse. # noqa: E501 + + Return code, 0 means success # noqa: E501 + + :return: The code of this ListEarnFixedTermLendsResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListEarnFixedTermLendsResponse. + + Return code, 0 means success # noqa: E501 + + :param code: The code of this ListEarnFixedTermLendsResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this ListEarnFixedTermLendsResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this ListEarnFixedTermLendsResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListEarnFixedTermLendsResponse. + + Response message # noqa: E501 + + :param message: The message of this ListEarnFixedTermLendsResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ListEarnFixedTermLendsResponse. # noqa: E501 + + + :return: The data of this ListEarnFixedTermLendsResponse. # noqa: E501 + :rtype: ListEarnFixedTermLendsResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListEarnFixedTermLendsResponse. + + + :param data: The data of this ListEarnFixedTermLendsResponse. # noqa: E501 + :type: ListEarnFixedTermLendsResponseData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ListEarnFixedTermLendsResponse. # noqa: E501 + + Response timestamp (in seconds) # noqa: E501 + + :return: The timestamp of this ListEarnFixedTermLendsResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ListEarnFixedTermLendsResponse. + + Response timestamp (in seconds) # noqa: E501 + + :param timestamp: The timestamp of this ListEarnFixedTermLendsResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ListEarnFixedTermLendsResponse): + 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, ListEarnFixedTermLendsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_earn_fixed_term_lends_response_data.py b/gate_api/models/list_earn_fixed_term_lends_response_data.py new file mode 100644 index 00000000..635563a2 --- /dev/null +++ b/gate_api/models/list_earn_fixed_term_lends_response_data.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 ListEarnFixedTermLendsResponseData(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[FixedTermLendOrder]', + 'total': 'int' + } + + attribute_map = { + 'list': 'list', + 'total': 'total' + } + + def __init__(self, list=None, total=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FixedTermLendOrder], int, Configuration) -> None + """ListEarnFixedTermLendsResponseData - 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._total = None + self.discriminator = None + + self.list = list + self.total = total + + @property + def list(self): + """Gets the list of this ListEarnFixedTermLendsResponseData. # noqa: E501 + + Subscription order list # noqa: E501 + + :return: The list of this ListEarnFixedTermLendsResponseData. # noqa: E501 + :rtype: list[FixedTermLendOrder] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this ListEarnFixedTermLendsResponseData. + + Subscription order list # noqa: E501 + + :param list: The list of this ListEarnFixedTermLendsResponseData. # noqa: E501 + :type: list[FixedTermLendOrder] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + self._list = list + + @property + def total(self): + """Gets the total of this ListEarnFixedTermLendsResponseData. # noqa: E501 + + Total Records # noqa: E501 + + :return: The total of this ListEarnFixedTermLendsResponseData. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListEarnFixedTermLendsResponseData. + + Total Records # noqa: E501 + + :param total: The total of this ListEarnFixedTermLendsResponseData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 + raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 + + self._total = total + + 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, ListEarnFixedTermLendsResponseData): + 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, ListEarnFixedTermLendsResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_earn_fixed_term_products_by_asset_response.py b/gate_api/models/list_earn_fixed_term_products_by_asset_response.py new file mode 100644 index 00000000..b9d470ca --- /dev/null +++ b/gate_api/models/list_earn_fixed_term_products_by_asset_response.py @@ -0,0 +1,209 @@ +# 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 ListEarnFixedTermProductsByAssetResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'ListEarnFixedTermProductsByAssetResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, ListEarnFixedTermProductsByAssetResponseData, int, Configuration) -> None + """ListEarnFixedTermProductsByAssetResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + + Return code, 0 means success # noqa: E501 + + :return: The code of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListEarnFixedTermProductsByAssetResponse. + + Return code, 0 means success # noqa: E501 + + :param code: The code of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListEarnFixedTermProductsByAssetResponse. + + Response message # noqa: E501 + + :param message: The message of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + + + :return: The data of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + :rtype: ListEarnFixedTermProductsByAssetResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListEarnFixedTermProductsByAssetResponse. + + + :param data: The data of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + :type: ListEarnFixedTermProductsByAssetResponseData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + + Response timestamp (in seconds) # noqa: E501 + + :return: The timestamp of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ListEarnFixedTermProductsByAssetResponse. + + Response timestamp (in seconds) # noqa: E501 + + :param timestamp: The timestamp of this ListEarnFixedTermProductsByAssetResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ListEarnFixedTermProductsByAssetResponse): + 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, ListEarnFixedTermProductsByAssetResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_earn_fixed_term_products_by_asset_response_data.py b/gate_api/models/list_earn_fixed_term_products_by_asset_response_data.py new file mode 100644 index 00000000..587ea155 --- /dev/null +++ b/gate_api/models/list_earn_fixed_term_products_by_asset_response_data.py @@ -0,0 +1,124 @@ +# 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 ListEarnFixedTermProductsByAssetResponseData(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[FixedTermProductSimple]' + } + + attribute_map = { + 'list': 'list' + } + + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FixedTermProductSimple], Configuration) -> None + """ListEarnFixedTermProductsByAssetResponseData - 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 + + self.list = list + + @property + def list(self): + """Gets the list of this ListEarnFixedTermProductsByAssetResponseData. # noqa: E501 + + Product list # noqa: E501 + + :return: The list of this ListEarnFixedTermProductsByAssetResponseData. # noqa: E501 + :rtype: list[FixedTermProductSimple] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this ListEarnFixedTermProductsByAssetResponseData. + + Product list # noqa: E501 + + :param list: The list of this ListEarnFixedTermProductsByAssetResponseData. # noqa: E501 + :type: list[FixedTermProductSimple] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + 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, ListEarnFixedTermProductsByAssetResponseData): + 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, ListEarnFixedTermProductsByAssetResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_earn_fixed_term_products_response.py b/gate_api/models/list_earn_fixed_term_products_response.py new file mode 100644 index 00000000..c85145f3 --- /dev/null +++ b/gate_api/models/list_earn_fixed_term_products_response.py @@ -0,0 +1,209 @@ +# 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 ListEarnFixedTermProductsResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'ListEarnFixedTermProductsResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, ListEarnFixedTermProductsResponseData, int, Configuration) -> None + """ListEarnFixedTermProductsResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this ListEarnFixedTermProductsResponse. # noqa: E501 + + Return code, 0 means success # noqa: E501 + + :return: The code of this ListEarnFixedTermProductsResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListEarnFixedTermProductsResponse. + + Return code, 0 means success # noqa: E501 + + :param code: The code of this ListEarnFixedTermProductsResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this ListEarnFixedTermProductsResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this ListEarnFixedTermProductsResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListEarnFixedTermProductsResponse. + + Response message # noqa: E501 + + :param message: The message of this ListEarnFixedTermProductsResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this ListEarnFixedTermProductsResponse. # noqa: E501 + + + :return: The data of this ListEarnFixedTermProductsResponse. # noqa: E501 + :rtype: ListEarnFixedTermProductsResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListEarnFixedTermProductsResponse. + + + :param data: The data of this ListEarnFixedTermProductsResponse. # noqa: E501 + :type: ListEarnFixedTermProductsResponseData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ListEarnFixedTermProductsResponse. # noqa: E501 + + Response timestamp (in seconds) # noqa: E501 + + :return: The timestamp of this ListEarnFixedTermProductsResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ListEarnFixedTermProductsResponse. + + Response timestamp (in seconds) # noqa: E501 + + :param timestamp: The timestamp of this ListEarnFixedTermProductsResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, ListEarnFixedTermProductsResponse): + 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, ListEarnFixedTermProductsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_earn_fixed_term_products_response_data.py b/gate_api/models/list_earn_fixed_term_products_response_data.py new file mode 100644 index 00000000..059d6a68 --- /dev/null +++ b/gate_api/models/list_earn_fixed_term_products_response_data.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 ListEarnFixedTermProductsResponseData(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[FixedTermProduct]', + 'total': 'int' + } + + attribute_map = { + 'list': 'list', + 'total': 'total' + } + + def __init__(self, list=None, total=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FixedTermProduct], int, Configuration) -> None + """ListEarnFixedTermProductsResponseData - 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._total = None + self.discriminator = None + + self.list = list + self.total = total + + @property + def list(self): + """Gets the list of this ListEarnFixedTermProductsResponseData. # noqa: E501 + + Product list # noqa: E501 + + :return: The list of this ListEarnFixedTermProductsResponseData. # noqa: E501 + :rtype: list[FixedTermProduct] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this ListEarnFixedTermProductsResponseData. + + Product list # noqa: E501 + + :param list: The list of this ListEarnFixedTermProductsResponseData. # noqa: E501 + :type: list[FixedTermProduct] + """ + if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 + raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 + + self._list = list + + @property + def total(self): + """Gets the total of this ListEarnFixedTermProductsResponseData. # noqa: E501 + + Total Records # noqa: E501 + + :return: The total of this ListEarnFixedTermProductsResponseData. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListEarnFixedTermProductsResponseData. + + Total Records # noqa: E501 + + :param total: The total of this ListEarnFixedTermProductsResponseData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 + raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 + + self._total = total + + 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, ListEarnFixedTermProductsResponseData): + 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, ListEarnFixedTermProductsResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_live_replay_error.py b/gate_api/models/list_live_replay_error.py new file mode 100644 index 00000000..2ebf9911 --- /dev/null +++ b/gate_api/models/list_live_replay_error.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 ListLiveReplayError(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 = { + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'label': 'label', + 'message': 'message' + } + + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """ListLiveReplayError - 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._label = None + self._message = None + self.discriminator = None + + if label is not None: + self.label = label + if message is not None: + self.message = message + + @property + def label(self): + """Gets the label of this ListLiveReplayError. # noqa: E501 + + Error identifier code # noqa: E501 + + :return: The label of this ListLiveReplayError. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ListLiveReplayError. + + Error identifier code # noqa: E501 + + :param label: The label of this ListLiveReplayError. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ListLiveReplayError. # noqa: E501 + + Error details # noqa: E501 + + :return: The message of this ListLiveReplayError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListLiveReplayError. + + Error details # noqa: E501 + + :param message: The message of this ListLiveReplayError. # 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, ListLiveReplayError): + 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, ListLiveReplayError): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_live_replay_response.py b/gate_api/models/list_live_replay_response.py new file mode 100644 index 00000000..8fe1e410 --- /dev/null +++ b/gate_api/models/list_live_replay_response.py @@ -0,0 +1,233 @@ +# 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 ListLiveReplayResponse(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'request_id': 'str', + 'data': 'ListLiveReplayResponseData' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'request_id': 'request_id', + 'data': 'data' + } + + def __init__(self, code=None, label=None, message=None, request_id=None, data=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, ListLiveReplayResponseData, Configuration) -> None + """ListLiveReplayResponse - 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._code = None + self._label = None + self._message = None + self._request_id = None + self._data = None + self.discriminator = None + + if code is not None: + self.code = code + if label is not None: + self.label = label + if message is not None: + self.message = message + if request_id is not None: + self.request_id = request_id + if data is not None: + self.data = data + + @property + def code(self): + """Gets the code of this ListLiveReplayResponse. # noqa: E501 + + Status code, 200 = success # noqa: E501 + + :return: The code of this ListLiveReplayResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListLiveReplayResponse. + + Status code, 200 = success # noqa: E501 + + :param code: The code of this ListLiveReplayResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def label(self): + """Gets the label of this ListLiveReplayResponse. # noqa: E501 + + Status label # noqa: E501 + + :return: The label of this ListLiveReplayResponse. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ListLiveReplayResponse. + + Status label # noqa: E501 + + :param label: The label of this ListLiveReplayResponse. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ListLiveReplayResponse. # noqa: E501 + + Status message # noqa: E501 + + :return: The message of this ListLiveReplayResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListLiveReplayResponse. + + Status message # noqa: E501 + + :param message: The message of this ListLiveReplayResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def request_id(self): + """Gets the request_id of this ListLiveReplayResponse. # noqa: E501 + + Request ID # noqa: E501 + + :return: The request_id of this ListLiveReplayResponse. # noqa: E501 + :rtype: str + """ + return self._request_id + + @request_id.setter + def request_id(self, request_id): + """Sets the request_id of this ListLiveReplayResponse. + + Request ID # noqa: E501 + + :param request_id: The request_id of this ListLiveReplayResponse. # noqa: E501 + :type: str + """ + + self._request_id = request_id + + @property + def data(self): + """Gets the data of this ListLiveReplayResponse. # noqa: E501 + + + :return: The data of this ListLiveReplayResponse. # noqa: E501 + :rtype: ListLiveReplayResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListLiveReplayResponse. + + + :param data: The data of this ListLiveReplayResponse. # noqa: E501 + :type: ListLiveReplayResponseData + """ + + self._data = data + + 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, ListLiveReplayResponse): + 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, ListLiveReplayResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_live_replay_response_data.py b/gate_api/models/list_live_replay_response_data.py new file mode 100644 index 00000000..9a947a36 --- /dev/null +++ b/gate_api/models/list_live_replay_response_data.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 ListLiveReplayResponseData(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[ListLiveReplayResponseDataList]' + } + + attribute_map = { + 'list': 'list' + } + + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[ListLiveReplayResponseDataList], Configuration) -> None + """ListLiveReplayResponseData - 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 ListLiveReplayResponseData. # noqa: E501 + + Live stream/replay list # noqa: E501 + + :return: The list of this ListLiveReplayResponseData. # noqa: E501 + :rtype: list[ListLiveReplayResponseDataList] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this ListLiveReplayResponseData. + + Live stream/replay list # noqa: E501 + + :param list: The list of this ListLiveReplayResponseData. # noqa: E501 + :type: list[ListLiveReplayResponseDataList] + """ + + 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, ListLiveReplayResponseData): + 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, ListLiveReplayResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_live_replay_response_data_list.py b/gate_api/models/list_live_replay_response_data_list.py new file mode 100644 index 00000000..42cdd12b --- /dev/null +++ b/gate_api/models/list_live_replay_response_data_list.py @@ -0,0 +1,175 @@ +# 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 ListLiveReplayResponseDataList(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 = { + 'content_type': 'str', + 'live': 'ListLiveReplayResponseDataLive', + 'video': 'ListLiveReplayResponseDataVideo' + } + + attribute_map = { + 'content_type': 'content_type', + 'live': 'live', + 'video': 'video' + } + + def __init__(self, content_type=None, live=None, video=None, local_vars_configuration=None): # noqa: E501 + # type: (str, ListLiveReplayResponseDataLive, ListLiveReplayResponseDataVideo, Configuration) -> None + """ListLiveReplayResponseDataList - 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._content_type = None + self._live = None + self._video = None + self.discriminator = None + + if content_type is not None: + self.content_type = content_type + if live is not None: + self.live = live + if video is not None: + self.video = video + + @property + def content_type(self): + """Gets the content_type of this ListLiveReplayResponseDataList. # noqa: E501 + + Content type: streaming = live broadcast, video = replay video # noqa: E501 + + :return: The content_type of this ListLiveReplayResponseDataList. # noqa: E501 + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content_type of this ListLiveReplayResponseDataList. + + Content type: streaming = live broadcast, video = replay video # noqa: E501 + + :param content_type: The content_type of this ListLiveReplayResponseDataList. # noqa: E501 + :type: str + """ + + self._content_type = content_type + + @property + def live(self): + """Gets the live of this ListLiveReplayResponseDataList. # noqa: E501 + + + :return: The live of this ListLiveReplayResponseDataList. # noqa: E501 + :rtype: ListLiveReplayResponseDataLive + """ + return self._live + + @live.setter + def live(self, live): + """Sets the live of this ListLiveReplayResponseDataList. + + + :param live: The live of this ListLiveReplayResponseDataList. # noqa: E501 + :type: ListLiveReplayResponseDataLive + """ + + self._live = live + + @property + def video(self): + """Gets the video of this ListLiveReplayResponseDataList. # noqa: E501 + + + :return: The video of this ListLiveReplayResponseDataList. # noqa: E501 + :rtype: ListLiveReplayResponseDataVideo + """ + return self._video + + @video.setter + def video(self, video): + """Sets the video of this ListLiveReplayResponseDataList. + + + :param video: The video of this ListLiveReplayResponseDataList. # noqa: E501 + :type: ListLiveReplayResponseDataVideo + """ + + self._video = video + + 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, ListLiveReplayResponseDataList): + 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, ListLiveReplayResponseDataList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_live_replay_response_data_live.py b/gate_api/models/list_live_replay_response_data_live.py new file mode 100644 index 00000000..4b251174 --- /dev/null +++ b/gate_api/models/list_live_replay_response_data_live.py @@ -0,0 +1,429 @@ +# 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 ListLiveReplayResponseDataLive(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', + 'uid': 'str', + 'chat_group_id': 'str', + 'name': 'str', + 'cover': 'str', + 'started_at': 'str', + 'subscription_required': 'bool', + 'hot_weight': 'int', + 'live_type': 'int', + 'session_id': 'str', + 'host': 'ListLiveReplayResponseDataLiveHost', + 'status': 'str' + } + + attribute_map = { + 'id': 'id', + 'uid': 'uid', + 'chat_group_id': 'chat_group_id', + 'name': 'name', + 'cover': 'cover', + 'started_at': 'started_at', + 'subscription_required': 'subscription_required', + 'hot_weight': 'hot_weight', + 'live_type': 'live_type', + 'session_id': 'session_id', + 'host': 'host', + 'status': 'status' + } + + def __init__(self, id=None, uid=None, chat_group_id=None, name=None, cover=None, started_at=None, subscription_required=None, hot_weight=None, live_type=None, session_id=None, host=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, bool, int, int, str, ListLiveReplayResponseDataLiveHost, str, Configuration) -> None + """ListLiveReplayResponseDataLive - 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._uid = None + self._chat_group_id = None + self._name = None + self._cover = None + self._started_at = None + self._subscription_required = None + self._hot_weight = None + self._live_type = None + self._session_id = None + self._host = None + self._status = None + self.discriminator = None + + if id is not None: + self.id = id + if uid is not None: + self.uid = uid + if chat_group_id is not None: + self.chat_group_id = chat_group_id + if name is not None: + self.name = name + if cover is not None: + self.cover = cover + if started_at is not None: + self.started_at = started_at + if subscription_required is not None: + self.subscription_required = subscription_required + if hot_weight is not None: + self.hot_weight = hot_weight + if live_type is not None: + self.live_type = live_type + if session_id is not None: + self.session_id = session_id + if host is not None: + self.host = host + if status is not None: + self.status = status + + @property + def id(self): + """Gets the id of this ListLiveReplayResponseDataLive. # noqa: E501 + + Live ID # noqa: E501 + + :return: The id of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListLiveReplayResponseDataLive. + + Live ID # noqa: E501 + + :param id: The id of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def uid(self): + """Gets the uid of this ListLiveReplayResponseDataLive. # noqa: E501 + + Anchor User ID # noqa: E501 + + :return: The uid of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this ListLiveReplayResponseDataLive. + + Anchor User ID # noqa: E501 + + :param uid: The uid of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def chat_group_id(self): + """Gets the chat_group_id of this ListLiveReplayResponseDataLive. # noqa: E501 + + Chat group ID # noqa: E501 + + :return: The chat_group_id of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: str + """ + return self._chat_group_id + + @chat_group_id.setter + def chat_group_id(self, chat_group_id): + """Sets the chat_group_id of this ListLiveReplayResponseDataLive. + + Chat group ID # noqa: E501 + + :param chat_group_id: The chat_group_id of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: str + """ + + self._chat_group_id = chat_group_id + + @property + def name(self): + """Gets the name of this ListLiveReplayResponseDataLive. # noqa: E501 + + Live room name # noqa: E501 + + :return: The name of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListLiveReplayResponseDataLive. + + Live room name # noqa: E501 + + :param name: The name of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def cover(self): + """Gets the cover of this ListLiveReplayResponseDataLive. # noqa: E501 + + Cover image URL # noqa: E501 + + :return: The cover of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: str + """ + return self._cover + + @cover.setter + def cover(self, cover): + """Sets the cover of this ListLiveReplayResponseDataLive. + + Cover image URL # noqa: E501 + + :param cover: The cover of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: str + """ + + self._cover = cover + + @property + def started_at(self): + """Gets the started_at of this ListLiveReplayResponseDataLive. # noqa: E501 + + Broadcast start time (Unix timestamp string) # noqa: E501 + + :return: The started_at of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: str + """ + return self._started_at + + @started_at.setter + def started_at(self, started_at): + """Sets the started_at of this ListLiveReplayResponseDataLive. + + Broadcast start time (Unix timestamp string) # noqa: E501 + + :param started_at: The started_at of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: str + """ + + self._started_at = started_at + + @property + def subscription_required(self): + """Gets the subscription_required of this ListLiveReplayResponseDataLive. # noqa: E501 + + Whether subscription is required # noqa: E501 + + :return: The subscription_required of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: bool + """ + return self._subscription_required + + @subscription_required.setter + def subscription_required(self, subscription_required): + """Sets the subscription_required of this ListLiveReplayResponseDataLive. + + Whether subscription is required # noqa: E501 + + :param subscription_required: The subscription_required of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: bool + """ + + self._subscription_required = subscription_required + + @property + def hot_weight(self): + """Gets the hot_weight of this ListLiveReplayResponseDataLive. # noqa: E501 + + Popularity weight # noqa: E501 + + :return: The hot_weight of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: int + """ + return self._hot_weight + + @hot_weight.setter + def hot_weight(self, hot_weight): + """Sets the hot_weight of this ListLiveReplayResponseDataLive. + + Popularity weight # noqa: E501 + + :param hot_weight: The hot_weight of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: int + """ + + self._hot_weight = hot_weight + + @property + def live_type(self): + """Gets the live_type of this ListLiveReplayResponseDataLive. # noqa: E501 + + Live stream type # noqa: E501 + + :return: The live_type of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: int + """ + return self._live_type + + @live_type.setter + def live_type(self, live_type): + """Sets the live_type of this ListLiveReplayResponseDataLive. + + Live stream type # noqa: E501 + + :param live_type: The live_type of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: int + """ + + self._live_type = live_type + + @property + def session_id(self): + """Gets the session_id of this ListLiveReplayResponseDataLive. # noqa: E501 + + Session ID # noqa: E501 + + :return: The session_id of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: str + """ + return self._session_id + + @session_id.setter + def session_id(self, session_id): + """Sets the session_id of this ListLiveReplayResponseDataLive. + + Session ID # noqa: E501 + + :param session_id: The session_id of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: str + """ + + self._session_id = session_id + + @property + def host(self): + """Gets the host of this ListLiveReplayResponseDataLive. # noqa: E501 + + + :return: The host of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: ListLiveReplayResponseDataLiveHost + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this ListLiveReplayResponseDataLive. + + + :param host: The host of this ListLiveReplayResponseDataLive. # noqa: E501 + :type: ListLiveReplayResponseDataLiveHost + """ + + self._host = host + + @property + def status(self): + """Gets the status of this ListLiveReplayResponseDataLive. # noqa: E501 + + Live stream status (e.g., streaming) # noqa: E501 + + :return: The status of this ListLiveReplayResponseDataLive. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListLiveReplayResponseDataLive. + + Live stream status (e.g., streaming) # noqa: E501 + + :param status: The status of this ListLiveReplayResponseDataLive. # 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, ListLiveReplayResponseDataLive): + 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, ListLiveReplayResponseDataLive): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_live_replay_response_data_live_host.py b/gate_api/models/list_live_replay_response_data_live_host.py new file mode 100644 index 00000000..80f16ac2 --- /dev/null +++ b/gate_api/models/list_live_replay_response_data_live_host.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 ListLiveReplayResponseDataLiveHost(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', + 'name': 'str', + 'avatar': 'str', + 'fans': 'int', + 'tier': 'int' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'avatar': 'avatar', + 'fans': 'fans', + 'tier': 'tier' + } + + def __init__(self, id=None, name=None, avatar=None, fans=None, tier=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, int, Configuration) -> None + """ListLiveReplayResponseDataLiveHost - 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._name = None + self._avatar = None + self._fans = None + self._tier = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if avatar is not None: + self.avatar = avatar + if fans is not None: + self.fans = fans + if tier is not None: + self.tier = tier + + @property + def id(self): + """Gets the id of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + + Streamer ID # noqa: E501 + + :return: The id of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListLiveReplayResponseDataLiveHost. + + Streamer ID # noqa: E501 + + :param id: The id of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + + Streamer nickname # noqa: E501 + + :return: The name of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListLiveReplayResponseDataLiveHost. + + Streamer nickname # noqa: E501 + + :param name: The name of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def avatar(self): + """Gets the avatar of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + + Streamer avatar URL # noqa: E501 + + :return: The avatar of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :rtype: str + """ + return self._avatar + + @avatar.setter + def avatar(self, avatar): + """Sets the avatar of this ListLiveReplayResponseDataLiveHost. + + Streamer avatar URL # noqa: E501 + + :param avatar: The avatar of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :type: str + """ + + self._avatar = avatar + + @property + def fans(self): + """Gets the fans of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + + Follower count # noqa: E501 + + :return: The fans of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :rtype: int + """ + return self._fans + + @fans.setter + def fans(self, fans): + """Sets the fans of this ListLiveReplayResponseDataLiveHost. + + Follower count # noqa: E501 + + :param fans: The fans of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :type: int + """ + + self._fans = fans + + @property + def tier(self): + """Gets the tier of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + + Streamer level # noqa: E501 + + :return: The tier of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :rtype: int + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this ListLiveReplayResponseDataLiveHost. + + Streamer level # noqa: E501 + + :param tier: The tier of this ListLiveReplayResponseDataLiveHost. # noqa: E501 + :type: int + """ + + self._tier = tier + + 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, ListLiveReplayResponseDataLiveHost): + 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, ListLiveReplayResponseDataLiveHost): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_live_replay_response_data_video.py b/gate_api/models/list_live_replay_response_data_video.py new file mode 100644 index 00000000..a3f537fa --- /dev/null +++ b/gate_api/models/list_live_replay_response_data_video.py @@ -0,0 +1,598 @@ +# 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 ListLiveReplayResponseDataVideo(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', + 'stream_id': 'str', + 'title': 'str', + 'avatar': 'str', + 'nick': 'str', + 'nick_en': 'str', + 'cover': 'str', + 'watched': 'int', + 'subscription_required': 'bool', + 'has_subscribed': 'bool', + 'duration': 'int', + 'weight': 'int', + 'moments_uid': 'str', + 'session_id': 'str', + 'ended_at_format': 'str', + 'ended_at_type': 'int', + 'tier': 'int', + 'tag': 'str' + } + + attribute_map = { + 'id': 'id', + 'stream_id': 'stream_id', + 'title': 'title', + 'avatar': 'avatar', + 'nick': 'nick', + 'nick_en': 'nick_en', + 'cover': 'cover', + 'watched': 'watched', + 'subscription_required': 'subscription_required', + 'has_subscribed': 'has_subscribed', + 'duration': 'duration', + 'weight': 'weight', + 'moments_uid': 'moments_uid', + 'session_id': 'session_id', + 'ended_at_format': 'ended_at_format', + 'ended_at_type': 'ended_at_type', + 'tier': 'tier', + 'tag': 'tag' + } + + def __init__(self, id=None, stream_id=None, title=None, avatar=None, nick=None, nick_en=None, cover=None, watched=None, subscription_required=None, has_subscribed=None, duration=None, weight=None, moments_uid=None, session_id=None, ended_at_format=None, ended_at_type=None, tier=None, tag=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, int, bool, bool, int, int, str, str, str, int, int, str, Configuration) -> None + """ListLiveReplayResponseDataVideo - 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._stream_id = None + self._title = None + self._avatar = None + self._nick = None + self._nick_en = None + self._cover = None + self._watched = None + self._subscription_required = None + self._has_subscribed = None + self._duration = None + self._weight = None + self._moments_uid = None + self._session_id = None + self._ended_at_format = None + self._ended_at_type = None + self._tier = None + self._tag = None + self.discriminator = None + + if id is not None: + self.id = id + if stream_id is not None: + self.stream_id = stream_id + if title is not None: + self.title = title + if avatar is not None: + self.avatar = avatar + if nick is not None: + self.nick = nick + if nick_en is not None: + self.nick_en = nick_en + if cover is not None: + self.cover = cover + if watched is not None: + self.watched = watched + if subscription_required is not None: + self.subscription_required = subscription_required + if has_subscribed is not None: + self.has_subscribed = has_subscribed + if duration is not None: + self.duration = duration + if weight is not None: + self.weight = weight + if moments_uid is not None: + self.moments_uid = moments_uid + if session_id is not None: + self.session_id = session_id + if ended_at_format is not None: + self.ended_at_format = ended_at_format + if ended_at_type is not None: + self.ended_at_type = ended_at_type + if tier is not None: + self.tier = tier + self.tag = tag + + @property + def id(self): + """Gets the id of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Video ID # noqa: E501 + + :return: The id of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListLiveReplayResponseDataVideo. + + Video ID # noqa: E501 + + :param id: The id of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def stream_id(self): + """Gets the stream_id of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Live stream ID # noqa: E501 + + :return: The stream_id of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._stream_id + + @stream_id.setter + def stream_id(self, stream_id): + """Sets the stream_id of this ListLiveReplayResponseDataVideo. + + Live stream ID # noqa: E501 + + :param stream_id: The stream_id of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._stream_id = stream_id + + @property + def title(self): + """Gets the title of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Video Title # noqa: E501 + + :return: The title of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this ListLiveReplayResponseDataVideo. + + Video Title # noqa: E501 + + :param title: The title of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def avatar(self): + """Gets the avatar of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Author avatar URL # noqa: E501 + + :return: The avatar of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._avatar + + @avatar.setter + def avatar(self, avatar): + """Sets the avatar of this ListLiveReplayResponseDataVideo. + + Author avatar URL # noqa: E501 + + :param avatar: The avatar of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._avatar = avatar + + @property + def nick(self): + """Gets the nick of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Author nickname # noqa: E501 + + :return: The nick of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._nick + + @nick.setter + def nick(self, nick): + """Sets the nick of this ListLiveReplayResponseDataVideo. + + Author nickname # noqa: E501 + + :param nick: The nick of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._nick = nick + + @property + def nick_en(self): + """Gets the nick_en of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Author English nickname # noqa: E501 + + :return: The nick_en of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._nick_en + + @nick_en.setter + def nick_en(self, nick_en): + """Sets the nick_en of this ListLiveReplayResponseDataVideo. + + Author English nickname # noqa: E501 + + :param nick_en: The nick_en of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._nick_en = nick_en + + @property + def cover(self): + """Gets the cover of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Cover image URL # noqa: E501 + + :return: The cover of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._cover + + @cover.setter + def cover(self, cover): + """Sets the cover of this ListLiveReplayResponseDataVideo. + + Cover image URL # noqa: E501 + + :param cover: The cover of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._cover = cover + + @property + def watched(self): + """Gets the watched of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Viewer count # noqa: E501 + + :return: The watched of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: int + """ + return self._watched + + @watched.setter + def watched(self, watched): + """Sets the watched of this ListLiveReplayResponseDataVideo. + + Viewer count # noqa: E501 + + :param watched: The watched of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: int + """ + + self._watched = watched + + @property + def subscription_required(self): + """Gets the subscription_required of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Whether subscription is required # noqa: E501 + + :return: The subscription_required of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: bool + """ + return self._subscription_required + + @subscription_required.setter + def subscription_required(self, subscription_required): + """Sets the subscription_required of this ListLiveReplayResponseDataVideo. + + Whether subscription is required # noqa: E501 + + :param subscription_required: The subscription_required of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: bool + """ + + self._subscription_required = subscription_required + + @property + def has_subscribed(self): + """Gets the has_subscribed of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Whether the current user has subscribed # noqa: E501 + + :return: The has_subscribed of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: bool + """ + return self._has_subscribed + + @has_subscribed.setter + def has_subscribed(self, has_subscribed): + """Sets the has_subscribed of this ListLiveReplayResponseDataVideo. + + Whether the current user has subscribed # noqa: E501 + + :param has_subscribed: The has_subscribed of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: bool + """ + + self._has_subscribed = has_subscribed + + @property + def duration(self): + """Gets the duration of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Video duration (in seconds) # noqa: E501 + + :return: The duration of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: int + """ + return self._duration + + @duration.setter + def duration(self, duration): + """Sets the duration of this ListLiveReplayResponseDataVideo. + + Video duration (in seconds) # noqa: E501 + + :param duration: The duration of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: int + """ + + self._duration = duration + + @property + def weight(self): + """Gets the weight of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Sort weight # noqa: E501 + + :return: The weight of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: int + """ + return self._weight + + @weight.setter + def weight(self, weight): + """Sets the weight of this ListLiveReplayResponseDataVideo. + + Sort weight # noqa: E501 + + :param weight: The weight of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: int + """ + + self._weight = weight + + @property + def moments_uid(self): + """Gets the moments_uid of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Square user ID # noqa: E501 + + :return: The moments_uid of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._moments_uid + + @moments_uid.setter + def moments_uid(self, moments_uid): + """Sets the moments_uid of this ListLiveReplayResponseDataVideo. + + Square user ID # noqa: E501 + + :param moments_uid: The moments_uid of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._moments_uid = moments_uid + + @property + def session_id(self): + """Gets the session_id of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Session ID # noqa: E501 + + :return: The session_id of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._session_id + + @session_id.setter + def session_id(self, session_id): + """Sets the session_id of this ListLiveReplayResponseDataVideo. + + Session ID # noqa: E501 + + :param session_id: The session_id of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._session_id = session_id + + @property + def ended_at_format(self): + """Gets the ended_at_format of this ListLiveReplayResponseDataVideo. # noqa: E501 + + End time format # noqa: E501 + + :return: The ended_at_format of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._ended_at_format + + @ended_at_format.setter + def ended_at_format(self, ended_at_format): + """Sets the ended_at_format of this ListLiveReplayResponseDataVideo. + + End time format # noqa: E501 + + :param ended_at_format: The ended_at_format of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._ended_at_format = ended_at_format + + @property + def ended_at_type(self): + """Gets the ended_at_type of this ListLiveReplayResponseDataVideo. # noqa: E501 + + End time type # noqa: E501 + + :return: The ended_at_type of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: int + """ + return self._ended_at_type + + @ended_at_type.setter + def ended_at_type(self, ended_at_type): + """Sets the ended_at_type of this ListLiveReplayResponseDataVideo. + + End time type # noqa: E501 + + :param ended_at_type: The ended_at_type of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: int + """ + + self._ended_at_type = ended_at_type + + @property + def tier(self): + """Gets the tier of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Author level # noqa: E501 + + :return: The tier of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: int + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this ListLiveReplayResponseDataVideo. + + Author level # noqa: E501 + + :param tier: The tier of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: int + """ + + self._tier = tier + + @property + def tag(self): + """Gets the tag of this ListLiveReplayResponseDataVideo. # noqa: E501 + + Tag # noqa: E501 + + :return: The tag of this ListLiveReplayResponseDataVideo. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this ListLiveReplayResponseDataVideo. + + Tag # noqa: E501 + + :param tag: The tag of this ListLiveReplayResponseDataVideo. # noqa: E501 + :type: str + """ + + self._tag = tag + + 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, ListLiveReplayResponseDataVideo): + 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, ListLiveReplayResponseDataVideo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_square_ai_search_error.py b/gate_api/models/list_square_ai_search_error.py new file mode 100644 index 00000000..b3a6d1d5 --- /dev/null +++ b/gate_api/models/list_square_ai_search_error.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 ListSquareAiSearchError(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 = { + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'label': 'label', + 'message': 'message' + } + + def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """ListSquareAiSearchError - 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._label = None + self._message = None + self.discriminator = None + + if label is not None: + self.label = label + if message is not None: + self.message = message + + @property + def label(self): + """Gets the label of this ListSquareAiSearchError. # noqa: E501 + + Error identifier code # noqa: E501 + + :return: The label of this ListSquareAiSearchError. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ListSquareAiSearchError. + + Error identifier code # noqa: E501 + + :param label: The label of this ListSquareAiSearchError. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ListSquareAiSearchError. # noqa: E501 + + Error details # noqa: E501 + + :return: The message of this ListSquareAiSearchError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListSquareAiSearchError. + + Error details # noqa: E501 + + :param message: The message of this ListSquareAiSearchError. # 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, ListSquareAiSearchError): + 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, ListSquareAiSearchError): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_square_ai_search_response.py b/gate_api/models/list_square_ai_search_response.py new file mode 100644 index 00000000..8389ccbd --- /dev/null +++ b/gate_api/models/list_square_ai_search_response.py @@ -0,0 +1,205 @@ +# 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 ListSquareAiSearchResponse(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 = { + 'code': 'int', + 'label': 'str', + 'msg': 'str', + 'data': 'ListSquareAiSearchResponseData' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'msg': 'msg', + 'data': 'data' + } + + def __init__(self, code=None, label=None, msg=None, data=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, ListSquareAiSearchResponseData, Configuration) -> None + """ListSquareAiSearchResponse - 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._code = None + self._label = None + self._msg = None + self._data = None + self.discriminator = None + + if code is not None: + self.code = code + if label is not None: + self.label = label + if msg is not None: + self.msg = msg + if data is not None: + self.data = data + + @property + def code(self): + """Gets the code of this ListSquareAiSearchResponse. # noqa: E501 + + Status code, 0 = success # noqa: E501 + + :return: The code of this ListSquareAiSearchResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListSquareAiSearchResponse. + + Status code, 0 = success # noqa: E501 + + :param code: The code of this ListSquareAiSearchResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def label(self): + """Gets the label of this ListSquareAiSearchResponse. # noqa: E501 + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :return: The label of this ListSquareAiSearchResponse. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ListSquareAiSearchResponse. + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :param label: The label of this ListSquareAiSearchResponse. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def msg(self): + """Gets the msg of this ListSquareAiSearchResponse. # noqa: E501 + + Status message # noqa: E501 + + :return: The msg of this ListSquareAiSearchResponse. # noqa: E501 + :rtype: str + """ + return self._msg + + @msg.setter + def msg(self, msg): + """Sets the msg of this ListSquareAiSearchResponse. + + Status message # noqa: E501 + + :param msg: The msg of this ListSquareAiSearchResponse. # noqa: E501 + :type: str + """ + + self._msg = msg + + @property + def data(self): + """Gets the data of this ListSquareAiSearchResponse. # noqa: E501 + + + :return: The data of this ListSquareAiSearchResponse. # noqa: E501 + :rtype: ListSquareAiSearchResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListSquareAiSearchResponse. + + + :param data: The data of this ListSquareAiSearchResponse. # noqa: E501 + :type: ListSquareAiSearchResponseData + """ + + self._data = data + + 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, ListSquareAiSearchResponse): + 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, ListSquareAiSearchResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_square_ai_search_response_data.py b/gate_api/models/list_square_ai_search_response_data.py new file mode 100644 index 00000000..20ed5932 --- /dev/null +++ b/gate_api/models/list_square_ai_search_response_data.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 ListSquareAiSearchResponseData(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', + 'items': 'list[ListSquareAiSearchResponseDataItems]' + } + + attribute_map = { + 'total': 'total', + 'items': 'items' + } + + def __init__(self, total=None, items=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[ListSquareAiSearchResponseDataItems], Configuration) -> None + """ListSquareAiSearchResponseData - 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._items = None + self.discriminator = None + + if total is not None: + self.total = total + if items is not None: + self.items = items + + @property + def total(self): + """Gets the total of this ListSquareAiSearchResponseData. # noqa: E501 + + Total number of results # noqa: E501 + + :return: The total of this ListSquareAiSearchResponseData. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListSquareAiSearchResponseData. + + Total number of results # noqa: E501 + + :param total: The total of this ListSquareAiSearchResponseData. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def items(self): + """Gets the items of this ListSquareAiSearchResponseData. # noqa: E501 + + Search result list # noqa: E501 + + :return: The items of this ListSquareAiSearchResponseData. # noqa: E501 + :rtype: list[ListSquareAiSearchResponseDataItems] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this ListSquareAiSearchResponseData. + + Search result list # noqa: E501 + + :param items: The items of this ListSquareAiSearchResponseData. # noqa: E501 + :type: list[ListSquareAiSearchResponseDataItems] + """ + + self._items = 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, ListSquareAiSearchResponseData): + 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, ListSquareAiSearchResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_square_ai_search_response_data_items.py b/gate_api/models/list_square_ai_search_response_data_items.py new file mode 100644 index 00000000..28b4777f --- /dev/null +++ b/gate_api/models/list_square_ai_search_response_data_items.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 ListSquareAiSearchResponseDataItems(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', + 'content': 'str', + 'image': 'str', + 'avatar': 'str', + 'nickname': 'str', + 'like_count': 'int', + 'page_view': 'int' + } + + attribute_map = { + 'id': 'id', + 'content': 'content', + 'image': 'image', + 'avatar': 'avatar', + 'nickname': 'nickname', + 'like_count': 'like_count', + 'page_view': 'page_view' + } + + def __init__(self, id=None, content=None, image=None, avatar=None, nickname=None, like_count=None, page_view=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, int, int, Configuration) -> None + """ListSquareAiSearchResponseDataItems - 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._content = None + self._image = None + self._avatar = None + self._nickname = None + self._like_count = None + self._page_view = None + self.discriminator = None + + if id is not None: + self.id = id + if content is not None: + self.content = content + if image is not None: + self.image = image + if avatar is not None: + self.avatar = avatar + if nickname is not None: + self.nickname = nickname + if like_count is not None: + self.like_count = like_count + if page_view is not None: + self.page_view = page_view + + @property + def id(self): + """Gets the id of this ListSquareAiSearchResponseDataItems. # noqa: E501 + + Post ID # noqa: E501 + + :return: The id of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListSquareAiSearchResponseDataItems. + + Post ID # noqa: E501 + + :param id: The id of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def content(self): + """Gets the content of this ListSquareAiSearchResponseDataItems. # noqa: E501 + + Post content # noqa: E501 + + :return: The content of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ListSquareAiSearchResponseDataItems. + + Post content # noqa: E501 + + :param content: The content of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def image(self): + """Gets the image of this ListSquareAiSearchResponseDataItems. # noqa: E501 + + First image URL # noqa: E501 + + :return: The image of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this ListSquareAiSearchResponseDataItems. + + First image URL # noqa: E501 + + :param image: The image of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def avatar(self): + """Gets the avatar of this ListSquareAiSearchResponseDataItems. # noqa: E501 + + Author avatar # noqa: E501 + + :return: The avatar of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :rtype: str + """ + return self._avatar + + @avatar.setter + def avatar(self, avatar): + """Sets the avatar of this ListSquareAiSearchResponseDataItems. + + Author avatar # noqa: E501 + + :param avatar: The avatar of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :type: str + """ + + self._avatar = avatar + + @property + def nickname(self): + """Gets the nickname of this ListSquareAiSearchResponseDataItems. # noqa: E501 + + Author nickname # noqa: E501 + + :return: The nickname of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :rtype: str + """ + return self._nickname + + @nickname.setter + def nickname(self, nickname): + """Sets the nickname of this ListSquareAiSearchResponseDataItems. + + Author nickname # noqa: E501 + + :param nickname: The nickname of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :type: str + """ + + self._nickname = nickname + + @property + def like_count(self): + """Gets the like_count of this ListSquareAiSearchResponseDataItems. # noqa: E501 + + Like count # noqa: E501 + + :return: The like_count of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :rtype: int + """ + return self._like_count + + @like_count.setter + def like_count(self, like_count): + """Sets the like_count of this ListSquareAiSearchResponseDataItems. + + Like count # noqa: E501 + + :param like_count: The like_count of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :type: int + """ + + self._like_count = like_count + + @property + def page_view(self): + """Gets the page_view of this ListSquareAiSearchResponseDataItems. # noqa: E501 + + View count # noqa: E501 + + :return: The page_view of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :rtype: int + """ + return self._page_view + + @page_view.setter + def page_view(self, page_view): + """Sets the page_view of this ListSquareAiSearchResponseDataItems. + + View count # noqa: E501 + + :param page_view: The page_view of this ListSquareAiSearchResponseDataItems. # noqa: E501 + :type: int + """ + + self._page_view = page_view + + 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, ListSquareAiSearchResponseDataItems): + 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, ListSquareAiSearchResponseDataItems): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_user_coupons_response.py b/gate_api/models/list_user_coupons_response.py new file mode 100644 index 00000000..b41a9696 --- /dev/null +++ b/gate_api/models/list_user_coupons_response.py @@ -0,0 +1,209 @@ +# 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 ListUserCouponsResponse(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 = { + 'code': 'int', + 'label': 'str', + 'message': 'str', + 'data': 'ListUserCouponsResponseData' + } + + attribute_map = { + 'code': 'code', + 'label': 'label', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, code=None, label=None, message=None, data=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, ListUserCouponsResponseData, Configuration) -> None + """ListUserCouponsResponse - 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._code = None + self._label = None + self._message = None + self._data = None + self.discriminator = None + + if code is not None: + self.code = code + if label is not None: + self.label = label + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def code(self): + """Gets the code of this ListUserCouponsResponse. # noqa: E501 + + Response Code. `0` = Success; `2002` = User not logged in; `50105` = Input parameter validation failed # noqa: E501 + + :return: The code of this ListUserCouponsResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListUserCouponsResponse. + + Response Code. `0` = Success; `2002` = User not logged in; `50105` = Input parameter validation failed # noqa: E501 + + :param code: The code of this ListUserCouponsResponse. # noqa: E501 + :type: int + """ + allowed_values = [0, 2002, 50105] # noqa: E501 + if self.local_vars_configuration.client_side_validation and code not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `code` ({0}), must be one of {1}" # noqa: E501 + .format(code, allowed_values) + ) + + self._code = code + + @property + def label(self): + """Gets the label of this ListUserCouponsResponse. # noqa: E501 + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :return: The label of this ListUserCouponsResponse. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ListUserCouponsResponse. + + Error identifier code. Empty string on success, machine-readable error label on error # noqa: E501 + + :param label: The label of this ListUserCouponsResponse. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this ListUserCouponsResponse. # noqa: E501 + + + :return: The message of this ListUserCouponsResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ListUserCouponsResponse. + + + :param message: The message of this ListUserCouponsResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ListUserCouponsResponse. # noqa: E501 + + + :return: The data of this ListUserCouponsResponse. # noqa: E501 + :rtype: ListUserCouponsResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListUserCouponsResponse. + + + :param data: The data of this ListUserCouponsResponse. # noqa: E501 + :type: ListUserCouponsResponseData + """ + + self._data = data + + 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, ListUserCouponsResponse): + 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, ListUserCouponsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_user_coupons_response_data.py b/gate_api/models/list_user_coupons_response_data.py new file mode 100644 index 00000000..1f4813a6 --- /dev/null +++ b/gate_api/models/list_user_coupons_response_data.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 ListUserCouponsResponseData(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 = { + 'next_page': 'bool', + 'list': 'list[ListUserCouponsResponseDataList]' + } + + attribute_map = { + 'next_page': 'next_page', + 'list': 'list' + } + + def __init__(self, next_page=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, list[ListUserCouponsResponseDataList], Configuration) -> None + """ListUserCouponsResponseData - 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._next_page = None + self._list = None + self.discriminator = None + + if next_page is not None: + self.next_page = next_page + if list is not None: + self.list = list + + @property + def next_page(self): + """Gets the next_page of this ListUserCouponsResponseData. # noqa: E501 + + Whether there is a next page. `true` means more data is available. Pass the `id` of the last record as `last_id` and `expire_time_order_by` as `expire_time` in the next request # noqa: E501 + + :return: The next_page of this ListUserCouponsResponseData. # noqa: E501 + :rtype: bool + """ + return self._next_page + + @next_page.setter + def next_page(self, next_page): + """Sets the next_page of this ListUserCouponsResponseData. + + Whether there is a next page. `true` means more data is available. Pass the `id` of the last record as `last_id` and `expire_time_order_by` as `expire_time` in the next request # noqa: E501 + + :param next_page: The next_page of this ListUserCouponsResponseData. # noqa: E501 + :type: bool + """ + + self._next_page = next_page + + @property + def list(self): + """Gets the list of this ListUserCouponsResponseData. # noqa: E501 + + Coupon object array, see field details below # noqa: E501 + + :return: The list of this ListUserCouponsResponseData. # noqa: E501 + :rtype: list[ListUserCouponsResponseDataList] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this ListUserCouponsResponseData. + + Coupon object array, see field details below # noqa: E501 + + :param list: The list of this ListUserCouponsResponseData. # noqa: E501 + :type: list[ListUserCouponsResponseDataList] + """ + + 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, ListUserCouponsResponseData): + 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, ListUserCouponsResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_user_coupons_response_data_help_url.py b/gate_api/models/list_user_coupons_response_data_help_url.py new file mode 100644 index 00000000..1f060a56 --- /dev/null +++ b/gate_api/models/list_user_coupons_response_data_help_url.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 ListUserCouponsResponseDataHelpUrl(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 = { + 'web': 'str', + 'app': 'str' + } + + attribute_map = { + 'web': 'web', + 'app': 'app' + } + + def __init__(self, web=None, app=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """ListUserCouponsResponseDataHelpUrl - 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._web = None + self._app = None + self.discriminator = None + + if web is not None: + self.web = web + if app is not None: + self.app = app + + @property + def web(self): + """Gets the web of this ListUserCouponsResponseDataHelpUrl. # noqa: E501 + + Web Help Link # noqa: E501 + + :return: The web of this ListUserCouponsResponseDataHelpUrl. # noqa: E501 + :rtype: str + """ + return self._web + + @web.setter + def web(self, web): + """Sets the web of this ListUserCouponsResponseDataHelpUrl. + + Web Help Link # noqa: E501 + + :param web: The web of this ListUserCouponsResponseDataHelpUrl. # noqa: E501 + :type: str + """ + + self._web = web + + @property + def app(self): + """Gets the app of this ListUserCouponsResponseDataHelpUrl. # noqa: E501 + + App Help Link # noqa: E501 + + :return: The app of this ListUserCouponsResponseDataHelpUrl. # noqa: E501 + :rtype: str + """ + return self._app + + @app.setter + def app(self, app): + """Sets the app of this ListUserCouponsResponseDataHelpUrl. + + App Help Link # noqa: E501 + + :param app: The app of this ListUserCouponsResponseDataHelpUrl. # noqa: E501 + :type: str + """ + + self._app = app + + 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, ListUserCouponsResponseDataHelpUrl): + 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, ListUserCouponsResponseDataHelpUrl): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/list_user_coupons_response_data_jump_url.py similarity index 51% rename from gate_api/models/eth2_rate_list.py rename to gate_api/models/list_user_coupons_response_data_jump_url.py index c714e00c..e98a119c 100644 --- a/gate_api/models/eth2_rate_list.py +++ b/gate_api/models/list_user_coupons_response_data_jump_url.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class Eth2RateList(object): +class ListUserCouponsResponseDataJumpUrl(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,104 +33,104 @@ class Eth2RateList(object): and the value is json key in definition. """ openapi_types = { - 'date_time': 'int', - 'date': 'str', - 'rate': 'str' + 'web': 'str', + 'app': 'str', + 'mini_app': 'str' } attribute_map = { - 'date_time': 'date_time', - 'date': 'date', - 'rate': 'rate' + 'web': 'web', + 'app': 'app', + 'mini_app': 'mini_app' } - 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 + def __init__(self, web=None, app=None, mini_app=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """ListUserCouponsResponseDataJumpUrl - 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._web = None + self._app = None + self._mini_app = 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 + if web is not None: + self.web = web + if app is not None: + self.app = app + if mini_app is not None: + self.mini_app = mini_app @property - def date_time(self): - """Gets the date_time of this Eth2RateList. # noqa: E501 + def web(self): + """Gets the web of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 - Date Timestamp # noqa: E501 + Web Redirect Link # noqa: E501 - :return: The date_time of this Eth2RateList. # noqa: E501 - :rtype: int + :return: The web of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 + :rtype: str """ - return self._date_time + return self._web - @date_time.setter - def date_time(self, date_time): - """Sets the date_time of this Eth2RateList. + @web.setter + def web(self, web): + """Sets the web of this ListUserCouponsResponseDataJumpUrl. - Date Timestamp # noqa: E501 + Web Redirect Link # noqa: E501 - :param date_time: The date_time of this Eth2RateList. # noqa: E501 - :type: int + :param web: The web of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 + :type: str """ - self._date_time = date_time + self._web = web @property - def date(self): - """Gets the date of this Eth2RateList. # noqa: E501 + def app(self): + """Gets the app of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 - Date # noqa: E501 + App Redirect Link # noqa: E501 - :return: The date of this Eth2RateList. # noqa: E501 + :return: The app of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 :rtype: str """ - return self._date + return self._app - @date.setter - def date(self, date): - """Sets the date of this Eth2RateList. + @app.setter + def app(self, app): + """Sets the app of this ListUserCouponsResponseDataJumpUrl. - Date # noqa: E501 + App Redirect Link # noqa: E501 - :param date: The date of this Eth2RateList. # noqa: E501 + :param app: The app of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 :type: str """ - self._date = date + self._app = app @property - def rate(self): - """Gets the rate of this Eth2RateList. # noqa: E501 + def mini_app(self): + """Gets the mini_app of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 - Percentage Rate # noqa: E501 + Mini Program Redirect Link (empty string for most types) # noqa: E501 - :return: The rate of this Eth2RateList. # noqa: E501 + :return: The mini_app of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 :rtype: str """ - return self._rate + return self._mini_app - @rate.setter - def rate(self, rate): - """Sets the rate of this Eth2RateList. + @mini_app.setter + def mini_app(self, mini_app): + """Sets the mini_app of this ListUserCouponsResponseDataJumpUrl. - Percentage Rate # noqa: E501 + Mini Program Redirect Link (empty string for most types) # noqa: E501 - :param rate: The rate of this Eth2RateList. # noqa: E501 + :param mini_app: The mini_app of this ListUserCouponsResponseDataJumpUrl. # noqa: E501 :type: str """ - self._rate = rate + self._mini_app = mini_app def to_dict(self): """Returns the model properties as a dict""" @@ -166,14 +166,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, Eth2RateList): + if not isinstance(other, ListUserCouponsResponseDataJumpUrl): 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): + if not isinstance(other, ListUserCouponsResponseDataJumpUrl): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_user_coupons_response_data_list.py b/gate_api/models/list_user_coupons_response_data_list.py new file mode 100644 index 00000000..d38e91fe --- /dev/null +++ b/gate_api/models/list_user_coupons_response_data_list.py @@ -0,0 +1,829 @@ +# 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 ListUserCouponsResponseDataList(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', + 'details_id': 'int', + 'coupon_type': 'str', + 'name': 'str', + 'amount': 'str', + 'origin_amount': 'str', + 'currency': 'str', + 'rule_new': 'str', + 'status': 'str', + 'jump_url': 'ListUserCouponsResponseDataJumpUrl', + 'help_url': 'ListUserCouponsResponseDataHelpUrl', + 'expire_time': 'int', + 'expire_time_order_by': 'int', + 'expire_second': 'int', + 'has_usage_history': 'bool', + 'has_progress': 'bool', + 'progress_config': 'ListUserCouponsResponseDataProgressConfig', + 'activation_info': 'object', + 'is_task_coupon': 'int', + 'upgrade_toast': 'bool', + 'task_title': 'str', + 'task_desc': 'str', + 'task_start_at': 'int', + 'task_expire_at': 'int', + 'task_completed_at': 'int', + 'extra': 'list[object]' + } + + attribute_map = { + 'id': 'id', + 'details_id': 'details_id', + 'coupon_type': 'coupon_type', + 'name': 'name', + 'amount': 'amount', + 'origin_amount': 'origin_amount', + 'currency': 'currency', + 'rule_new': 'rule_new', + 'status': 'status', + 'jump_url': 'jump_url', + 'help_url': 'help_url', + 'expire_time': 'expire_time', + 'expire_time_order_by': 'expire_time_order_by', + 'expire_second': 'expire_second', + 'has_usage_history': 'has_usage_history', + 'has_progress': 'has_progress', + 'progress_config': 'progress_config', + 'activation_info': 'activation_info', + 'is_task_coupon': 'is_task_coupon', + 'upgrade_toast': 'upgrade_toast', + 'task_title': 'task_title', + 'task_desc': 'task_desc', + 'task_start_at': 'task_start_at', + 'task_expire_at': 'task_expire_at', + 'task_completed_at': 'task_completed_at', + 'extra': 'extra' + } + + def __init__(self, id=None, details_id=None, coupon_type=None, name=None, amount=None, origin_amount=None, currency=None, rule_new=None, status=None, jump_url=None, help_url=None, expire_time=None, expire_time_order_by=None, expire_second=None, has_usage_history=None, has_progress=None, progress_config=None, activation_info=None, is_task_coupon=None, upgrade_toast=None, task_title=None, task_desc=None, task_start_at=None, task_expire_at=None, task_completed_at=None, extra=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, ListUserCouponsResponseDataJumpUrl, ListUserCouponsResponseDataHelpUrl, int, int, int, bool, bool, ListUserCouponsResponseDataProgressConfig, object, int, bool, str, str, int, int, int, list[object], Configuration) -> None + """ListUserCouponsResponseDataList - 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._details_id = None + self._coupon_type = None + self._name = None + self._amount = None + self._origin_amount = None + self._currency = None + self._rule_new = None + self._status = None + self._jump_url = None + self._help_url = None + self._expire_time = None + self._expire_time_order_by = None + self._expire_second = None + self._has_usage_history = None + self._has_progress = None + self._progress_config = None + self._activation_info = None + self._is_task_coupon = None + self._upgrade_toast = None + self._task_title = None + self._task_desc = None + self._task_start_at = None + self._task_expire_at = None + self._task_completed_at = None + self._extra = None + self.discriminator = None + + if id is not None: + self.id = id + if details_id is not None: + self.details_id = details_id + if coupon_type is not None: + self.coupon_type = coupon_type + if name is not None: + self.name = name + if amount is not None: + self.amount = amount + if origin_amount is not None: + self.origin_amount = origin_amount + if currency is not None: + self.currency = currency + if rule_new is not None: + self.rule_new = rule_new + if status is not None: + self.status = status + if jump_url is not None: + self.jump_url = jump_url + if help_url is not None: + self.help_url = help_url + if expire_time is not None: + self.expire_time = expire_time + if expire_time_order_by is not None: + self.expire_time_order_by = expire_time_order_by + if expire_second is not None: + self.expire_second = expire_second + if has_usage_history is not None: + self.has_usage_history = has_usage_history + if has_progress is not None: + self.has_progress = has_progress + if progress_config is not None: + self.progress_config = progress_config + if activation_info is not None: + self.activation_info = activation_info + if is_task_coupon is not None: + self.is_task_coupon = is_task_coupon + if upgrade_toast is not None: + self.upgrade_toast = upgrade_toast + if task_title is not None: + self.task_title = task_title + if task_desc is not None: + self.task_desc = task_desc + if task_start_at is not None: + self.task_start_at = task_start_at + if task_expire_at is not None: + self.task_expire_at = task_expire_at + if task_completed_at is not None: + self.task_completed_at = task_completed_at + if extra is not None: + self.extra = extra + + @property + def id(self): + """Gets the id of this ListUserCouponsResponseDataList. # noqa: E501 + + Coupon distribution record ID (coupon_send_issuing_log.id), used as `last_id` for cursor-based pagination # noqa: E501 + + :return: The id of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListUserCouponsResponseDataList. + + Coupon distribution record ID (coupon_send_issuing_log.id), used as `last_id` for cursor-based pagination # noqa: E501 + + :param id: The id of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def details_id(self): + """Gets the details_id of this ListUserCouponsResponseDataList. # noqa: E501 + + User coupon detail table primary key (separate table per type). This field is 0 for task coupons, has value for regular coupons # noqa: E501 + + :return: The details_id of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._details_id + + @details_id.setter + def details_id(self, details_id): + """Sets the details_id of this ListUserCouponsResponseDataList. + + User coupon detail table primary key (separate table per type). This field is 0 for task coupons, has value for regular coupons # noqa: E501 + + :param details_id: The details_id of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + + self._details_id = details_id + + @property + def coupon_type(self): + """Gets the coupon_type of this ListUserCouponsResponseDataList. # noqa: E501 + + Coupon type, enum values same as the `type` parameter # noqa: E501 + + :return: The coupon_type of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._coupon_type + + @coupon_type.setter + def coupon_type(self, coupon_type): + """Sets the coupon_type of this ListUserCouponsResponseDataList. + + Coupon type, enum values same as the `type` parameter # noqa: E501 + + :param coupon_type: The coupon_type of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + + self._coupon_type = coupon_type + + @property + def name(self): + """Gets the name of this ListUserCouponsResponseDataList. # noqa: E501 + + Coupon display name (i18n translated) # noqa: E501 + + :return: The name of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListUserCouponsResponseDataList. + + Coupon display name (i18n translated) # noqa: E501 + + :param name: The name of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def amount(self): + """Gets the amount of this ListUserCouponsResponseDataList. # noqa: E501 + + Coupon denomination (formatted string with thousand separators). Meaning by type: point card = balance, interest rate boost coupon = interest rate percentage (e.g., '5%'), VIP trial card = VIP level number, position voucher = face value × leverage, others = face value # noqa: E501 + + :return: The amount of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this ListUserCouponsResponseDataList. + + Coupon denomination (formatted string with thousand separators). Meaning by type: point card = balance, interest rate boost coupon = interest rate percentage (e.g., '5%'), VIP trial card = VIP level number, position voucher = face value × leverage, others = face value # noqa: E501 + + :param amount: The amount of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def origin_amount(self): + """Gets the origin_amount of this ListUserCouponsResponseDataList. # noqa: E501 + + Original denomination (string with trailing zeros removed). Only returned for point card type, other types do not have this field # noqa: E501 + + :return: The origin_amount of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._origin_amount + + @origin_amount.setter + def origin_amount(self, origin_amount): + """Sets the origin_amount of this ListUserCouponsResponseDataList. + + Original denomination (string with trailing zeros removed). Only returned for point card type, other types do not have this field # noqa: E501 + + :param origin_amount: The origin_amount of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + + self._origin_amount = origin_amount + + @property + def currency(self): + """Gets the currency of this ListUserCouponsResponseDataList. # noqa: E501 + + Denomination unit. Point card = 'POINT', interest rate boost coupon = 'APR', VIP trial card = 'VIP', Alpha cash coupon = base currency, others = uppercase currency symbol (e.g., 'USDT'/'GT') # noqa: E501 + + :return: The currency of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this ListUserCouponsResponseDataList. + + Denomination unit. Point card = 'POINT', interest rate boost coupon = 'APR', VIP trial card = 'VIP', Alpha cash coupon = base currency, others = uppercase currency symbol (e.g., 'USDT'/'GT') # noqa: E501 + + :param currency: The currency of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def rule_new(self): + """Gets the rule_new of this ListUserCouponsResponseDataList. # noqa: E501 + + Coupon usage rule text. List endpoint always returns empty string \"\", only detail endpoint returns actual value # noqa: E501 + + :return: The rule_new of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._rule_new + + @rule_new.setter + def rule_new(self, rule_new): + """Sets the rule_new of this ListUserCouponsResponseDataList. + + Coupon usage rule text. List endpoint always returns empty string \"\", only detail endpoint returns actual value # noqa: E501 + + :param rule_new: The rule_new of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + + self._rule_new = rule_new + + @property + def status(self): + """Gets the status of this ListUserCouponsResponseDataList. # noqa: E501 + + Coupon status. Regular coupon: NOT_ACTIVE (pending activation), ACTIVATED (activated), TO_BE_USED (to be used), EXPIRED (expired), RECYCLED (recycled), INVALID (invalidated), USED (used), UNKNOWN (unknown), LOCKED (locked, P2P only). Task coupon: TASK_START (task not started), TASK_WAIT (task in progress), TASK_DONE (task completed, processing), TASK_EXPIRED (task not completed, expired), TASK_NOT_STARTED_EXPIRED (not started, expired), TASK_RECEIVE_SUCCESS (reward claimed successfully), TASK_RECEIVE_FAIL (reward claim failed) # noqa: E501 + + :return: The status of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListUserCouponsResponseDataList. + + Coupon status. Regular coupon: NOT_ACTIVE (pending activation), ACTIVATED (activated), TO_BE_USED (to be used), EXPIRED (expired), RECYCLED (recycled), INVALID (invalidated), USED (used), UNKNOWN (unknown), LOCKED (locked, P2P only). Task coupon: TASK_START (task not started), TASK_WAIT (task in progress), TASK_DONE (task completed, processing), TASK_EXPIRED (task not completed, expired), TASK_NOT_STARTED_EXPIRED (not started, expired), TASK_RECEIVE_SUCCESS (reward claimed successfully), TASK_RECEIVE_FAIL (reward claim failed) # noqa: E501 + + :param status: The status of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + allowed_values = ["NOT_ACTIVE", "ACTIVATED", "TO_BE_USED", "EXPIRED", "RECYCLED", "INVALID", "USED", "UNKNOWN", "LOCKED", "TASK_START", "TASK_WAIT", "TASK_DONE", "TASK_EXPIRED", "TASK_NOT_STARTED_EXPIRED", "TASK_RECEIVE_SUCCESS", "TASK_RECEIVE_FAIL"] # 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}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def jump_url(self): + """Gets the jump_url of this ListUserCouponsResponseDataList. # noqa: E501 + + + :return: The jump_url of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: ListUserCouponsResponseDataJumpUrl + """ + return self._jump_url + + @jump_url.setter + def jump_url(self, jump_url): + """Sets the jump_url of this ListUserCouponsResponseDataList. + + + :param jump_url: The jump_url of this ListUserCouponsResponseDataList. # noqa: E501 + :type: ListUserCouponsResponseDataJumpUrl + """ + + self._jump_url = jump_url + + @property + def help_url(self): + """Gets the help_url of this ListUserCouponsResponseDataList. # noqa: E501 + + + :return: The help_url of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: ListUserCouponsResponseDataHelpUrl + """ + return self._help_url + + @help_url.setter + def help_url(self, help_url): + """Sets the help_url of this ListUserCouponsResponseDataList. + + + :param help_url: The help_url of this ListUserCouponsResponseDataList. # noqa: E501 + :type: ListUserCouponsResponseDataHelpUrl + """ + + self._help_url = help_url + + @property + def expire_time(self): + """Gets the expire_time of this ListUserCouponsResponseDataList. # noqa: E501 + + Expiration time (Unix timestamp). Some types replace this with actual expiration time after activation or use (e.g., contract_bonus uses expired_timest after activation). Point card type returns 0 # noqa: E501 + + :return: The expire_time of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._expire_time + + @expire_time.setter + def expire_time(self, expire_time): + """Sets the expire_time of this ListUserCouponsResponseDataList. + + Expiration time (Unix timestamp). Some types replace this with actual expiration time after activation or use (e.g., contract_bonus uses expired_timest after activation). Point card type returns 0 # noqa: E501 + + :param expire_time: The expire_time of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + + self._expire_time = expire_time + + @property + def expire_time_order_by(self): + """Gets the expire_time_order_by of this ListUserCouponsResponseDataList. # noqa: E501 + + Sorting expiration time (from the original expiration time of the distribution record, unaffected by activation). Used as the `expire_time` parameter for the next request in cursor-based pagination # noqa: E501 + + :return: The expire_time_order_by of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._expire_time_order_by + + @expire_time_order_by.setter + def expire_time_order_by(self, expire_time_order_by): + """Sets the expire_time_order_by of this ListUserCouponsResponseDataList. + + Sorting expiration time (from the original expiration time of the distribution record, unaffected by activation). Used as the `expire_time` parameter for the next request in cursor-based pagination # noqa: E501 + + :param expire_time_order_by: The expire_time_order_by of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + + self._expire_time_order_by = expire_time_order_by + + @property + def expire_second(self): + """Gets the expire_second of this ListUserCouponsResponseDataList. # noqa: E501 + + Seconds remaining until expiration. Returns 0 for expired or Point Card types # noqa: E501 + + :return: The expire_second of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._expire_second + + @expire_second.setter + def expire_second(self, expire_second): + """Sets the expire_second of this ListUserCouponsResponseDataList. + + Seconds remaining until expiration. Returns 0 for expired or Point Card types # noqa: E501 + + :param expire_second: The expire_second of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + + self._expire_second = expire_second + + @property + def has_usage_history(self): + """Gets the has_usage_history of this ListUserCouponsResponseDataList. # noqa: E501 + + Whether there is a usage history. Fixed as true for point card type, determined by type for others # noqa: E501 + + :return: The has_usage_history of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: bool + """ + return self._has_usage_history + + @has_usage_history.setter + def has_usage_history(self, has_usage_history): + """Sets the has_usage_history of this ListUserCouponsResponseDataList. + + Whether there is a usage history. Fixed as true for point card type, determined by type for others # noqa: E501 + + :param has_usage_history: The has_usage_history of this ListUserCouponsResponseDataList. # noqa: E501 + :type: bool + """ + + self._has_usage_history = has_usage_history + + @property + def has_progress(self): + """Gets the has_progress of this ListUserCouponsResponseDataList. # noqa: E501 + + Whether to display a progress bar. Only true for commission_rebate, interest_voucher, and qualifying task coupons # noqa: E501 + + :return: The has_progress of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: bool + """ + return self._has_progress + + @has_progress.setter + def has_progress(self, has_progress): + """Sets the has_progress of this ListUserCouponsResponseDataList. + + Whether to display a progress bar. Only true for commission_rebate, interest_voucher, and qualifying task coupons # noqa: E501 + + :param has_progress: The has_progress of this ListUserCouponsResponseDataList. # noqa: E501 + :type: bool + """ + + self._has_progress = has_progress + + @property + def progress_config(self): + """Gets the progress_config of this ListUserCouponsResponseDataList. # noqa: E501 + + + :return: The progress_config of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: ListUserCouponsResponseDataProgressConfig + """ + return self._progress_config + + @progress_config.setter + def progress_config(self, progress_config): + """Sets the progress_config of this ListUserCouponsResponseDataList. + + + :param progress_config: The progress_config of this ListUserCouponsResponseDataList. # noqa: E501 + :type: ListUserCouponsResponseDataProgressConfig + """ + + self._progress_config = progress_config + + @property + def activation_info(self): + """Gets the activation_info of this ListUserCouponsResponseDataList. # noqa: E501 + + Type-specific activation information. Types without specific fields return empty object {}. Fields by type: interest_voucher={supported_pairs,transaction_type}; contract_bonus_new={received_expired_hour}; contract_bonus={check_unified_account_mode,received_expired_days,abtest}; commission_rebate={market,market_name}; robot_bonus={designated_bots}; position_voucher={symbols,leverage,need_user_funds,user_funds_amount,position_bonus}; tradfi_position_voucher={symbols,leverage,position_bonus}; etf_voucher={currency_markets,amount} # noqa: E501 + + :return: The activation_info of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: object + """ + return self._activation_info + + @activation_info.setter + def activation_info(self, activation_info): + """Sets the activation_info of this ListUserCouponsResponseDataList. + + Type-specific activation information. Types without specific fields return empty object {}. Fields by type: interest_voucher={supported_pairs,transaction_type}; contract_bonus_new={received_expired_hour}; contract_bonus={check_unified_account_mode,received_expired_days,abtest}; commission_rebate={market,market_name}; robot_bonus={designated_bots}; position_voucher={symbols,leverage,need_user_funds,user_funds_amount,position_bonus}; tradfi_position_voucher={symbols,leverage,position_bonus}; etf_voucher={currency_markets,amount} # noqa: E501 + + :param activation_info: The activation_info of this ListUserCouponsResponseDataList. # noqa: E501 + :type: object + """ + + self._activation_info = activation_info + + @property + def is_task_coupon(self): + """Gets the is_task_coupon of this ListUserCouponsResponseDataList. # noqa: E501 + + Whether it is a task coupon. `0` = regular coupon; `1` = task coupon # noqa: E501 + + :return: The is_task_coupon of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._is_task_coupon + + @is_task_coupon.setter + def is_task_coupon(self, is_task_coupon): + """Sets the is_task_coupon of this ListUserCouponsResponseDataList. + + Whether it is a task coupon. `0` = regular coupon; `1` = task coupon # noqa: E501 + + :param is_task_coupon: The is_task_coupon of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and is_task_coupon not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `is_task_coupon` ({0}), must be one of {1}" # noqa: E501 + .format(is_task_coupon, allowed_values) + ) + + self._is_task_coupon = is_task_coupon + + @property + def upgrade_toast(self): + """Gets the upgrade_toast of this ListUserCouponsResponseDataList. # noqa: E501 + + Whether to prompt the user to upgrade the App (true when app version is too old to support the coupon). Triggered types: copy_trading/alpha_voucher (Android<7320000/iOS<202507320000), commission_rebate subtype tradfi (Android<8040000/iOS<202608040000), etf_voucher (Android<8090000/iOS<202608090000), tradfi_position_voucher (Android<8100000/iOS<202508240000) # noqa: E501 + + :return: The upgrade_toast of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: bool + """ + return self._upgrade_toast + + @upgrade_toast.setter + def upgrade_toast(self, upgrade_toast): + """Sets the upgrade_toast of this ListUserCouponsResponseDataList. + + Whether to prompt the user to upgrade the App (true when app version is too old to support the coupon). Triggered types: copy_trading/alpha_voucher (Android<7320000/iOS<202507320000), commission_rebate subtype tradfi (Android<8040000/iOS<202608040000), etf_voucher (Android<8090000/iOS<202608090000), tradfi_position_voucher (Android<8100000/iOS<202508240000) # noqa: E501 + + :param upgrade_toast: The upgrade_toast of this ListUserCouponsResponseDataList. # noqa: E501 + :type: bool + """ + + self._upgrade_toast = upgrade_toast + + @property + def task_title(self): + """Gets the task_title of this ListUserCouponsResponseDataList. # noqa: E501 + + Task title (only task coupons have value, regular coupons return empty string \"\") # noqa: E501 + + :return: The task_title of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._task_title + + @task_title.setter + def task_title(self, task_title): + """Sets the task_title of this ListUserCouponsResponseDataList. + + Task title (only task coupons have value, regular coupons return empty string \"\") # noqa: E501 + + :param task_title: The task_title of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + + self._task_title = task_title + + @property + def task_desc(self): + """Gets the task_desc of this ListUserCouponsResponseDataList. # noqa: E501 + + Task description (only task coupons have value, regular coupons return empty string \"\") # noqa: E501 + + :return: The task_desc of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: str + """ + return self._task_desc + + @task_desc.setter + def task_desc(self, task_desc): + """Sets the task_desc of this ListUserCouponsResponseDataList. + + Task description (only task coupons have value, regular coupons return empty string \"\") # noqa: E501 + + :param task_desc: The task_desc of this ListUserCouponsResponseDataList. # noqa: E501 + :type: str + """ + + self._task_desc = task_desc + + @property + def task_start_at(self): + """Gets the task_start_at of this ListUserCouponsResponseDataList. # noqa: E501 + + Task start timestamp (Unix). Only has value for task coupons in TASK_EXPIRED status, otherwise 0 # noqa: E501 + + :return: The task_start_at of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._task_start_at + + @task_start_at.setter + def task_start_at(self, task_start_at): + """Sets the task_start_at of this ListUserCouponsResponseDataList. + + Task start timestamp (Unix). Only has value for task coupons in TASK_EXPIRED status, otherwise 0 # noqa: E501 + + :param task_start_at: The task_start_at of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + + self._task_start_at = task_start_at + + @property + def task_expire_at(self): + """Gets the task_expire_at of this ListUserCouponsResponseDataList. # noqa: E501 + + Task expiration timestamp (Unix). Currently fixed at 0, reserved field # noqa: E501 + + :return: The task_expire_at of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._task_expire_at + + @task_expire_at.setter + def task_expire_at(self, task_expire_at): + """Sets the task_expire_at of this ListUserCouponsResponseDataList. + + Task expiration timestamp (Unix). Currently fixed at 0, reserved field # noqa: E501 + + :param task_expire_at: The task_expire_at of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + + self._task_expire_at = task_expire_at + + @property + def task_completed_at(self): + """Gets the task_completed_at of this ListUserCouponsResponseDataList. # noqa: E501 + + Task completion timestamp (Unix). Currently fixed at 0, reserved field # noqa: E501 + + :return: The task_completed_at of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: int + """ + return self._task_completed_at + + @task_completed_at.setter + def task_completed_at(self, task_completed_at): + """Sets the task_completed_at of this ListUserCouponsResponseDataList. + + Task completion timestamp (Unix). Currently fixed at 0, reserved field # noqa: E501 + + :param task_completed_at: The task_completed_at of this ListUserCouponsResponseDataList. # noqa: E501 + :type: int + """ + + self._task_completed_at = task_completed_at + + @property + def extra(self): + """Gets the extra of this ListUserCouponsResponseDataList. # noqa: E501 + + Extension fields. List endpoint always returns empty array [], only the detail endpoint has values # noqa: E501 + + :return: The extra of this ListUserCouponsResponseDataList. # noqa: E501 + :rtype: list[object] + """ + return self._extra + + @extra.setter + def extra(self, extra): + """Sets the extra of this ListUserCouponsResponseDataList. + + Extension fields. List endpoint always returns empty array [], only the detail endpoint has values # noqa: E501 + + :param extra: The extra of this ListUserCouponsResponseDataList. # noqa: E501 + :type: list[object] + """ + + self._extra = extra + + 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, ListUserCouponsResponseDataList): + 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, ListUserCouponsResponseDataList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/list_user_coupons_response_data_progress_config.py b/gate_api/models/list_user_coupons_response_data_progress_config.py new file mode 100644 index 00000000..af60d09e --- /dev/null +++ b/gate_api/models/list_user_coupons_response_data_progress_config.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 ListUserCouponsResponseDataProgressConfig(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_balance': 'str', + 'current_used': 'str', + 'current_achived': 'str', + 'currency': 'str' + } + + attribute_map = { + 'total_balance': 'total_balance', + 'current_used': 'current_used', + 'current_achived': 'current_achived', + 'currency': 'currency' + } + + def __init__(self, total_balance=None, current_used=None, current_achived=None, currency=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """ListUserCouponsResponseDataProgressConfig - 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_balance = None + self._current_used = None + self._current_achived = None + self._currency = None + self.discriminator = None + + if total_balance is not None: + self.total_balance = total_balance + if current_used is not None: + self.current_used = current_used + if current_achived is not None: + self.current_achived = current_achived + if currency is not None: + self.currency = currency + + @property + def total_balance(self): + """Gets the total_balance of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + + Total Required Amount # noqa: E501 + + :return: The total_balance of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + :rtype: str + """ + return self._total_balance + + @total_balance.setter + def total_balance(self, total_balance): + """Sets the total_balance of this ListUserCouponsResponseDataProgressConfig. + + Total Required Amount # noqa: E501 + + :param total_balance: The total_balance of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + :type: str + """ + + self._total_balance = total_balance + + @property + def current_used(self): + """Gets the current_used of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + + Used Amount # noqa: E501 + + :return: The current_used of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + :rtype: str + """ + return self._current_used + + @current_used.setter + def current_used(self, current_used): + """Sets the current_used of this ListUserCouponsResponseDataProgressConfig. + + Used Amount # noqa: E501 + + :param current_used: The current_used of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + :type: str + """ + + self._current_used = current_used + + @property + def current_achived(self): + """Gets the current_achived of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + + Amount achieved (note: field name is spelled as achived) # noqa: E501 + + :return: The current_achived of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + :rtype: str + """ + return self._current_achived + + @current_achived.setter + def current_achived(self, current_achived): + """Sets the current_achived of this ListUserCouponsResponseDataProgressConfig. + + Amount achieved (note: field name is spelled as achived) # noqa: E501 + + :param current_achived: The current_achived of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + :type: str + """ + + self._current_achived = current_achived + + @property + def currency(self): + """Gets the currency of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + + Progress unit (e.g., 'USDT') # noqa: E501 + + :return: The currency of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this ListUserCouponsResponseDataProgressConfig. + + Progress unit (e.g., 'USDT') # noqa: E501 + + :param currency: The currency of this ListUserCouponsResponseDataProgressConfig. # noqa: E501 + :type: str + """ + + self._currency = currency + + 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, ListUserCouponsResponseDataProgressConfig): + 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, ListUserCouponsResponseDataProgressConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_grid_create_params.py b/gate_api/models/margin_grid_create_params.py new file mode 100644 index 00000000..7298a0fc --- /dev/null +++ b/gate_api/models/margin_grid_create_params.py @@ -0,0 +1,422 @@ +# 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 MarginGridCreateParams(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 = { + 'money': 'str', + 'low_price': 'str', + 'high_price': 'str', + 'grid_num': 'int', + 'price_type': 'int', + 'leverage': 'str', + 'direction': 'FuturesDirection', + 'trigger_price': 'str', + 'stop_profit': 'str', + 'stop_loss': 'str', + 'profit_sharing_ratio': 'str', + 'is_use_base': 'bool' + } + + attribute_map = { + 'money': 'money', + 'low_price': 'low_price', + 'high_price': 'high_price', + 'grid_num': 'grid_num', + 'price_type': 'price_type', + 'leverage': 'leverage', + 'direction': 'direction', + 'trigger_price': 'trigger_price', + 'stop_profit': 'stop_profit', + 'stop_loss': 'stop_loss', + 'profit_sharing_ratio': 'profit_sharing_ratio', + 'is_use_base': 'is_use_base' + } + + def __init__(self, money=None, low_price=None, high_price=None, grid_num=None, price_type=None, leverage=None, direction=None, trigger_price=None, stop_profit=None, stop_loss=None, profit_sharing_ratio=None, is_use_base=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, int, str, FuturesDirection, str, str, str, str, bool, Configuration) -> None + """MarginGridCreateParams - 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._money = None + self._low_price = None + self._high_price = None + self._grid_num = None + self._price_type = None + self._leverage = None + self._direction = None + self._trigger_price = None + self._stop_profit = None + self._stop_loss = None + self._profit_sharing_ratio = None + self._is_use_base = None + self.discriminator = None + + self.money = money + self.low_price = low_price + self.high_price = high_price + self.grid_num = grid_num + self.price_type = price_type + self.leverage = leverage + if direction is not None: + self.direction = direction + if trigger_price is not None: + self.trigger_price = trigger_price + if stop_profit is not None: + self.stop_profit = stop_profit + if stop_loss is not None: + self.stop_loss = stop_loss + if profit_sharing_ratio is not None: + self.profit_sharing_ratio = profit_sharing_ratio + if is_use_base is not None: + self.is_use_base = is_use_base + + @property + def money(self): + """Gets the money of this MarginGridCreateParams. # noqa: E501 + + + :return: The money of this MarginGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this MarginGridCreateParams. + + + :param money: The money of this MarginGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and money is None: # noqa: E501 + raise ValueError("Invalid value for `money`, must not be `None`") # noqa: E501 + + self._money = money + + @property + def low_price(self): + """Gets the low_price of this MarginGridCreateParams. # noqa: E501 + + + :return: The low_price of this MarginGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._low_price + + @low_price.setter + def low_price(self, low_price): + """Sets the low_price of this MarginGridCreateParams. + + + :param low_price: The low_price of this MarginGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and low_price is None: # noqa: E501 + raise ValueError("Invalid value for `low_price`, must not be `None`") # noqa: E501 + + self._low_price = low_price + + @property + def high_price(self): + """Gets the high_price of this MarginGridCreateParams. # noqa: E501 + + + :return: The high_price of this MarginGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._high_price + + @high_price.setter + def high_price(self, high_price): + """Sets the high_price of this MarginGridCreateParams. + + + :param high_price: The high_price of this MarginGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and high_price is None: # noqa: E501 + raise ValueError("Invalid value for `high_price`, must not be `None`") # noqa: E501 + + self._high_price = high_price + + @property + def grid_num(self): + """Gets the grid_num of this MarginGridCreateParams. # noqa: E501 + + + :return: The grid_num of this MarginGridCreateParams. # noqa: E501 + :rtype: int + """ + return self._grid_num + + @grid_num.setter + def grid_num(self, grid_num): + """Sets the grid_num of this MarginGridCreateParams. + + + :param grid_num: The grid_num of this MarginGridCreateParams. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and grid_num is None: # noqa: E501 + raise ValueError("Invalid value for `grid_num`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + grid_num is not None and grid_num < 1): # noqa: E501 + raise ValueError("Invalid value for `grid_num`, must be a value greater than or equal to `1`") # noqa: E501 + + self._grid_num = grid_num + + @property + def price_type(self): + """Gets the price_type of this MarginGridCreateParams. # noqa: E501 + + + :return: The price_type of this MarginGridCreateParams. # noqa: E501 + :rtype: int + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this MarginGridCreateParams. + + + :param price_type: The price_type of this MarginGridCreateParams. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and price_type is None: # noqa: E501 + raise ValueError("Invalid value for `price_type`, must not be `None`") # noqa: E501 + allowed_values = [0, 1] # 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}" # noqa: E501 + .format(price_type, allowed_values) + ) + + self._price_type = price_type + + @property + def leverage(self): + """Gets the leverage of this MarginGridCreateParams. # noqa: E501 + + + :return: The leverage of this MarginGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this MarginGridCreateParams. + + + :param leverage: The leverage of this MarginGridCreateParams. # 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 + + @property + def direction(self): + """Gets the direction of this MarginGridCreateParams. # noqa: E501 + + + :return: The direction of this MarginGridCreateParams. # noqa: E501 + :rtype: FuturesDirection + """ + return self._direction + + @direction.setter + def direction(self, direction): + """Sets the direction of this MarginGridCreateParams. + + + :param direction: The direction of this MarginGridCreateParams. # noqa: E501 + :type: FuturesDirection + """ + + self._direction = direction + + @property + def trigger_price(self): + """Gets the trigger_price of this MarginGridCreateParams. # noqa: E501 + + + :return: The trigger_price of this MarginGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this MarginGridCreateParams. + + + :param trigger_price: The trigger_price of this MarginGridCreateParams. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def stop_profit(self): + """Gets the stop_profit of this MarginGridCreateParams. # noqa: E501 + + + :return: The stop_profit of this MarginGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_profit + + @stop_profit.setter + def stop_profit(self, stop_profit): + """Sets the stop_profit of this MarginGridCreateParams. + + + :param stop_profit: The stop_profit of this MarginGridCreateParams. # noqa: E501 + :type: str + """ + + self._stop_profit = stop_profit + + @property + def stop_loss(self): + """Gets the stop_loss of this MarginGridCreateParams. # noqa: E501 + + + :return: The stop_loss of this MarginGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_loss + + @stop_loss.setter + def stop_loss(self, stop_loss): + """Sets the stop_loss of this MarginGridCreateParams. + + + :param stop_loss: The stop_loss of this MarginGridCreateParams. # noqa: E501 + :type: str + """ + + self._stop_loss = stop_loss + + @property + def profit_sharing_ratio(self): + """Gets the profit_sharing_ratio of this MarginGridCreateParams. # noqa: E501 + + + :return: The profit_sharing_ratio of this MarginGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._profit_sharing_ratio + + @profit_sharing_ratio.setter + def profit_sharing_ratio(self, profit_sharing_ratio): + """Sets the profit_sharing_ratio of this MarginGridCreateParams. + + + :param profit_sharing_ratio: The profit_sharing_ratio of this MarginGridCreateParams. # noqa: E501 + :type: str + """ + + self._profit_sharing_ratio = profit_sharing_ratio + + @property + def is_use_base(self): + """Gets the is_use_base of this MarginGridCreateParams. # noqa: E501 + + + :return: The is_use_base of this MarginGridCreateParams. # noqa: E501 + :rtype: bool + """ + return self._is_use_base + + @is_use_base.setter + def is_use_base(self, is_use_base): + """Sets the is_use_base of this MarginGridCreateParams. + + + :param is_use_base: The is_use_base of this MarginGridCreateParams. # noqa: E501 + :type: bool + """ + + self._is_use_base = is_use_base + + 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, MarginGridCreateParams): + 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, MarginGridCreateParams): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_grid_create_request.py b/gate_api/models/margin_grid_create_request.py new file mode 100644 index 00000000..14914924 --- /dev/null +++ b/gate_api/models/margin_grid_create_request.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 MarginGridCreateRequest(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 = { + 'strategy_type': 'str', + 'market': 'str', + 'create_params': 'MarginGridCreateParams' + } + + attribute_map = { + 'strategy_type': 'strategy_type', + 'market': 'market', + 'create_params': 'create_params' + } + + def __init__(self, strategy_type=None, market=None, create_params=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, MarginGridCreateParams, Configuration) -> None + """MarginGridCreateRequest - 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._strategy_type = None + self._market = None + self._create_params = None + self.discriminator = None + + self.strategy_type = strategy_type + self.market = market + self.create_params = create_params + + @property + def strategy_type(self): + """Gets the strategy_type of this MarginGridCreateRequest. # noqa: E501 + + + :return: The strategy_type of this MarginGridCreateRequest. # noqa: E501 + :rtype: str + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this MarginGridCreateRequest. + + + :param strategy_type: The strategy_type of this MarginGridCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + allowed_values = ["margin_grid"] # 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}" # noqa: E501 + .format(strategy_type, allowed_values) + ) + + self._strategy_type = strategy_type + + @property + def market(self): + """Gets the market of this MarginGridCreateRequest. # noqa: E501 + + + :return: The market of this MarginGridCreateRequest. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this MarginGridCreateRequest. + + + :param market: The market of this MarginGridCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def create_params(self): + """Gets the create_params of this MarginGridCreateRequest. # noqa: E501 + + + :return: The create_params of this MarginGridCreateRequest. # noqa: E501 + :rtype: MarginGridCreateParams + """ + return self._create_params + + @create_params.setter + def create_params(self, create_params): + """Sets the create_params of this MarginGridCreateRequest. + + + :param create_params: The create_params of this MarginGridCreateRequest. # noqa: E501 + :type: MarginGridCreateParams + """ + if self.local_vars_configuration.client_side_validation and create_params is None: # noqa: E501 + raise ValueError("Invalid value for `create_params`, must not be `None`") # noqa: E501 + + self._create_params = create_params + + 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, MarginGridCreateRequest): + 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, MarginGridCreateRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/my_ads_list_request.py b/gate_api/models/my_ads_list_request.py index cdaffcdd..5397e742 100644 --- a/gate_api/models/my_ads_list_request.py +++ b/gate_api/models/my_ads_list_request.py @@ -67,7 +67,7 @@ def __init__(self, asset=None, fiat_unit=None, trade_type=None, local_vars_confi def asset(self): """Gets the asset of this MyAdsListRequest. # noqa: E501 - Cryptocurrency # noqa: E501 + Crypto asset; omit to skip asset filter. # noqa: E501 :return: The asset of this MyAdsListRequest. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def asset(self): def asset(self, asset): """Sets the asset of this MyAdsListRequest. - Cryptocurrency # noqa: E501 + Crypto asset; omit to skip asset filter. # noqa: E501 :param asset: The asset of this MyAdsListRequest. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def asset(self, asset): def fiat_unit(self): """Gets the fiat_unit of this MyAdsListRequest. # noqa: E501 - Fiat currency # noqa: E501 + Fiat currency; omit to skip fiat filter. # noqa: E501 :return: The fiat_unit of this MyAdsListRequest. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def fiat_unit(self): def fiat_unit(self, fiat_unit): """Sets the fiat_unit of this MyAdsListRequest. - Fiat currency # noqa: E501 + Fiat currency; omit to skip fiat filter. # noqa: E501 :param fiat_unit: The fiat_unit of this MyAdsListRequest. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def fiat_unit(self, fiat_unit): def trade_type(self): """Gets the trade_type of this MyAdsListRequest. # noqa: E501 - Buy/Sell # noqa: E501 + Ad side: `buy` for buy-crypto ads, `sell` for sell-crypto ads; omit for all sides. # noqa: E501 :return: The trade_type of this MyAdsListRequest. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def trade_type(self): def trade_type(self, trade_type): """Sets the trade_type of this MyAdsListRequest. - Buy/Sell # noqa: E501 + Ad side: `buy` for buy-crypto ads, `sell` for sell-crypto ads; omit for all sides. # noqa: E501 :param trade_type: The trade_type of this MyAdsListRequest. # noqa: E501 :type: str diff --git a/gate_api/models/options_order_book.py b/gate_api/models/options_order_book.py index b23a917d..3cd0338f 100644 --- a/gate_api/models/options_order_book.py +++ b/gate_api/models/options_order_book.py @@ -36,8 +36,8 @@ class OptionsOrderBook(object): 'id': 'int', 'current': 'float', 'update': 'float', - 'asks': 'list[FuturesOrderBookItem1]', - 'bids': 'list[FuturesOrderBookItem1]' + 'asks': 'list[DeliveryOrderBookItem]', + 'bids': 'list[DeliveryOrderBookItem]' } attribute_map = { @@ -49,7 +49,7 @@ class OptionsOrderBook(object): } def __init__(self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None): # noqa: E501 - # type: (int, float, float, list[FuturesOrderBookItem1], list[FuturesOrderBookItem1], Configuration) -> None + # type: (int, float, float, list[DeliveryOrderBookItem], list[DeliveryOrderBookItem], Configuration) -> None """OptionsOrderBook - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -147,7 +147,7 @@ def asks(self): Ask Depth # noqa: E501 :return: The asks of this OptionsOrderBook. # noqa: E501 - :rtype: list[FuturesOrderBookItem1] + :rtype: list[DeliveryOrderBookItem] """ return self._asks @@ -158,7 +158,7 @@ def asks(self, asks): Ask Depth # noqa: E501 :param asks: The asks of this OptionsOrderBook. # noqa: E501 - :type: list[FuturesOrderBookItem1] + :type: list[DeliveryOrderBookItem] """ if self.local_vars_configuration.client_side_validation and asks is None: # noqa: E501 raise ValueError("Invalid value for `asks`, must not be `None`") # noqa: E501 @@ -172,7 +172,7 @@ def bids(self): Bid Depth # noqa: E501 :return: The bids of this OptionsOrderBook. # noqa: E501 - :rtype: list[FuturesOrderBookItem1] + :rtype: list[DeliveryOrderBookItem] """ return self._bids @@ -183,7 +183,7 @@ def bids(self, bids): Bid Depth # noqa: E501 :param bids: The bids of this OptionsOrderBook. # noqa: E501 - :type: list[FuturesOrderBookItem1] + :type: list[DeliveryOrderBookItem] """ if self.local_vars_configuration.client_side_validation and bids is None: # noqa: E501 raise ValueError("Invalid value for `bids`, must not be `None`") # noqa: E501 diff --git a/gate_api/models/order.py b/gate_api/models/order.py index 61a4b3d6..2d116060 100644 --- a/gate_api/models/order.py +++ b/gate_api/models/order.py @@ -69,7 +69,9 @@ class Order(object): 'stp_act': 'str', 'finish_as': 'str', 'action_mode': 'str', - 'slippage': 'str' + 'slippage': 'str', + 'stop_profit': 'SpotOrderStopProfit', + 'stop_loss': 'SpotOrderStopLoss' } attribute_map = { @@ -109,11 +111,13 @@ class Order(object): 'stp_act': 'stp_act', 'finish_as': 'finish_as', 'action_mode': 'action_mode', - 'slippage': 'slippage' + 'slippage': 'slippage', + 'stop_profit': 'stop_profit', + 'stop_loss': 'stop_loss' } - 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, slippage=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, 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, slippage=None, stop_profit=None, stop_loss=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, str, SpotOrderStopProfit, SpotOrderStopLoss, Configuration) -> None """Order - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -156,6 +160,8 @@ def __init__(self, id=None, text=None, amend_text=None, create_time=None, update self._finish_as = None self._action_mode = None self._slippage = None + self._stop_profit = None + self._stop_loss = None self.discriminator = None if id is not None: @@ -229,6 +235,10 @@ def __init__(self, id=None, text=None, amend_text=None, create_time=None, update self.action_mode = action_mode if slippage is not None: self.slippage = slippage + if stop_profit is not None: + self.stop_profit = stop_profit + if stop_loss is not None: + self.stop_loss = stop_loss @property def id(self): @@ -532,7 +542,7 @@ def side(self, side): def amount(self): """Gets the amount of this Order. # 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 + Trade amount When `type` is `limit`, this is the base currency to trade (the currency being bought or sold), e.g. `BTC` in `BTC_USDT`. When `type` is `market`, the meaning depends on the side: - `side`: `buy` refers to the quote currency, e.g. `USDT` in `BTC_USDT` - `side`: `sell` refers to the base currency, e.g. `BTC` in `BTC_USDT` # noqa: E501 :return: The amount of this Order. # noqa: E501 :rtype: str @@ -543,7 +553,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Order. - 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 + Trade amount When `type` is `limit`, this is the base currency to trade (the currency being bought or sold), e.g. `BTC` in `BTC_USDT`. When `type` is `market`, the meaning depends on the side: - `side`: `buy` refers to the quote currency, e.g. `USDT` in `BTC_USDT` - `side`: `sell` refers to the base currency, e.g. `BTC` in `BTC_USDT` # noqa: E501 :param amount: The amount of this Order. # noqa: E501 :type: str @@ -1052,7 +1062,7 @@ def stp_act(self, stp_act): def finish_as(self): """Gets the finish_as of this Order. # noqa: E501 - 订单结束方式,包括: - open: 等待处理 - filled: 完全成交 - cancelled: 用户撤销 - liquidate_cancelled: 爆仓撤销 - small: 订单数量太小 - depth_not_enough: 深度不足导致撤单 - trader_not_enough: 对手方不足导致撤单 - ioc: 未立即成交,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - poc: 未满足挂单策略,因为 tif 设置为 poc - fok: 未立即完全成交,因为 tif 设置为 fok - stp: 订单发生自成交限制而被撤销 - price_protect_cancelled: 价格保护导致撤单 - unknown: 未知 # noqa: E501 + How the order finished: - open: Pending processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled by liquidation - small: Order size too small - depth_not_enough: Cancelled due to insufficient order book depth - trader_not_enough: Cancelled due to insufficient counterparty liquidity - ioc: Not filled immediately because time-in-force is IOC - poc: Post-only requirement not met because time-in-force is set to poc (maker-only); rejected after being detected as taker - fok: Not fully filled immediately because time-in-force is FOK - stp: Cancelled due to self-trade prevention - price_protect_cancelled: Cancelled due to price protection - unknown: Unknown # noqa: E501 :return: The finish_as of this Order. # noqa: E501 :rtype: str @@ -1063,7 +1073,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this Order. - 订单结束方式,包括: - open: 等待处理 - filled: 完全成交 - cancelled: 用户撤销 - liquidate_cancelled: 爆仓撤销 - small: 订单数量太小 - depth_not_enough: 深度不足导致撤单 - trader_not_enough: 对手方不足导致撤单 - ioc: 未立即成交,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - poc: 未满足挂单策略,因为 tif 设置为 poc - fok: 未立即完全成交,因为 tif 设置为 fok - stp: 订单发生自成交限制而被撤销 - price_protect_cancelled: 价格保护导致撤单 - unknown: 未知 # noqa: E501 + How the order finished: - open: Pending processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled by liquidation - small: Order size too small - depth_not_enough: Cancelled due to insufficient order book depth - trader_not_enough: Cancelled due to insufficient counterparty liquidity - ioc: Not filled immediately because time-in-force is IOC - poc: Post-only requirement not met because time-in-force is set to poc (maker-only); rejected after being detected as taker - fok: Not fully filled immediately because time-in-force is FOK - stp: Cancelled due to self-trade prevention - price_protect_cancelled: Cancelled due to price protection - unknown: Unknown # noqa: E501 :param finish_as: The finish_as of this Order. # noqa: E501 :type: str @@ -1123,6 +1133,48 @@ def slippage(self, slippage): self._slippage = slippage + @property + def stop_profit(self): + """Gets the stop_profit of this Order. # noqa: E501 + + + :return: The stop_profit of this Order. # noqa: E501 + :rtype: SpotOrderStopProfit + """ + return self._stop_profit + + @stop_profit.setter + def stop_profit(self, stop_profit): + """Sets the stop_profit of this Order. + + + :param stop_profit: The stop_profit of this Order. # noqa: E501 + :type: SpotOrderStopProfit + """ + + self._stop_profit = stop_profit + + @property + def stop_loss(self): + """Gets the stop_loss of this Order. # noqa: E501 + + + :return: The stop_loss of this Order. # noqa: E501 + :rtype: SpotOrderStopLoss + """ + return self._stop_loss + + @stop_loss.setter + def stop_loss(self, stop_loss): + """Sets the stop_loss of this Order. + + + :param stop_loss: The stop_loss of this Order. # noqa: E501 + :type: SpotOrderStopLoss + """ + + self._stop_loss = stop_loss + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/order_create_v1_req.py b/gate_api/models/order_create_v1_req.py new file mode 100644 index 00000000..727a0eaf --- /dev/null +++ b/gate_api/models/order_create_v1_req.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 OrderCreateV1Req(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 = { + '_from': 'list[CreateParam]', + 'to': 'list[CreateParam]' + } + + attribute_map = { + '_from': 'from', + 'to': 'to' + } + + def __init__(self, _from=None, to=None, local_vars_configuration=None): # noqa: E501 + # type: (list[CreateParam], list[CreateParam], Configuration) -> None + """OrderCreateV1Req - 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.__from = None + self._to = None + self.discriminator = None + + self._from = _from + self.to = to + + @property + def _from(self): + """Gets the _from of this OrderCreateV1Req. # noqa: E501 + + Sell ​​side list, at least one item; each item is the currency and amount `amount` to be swapped out. # noqa: E501 + + :return: The _from of this OrderCreateV1Req. # noqa: E501 + :rtype: list[CreateParam] + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this OrderCreateV1Req. + + Sell ​​side list, at least one item; each item is the currency and amount `amount` to be swapped out. # noqa: E501 + + :param _from: The _from of this OrderCreateV1Req. # noqa: E501 + :type: list[CreateParam] + """ + 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 + + self.__from = _from + + @property + def to(self): + """Gets the to of this OrderCreateV1Req. # noqa: E501 + + Target side list, at least one item; each item is the target currency and **amount** `amount` (non-proportional). The structural semantics are different from `OrderPreviewV1Req.to` (`PreviewToParam`, including `ratio`), so do not mix them. # noqa: E501 + + :return: The to of this OrderCreateV1Req. # noqa: E501 + :rtype: list[CreateParam] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this OrderCreateV1Req. + + Target side list, at least one item; each item is the target currency and **amount** `amount` (non-proportional). The structural semantics are different from `OrderPreviewV1Req.to` (`PreviewToParam`, including `ratio`), so do not mix them. # noqa: E501 + + :param to: The to of this OrderCreateV1Req. # noqa: E501 + :type: list[CreateParam] + """ + 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 + + self._to = to + + 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, OrderCreateV1Req): + 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, OrderCreateV1Req): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_create_v1_resp.py b/gate_api/models/order_create_v1_resp.py new file mode 100644 index 00000000..6c8a0384 --- /dev/null +++ b/gate_api/models/order_create_v1_resp.py @@ -0,0 +1,122 @@ +# 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 OrderCreateV1Resp(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': 'CreateOrder' + } + + attribute_map = { + 'order': 'order' + } + + def __init__(self, order=None, local_vars_configuration=None): # noqa: E501 + # type: (CreateOrder, Configuration) -> None + """OrderCreateV1Resp - 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 = None + self.discriminator = None + + self.order = order + + @property + def order(self): + """Gets the order of this OrderCreateV1Resp. # noqa: E501 + + + :return: The order of this OrderCreateV1Resp. # noqa: E501 + :rtype: CreateOrder + """ + return self._order + + @order.setter + def order(self, order): + """Sets the order of this OrderCreateV1Resp. + + + :param order: The order of this OrderCreateV1Resp. # noqa: E501 + :type: CreateOrder + """ + if self.local_vars_configuration.client_side_validation and order is None: # noqa: E501 + raise ValueError("Invalid value for `order`, must not be `None`") # noqa: E501 + + self._order = order + + 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, OrderCreateV1Resp): + 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, OrderCreateV1Resp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_list_struct_list.py b/gate_api/models/order_list_struct_list.py index f741dcf7..9493cbb0 100644 --- a/gate_api/models/order_list_struct_list.py +++ b/gate_api/models/order_list_struct_list.py @@ -188,7 +188,7 @@ def type(self, type): def status(self): """Gets the status of this OrderListStructList. # noqa: E501 - Status # noqa: E501 + Status. 1 - success, 3 - delayed redemption in progress, 6 - redemption cancellation order # noqa: E501 :return: The status of this OrderListStructList. # noqa: E501 :rtype: int @@ -199,7 +199,7 @@ def status(self): def status(self, status): """Sets the status of this OrderListStructList. - Status # noqa: E501 + Status. 1 - success, 3 - delayed redemption in progress, 6 - redemption cancellation order # noqa: E501 :param status: The status of this OrderListStructList. # noqa: E501 :type: int diff --git a/gate_api/models/order_list_v1_resp.py b/gate_api/models/order_list_v1_resp.py new file mode 100644 index 00000000..ed1f6647 --- /dev/null +++ b/gate_api/models/order_list_v1_resp.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 OrderListV1Resp(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 = { + 'orders': 'list[CreateOrder]', + 'total': 'int' + } + + attribute_map = { + 'orders': 'orders', + 'total': 'total' + } + + def __init__(self, orders=None, total=None, local_vars_configuration=None): # noqa: E501 + # type: (list[CreateOrder], int, Configuration) -> None + """OrderListV1Resp - 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._orders = None + self._total = None + self.discriminator = None + + self.orders = orders + self.total = total + + @property + def orders(self): + """Gets the orders of this OrderListV1Resp. # noqa: E501 + + + :return: The orders of this OrderListV1Resp. # noqa: E501 + :rtype: list[CreateOrder] + """ + return self._orders + + @orders.setter + def orders(self, orders): + """Sets the orders of this OrderListV1Resp. + + + :param orders: The orders of this OrderListV1Resp. # noqa: E501 + :type: list[CreateOrder] + """ + if self.local_vars_configuration.client_side_validation and orders is None: # noqa: E501 + raise ValueError("Invalid value for `orders`, must not be `None`") # noqa: E501 + + self._orders = orders + + @property + def total(self): + """Gets the total of this OrderListV1Resp. # noqa: E501 + + + :return: The total of this OrderListV1Resp. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this OrderListV1Resp. + + + :param total: The total of this OrderListV1Resp. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 + raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 + + self._total = total + + 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, OrderListV1Resp): + 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, OrderListV1Resp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_log.py b/gate_api/models/order_log.py new file mode 100644 index 00000000..ed491a0f --- /dev/null +++ b/gate_api/models/order_log.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 OrderLog(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 = { + 'timestamp': 'int', + 'data': 'OrderLogData' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'data': 'data' + } + + def __init__(self, timestamp=None, data=None, local_vars_configuration=None): # noqa: E501 + # type: (int, OrderLogData, Configuration) -> None + """OrderLog - 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._timestamp = None + self._data = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if data is not None: + self.data = data + + @property + def timestamp(self): + """Gets the timestamp of this OrderLog. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this OrderLog. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this OrderLog. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this OrderLog. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + @property + def data(self): + """Gets the data of this OrderLog. # noqa: E501 + + + :return: The data of this OrderLog. # noqa: E501 + :rtype: OrderLogData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OrderLog. + + + :param data: The data of this OrderLog. # noqa: E501 + :type: OrderLogData + """ + + self._data = data + + 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, OrderLog): + 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, OrderLog): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_log_data.py b/gate_api/models/order_log_data.py new file mode 100644 index 00000000..076c69b2 --- /dev/null +++ b/gate_api/models/order_log_data.py @@ -0,0 +1,331 @@ +# 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 OrderLogData(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', + 'log_id': 'int', + 'symbol': 'str', + 'price_type': 'str', + 'state': 'int', + 'side': 'int', + 'volume': 'str', + 'price': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'log_id': 'log_id', + 'symbol': 'symbol', + 'price_type': 'price_type', + 'state': 'state', + 'side': 'side', + 'volume': 'volume', + 'price': 'price' + } + + def __init__(self, order_id=None, log_id=None, symbol=None, price_type=None, state=None, side=None, volume=None, price=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, int, int, str, str, Configuration) -> None + """OrderLogData - 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._log_id = None + self._symbol = None + self._price_type = None + self._state = None + self._side = None + self._volume = None + self._price = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if log_id is not None: + self.log_id = log_id + if symbol is not None: + self.symbol = symbol + if price_type is not None: + self.price_type = price_type + if state is not None: + self.state = state + if side is not None: + self.side = side + if volume is not None: + self.volume = volume + if price is not None: + self.price = price + + @property + def order_id(self): + """Gets the order_id of this OrderLogData. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this OrderLogData. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this OrderLogData. + + Order ID # noqa: E501 + + :param order_id: The order_id of this OrderLogData. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def log_id(self): + """Gets the log_id of this OrderLogData. # noqa: E501 + + logID # noqa: E501 + + :return: The log_id of this OrderLogData. # noqa: E501 + :rtype: int + """ + return self._log_id + + @log_id.setter + def log_id(self, log_id): + """Sets the log_id of this OrderLogData. + + logID # noqa: E501 + + :param log_id: The log_id of this OrderLogData. # noqa: E501 + :type: int + """ + + self._log_id = log_id + + @property + def symbol(self): + """Gets the symbol of this OrderLogData. # noqa: E501 + + Trading pair of the order # noqa: E501 + + :return: The symbol of this OrderLogData. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this OrderLogData. + + Trading pair of the order # noqa: E501 + + :param symbol: The symbol of this OrderLogData. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def price_type(self): + """Gets the price_type of this OrderLogData. # noqa: E501 + + Trade type (market=market price, trigger=trigger price) # noqa: E501 + + :return: The price_type of this OrderLogData. # noqa: E501 + :rtype: str + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this OrderLogData. + + Trade type (market=market price, trigger=trigger price) # noqa: E501 + + :param price_type: The price_type of this OrderLogData. # noqa: E501 + :type: str + """ + allowed_values = ["market", "trigger"] # 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}" # noqa: E501 + .format(price_type, allowed_values) + ) + + self._price_type = price_type + + @property + def state(self): + """Gets the state of this OrderLogData. # noqa: E501 + + Order status code (1=placed, 2=canceled, 3=partially filled, 4=filled, 5=rejected) # noqa: E501 + + :return: The state of this OrderLogData. # noqa: E501 + :rtype: int + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this OrderLogData. + + Order status code (1=placed, 2=canceled, 3=partially filled, 4=filled, 5=rejected) # noqa: E501 + + :param state: The state of this OrderLogData. # noqa: E501 + :type: int + """ + + self._state = state + + @property + def side(self): + """Gets the side of this OrderLogData. # noqa: E501 + + Order side (1=sell, 2=buy) # noqa: E501 + + :return: The side of this OrderLogData. # noqa: E501 + :rtype: int + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this OrderLogData. + + Order side (1=sell, 2=buy) # noqa: E501 + + :param side: The side of this OrderLogData. # noqa: E501 + :type: int + """ + allowed_values = [1, 2] # 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}" # noqa: E501 + .format(side, allowed_values) + ) + + self._side = side + + @property + def volume(self): + """Gets the volume of this OrderLogData. # noqa: E501 + + Order volume # noqa: E501 + + :return: The volume of this OrderLogData. # noqa: E501 + :rtype: str + """ + return self._volume + + @volume.setter + def volume(self, volume): + """Sets the volume of this OrderLogData. + + Order volume # noqa: E501 + + :param volume: The volume of this OrderLogData. # noqa: E501 + :type: str + """ + + self._volume = volume + + @property + def price(self): + """Gets the price of this OrderLogData. # noqa: E501 + + Average fill price # noqa: E501 + + :return: The price of this OrderLogData. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OrderLogData. + + Average fill price # noqa: E501 + + :param price: The price of this OrderLogData. # 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, OrderLogData): + 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, OrderLogData): + 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 8e590359..f8dc4388 100644 --- a/gate_api/models/order_patch.py +++ b/gate_api/models/order_patch.py @@ -38,7 +38,9 @@ class OrderPatch(object): 'amount': 'str', 'price': 'str', 'amend_text': 'str', - 'action_mode': 'str' + 'action_mode': 'str', + 'stop_profit': 'SpotOrderStopProfit', + 'stop_loss': 'SpotOrderStopLoss' } attribute_map = { @@ -47,11 +49,13 @@ class OrderPatch(object): 'amount': 'amount', 'price': 'price', 'amend_text': 'amend_text', - 'action_mode': 'action_mode' + 'action_mode': 'action_mode', + 'stop_profit': 'stop_profit', + 'stop_loss': 'stop_loss' } - 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 + def __init__(self, currency_pair=None, account=None, amount=None, price=None, amend_text=None, action_mode=None, stop_profit=None, stop_loss=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, SpotOrderStopProfit, SpotOrderStopLoss, Configuration) -> None """OrderPatch - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -63,6 +67,8 @@ def __init__(self, currency_pair=None, account=None, amount=None, price=None, am self._price = None self._amend_text = None self._action_mode = None + self._stop_profit = None + self._stop_loss = None self.discriminator = None if currency_pair is not None: @@ -77,6 +83,10 @@ def __init__(self, currency_pair=None, account=None, amount=None, price=None, am self.amend_text = amend_text if action_mode is not None: self.action_mode = action_mode + if stop_profit is not None: + self.stop_profit = stop_profit + if stop_loss is not None: + self.stop_loss = stop_loss @property def currency_pair(self): @@ -219,6 +229,48 @@ def action_mode(self, action_mode): self._action_mode = action_mode + @property + def stop_profit(self): + """Gets the stop_profit of this OrderPatch. # noqa: E501 + + + :return: The stop_profit of this OrderPatch. # noqa: E501 + :rtype: SpotOrderStopProfit + """ + return self._stop_profit + + @stop_profit.setter + def stop_profit(self, stop_profit): + """Sets the stop_profit of this OrderPatch. + + + :param stop_profit: The stop_profit of this OrderPatch. # noqa: E501 + :type: SpotOrderStopProfit + """ + + self._stop_profit = stop_profit + + @property + def stop_loss(self): + """Gets the stop_loss of this OrderPatch. # noqa: E501 + + + :return: The stop_loss of this OrderPatch. # noqa: E501 + :rtype: SpotOrderStopLoss + """ + return self._stop_loss + + @stop_loss.setter + def stop_loss(self, stop_loss): + """Sets the stop_loss of this OrderPatch. + + + :param stop_loss: The stop_loss of this OrderPatch. # noqa: E501 + :type: SpotOrderStopLoss + """ + + self._stop_loss = stop_loss + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/order_preview_v1_req.py b/gate_api/models/order_preview_v1_req.py new file mode 100644 index 00000000..3d88c8b6 --- /dev/null +++ b/gate_api/models/order_preview_v1_req.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 OrderPreviewV1Req(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 = { + '_from': 'list[PreviewFromParam]', + 'to': 'list[PreviewToParam]' + } + + attribute_map = { + '_from': 'from', + 'to': 'to' + } + + def __init__(self, _from=None, to=None, local_vars_configuration=None): # noqa: E501 + # type: (list[PreviewFromParam], list[PreviewToParam], Configuration) -> None + """OrderPreviewV1Req - 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.__from = None + self._to = None + self.discriminator = None + + self._from = _from + self.to = to + + @property + def _from(self): + """Gets the _from of this OrderPreviewV1Req. # noqa: E501 + + Sell ​​side; each item is the currency + the swap amount `amount` (string decimal). # noqa: E501 + + :return: The _from of this OrderPreviewV1Req. # noqa: E501 + :rtype: list[PreviewFromParam] + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this OrderPreviewV1Req. + + Sell ​​side; each item is the currency + the swap amount `amount` (string decimal). # noqa: E501 + + :param _from: The _from of this OrderPreviewV1Req. # noqa: E501 + :type: list[PreviewFromParam] + """ + 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 + + self.__from = _from + + @property + def to(self): + """Gets the to of this OrderPreviewV1Req. # noqa: E501 + + Target side; each item is currency + **ratio** `ratio` (string decimal, such as `0.5`). Typical source: `GET /asset-swap/config` → `recommend_v2` `schemes[].name` / `schemes[].ratio` of the strategy under a certain group. # noqa: E501 + + :return: The to of this OrderPreviewV1Req. # noqa: E501 + :rtype: list[PreviewToParam] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this OrderPreviewV1Req. + + Target side; each item is currency + **ratio** `ratio` (string decimal, such as `0.5`). Typical source: `GET /asset-swap/config` → `recommend_v2` `schemes[].name` / `schemes[].ratio` of the strategy under a certain group. # noqa: E501 + + :param to: The to of this OrderPreviewV1Req. # noqa: E501 + :type: list[PreviewToParam] + """ + 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 + + self._to = to + + 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, OrderPreviewV1Req): + 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, OrderPreviewV1Req): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_preview_v1_resp.py b/gate_api/models/order_preview_v1_resp.py new file mode 100644 index 00000000..d2f995b6 --- /dev/null +++ b/gate_api/models/order_preview_v1_resp.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 OrderPreviewV1Resp(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': 'PreviewOrder', + 'transaction_fee': 'str' + } + + attribute_map = { + 'order': 'order', + 'transaction_fee': 'transaction_fee' + } + + def __init__(self, order=None, transaction_fee=None, local_vars_configuration=None): # noqa: E501 + # type: (PreviewOrder, str, Configuration) -> None + """OrderPreviewV1Resp - 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 = None + self._transaction_fee = None + self.discriminator = None + + self.order = order + self.transaction_fee = transaction_fee + + @property + def order(self): + """Gets the order of this OrderPreviewV1Resp. # noqa: E501 + + + :return: The order of this OrderPreviewV1Resp. # noqa: E501 + :rtype: PreviewOrder + """ + return self._order + + @order.setter + def order(self, order): + """Sets the order of this OrderPreviewV1Resp. + + + :param order: The order of this OrderPreviewV1Resp. # noqa: E501 + :type: PreviewOrder + """ + if self.local_vars_configuration.client_side_validation and order is None: # noqa: E501 + raise ValueError("Invalid value for `order`, must not be `None`") # noqa: E501 + + self._order = order + + @property + def transaction_fee(self): + """Gets the transaction_fee of this OrderPreviewV1Resp. # noqa: E501 + + + :return: The transaction_fee of this OrderPreviewV1Resp. # noqa: E501 + :rtype: str + """ + return self._transaction_fee + + @transaction_fee.setter + def transaction_fee(self, transaction_fee): + """Sets the transaction_fee of this OrderPreviewV1Resp. + + + :param transaction_fee: The transaction_fee of this OrderPreviewV1Resp. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and transaction_fee is None: # noqa: E501 + raise ValueError("Invalid value for `transaction_fee`, must not be `None`") # noqa: E501 + + self._transaction_fee = transaction_fee + + 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, OrderPreviewV1Resp): + 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, OrderPreviewV1Resp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2007.py b/gate_api/models/otc_action_response.py similarity index 80% rename from gate_api/models/inline_response2007.py rename to gate_api/models/otc_action_response.py index 3ab64175..490f2e70 100644 --- a/gate_api/models/inline_response2007.py +++ b/gate_api/models/otc_action_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2007(object): +class OtcActionResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -46,7 +46,7 @@ class InlineResponse2007(object): def __init__(self, code=None, message=None, timestamp=None, local_vars_configuration=None): # noqa: E501 # type: (int, str, int, Configuration) -> None - """InlineResponse2007 - a model defined in OpenAPI""" # noqa: E501 + """OtcActionResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -62,20 +62,20 @@ def __init__(self, code=None, message=None, timestamp=None, local_vars_configura @property def code(self): - """Gets the code of this InlineResponse2007. # noqa: E501 + """Gets the code of this OtcActionResponse. # noqa: E501 - :return: The code of this InlineResponse2007. # noqa: E501 + :return: The code of this OtcActionResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse2007. + """Sets the code of this OtcActionResponse. - :param code: The code of this InlineResponse2007. # noqa: E501 + :param code: The code of this OtcActionResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 @@ -85,20 +85,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse2007. # noqa: E501 + """Gets the message of this OtcActionResponse. # noqa: E501 - :return: The message of this InlineResponse2007. # noqa: E501 + :return: The message of this OtcActionResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse2007. + """Sets the message of this OtcActionResponse. - :param message: The message of this InlineResponse2007. # noqa: E501 + :param message: The message of this OtcActionResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 @@ -108,20 +108,20 @@ def message(self, message): @property def timestamp(self): - """Gets the timestamp of this InlineResponse2007. # noqa: E501 + """Gets the timestamp of this OtcActionResponse. # noqa: E501 - :return: The timestamp of this InlineResponse2007. # noqa: E501 + :return: The timestamp of this OtcActionResponse. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse2007. + """Sets the timestamp of this OtcActionResponse. - :param timestamp: The timestamp of this InlineResponse2007. # noqa: E501 + :param timestamp: The timestamp of this OtcActionResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 @@ -163,14 +163,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2007): + if not isinstance(other, OtcActionResponse): 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, InlineResponse2007): + if not isinstance(other, OtcActionResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_create_multipart_request.py b/gate_api/models/otc_bank_create_multipart_request.py new file mode 100644 index 00000000..697de0b8 --- /dev/null +++ b/gate_api/models/otc_bank_create_multipart_request.py @@ -0,0 +1,364 @@ +# 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 OtcBankCreateMultipartRequest(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 = { + 'bank_account_name': 'str', + 'bank_name': 'str', + 'bank_country': 'str', + 'bank_address': 'str', + 'iban': 'str', + 'swift': 'str', + 'remittance_line_number': 'str', + 'agent_bank_name': 'str', + 'agent_bank_swift': 'str', + 'documentation_file': 'str' + } + + attribute_map = { + 'bank_account_name': 'bank_account_name', + 'bank_name': 'bank_name', + 'bank_country': 'bank_country', + 'bank_address': 'bank_address', + 'iban': 'iban', + 'swift': 'swift', + 'remittance_line_number': 'remittance_line_number', + 'agent_bank_name': 'agent_bank_name', + 'agent_bank_swift': 'agent_bank_swift', + 'documentation_file': 'documentation_file' + } + + def __init__(self, bank_account_name=None, bank_name=None, bank_country=None, bank_address=None, iban=None, swift=None, remittance_line_number=None, agent_bank_name=None, agent_bank_swift=None, documentation_file=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """OtcBankCreateMultipartRequest - 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._bank_account_name = None + self._bank_name = None + self._bank_country = None + self._bank_address = None + self._iban = None + self._swift = None + self._remittance_line_number = None + self._agent_bank_name = None + self._agent_bank_swift = None + self._documentation_file = None + self.discriminator = None + + self.bank_account_name = bank_account_name + self.bank_name = bank_name + self.bank_country = bank_country + self.bank_address = bank_address + self.iban = iban + self.swift = swift + if remittance_line_number is not None: + self.remittance_line_number = remittance_line_number + if agent_bank_name is not None: + self.agent_bank_name = agent_bank_name + if agent_bank_swift is not None: + self.agent_bank_swift = agent_bank_swift + self.documentation_file = documentation_file + + @property + def bank_account_name(self): + """Gets the bank_account_name of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The bank_account_name of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._bank_account_name + + @bank_account_name.setter + def bank_account_name(self, bank_account_name): + """Sets the bank_account_name of this OtcBankCreateMultipartRequest. + + + :param bank_account_name: The bank_account_name of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and bank_account_name is None: # noqa: E501 + raise ValueError("Invalid value for `bank_account_name`, must not be `None`") # noqa: E501 + + self._bank_account_name = bank_account_name + + @property + def bank_name(self): + """Gets the bank_name of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The bank_name of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._bank_name + + @bank_name.setter + def bank_name(self, bank_name): + """Sets the bank_name of this OtcBankCreateMultipartRequest. + + + :param bank_name: The bank_name of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and bank_name is None: # noqa: E501 + raise ValueError("Invalid value for `bank_name`, must not be `None`") # noqa: E501 + + self._bank_name = bank_name + + @property + def bank_country(self): + """Gets the bank_country of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The bank_country of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._bank_country + + @bank_country.setter + def bank_country(self, bank_country): + """Sets the bank_country of this OtcBankCreateMultipartRequest. + + + :param bank_country: The bank_country of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and bank_country is None: # noqa: E501 + raise ValueError("Invalid value for `bank_country`, must not be `None`") # noqa: E501 + + self._bank_country = bank_country + + @property + def bank_address(self): + """Gets the bank_address of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The bank_address of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._bank_address + + @bank_address.setter + def bank_address(self, bank_address): + """Sets the bank_address of this OtcBankCreateMultipartRequest. + + + :param bank_address: The bank_address of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and bank_address is None: # noqa: E501 + raise ValueError("Invalid value for `bank_address`, must not be `None`") # noqa: E501 + + self._bank_address = bank_address + + @property + def iban(self): + """Gets the iban of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The iban of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._iban + + @iban.setter + def iban(self, iban): + """Sets the iban of this OtcBankCreateMultipartRequest. + + + :param iban: The iban of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and iban is None: # noqa: E501 + raise ValueError("Invalid value for `iban`, must not be `None`") # noqa: E501 + + self._iban = iban + + @property + def swift(self): + """Gets the swift of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The swift of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._swift + + @swift.setter + def swift(self, swift): + """Sets the swift of this OtcBankCreateMultipartRequest. + + + :param swift: The swift of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and swift is None: # noqa: E501 + raise ValueError("Invalid value for `swift`, must not be `None`") # noqa: E501 + + self._swift = swift + + @property + def remittance_line_number(self): + """Gets the remittance_line_number of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The remittance_line_number of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._remittance_line_number + + @remittance_line_number.setter + def remittance_line_number(self, remittance_line_number): + """Sets the remittance_line_number of this OtcBankCreateMultipartRequest. + + + :param remittance_line_number: The remittance_line_number of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + + self._remittance_line_number = remittance_line_number + + @property + def agent_bank_name(self): + """Gets the agent_bank_name of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The agent_bank_name of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._agent_bank_name + + @agent_bank_name.setter + def agent_bank_name(self, agent_bank_name): + """Sets the agent_bank_name of this OtcBankCreateMultipartRequest. + + + :param agent_bank_name: The agent_bank_name of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + + self._agent_bank_name = agent_bank_name + + @property + def agent_bank_swift(self): + """Gets the agent_bank_swift of this OtcBankCreateMultipartRequest. # noqa: E501 + + + :return: The agent_bank_swift of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._agent_bank_swift + + @agent_bank_swift.setter + def agent_bank_swift(self, agent_bank_swift): + """Sets the agent_bank_swift of this OtcBankCreateMultipartRequest. + + + :param agent_bank_swift: The agent_bank_swift of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + + self._agent_bank_swift = agent_bank_swift + + @property + def documentation_file(self): + """Gets the documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 + + 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) # noqa: E501 + + :return: The documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._documentation_file + + @documentation_file.setter + def documentation_file(self, documentation_file): + """Sets the documentation_file of this OtcBankCreateMultipartRequest. + + 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) # noqa: E501 + + :param documentation_file: The documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and documentation_file is None: # noqa: E501 + raise ValueError("Invalid value for `documentation_file`, must not be `None`") # noqa: E501 + + self._documentation_file = documentation_file + + 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, OtcBankCreateMultipartRequest): + 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, OtcBankCreateMultipartRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_create_response.py b/gate_api/models/otc_bank_create_response.py new file mode 100644 index 00000000..16482959 --- /dev/null +++ b/gate_api/models/otc_bank_create_response.py @@ -0,0 +1,202 @@ +# 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 OtcBankCreateResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'OtcBankCreateResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, OtcBankCreateResponseData, int, Configuration) -> None + """OtcBankCreateResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this OtcBankCreateResponse. # noqa: E501 + + + :return: The code of this OtcBankCreateResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this OtcBankCreateResponse. + + + :param code: The code of this OtcBankCreateResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this OtcBankCreateResponse. # noqa: E501 + + + :return: The message of this OtcBankCreateResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this OtcBankCreateResponse. + + + :param message: The message of this OtcBankCreateResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this OtcBankCreateResponse. # noqa: E501 + + + :return: The data of this OtcBankCreateResponse. # noqa: E501 + :rtype: OtcBankCreateResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OtcBankCreateResponse. + + + :param data: The data of this OtcBankCreateResponse. # noqa: E501 + :type: OtcBankCreateResponseData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this OtcBankCreateResponse. # noqa: E501 + + + :return: The timestamp of this OtcBankCreateResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this OtcBankCreateResponse. + + + :param timestamp: The timestamp of this OtcBankCreateResponse. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, OtcBankCreateResponse): + 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, OtcBankCreateResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_create_response_data.py b/gate_api/models/otc_bank_create_response_data.py new file mode 100644 index 00000000..1d2a38bf --- /dev/null +++ b/gate_api/models/otc_bank_create_response_data.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 OtcBankCreateResponseData(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 = { + 'bank_id': 'int', + 'status': 'int' + } + + attribute_map = { + 'bank_id': 'bank_id', + 'status': 'status' + } + + def __init__(self, bank_id=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, Configuration) -> None + """OtcBankCreateResponseData - 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._bank_id = None + self._status = None + self.discriminator = None + + self.bank_id = bank_id + self.status = status + + @property + def bank_id(self): + """Gets the bank_id of this OtcBankCreateResponseData. # noqa: E501 + + Bank card primary key in otc_rds. # noqa: E501 + + :return: The bank_id of this OtcBankCreateResponseData. # noqa: E501 + :rtype: int + """ + return self._bank_id + + @bank_id.setter + def bank_id(self, bank_id): + """Sets the bank_id of this OtcBankCreateResponseData. + + Bank card primary key in otc_rds. # noqa: E501 + + :param bank_id: The bank_id of this OtcBankCreateResponseData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and bank_id is None: # noqa: E501 + raise ValueError("Invalid value for `bank_id`, must not be `None`") # noqa: E501 + + self._bank_id = bank_id + + @property + def status(self): + """Gets the status of this OtcBankCreateResponseData. # noqa: E501 + + Review status (e.g., pending review). # noqa: E501 + + :return: The status of this OtcBankCreateResponseData. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this OtcBankCreateResponseData. + + Review status (e.g., pending review). # noqa: E501 + + :param status: The status of this OtcBankCreateResponseData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + 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, OtcBankCreateResponseData): + 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, OtcBankCreateResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_enterprise_supplement_multipart_request.py b/gate_api/models/otc_bank_enterprise_supplement_multipart_request.py new file mode 100644 index 00000000..5b962cec --- /dev/null +++ b/gate_api/models/otc_bank_enterprise_supplement_multipart_request.py @@ -0,0 +1,320 @@ +# 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 OtcBankEnterpriseSupplementMultipartRequest(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': 'str', + 'bank_id': 'str', + 'certificate': 'str', + 'share_holders': 'str', + 'passport': 'str', + 'share_holding_structure': 'str', + 'funds_statement': 'str', + 'additional': 'str' + } + + attribute_map = { + 'uid': 'uid', + 'bank_id': 'bank_id', + 'certificate': 'certificate', + 'share_holders': 'share_holders', + 'passport': 'passport', + 'share_holding_structure': 'share_holding_structure', + 'funds_statement': 'funds_statement', + 'additional': 'additional' + } + + def __init__(self, uid=None, bank_id=None, certificate=None, share_holders=None, passport=None, share_holding_structure=None, funds_statement=None, additional=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, Configuration) -> None + """OtcBankEnterpriseSupplementMultipartRequest - 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._bank_id = None + self._certificate = None + self._share_holders = None + self._passport = None + self._share_holding_structure = None + self._funds_statement = None + self._additional = None + self.discriminator = None + + if uid is not None: + self.uid = uid + self.bank_id = bank_id + self.certificate = certificate + self.share_holders = share_holders + self.passport = passport + self.share_holding_structure = share_holding_structure + if funds_statement is not None: + self.funds_statement = funds_statement + if additional is not None: + self.additional = additional + + @property + def uid(self): + """Gets the uid of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + + + :return: The uid of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this OtcBankEnterpriseSupplementMultipartRequest. + + + :param uid: The uid of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def bank_id(self): + """Gets the bank_id of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + + + :return: The bank_id of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._bank_id + + @bank_id.setter + def bank_id(self, bank_id): + """Sets the bank_id of this OtcBankEnterpriseSupplementMultipartRequest. + + + :param bank_id: The bank_id of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and bank_id is None: # noqa: E501 + raise ValueError("Invalid value for `bank_id`, must not be `None`") # noqa: E501 + + self._bank_id = bank_id + + @property + def certificate(self): + """Gets the certificate of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + + Business license / registration certificate file content (multipart file field, binary/Base64) # noqa: E501 + + :return: The certificate of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._certificate + + @certificate.setter + def certificate(self, certificate): + """Sets the certificate of this OtcBankEnterpriseSupplementMultipartRequest. + + Business license / registration certificate file content (multipart file field, binary/Base64) # noqa: E501 + + :param certificate: The certificate of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and certificate is None: # noqa: E501 + raise ValueError("Invalid value for `certificate`, must not be `None`") # noqa: E501 + + self._certificate = certificate + + @property + def share_holders(self): + """Gets the share_holders of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + + Register of shareholders file content (multipart file field, binary/Base64) # noqa: E501 + + :return: The share_holders of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._share_holders + + @share_holders.setter + def share_holders(self, share_holders): + """Sets the share_holders of this OtcBankEnterpriseSupplementMultipartRequest. + + Register of shareholders file content (multipart file field, binary/Base64) # noqa: E501 + + :param share_holders: The share_holders of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and share_holders is None: # noqa: E501 + raise ValueError("Invalid value for `share_holders`, must not be `None`") # noqa: E501 + + self._share_holders = share_holders + + @property + def passport(self): + """Gets the passport of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + + Legal representative / shareholder passport file content (multipart file field, binary/Base64) # noqa: E501 + + :return: The passport of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._passport + + @passport.setter + def passport(self, passport): + """Sets the passport of this OtcBankEnterpriseSupplementMultipartRequest. + + Legal representative / shareholder passport file content (multipart file field, binary/Base64) # noqa: E501 + + :param passport: The passport of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and passport is None: # noqa: E501 + raise ValueError("Invalid value for `passport`, must not be `None`") # noqa: E501 + + self._passport = passport + + @property + def share_holding_structure(self): + """Gets the share_holding_structure of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + + Ownership structure chart file content (multipart file field, binary/Base64) # noqa: E501 + + :return: The share_holding_structure of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._share_holding_structure + + @share_holding_structure.setter + def share_holding_structure(self, share_holding_structure): + """Sets the share_holding_structure of this OtcBankEnterpriseSupplementMultipartRequest. + + Ownership structure chart file content (multipart file field, binary/Base64) # noqa: E501 + + :param share_holding_structure: The share_holding_structure of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and share_holding_structure is None: # noqa: E501 + raise ValueError("Invalid value for `share_holding_structure`, must not be `None`") # noqa: E501 + + self._share_holding_structure = share_holding_structure + + @property + def funds_statement(self): + """Gets the funds_statement of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + + Proof-of-funds file content (multipart file field, binary/Base64, optional) # noqa: E501 + + :return: The funds_statement of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._funds_statement + + @funds_statement.setter + def funds_statement(self, funds_statement): + """Sets the funds_statement of this OtcBankEnterpriseSupplementMultipartRequest. + + Proof-of-funds file content (multipart file field, binary/Base64, optional) # noqa: E501 + + :param funds_statement: The funds_statement of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :type: str + """ + + self._funds_statement = funds_statement + + @property + def additional(self): + """Gets the additional of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + + Other supplementary material file content (multipart file field, binary/Base64, optional) # noqa: E501 + + :return: The additional of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._additional + + @additional.setter + def additional(self, additional): + """Sets the additional of this OtcBankEnterpriseSupplementMultipartRequest. + + Other supplementary material file content (multipart file field, binary/Base64, optional) # noqa: E501 + + :param additional: The additional of this OtcBankEnterpriseSupplementMultipartRequest. # noqa: E501 + :type: str + """ + + self._additional = additional + + 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, OtcBankEnterpriseSupplementMultipartRequest): + 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, OtcBankEnterpriseSupplementMultipartRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_id_request.py b/gate_api/models/otc_bank_id_request.py new file mode 100644 index 00000000..403dd182 --- /dev/null +++ b/gate_api/models/otc_bank_id_request.py @@ -0,0 +1,124 @@ +# 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 OtcBankIdRequest(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 = { + 'bank_id': 'str' + } + + attribute_map = { + 'bank_id': 'bank_id' + } + + def __init__(self, bank_id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, Configuration) -> None + """OtcBankIdRequest - 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._bank_id = None + self.discriminator = None + + self.bank_id = bank_id + + @property + def bank_id(self): + """Gets the bank_id of this OtcBankIdRequest. # noqa: E501 + + Bank card ID # noqa: E501 + + :return: The bank_id of this OtcBankIdRequest. # noqa: E501 + :rtype: str + """ + return self._bank_id + + @bank_id.setter + def bank_id(self, bank_id): + """Sets the bank_id of this OtcBankIdRequest. + + Bank card ID # noqa: E501 + + :param bank_id: The bank_id of this OtcBankIdRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and bank_id is None: # noqa: E501 + raise ValueError("Invalid value for `bank_id`, must not be `None`") # noqa: E501 + + self._bank_id = bank_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, OtcBankIdRequest): + 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, OtcBankIdRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20010_data_lists.py b/gate_api/models/otc_bank_list_item.py similarity index 68% rename from gate_api/models/inline_response20010_data_lists.py rename to gate_api/models/otc_bank_list_item.py index 0897690c..cccd5a38 100644 --- a/gate_api/models/inline_response20010_data_lists.py +++ b/gate_api/models/otc_bank_list_item.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20010DataLists(object): +class OtcBankListItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -80,7 +80,7 @@ class InlineResponse20010DataLists(object): def __init__(self, id=None, bank_account_name=None, bank_name=None, bank_country=None, bank_address=None, bank_code=None, branch_code=None, iban=None, swift=None, remittance_line_number=None, agent_bank_name=None, agent_bank_swift=None, submit_time=None, update_time=None, status=None, documentation_file_type=None, memo=None, is_default=None, bank_id=None, documentation_file_key_url=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, int, str, str, Configuration) -> None - """InlineResponse20010DataLists - a model defined in OpenAPI""" # noqa: E501 + """OtcBankListItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -147,22 +147,22 @@ def __init__(self, id=None, bank_account_name=None, bank_name=None, bank_country @property def id(self): - """Gets the id of this InlineResponse20010DataLists. # noqa: E501 + """Gets the id of this OtcBankListItem. # noqa: E501 Bank ID (required for order placement) # noqa: E501 - :return: The id of this InlineResponse20010DataLists. # noqa: E501 + :return: The id of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this InlineResponse20010DataLists. + """Sets the id of this OtcBankListItem. Bank ID (required for order placement) # noqa: E501 - :param id: The id of this InlineResponse20010DataLists. # noqa: E501 + :param id: The id of this OtcBankListItem. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 @@ -172,22 +172,22 @@ def id(self, id): @property def bank_account_name(self): - """Gets the bank_account_name of this InlineResponse20010DataLists. # noqa: E501 + """Gets the bank_account_name of this OtcBankListItem. # noqa: E501 Bank account name # noqa: E501 - :return: The bank_account_name of this InlineResponse20010DataLists. # noqa: E501 + :return: The bank_account_name of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._bank_account_name @bank_account_name.setter def bank_account_name(self, bank_account_name): - """Sets the bank_account_name of this InlineResponse20010DataLists. + """Sets the bank_account_name of this OtcBankListItem. Bank account name # noqa: E501 - :param bank_account_name: The bank_account_name of this InlineResponse20010DataLists. # noqa: E501 + :param bank_account_name: The bank_account_name of this OtcBankListItem. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and bank_account_name is None: # noqa: E501 @@ -197,22 +197,22 @@ def bank_account_name(self, bank_account_name): @property def bank_name(self): - """Gets the bank_name of this InlineResponse20010DataLists. # noqa: E501 + """Gets the bank_name of this OtcBankListItem. # noqa: E501 Bank name # noqa: E501 - :return: The bank_name of this InlineResponse20010DataLists. # noqa: E501 + :return: The bank_name of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._bank_name @bank_name.setter def bank_name(self, bank_name): - """Sets the bank_name of this InlineResponse20010DataLists. + """Sets the bank_name of this OtcBankListItem. Bank name # noqa: E501 - :param bank_name: The bank_name of this InlineResponse20010DataLists. # noqa: E501 + :param bank_name: The bank_name of this OtcBankListItem. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and bank_name is None: # noqa: E501 @@ -222,22 +222,22 @@ def bank_name(self, bank_name): @property def bank_country(self): - """Gets the bank_country of this InlineResponse20010DataLists. # noqa: E501 + """Gets the bank_country of this OtcBankListItem. # noqa: E501 Bank country # noqa: E501 - :return: The bank_country of this InlineResponse20010DataLists. # noqa: E501 + :return: The bank_country of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._bank_country @bank_country.setter def bank_country(self, bank_country): - """Sets the bank_country of this InlineResponse20010DataLists. + """Sets the bank_country of this OtcBankListItem. Bank country # noqa: E501 - :param bank_country: The bank_country of this InlineResponse20010DataLists. # noqa: E501 + :param bank_country: The bank_country of this OtcBankListItem. # noqa: E501 :type: str """ @@ -245,22 +245,22 @@ def bank_country(self, bank_country): @property def bank_address(self): - """Gets the bank_address of this InlineResponse20010DataLists. # noqa: E501 + """Gets the bank_address of this OtcBankListItem. # noqa: E501 Bank address # noqa: E501 - :return: The bank_address of this InlineResponse20010DataLists. # noqa: E501 + :return: The bank_address of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._bank_address @bank_address.setter def bank_address(self, bank_address): - """Sets the bank_address of this InlineResponse20010DataLists. + """Sets the bank_address of this OtcBankListItem. Bank address # noqa: E501 - :param bank_address: The bank_address of this InlineResponse20010DataLists. # noqa: E501 + :param bank_address: The bank_address of this OtcBankListItem. # noqa: E501 :type: str """ @@ -268,22 +268,22 @@ def bank_address(self, bank_address): @property def bank_code(self): - """Gets the bank_code of this InlineResponse20010DataLists. # noqa: E501 + """Gets the bank_code of this OtcBankListItem. # noqa: E501 Bank code # noqa: E501 - :return: The bank_code of this InlineResponse20010DataLists. # noqa: E501 + :return: The bank_code of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._bank_code @bank_code.setter def bank_code(self, bank_code): - """Sets the bank_code of this InlineResponse20010DataLists. + """Sets the bank_code of this OtcBankListItem. Bank code # noqa: E501 - :param bank_code: The bank_code of this InlineResponse20010DataLists. # noqa: E501 + :param bank_code: The bank_code of this OtcBankListItem. # noqa: E501 :type: str """ @@ -291,22 +291,22 @@ def bank_code(self, bank_code): @property def branch_code(self): - """Gets the branch_code of this InlineResponse20010DataLists. # noqa: E501 + """Gets the branch_code of this OtcBankListItem. # noqa: E501 Branch code # noqa: E501 - :return: The branch_code of this InlineResponse20010DataLists. # noqa: E501 + :return: The branch_code of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._branch_code @branch_code.setter def branch_code(self, branch_code): - """Sets the branch_code of this InlineResponse20010DataLists. + """Sets the branch_code of this OtcBankListItem. Branch code # noqa: E501 - :param branch_code: The branch_code of this InlineResponse20010DataLists. # noqa: E501 + :param branch_code: The branch_code of this OtcBankListItem. # noqa: E501 :type: str """ @@ -314,22 +314,22 @@ def branch_code(self, branch_code): @property def iban(self): - """Gets the iban of this InlineResponse20010DataLists. # noqa: E501 + """Gets the iban of this OtcBankListItem. # noqa: E501 IBAN number # noqa: E501 - :return: The iban of this InlineResponse20010DataLists. # noqa: E501 + :return: The iban of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._iban @iban.setter def iban(self, iban): - """Sets the iban of this InlineResponse20010DataLists. + """Sets the iban of this OtcBankListItem. IBAN number # noqa: E501 - :param iban: The iban of this InlineResponse20010DataLists. # noqa: E501 + :param iban: The iban of this OtcBankListItem. # noqa: E501 :type: str """ @@ -337,22 +337,22 @@ def iban(self, iban): @property def swift(self): - """Gets the swift of this InlineResponse20010DataLists. # noqa: E501 + """Gets the swift of this OtcBankListItem. # noqa: E501 SWIFT code # noqa: E501 - :return: The swift of this InlineResponse20010DataLists. # noqa: E501 + :return: The swift of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._swift @swift.setter def swift(self, swift): - """Sets the swift of this InlineResponse20010DataLists. + """Sets the swift of this OtcBankListItem. SWIFT code # noqa: E501 - :param swift: The swift of this InlineResponse20010DataLists. # noqa: E501 + :param swift: The swift of this OtcBankListItem. # noqa: E501 :type: str """ @@ -360,22 +360,22 @@ def swift(self, swift): @property def remittance_line_number(self): - """Gets the remittance_line_number of this InlineResponse20010DataLists. # noqa: E501 + """Gets the remittance_line_number of this OtcBankListItem. # noqa: E501 Remittance routing number # noqa: E501 - :return: The remittance_line_number of this InlineResponse20010DataLists. # noqa: E501 + :return: The remittance_line_number of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._remittance_line_number @remittance_line_number.setter def remittance_line_number(self, remittance_line_number): - """Sets the remittance_line_number of this InlineResponse20010DataLists. + """Sets the remittance_line_number of this OtcBankListItem. Remittance routing number # noqa: E501 - :param remittance_line_number: The remittance_line_number of this InlineResponse20010DataLists. # noqa: E501 + :param remittance_line_number: The remittance_line_number of this OtcBankListItem. # noqa: E501 :type: str """ @@ -383,22 +383,22 @@ def remittance_line_number(self, remittance_line_number): @property def agent_bank_name(self): - """Gets the agent_bank_name of this InlineResponse20010DataLists. # noqa: E501 + """Gets the agent_bank_name of this OtcBankListItem. # noqa: E501 Correspondent bank name # noqa: E501 - :return: The agent_bank_name of this InlineResponse20010DataLists. # noqa: E501 + :return: The agent_bank_name of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._agent_bank_name @agent_bank_name.setter def agent_bank_name(self, agent_bank_name): - """Sets the agent_bank_name of this InlineResponse20010DataLists. + """Sets the agent_bank_name of this OtcBankListItem. Correspondent bank name # noqa: E501 - :param agent_bank_name: The agent_bank_name of this InlineResponse20010DataLists. # noqa: E501 + :param agent_bank_name: The agent_bank_name of this OtcBankListItem. # noqa: E501 :type: str """ @@ -406,22 +406,22 @@ def agent_bank_name(self, agent_bank_name): @property def agent_bank_swift(self): - """Gets the agent_bank_swift of this InlineResponse20010DataLists. # noqa: E501 + """Gets the agent_bank_swift of this OtcBankListItem. # noqa: E501 Correspondent bank SWIFT code # noqa: E501 - :return: The agent_bank_swift of this InlineResponse20010DataLists. # noqa: E501 + :return: The agent_bank_swift of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._agent_bank_swift @agent_bank_swift.setter def agent_bank_swift(self, agent_bank_swift): - """Sets the agent_bank_swift of this InlineResponse20010DataLists. + """Sets the agent_bank_swift of this OtcBankListItem. Correspondent bank SWIFT code # noqa: E501 - :param agent_bank_swift: The agent_bank_swift of this InlineResponse20010DataLists. # noqa: E501 + :param agent_bank_swift: The agent_bank_swift of this OtcBankListItem. # noqa: E501 :type: str """ @@ -429,22 +429,22 @@ def agent_bank_swift(self, agent_bank_swift): @property def submit_time(self): - """Gets the submit_time of this InlineResponse20010DataLists. # noqa: E501 + """Gets the submit_time of this OtcBankListItem. # noqa: E501 Submission time # noqa: E501 - :return: The submit_time of this InlineResponse20010DataLists. # noqa: E501 + :return: The submit_time of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._submit_time @submit_time.setter def submit_time(self, submit_time): - """Sets the submit_time of this InlineResponse20010DataLists. + """Sets the submit_time of this OtcBankListItem. Submission time # noqa: E501 - :param submit_time: The submit_time of this InlineResponse20010DataLists. # noqa: E501 + :param submit_time: The submit_time of this OtcBankListItem. # noqa: E501 :type: str """ @@ -452,22 +452,22 @@ def submit_time(self, submit_time): @property def update_time(self): - """Gets the update_time of this InlineResponse20010DataLists. # noqa: E501 + """Gets the update_time of this OtcBankListItem. # noqa: E501 Update time # noqa: E501 - :return: The update_time of this InlineResponse20010DataLists. # noqa: E501 + :return: The update_time of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._update_time @update_time.setter def update_time(self, update_time): - """Sets the update_time of this InlineResponse20010DataLists. + """Sets the update_time of this OtcBankListItem. Update time # noqa: E501 - :param update_time: The update_time of this InlineResponse20010DataLists. # noqa: E501 + :param update_time: The update_time of this OtcBankListItem. # noqa: E501 :type: str """ @@ -475,22 +475,22 @@ def update_time(self, update_time): @property def status(self): - """Gets the status of this InlineResponse20010DataLists. # noqa: E501 + """Gets the status of this OtcBankListItem. # noqa: E501 Status # noqa: E501 - :return: The status of this InlineResponse20010DataLists. # noqa: E501 + :return: The status of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20010DataLists. + """Sets the status of this OtcBankListItem. Status # noqa: E501 - :param status: The status of this InlineResponse20010DataLists. # noqa: E501 + :param status: The status of this OtcBankListItem. # noqa: E501 :type: str """ @@ -498,22 +498,22 @@ def status(self, status): @property def documentation_file_type(self): - """Gets the documentation_file_type of this InlineResponse20010DataLists. # noqa: E501 + """Gets the documentation_file_type of this OtcBankListItem. # noqa: E501 Document file type # noqa: E501 - :return: The documentation_file_type of this InlineResponse20010DataLists. # noqa: E501 + :return: The documentation_file_type of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._documentation_file_type @documentation_file_type.setter def documentation_file_type(self, documentation_file_type): - """Sets the documentation_file_type of this InlineResponse20010DataLists. + """Sets the documentation_file_type of this OtcBankListItem. Document file type # noqa: E501 - :param documentation_file_type: The documentation_file_type of this InlineResponse20010DataLists. # noqa: E501 + :param documentation_file_type: The documentation_file_type of this OtcBankListItem. # noqa: E501 :type: str """ @@ -521,22 +521,22 @@ def documentation_file_type(self, documentation_file_type): @property def memo(self): - """Gets the memo of this InlineResponse20010DataLists. # noqa: E501 + """Gets the memo of this OtcBankListItem. # noqa: E501 Remark # noqa: E501 - :return: The memo of this InlineResponse20010DataLists. # noqa: E501 + :return: The memo of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._memo @memo.setter def memo(self, memo): - """Sets the memo of this InlineResponse20010DataLists. + """Sets the memo of this OtcBankListItem. Remark # noqa: E501 - :param memo: The memo of this InlineResponse20010DataLists. # noqa: E501 + :param memo: The memo of this OtcBankListItem. # noqa: E501 :type: str """ @@ -544,22 +544,22 @@ def memo(self, memo): @property def is_default(self): - """Gets the is_default of this InlineResponse20010DataLists. # noqa: E501 + """Gets the is_default of this OtcBankListItem. # noqa: E501 Whether it is the default bank card. 1 - Yes, 0 - No # noqa: E501 - :return: The is_default of this InlineResponse20010DataLists. # noqa: E501 + :return: The is_default of this OtcBankListItem. # noqa: E501 :rtype: int """ return self._is_default @is_default.setter def is_default(self, is_default): - """Sets the is_default of this InlineResponse20010DataLists. + """Sets the is_default of this OtcBankListItem. Whether it is the default bank card. 1 - Yes, 0 - No # noqa: E501 - :param is_default: The is_default of this InlineResponse20010DataLists. # noqa: E501 + :param is_default: The is_default of this OtcBankListItem. # noqa: E501 :type: int """ @@ -567,22 +567,22 @@ def is_default(self, is_default): @property def bank_id(self): - """Gets the bank_id of this InlineResponse20010DataLists. # noqa: E501 + """Gets the bank_id of this OtcBankListItem. # noqa: E501 Bank ID # noqa: E501 - :return: The bank_id of this InlineResponse20010DataLists. # noqa: E501 + :return: The bank_id of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._bank_id @bank_id.setter def bank_id(self, bank_id): - """Sets the bank_id of this InlineResponse20010DataLists. + """Sets the bank_id of this OtcBankListItem. Bank ID # noqa: E501 - :param bank_id: The bank_id of this InlineResponse20010DataLists. # noqa: E501 + :param bank_id: The bank_id of this OtcBankListItem. # noqa: E501 :type: str """ @@ -590,22 +590,22 @@ def bank_id(self, bank_id): @property def documentation_file_key_url(self): - """Gets the documentation_file_key_url of this InlineResponse20010DataLists. # noqa: E501 + """Gets the documentation_file_key_url of this OtcBankListItem. # noqa: E501 Document file URL # noqa: E501 - :return: The documentation_file_key_url of this InlineResponse20010DataLists. # noqa: E501 + :return: The documentation_file_key_url of this OtcBankListItem. # noqa: E501 :rtype: str """ return self._documentation_file_key_url @documentation_file_key_url.setter def documentation_file_key_url(self, documentation_file_key_url): - """Sets the documentation_file_key_url of this InlineResponse20010DataLists. + """Sets the documentation_file_key_url of this OtcBankListItem. Document file URL # noqa: E501 - :param documentation_file_key_url: The documentation_file_key_url of this InlineResponse20010DataLists. # noqa: E501 + :param documentation_file_key_url: The documentation_file_key_url of this OtcBankListItem. # noqa: E501 :type: str """ @@ -645,14 +645,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20010DataLists): + if not isinstance(other, OtcBankListItem): 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, InlineResponse20010DataLists): + if not isinstance(other, OtcBankListItem): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20010.py b/gate_api/models/otc_bank_list_response.py similarity index 76% rename from gate_api/models/inline_response20010.py rename to gate_api/models/otc_bank_list_response.py index 93c45c18..c06a50f9 100644 --- a/gate_api/models/inline_response20010.py +++ b/gate_api/models/otc_bank_list_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20010(object): +class OtcBankListResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class InlineResponse20010(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'InlineResponse20010Data', + 'data': 'OtcBankListResult', 'timestamp': 'int' } @@ -47,8 +47,8 @@ class InlineResponse20010(object): } def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, InlineResponse20010Data, int, Configuration) -> None - """InlineResponse20010 - a model defined in OpenAPI""" # noqa: E501 + # type: (int, str, OtcBankListResult, int, Configuration) -> None + """OtcBankListResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -66,20 +66,20 @@ def __init__(self, code=None, message=None, data=None, timestamp=None, local_var @property def code(self): - """Gets the code of this InlineResponse20010. # noqa: E501 + """Gets the code of this OtcBankListResponse. # noqa: E501 - :return: The code of this InlineResponse20010. # noqa: E501 + :return: The code of this OtcBankListResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20010. + """Sets the code of this OtcBankListResponse. - :param code: The code of this InlineResponse20010. # noqa: E501 + :param code: The code of this OtcBankListResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 @@ -89,20 +89,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20010. # noqa: E501 + """Gets the message of this OtcBankListResponse. # noqa: E501 - :return: The message of this InlineResponse20010. # noqa: E501 + :return: The message of this OtcBankListResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20010. + """Sets the message of this OtcBankListResponse. - :param message: The message of this InlineResponse20010. # noqa: E501 + :param message: The message of this OtcBankListResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 @@ -112,21 +112,21 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20010. # noqa: E501 + """Gets the data of this OtcBankListResponse. # noqa: E501 - :return: The data of this InlineResponse20010. # noqa: E501 - :rtype: InlineResponse20010Data + :return: The data of this OtcBankListResponse. # noqa: E501 + :rtype: OtcBankListResult """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20010. + """Sets the data of this OtcBankListResponse. - :param data: The data of this InlineResponse20010. # noqa: E501 - :type: InlineResponse20010Data + :param data: The data of this OtcBankListResponse. # noqa: E501 + :type: OtcBankListResult """ if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 @@ -135,20 +135,20 @@ def data(self, data): @property def timestamp(self): - """Gets the timestamp of this InlineResponse20010. # noqa: E501 + """Gets the timestamp of this OtcBankListResponse. # noqa: E501 - :return: The timestamp of this InlineResponse20010. # noqa: E501 + :return: The timestamp of this OtcBankListResponse. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20010. + """Sets the timestamp of this OtcBankListResponse. - :param timestamp: The timestamp of this InlineResponse20010. # noqa: E501 + :param timestamp: The timestamp of this OtcBankListResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 @@ -190,14 +190,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20010): + if not isinstance(other, OtcBankListResponse): 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, InlineResponse20010): + if not isinstance(other, OtcBankListResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20010_data.py b/gate_api/models/otc_bank_list_result.py similarity index 80% rename from gate_api/models/inline_response20010_data.py rename to gate_api/models/otc_bank_list_result.py index f8562577..d7151d7e 100644 --- a/gate_api/models/inline_response20010_data.py +++ b/gate_api/models/otc_bank_list_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20010Data(object): +class OtcBankListResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,7 +33,7 @@ class InlineResponse20010Data(object): and the value is json key in definition. """ openapi_types = { - 'lists': 'list[InlineResponse20010DataLists]' + 'lists': 'list[OtcBankListItem]' } attribute_map = { @@ -41,8 +41,8 @@ class InlineResponse20010Data(object): } def __init__(self, lists=None, local_vars_configuration=None): # noqa: E501 - # type: (list[InlineResponse20010DataLists], Configuration) -> None - """InlineResponse20010Data - a model defined in OpenAPI""" # noqa: E501 + # type: (list[OtcBankListItem], Configuration) -> None + """OtcBankListResult - 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,23 +54,23 @@ def __init__(self, lists=None, local_vars_configuration=None): # noqa: E501 @property def lists(self): - """Gets the lists of this InlineResponse20010Data. # noqa: E501 + """Gets the lists of this OtcBankListResult. # noqa: E501 Bank card list # noqa: E501 - :return: The lists of this InlineResponse20010Data. # noqa: E501 - :rtype: list[InlineResponse20010DataLists] + :return: The lists of this OtcBankListResult. # noqa: E501 + :rtype: list[OtcBankListItem] """ return self._lists @lists.setter def lists(self, lists): - """Sets the lists of this InlineResponse20010Data. + """Sets the lists of this OtcBankListResult. Bank card list # noqa: E501 - :param lists: The lists of this InlineResponse20010Data. # noqa: E501 - :type: list[InlineResponse20010DataLists] + :param lists: The lists of this OtcBankListResult. # noqa: E501 + :type: list[OtcBankListItem] """ if self.local_vars_configuration.client_side_validation and lists is None: # noqa: E501 raise ValueError("Invalid value for `lists`, must not be `None`") # noqa: E501 @@ -111,14 +111,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20010Data): + if not isinstance(other, OtcBankListResult): 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, InlineResponse20010Data): + if not isinstance(other, OtcBankListResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_personal_supplement_multipart_request.py b/gate_api/models/otc_bank_personal_supplement_multipart_request.py new file mode 100644 index 00000000..03ee5101 --- /dev/null +++ b/gate_api/models/otc_bank_personal_supplement_multipart_request.py @@ -0,0 +1,209 @@ +# 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 OtcBankPersonalSupplementMultipartRequest(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 = { + 'bank_id': 'str', + 'id_document_front': 'str', + 'id_document_back': 'str', + 'address_proof': 'str' + } + + attribute_map = { + 'bank_id': 'bank_id', + 'id_document_front': 'id_document_front', + 'id_document_back': 'id_document_back', + 'address_proof': 'address_proof' + } + + def __init__(self, bank_id=None, id_document_front=None, id_document_back=None, address_proof=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """OtcBankPersonalSupplementMultipartRequest - 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._bank_id = None + self._id_document_front = None + self._id_document_back = None + self._address_proof = None + self.discriminator = None + + self.bank_id = bank_id + self.id_document_front = id_document_front + self.id_document_back = id_document_back + self.address_proof = address_proof + + @property + def bank_id(self): + """Gets the bank_id of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + + + :return: The bank_id of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._bank_id + + @bank_id.setter + def bank_id(self, bank_id): + """Sets the bank_id of this OtcBankPersonalSupplementMultipartRequest. + + + :param bank_id: The bank_id of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and bank_id is None: # noqa: E501 + raise ValueError("Invalid value for `bank_id`, must not be `None`") # noqa: E501 + + self._bank_id = bank_id + + @property + def id_document_front(self): + """Gets the id_document_front of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + + ID document front-side file content (multipart file field, binary/Base64) # noqa: E501 + + :return: The id_document_front of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._id_document_front + + @id_document_front.setter + def id_document_front(self, id_document_front): + """Sets the id_document_front of this OtcBankPersonalSupplementMultipartRequest. + + ID document front-side file content (multipart file field, binary/Base64) # noqa: E501 + + :param id_document_front: The id_document_front of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id_document_front is None: # noqa: E501 + raise ValueError("Invalid value for `id_document_front`, must not be `None`") # noqa: E501 + + self._id_document_front = id_document_front + + @property + def id_document_back(self): + """Gets the id_document_back of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + + ID document back-side file content (multipart file field, binary/Base64) # noqa: E501 + + :return: The id_document_back of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._id_document_back + + @id_document_back.setter + def id_document_back(self, id_document_back): + """Sets the id_document_back of this OtcBankPersonalSupplementMultipartRequest. + + ID document back-side file content (multipart file field, binary/Base64) # noqa: E501 + + :param id_document_back: The id_document_back of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id_document_back is None: # noqa: E501 + raise ValueError("Invalid value for `id_document_back`, must not be `None`") # noqa: E501 + + self._id_document_back = id_document_back + + @property + def address_proof(self): + """Gets the address_proof of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + + Proof-of-address file content (multipart file field, binary/Base64) # noqa: E501 + + :return: The address_proof of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + :rtype: str + """ + return self._address_proof + + @address_proof.setter + def address_proof(self, address_proof): + """Sets the address_proof of this OtcBankPersonalSupplementMultipartRequest. + + Proof-of-address file content (multipart file field, binary/Base64) # noqa: E501 + + :param address_proof: The address_proof of this OtcBankPersonalSupplementMultipartRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and address_proof is None: # noqa: E501 + raise ValueError("Invalid value for `address_proof`, must not be `None`") # noqa: E501 + + self._address_proof = address_proof + + 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, OtcBankPersonalSupplementMultipartRequest): + 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, OtcBankPersonalSupplementMultipartRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_supplement_checklist_item.py b/gate_api/models/otc_bank_supplement_checklist_item.py new file mode 100644 index 00000000..2351e654 --- /dev/null +++ b/gate_api/models/otc_bank_supplement_checklist_item.py @@ -0,0 +1,205 @@ +# 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 OtcBankSupplementChecklistItem(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 = { + 'code': 'str', + 'zh': 'str', + 'en': 'str', + 'required': 'bool' + } + + attribute_map = { + 'code': 'code', + 'zh': 'zh', + 'en': 'en', + 'required': 'required' + } + + def __init__(self, code=None, zh=None, en=None, required=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, bool, Configuration) -> None + """OtcBankSupplementChecklistItem - 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._code = None + self._zh = None + self._en = None + self._required = None + self.discriminator = None + + self.code = code + if zh is not None: + self.zh = zh + if en is not None: + self.en = en + self.required = required + + @property + def code(self): + """Gets the code of this OtcBankSupplementChecklistItem. # noqa: E501 + + Material item code, corresponding to the top-level key of `relationship_proof` # noqa: E501 + + :return: The code of this OtcBankSupplementChecklistItem. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this OtcBankSupplementChecklistItem. + + Material item code, corresponding to the top-level key of `relationship_proof` # noqa: E501 + + :param code: The code of this OtcBankSupplementChecklistItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def zh(self): + """Gets the zh of this OtcBankSupplementChecklistItem. # noqa: E501 + + + :return: The zh of this OtcBankSupplementChecklistItem. # noqa: E501 + :rtype: str + """ + return self._zh + + @zh.setter + def zh(self, zh): + """Sets the zh of this OtcBankSupplementChecklistItem. + + + :param zh: The zh of this OtcBankSupplementChecklistItem. # noqa: E501 + :type: str + """ + + self._zh = zh + + @property + def en(self): + """Gets the en of this OtcBankSupplementChecklistItem. # noqa: E501 + + + :return: The en of this OtcBankSupplementChecklistItem. # noqa: E501 + :rtype: str + """ + return self._en + + @en.setter + def en(self, en): + """Sets the en of this OtcBankSupplementChecklistItem. + + + :param en: The en of this OtcBankSupplementChecklistItem. # noqa: E501 + :type: str + """ + + self._en = en + + @property + def required(self): + """Gets the required of this OtcBankSupplementChecklistItem. # noqa: E501 + + Whether required # noqa: E501 + + :return: The required of this OtcBankSupplementChecklistItem. # noqa: E501 + :rtype: bool + """ + return self._required + + @required.setter + def required(self, required): + """Sets the required of this OtcBankSupplementChecklistItem. + + Whether required # noqa: E501 + + :param required: The required of this OtcBankSupplementChecklistItem. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and required is None: # noqa: E501 + raise ValueError("Invalid value for `required`, must not be `None`") # noqa: E501 + + self._required = required + + 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, OtcBankSupplementChecklistItem): + 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, OtcBankSupplementChecklistItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_supplement_checklist_response.py b/gate_api/models/otc_bank_supplement_checklist_response.py new file mode 100644 index 00000000..19f63505 --- /dev/null +++ b/gate_api/models/otc_bank_supplement_checklist_response.py @@ -0,0 +1,202 @@ +# 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 OtcBankSupplementChecklistResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'OtcBankSupplementChecklistResponseData', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, OtcBankSupplementChecklistResponseData, int, Configuration) -> None + """OtcBankSupplementChecklistResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this OtcBankSupplementChecklistResponse. # noqa: E501 + + + :return: The code of this OtcBankSupplementChecklistResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this OtcBankSupplementChecklistResponse. + + + :param code: The code of this OtcBankSupplementChecklistResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this OtcBankSupplementChecklistResponse. # noqa: E501 + + + :return: The message of this OtcBankSupplementChecklistResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this OtcBankSupplementChecklistResponse. + + + :param message: The message of this OtcBankSupplementChecklistResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this OtcBankSupplementChecklistResponse. # noqa: E501 + + + :return: The data of this OtcBankSupplementChecklistResponse. # noqa: E501 + :rtype: OtcBankSupplementChecklistResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OtcBankSupplementChecklistResponse. + + + :param data: The data of this OtcBankSupplementChecklistResponse. # noqa: E501 + :type: OtcBankSupplementChecklistResponseData + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this OtcBankSupplementChecklistResponse. # noqa: E501 + + + :return: The timestamp of this OtcBankSupplementChecklistResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this OtcBankSupplementChecklistResponse. + + + :param timestamp: The timestamp of this OtcBankSupplementChecklistResponse. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + 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, OtcBankSupplementChecklistResponse): + 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, OtcBankSupplementChecklistResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_bank_supplement_checklist_response_data.py b/gate_api/models/otc_bank_supplement_checklist_response_data.py new file mode 100644 index 00000000..7684ae2b --- /dev/null +++ b/gate_api/models/otc_bank_supplement_checklist_response_data.py @@ -0,0 +1,157 @@ +# 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 OtcBankSupplementChecklistResponseData(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_type': 'str', + 'items': 'list[OtcBankSupplementChecklistItem]' + } + + attribute_map = { + 'user_type': 'user_type', + 'items': 'items' + } + + def __init__(self, user_type=None, items=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[OtcBankSupplementChecklistItem], Configuration) -> None + """OtcBankSupplementChecklistResponseData - 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_type = None + self._items = None + self.discriminator = None + + self.user_type = user_type + self.items = items + + @property + def user_type(self): + """Gets the user_type of this OtcBankSupplementChecklistResponseData. # noqa: E501 + + personal or enterprise # noqa: E501 + + :return: The user_type of this OtcBankSupplementChecklistResponseData. # noqa: E501 + :rtype: str + """ + return self._user_type + + @user_type.setter + def user_type(self, user_type): + """Sets the user_type of this OtcBankSupplementChecklistResponseData. + + personal or enterprise # noqa: E501 + + :param user_type: The user_type of this OtcBankSupplementChecklistResponseData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_type is None: # noqa: E501 + raise ValueError("Invalid value for `user_type`, must not be `None`") # noqa: E501 + allowed_values = ["personal", "enterprise"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and user_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `user_type` ({0}), must be one of {1}" # noqa: E501 + .format(user_type, allowed_values) + ) + + self._user_type = user_type + + @property + def items(self): + """Gets the items of this OtcBankSupplementChecklistResponseData. # noqa: E501 + + + :return: The items of this OtcBankSupplementChecklistResponseData. # noqa: E501 + :rtype: list[OtcBankSupplementChecklistItem] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this OtcBankSupplementChecklistResponseData. + + + :param items: The items of this OtcBankSupplementChecklistResponseData. # noqa: E501 + :type: list[OtcBankSupplementChecklistItem] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = 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, OtcBankSupplementChecklistResponseData): + 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, OtcBankSupplementChecklistResponseData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_mark_order_paid_request.py b/gate_api/models/otc_mark_order_paid_request.py index 5d44d302..3128939a 100644 --- a/gate_api/models/otc_mark_order_paid_request.py +++ b/gate_api/models/otc_mark_order_paid_request.py @@ -33,24 +33,38 @@ class OtcMarkOrderPaidRequest(object): and the value is json key in definition. """ openapi_types = { - 'order_id': 'str' + 'order_id': 'str', + 'client_order_id': 'str', + 'payment_receipt_file_key': 'str', + 'payment_receipt': 'str' } attribute_map = { - 'order_id': 'order_id' + 'order_id': 'order_id', + 'client_order_id': 'client_order_id', + 'payment_receipt_file_key': 'payment_receipt_file_key', + 'payment_receipt': 'payment_receipt' } - def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 - # type: (str, Configuration) -> None + def __init__(self, order_id=None, client_order_id=None, payment_receipt_file_key=None, payment_receipt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None """OtcMarkOrderPaidRequest - 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._client_order_id = None + self._payment_receipt_file_key = None + self._payment_receipt = None self.discriminator = None self.order_id = order_id + if client_order_id is not None: + self.client_order_id = client_order_id + self.payment_receipt_file_key = payment_receipt_file_key + if payment_receipt is not None: + self.payment_receipt = payment_receipt @property def order_id(self): @@ -77,6 +91,77 @@ def order_id(self, order_id): self._order_id = order_id + @property + def client_order_id(self): + """Gets the client_order_id of this OtcMarkOrderPaidRequest. # noqa: E501 + + Client order ID (used by some gateway/Inner Pay paths, optional) # noqa: E501 + + :return: The client_order_id of this OtcMarkOrderPaidRequest. # 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 OtcMarkOrderPaidRequest. + + Client order ID (used by some gateway/Inner Pay paths, optional) # noqa: E501 + + :param client_order_id: The client_order_id of this OtcMarkOrderPaidRequest. # noqa: E501 + :type: str + """ + + self._client_order_id = client_order_id + + @property + def payment_receipt_file_key(self): + """Gets the payment_receipt_file_key of this OtcMarkOrderPaidRequest. # noqa: E501 + + User payment receipt: **required**. Stored as a file_key. Single file; jpg/jpeg/png/pdf; ≤4MB. # noqa: E501 + + :return: The payment_receipt_file_key of this OtcMarkOrderPaidRequest. # noqa: E501 + :rtype: str + """ + return self._payment_receipt_file_key + + @payment_receipt_file_key.setter + def payment_receipt_file_key(self, payment_receipt_file_key): + """Sets the payment_receipt_file_key of this OtcMarkOrderPaidRequest. + + User payment receipt: **required**. Stored as a file_key. Single file; jpg/jpeg/png/pdf; ≤4MB. # noqa: E501 + + :param payment_receipt_file_key: The payment_receipt_file_key of this OtcMarkOrderPaidRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and payment_receipt_file_key is None: # noqa: E501 + raise ValueError("Invalid value for `payment_receipt_file_key`, must not be `None`") # noqa: E501 + + self._payment_receipt_file_key = payment_receipt_file_key + + @property + def payment_receipt(self): + """Gets the payment_receipt of this OtcMarkOrderPaidRequest. # noqa: E501 + + Alias compatible with `payment_receipt_file_key` (depends on the gateway's external field name) # noqa: E501 + + :return: The payment_receipt of this OtcMarkOrderPaidRequest. # noqa: E501 + :rtype: str + """ + return self._payment_receipt + + @payment_receipt.setter + def payment_receipt(self, payment_receipt): + """Sets the payment_receipt of this OtcMarkOrderPaidRequest. + + Alias compatible with `payment_receipt_file_key` (depends on the gateway's external field name) # noqa: E501 + + :param payment_receipt: The payment_receipt of this OtcMarkOrderPaidRequest. # noqa: E501 + :type: str + """ + + self._payment_receipt = payment_receipt + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/inline_response20013_data.py b/gate_api/models/otc_order_detail.py similarity index 68% rename from gate_api/models/inline_response20013_data.py rename to gate_api/models/otc_order_detail.py index 48467879..dc57248c 100644 --- a/gate_api/models/inline_response20013_data.py +++ b/gate_api/models/otc_order_detail.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20013Data(object): +class OtcOrderDetail(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -42,6 +42,7 @@ class InlineResponse20013Data(object): 'crypto_amount': 'str', 'rate': 'str', 'transfer_remark': 'str', + 'reference_code': 'str', 'status': 'str', 'db_status': 'str', 'create_time': 'str', @@ -61,6 +62,7 @@ class InlineResponse20013Data(object): 'crypto_amount': 'crypto_amount', 'rate': 'rate', 'transfer_remark': 'transfer_remark', + 'reference_code': 'reference_code', 'status': 'status', 'db_status': 'db_status', 'create_time': 'create_time', @@ -70,9 +72,9 @@ class InlineResponse20013Data(object): 'trade_no': 'trade_no' } - def __init__(self, order_id=None, uid=None, type=None, fiat_currency=None, fiat_amount=None, crypto_currency=None, crypto_amount=None, rate=None, transfer_remark=None, status=None, db_status=None, create_time=None, memo=None, side=None, promotion_code=None, trade_no=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 - """InlineResponse20013Data - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, order_id=None, uid=None, type=None, fiat_currency=None, fiat_amount=None, crypto_currency=None, crypto_amount=None, rate=None, transfer_remark=None, reference_code=None, status=None, db_status=None, create_time=None, memo=None, side=None, promotion_code=None, trade_no=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, Configuration) -> None + """OtcOrderDetail - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -86,6 +88,7 @@ def __init__(self, order_id=None, uid=None, type=None, fiat_currency=None, fiat_ self._crypto_amount = None self._rate = None self._transfer_remark = None + self._reference_code = None self._status = None self._db_status = None self._create_time = None @@ -104,6 +107,8 @@ def __init__(self, order_id=None, uid=None, type=None, fiat_currency=None, fiat_ self.crypto_amount = crypto_amount self.rate = rate self.transfer_remark = transfer_remark + if reference_code is not None: + self.reference_code = reference_code self.status = status self.db_status = db_status self.create_time = create_time @@ -114,22 +119,22 @@ def __init__(self, order_id=None, uid=None, type=None, fiat_currency=None, fiat_ @property def order_id(self): - """Gets the order_id of this InlineResponse20013Data. # noqa: E501 + """Gets the order_id of this OtcOrderDetail. # noqa: E501 Order ID # noqa: E501 - :return: The order_id of this InlineResponse20013Data. # noqa: E501 + :return: The order_id of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._order_id @order_id.setter def order_id(self, order_id): - """Sets the order_id of this InlineResponse20013Data. + """Sets the order_id of this OtcOrderDetail. Order ID # noqa: E501 - :param order_id: The order_id of this InlineResponse20013Data. # noqa: E501 + :param order_id: The order_id of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 @@ -139,22 +144,22 @@ def order_id(self, order_id): @property def uid(self): - """Gets the uid of this InlineResponse20013Data. # noqa: E501 + """Gets the uid of this OtcOrderDetail. # noqa: E501 User ID # noqa: E501 - :return: The uid of this InlineResponse20013Data. # noqa: E501 + :return: The uid of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._uid @uid.setter def uid(self, uid): - """Sets the uid of this InlineResponse20013Data. + """Sets the uid of this OtcOrderDetail. User ID # noqa: E501 - :param uid: The uid of this InlineResponse20013Data. # noqa: E501 + :param uid: The uid of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and uid is None: # noqa: E501 @@ -164,22 +169,22 @@ def uid(self, uid): @property def type(self): - """Gets the type of this InlineResponse20013Data. # noqa: E501 + """Gets the type of this OtcOrderDetail. # noqa: E501 Order Type # noqa: E501 - :return: The type of this InlineResponse20013Data. # noqa: E501 + :return: The type of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this InlineResponse20013Data. + """Sets the type of this OtcOrderDetail. Order Type # noqa: E501 - :param type: The type of this InlineResponse20013Data. # noqa: E501 + :param type: The type of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 @@ -189,22 +194,22 @@ def type(self, type): @property def fiat_currency(self): - """Gets the fiat_currency of this InlineResponse20013Data. # noqa: E501 + """Gets the fiat_currency of this OtcOrderDetail. # noqa: E501 Fiat type # noqa: E501 - :return: The fiat_currency of this InlineResponse20013Data. # noqa: E501 + :return: The fiat_currency of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._fiat_currency @fiat_currency.setter def fiat_currency(self, fiat_currency): - """Sets the fiat_currency of this InlineResponse20013Data. + """Sets the fiat_currency of this OtcOrderDetail. Fiat type # noqa: E501 - :param fiat_currency: The fiat_currency of this InlineResponse20013Data. # noqa: E501 + :param fiat_currency: The fiat_currency of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and fiat_currency is None: # noqa: E501 @@ -214,22 +219,22 @@ def fiat_currency(self, fiat_currency): @property def fiat_amount(self): - """Gets the fiat_amount of this InlineResponse20013Data. # noqa: E501 + """Gets the fiat_amount of this OtcOrderDetail. # noqa: E501 Fiat amount # noqa: E501 - :return: The fiat_amount of this InlineResponse20013Data. # noqa: E501 + :return: The fiat_amount of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._fiat_amount @fiat_amount.setter def fiat_amount(self, fiat_amount): - """Sets the fiat_amount of this InlineResponse20013Data. + """Sets the fiat_amount of this OtcOrderDetail. Fiat amount # noqa: E501 - :param fiat_amount: The fiat_amount of this InlineResponse20013Data. # noqa: E501 + :param fiat_amount: The fiat_amount of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and fiat_amount is None: # noqa: E501 @@ -239,22 +244,22 @@ def fiat_amount(self, fiat_amount): @property def crypto_currency(self): - """Gets the crypto_currency of this InlineResponse20013Data. # noqa: E501 + """Gets the crypto_currency of this OtcOrderDetail. # noqa: E501 Stablecoin # noqa: E501 - :return: The crypto_currency of this InlineResponse20013Data. # noqa: E501 + :return: The crypto_currency of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._crypto_currency @crypto_currency.setter def crypto_currency(self, crypto_currency): - """Sets the crypto_currency of this InlineResponse20013Data. + """Sets the crypto_currency of this OtcOrderDetail. Stablecoin # noqa: E501 - :param crypto_currency: The crypto_currency of this InlineResponse20013Data. # noqa: E501 + :param crypto_currency: The crypto_currency of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and crypto_currency is None: # noqa: E501 @@ -264,22 +269,22 @@ def crypto_currency(self, crypto_currency): @property def crypto_amount(self): - """Gets the crypto_amount of this InlineResponse20013Data. # noqa: E501 + """Gets the crypto_amount of this OtcOrderDetail. # noqa: E501 Stablecoin amount # noqa: E501 - :return: The crypto_amount of this InlineResponse20013Data. # noqa: E501 + :return: The crypto_amount of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._crypto_amount @crypto_amount.setter def crypto_amount(self, crypto_amount): - """Sets the crypto_amount of this InlineResponse20013Data. + """Sets the crypto_amount of this OtcOrderDetail. Stablecoin amount # noqa: E501 - :param crypto_amount: The crypto_amount of this InlineResponse20013Data. # noqa: E501 + :param crypto_amount: The crypto_amount of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and crypto_amount is None: # noqa: E501 @@ -289,22 +294,22 @@ def crypto_amount(self, crypto_amount): @property def rate(self): - """Gets the rate of this InlineResponse20013Data. # noqa: E501 + """Gets the rate of this OtcOrderDetail. # noqa: E501 Exchange rate # noqa: E501 - :return: The rate of this InlineResponse20013Data. # noqa: E501 + :return: The rate of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._rate @rate.setter def rate(self, rate): - """Sets the rate of this InlineResponse20013Data. + """Sets the rate of this OtcOrderDetail. Exchange rate # noqa: E501 - :param rate: The rate of this InlineResponse20013Data. # noqa: E501 + :param rate: The rate of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and rate is None: # noqa: E501 @@ -314,22 +319,22 @@ def rate(self, rate): @property def transfer_remark(self): - """Gets the transfer_remark of this InlineResponse20013Data. # noqa: E501 + """Gets the transfer_remark of this OtcOrderDetail. # noqa: E501 - Remark # noqa: E501 + Transfer remark (mutually exclusive with reference_code; empty string when the deposit buy order has a reference code) # noqa: E501 - :return: The transfer_remark of this InlineResponse20013Data. # noqa: E501 + :return: The transfer_remark of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._transfer_remark @transfer_remark.setter def transfer_remark(self, transfer_remark): - """Sets the transfer_remark of this InlineResponse20013Data. + """Sets the transfer_remark of this OtcOrderDetail. - Remark # noqa: E501 + Transfer remark (mutually exclusive with reference_code; empty string when the deposit buy order has a reference code) # noqa: E501 - :param transfer_remark: The transfer_remark of this InlineResponse20013Data. # noqa: E501 + :param transfer_remark: The transfer_remark of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and transfer_remark is None: # noqa: E501 @@ -337,24 +342,47 @@ def transfer_remark(self, transfer_remark): self._transfer_remark = transfer_remark + @property + def reference_code(self): + """Gets the reference_code of this OtcOrderDetail. # noqa: E501 + + Unique bank transfer reference code for deposit buy orders (SGB deposit scenario; mutually exclusive with transfer_remark) # noqa: E501 + + :return: The reference_code of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._reference_code + + @reference_code.setter + def reference_code(self, reference_code): + """Sets the reference_code of this OtcOrderDetail. + + Unique bank transfer reference code for deposit buy orders (SGB deposit scenario; mutually exclusive with transfer_remark) # noqa: E501 + + :param reference_code: The reference_code of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._reference_code = reference_code + @property def status(self): - """Gets the status of this InlineResponse20013Data. # noqa: E501 + """Gets the status of this OtcOrderDetail. # noqa: E501 Status # noqa: E501 - :return: The status of this InlineResponse20013Data. # noqa: E501 + :return: The status of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20013Data. + """Sets the status of this OtcOrderDetail. Status # noqa: E501 - :param status: The status of this InlineResponse20013Data. # noqa: E501 + :param status: The status of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 @@ -364,20 +392,20 @@ def status(self, status): @property def db_status(self): - """Gets the db_status of this InlineResponse20013Data. # noqa: E501 + """Gets the db_status of this OtcOrderDetail. # noqa: E501 - :return: The db_status of this InlineResponse20013Data. # noqa: E501 + :return: The db_status of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._db_status @db_status.setter def db_status(self, db_status): - """Sets the db_status of this InlineResponse20013Data. + """Sets the db_status of this OtcOrderDetail. - :param db_status: The db_status of this InlineResponse20013Data. # noqa: E501 + :param db_status: The db_status of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and db_status is None: # noqa: E501 @@ -387,22 +415,22 @@ def db_status(self, db_status): @property def create_time(self): - """Gets the create_time of this InlineResponse20013Data. # noqa: E501 + """Gets the create_time of this OtcOrderDetail. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20013Data. # noqa: E501 + :return: The create_time of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20013Data. + """Sets the create_time of this OtcOrderDetail. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20013Data. # noqa: E501 + :param create_time: The create_time of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and create_time is None: # noqa: E501 @@ -412,22 +440,22 @@ def create_time(self, create_time): @property def memo(self): - """Gets the memo of this InlineResponse20013Data. # noqa: E501 + """Gets the memo of this OtcOrderDetail. # noqa: E501 Cancellation or rejection reason # noqa: E501 - :return: The memo of this InlineResponse20013Data. # noqa: E501 + :return: The memo of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._memo @memo.setter def memo(self, memo): - """Sets the memo of this InlineResponse20013Data. + """Sets the memo of this OtcOrderDetail. Cancellation or rejection reason # noqa: E501 - :param memo: The memo of this InlineResponse20013Data. # noqa: E501 + :param memo: The memo of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and memo is None: # noqa: E501 @@ -437,22 +465,22 @@ def memo(self, memo): @property def side(self): - """Gets the side of this InlineResponse20013Data. # noqa: E501 + """Gets the side of this OtcOrderDetail. # noqa: E501 Quote direction # noqa: E501 - :return: The side of this InlineResponse20013Data. # noqa: E501 + :return: The side of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._side @side.setter def side(self, side): - """Sets the side of this InlineResponse20013Data. + """Sets the side of this OtcOrderDetail. Quote direction # noqa: E501 - :param side: The side of this InlineResponse20013Data. # noqa: E501 + :param side: The side of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 @@ -462,22 +490,22 @@ def side(self, side): @property def promotion_code(self): - """Gets the promotion_code of this InlineResponse20013Data. # noqa: E501 + """Gets the promotion_code of this OtcOrderDetail. # noqa: E501 Promotion code # noqa: E501 - :return: The promotion_code of this InlineResponse20013Data. # noqa: E501 + :return: The promotion_code of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._promotion_code @promotion_code.setter def promotion_code(self, promotion_code): - """Sets the promotion_code of this InlineResponse20013Data. + """Sets the promotion_code of this OtcOrderDetail. Promotion code # noqa: E501 - :param promotion_code: The promotion_code of this InlineResponse20013Data. # noqa: E501 + :param promotion_code: The promotion_code of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and promotion_code is None: # noqa: E501 @@ -487,22 +515,22 @@ def promotion_code(self, promotion_code): @property def trade_no(self): - """Gets the trade_no of this InlineResponse20013Data. # noqa: E501 + """Gets the trade_no of this OtcOrderDetail. # noqa: E501 Trade number # noqa: E501 - :return: The trade_no of this InlineResponse20013Data. # noqa: E501 + :return: The trade_no of this OtcOrderDetail. # noqa: E501 :rtype: str """ return self._trade_no @trade_no.setter def trade_no(self, trade_no): - """Sets the trade_no of this InlineResponse20013Data. + """Sets the trade_no of this OtcOrderDetail. Trade number # noqa: E501 - :param trade_no: The trade_no of this InlineResponse20013Data. # noqa: E501 + :param trade_no: The trade_no of this OtcOrderDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and trade_no is None: # noqa: E501 @@ -544,14 +572,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20013Data): + if not isinstance(other, OtcOrderDetail): 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, InlineResponse20013Data): + if not isinstance(other, OtcOrderDetail): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20013.py b/gate_api/models/otc_order_detail_response.py similarity index 76% rename from gate_api/models/inline_response20013.py rename to gate_api/models/otc_order_detail_response.py index 48aa9254..d847e5f2 100644 --- a/gate_api/models/inline_response20013.py +++ b/gate_api/models/otc_order_detail_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20013(object): +class OtcOrderDetailResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class InlineResponse20013(object): openapi_types = { 'message': 'str', 'code': 'int', - 'data': 'InlineResponse20013Data' + 'data': 'OtcOrderDetail' } attribute_map = { @@ -45,8 +45,8 @@ class InlineResponse20013(object): } def __init__(self, message=None, code=None, data=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, InlineResponse20013Data, Configuration) -> None - """InlineResponse20013 - a model defined in OpenAPI""" # noqa: E501 + # type: (str, int, OtcOrderDetail, Configuration) -> None + """OtcOrderDetailResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -62,20 +62,20 @@ def __init__(self, message=None, code=None, data=None, local_vars_configuration= @property def message(self): - """Gets the message of this InlineResponse20013. # noqa: E501 + """Gets the message of this OtcOrderDetailResponse. # noqa: E501 - :return: The message of this InlineResponse20013. # noqa: E501 + :return: The message of this OtcOrderDetailResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20013. + """Sets the message of this OtcOrderDetailResponse. - :param message: The message of this InlineResponse20013. # noqa: E501 + :param message: The message of this OtcOrderDetailResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 @@ -85,20 +85,20 @@ def message(self, message): @property def code(self): - """Gets the code of this InlineResponse20013. # noqa: E501 + """Gets the code of this OtcOrderDetailResponse. # noqa: E501 - :return: The code of this InlineResponse20013. # noqa: E501 + :return: The code of this OtcOrderDetailResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20013. + """Sets the code of this OtcOrderDetailResponse. - :param code: The code of this InlineResponse20013. # noqa: E501 + :param code: The code of this OtcOrderDetailResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 @@ -108,21 +108,21 @@ def code(self, code): @property def data(self): - """Gets the data of this InlineResponse20013. # noqa: E501 + """Gets the data of this OtcOrderDetailResponse. # noqa: E501 - :return: The data of this InlineResponse20013. # noqa: E501 - :rtype: InlineResponse20013Data + :return: The data of this OtcOrderDetailResponse. # noqa: E501 + :rtype: OtcOrderDetail """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20013. + """Sets the data of this OtcOrderDetailResponse. - :param data: The data of this InlineResponse20013. # noqa: E501 - :type: InlineResponse20013Data + :param data: The data of this OtcOrderDetailResponse. # noqa: E501 + :type: OtcOrderDetail """ if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 @@ -163,14 +163,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20013): + if not isinstance(other, OtcOrderDetailResponse): 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, InlineResponse20013): + if not isinstance(other, OtcOrderDetailResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20011_data_crypto_currency_info.py b/gate_api/models/otc_order_list_crypto_currency_info.py similarity index 78% rename from gate_api/models/inline_response20011_data_crypto_currency_info.py rename to gate_api/models/otc_order_list_crypto_currency_info.py index 5d222745..761db3b1 100644 --- a/gate_api/models/inline_response20011_data_crypto_currency_info.py +++ b/gate_api/models/otc_order_list_crypto_currency_info.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20011DataCryptoCurrencyInfo(object): +class OtcOrderListCryptoCurrencyInfo(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse20011DataCryptoCurrencyInfo(object): def __init__(self, name=None, icon=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """InlineResponse20011DataCryptoCurrencyInfo - a model defined in OpenAPI""" # noqa: E501 + """OtcOrderListCryptoCurrencyInfo - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,20 +58,20 @@ def __init__(self, name=None, icon=None, local_vars_configuration=None): # noqa @property def name(self): - """Gets the name of this InlineResponse20011DataCryptoCurrencyInfo. # noqa: E501 + """Gets the name of this OtcOrderListCryptoCurrencyInfo. # noqa: E501 - :return: The name of this InlineResponse20011DataCryptoCurrencyInfo. # noqa: E501 + :return: The name of this OtcOrderListCryptoCurrencyInfo. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this InlineResponse20011DataCryptoCurrencyInfo. + """Sets the name of this OtcOrderListCryptoCurrencyInfo. - :param name: The name of this InlineResponse20011DataCryptoCurrencyInfo. # noqa: E501 + :param name: The name of this OtcOrderListCryptoCurrencyInfo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 @@ -81,20 +81,20 @@ def name(self, name): @property def icon(self): - """Gets the icon of this InlineResponse20011DataCryptoCurrencyInfo. # noqa: E501 + """Gets the icon of this OtcOrderListCryptoCurrencyInfo. # noqa: E501 - :return: The icon of this InlineResponse20011DataCryptoCurrencyInfo. # noqa: E501 + :return: The icon of this OtcOrderListCryptoCurrencyInfo. # noqa: E501 :rtype: str """ return self._icon @icon.setter def icon(self, icon): - """Sets the icon of this InlineResponse20011DataCryptoCurrencyInfo. + """Sets the icon of this OtcOrderListCryptoCurrencyInfo. - :param icon: The icon of this InlineResponse20011DataCryptoCurrencyInfo. # noqa: E501 + :param icon: The icon of this OtcOrderListCryptoCurrencyInfo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and icon is None: # noqa: E501 @@ -136,14 +136,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20011DataCryptoCurrencyInfo): + if not isinstance(other, OtcOrderListCryptoCurrencyInfo): 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, InlineResponse20011DataCryptoCurrencyInfo): + if not isinstance(other, OtcOrderListCryptoCurrencyInfo): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20011_data_fiat_currency_info.py b/gate_api/models/otc_order_list_fiat_currency_info.py similarity index 79% rename from gate_api/models/inline_response20011_data_fiat_currency_info.py rename to gate_api/models/otc_order_list_fiat_currency_info.py index bbc17b74..c387482f 100644 --- a/gate_api/models/inline_response20011_data_fiat_currency_info.py +++ b/gate_api/models/otc_order_list_fiat_currency_info.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20011DataFiatCurrencyInfo(object): +class OtcOrderListFiatCurrencyInfo(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse20011DataFiatCurrencyInfo(object): def __init__(self, name=None, icon=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """InlineResponse20011DataFiatCurrencyInfo - a model defined in OpenAPI""" # noqa: E501 + """OtcOrderListFiatCurrencyInfo - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,22 +58,22 @@ def __init__(self, name=None, icon=None, local_vars_configuration=None): # noqa @property def name(self): - """Gets the name of this InlineResponse20011DataFiatCurrencyInfo. # noqa: E501 + """Gets the name of this OtcOrderListFiatCurrencyInfo. # noqa: E501 Name # noqa: E501 - :return: The name of this InlineResponse20011DataFiatCurrencyInfo. # noqa: E501 + :return: The name of this OtcOrderListFiatCurrencyInfo. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this InlineResponse20011DataFiatCurrencyInfo. + """Sets the name of this OtcOrderListFiatCurrencyInfo. Name # noqa: E501 - :param name: The name of this InlineResponse20011DataFiatCurrencyInfo. # noqa: E501 + :param name: The name of this OtcOrderListFiatCurrencyInfo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 @@ -83,22 +83,22 @@ def name(self, name): @property def icon(self): - """Gets the icon of this InlineResponse20011DataFiatCurrencyInfo. # noqa: E501 + """Gets the icon of this OtcOrderListFiatCurrencyInfo. # noqa: E501 Image # noqa: E501 - :return: The icon of this InlineResponse20011DataFiatCurrencyInfo. # noqa: E501 + :return: The icon of this OtcOrderListFiatCurrencyInfo. # noqa: E501 :rtype: str """ return self._icon @icon.setter def icon(self, icon): - """Sets the icon of this InlineResponse20011DataFiatCurrencyInfo. + """Sets the icon of this OtcOrderListFiatCurrencyInfo. Image # noqa: E501 - :param icon: The icon of this InlineResponse20011DataFiatCurrencyInfo. # noqa: E501 + :param icon: The icon of this OtcOrderListFiatCurrencyInfo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and icon is None: # noqa: E501 @@ -140,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20011DataFiatCurrencyInfo): + if not isinstance(other, OtcOrderListFiatCurrencyInfo): 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, InlineResponse20011DataFiatCurrencyInfo): + if not isinstance(other, OtcOrderListFiatCurrencyInfo): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20011_data_list.py b/gate_api/models/otc_order_list_item.py similarity index 62% rename from gate_api/models/inline_response20011_data_list.py rename to gate_api/models/otc_order_list_item.py index 4420cff5..d8e0b4b7 100644 --- a/gate_api/models/inline_response20011_data_list.py +++ b/gate_api/models/otc_order_list_item.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20011DataList(object): +class OtcOrderListItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -41,13 +41,14 @@ class InlineResponse20011DataList(object): 'status': 'str', 'db_status': 'str', 'fiat_currency': 'str', - 'fiat_currency_info': 'InlineResponse20011DataFiatCurrencyInfo', + 'fiat_currency_info': 'OtcOrderListFiatCurrencyInfo', 'fiat_amount': 'str', 'crypto_currency': 'str', - 'crypto_currency_info': 'InlineResponse20011DataCryptoCurrencyInfo', + 'crypto_currency_info': 'OtcOrderListCryptoCurrencyInfo', 'crypto_amount': 'str', 'rate': 'str', 'transfer_remark': 'str', + 'reference_code': 'str', 'gate_bank_account_iban': 'str', 'promotion_code': 'str' } @@ -68,13 +69,14 @@ class InlineResponse20011DataList(object): 'crypto_amount': 'crypto_amount', 'rate': 'rate', 'transfer_remark': 'transfer_remark', + 'reference_code': 'reference_code', 'gate_bank_account_iban': 'gate_bank_account_iban', 'promotion_code': 'promotion_code' } - def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type=None, status=None, db_status=None, fiat_currency=None, fiat_currency_info=None, fiat_amount=None, crypto_currency=None, crypto_currency_info=None, crypto_amount=None, rate=None, transfer_remark=None, gate_bank_account_iban=None, promotion_code=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, str, str, str, str, str, InlineResponse20011DataFiatCurrencyInfo, str, str, InlineResponse20011DataCryptoCurrencyInfo, str, str, str, str, str, Configuration) -> None - """InlineResponse20011DataList - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type=None, status=None, db_status=None, fiat_currency=None, fiat_currency_info=None, fiat_amount=None, crypto_currency=None, crypto_currency_info=None, crypto_amount=None, rate=None, transfer_remark=None, reference_code=None, gate_bank_account_iban=None, promotion_code=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, str, str, str, str, OtcOrderListFiatCurrencyInfo, str, str, OtcOrderListCryptoCurrencyInfo, str, str, str, str, str, str, Configuration) -> None + """OtcOrderListItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -94,6 +96,7 @@ def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type self._crypto_amount = None self._rate = None self._transfer_remark = None + self._reference_code = None self._gate_bank_account_iban = None self._promotion_code = None self.discriminator = None @@ -128,6 +131,8 @@ def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type self.rate = rate if transfer_remark is not None: self.transfer_remark = transfer_remark + if reference_code is not None: + self.reference_code = reference_code if gate_bank_account_iban is not None: self.gate_bank_account_iban = gate_bank_account_iban if promotion_code is not None: @@ -135,22 +140,22 @@ def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type @property def time(self): - """Gets the time of this InlineResponse20011DataList. # noqa: E501 + """Gets the time of this OtcOrderListItem. # noqa: E501 Current time # noqa: E501 - :return: The time of this InlineResponse20011DataList. # noqa: E501 + :return: The time of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._time @time.setter def time(self, time): - """Sets the time of this InlineResponse20011DataList. + """Sets the time of this OtcOrderListItem. Current time # noqa: E501 - :param time: The time of this InlineResponse20011DataList. # noqa: E501 + :param time: The time of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -158,22 +163,22 @@ def time(self, time): @property def timestamp(self): - """Gets the timestamp of this InlineResponse20011DataList. # noqa: E501 + """Gets the timestamp of this OtcOrderListItem. # noqa: E501 Current timestamp # noqa: E501 - :return: The timestamp of this InlineResponse20011DataList. # noqa: E501 + :return: The timestamp of this OtcOrderListItem. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20011DataList. + """Sets the timestamp of this OtcOrderListItem. Current timestamp # noqa: E501 - :param timestamp: The timestamp of this InlineResponse20011DataList. # noqa: E501 + :param timestamp: The timestamp of this OtcOrderListItem. # noqa: E501 :type: int """ @@ -181,22 +186,22 @@ def timestamp(self, timestamp): @property def order_id(self): - """Gets the order_id of this InlineResponse20011DataList. # noqa: E501 + """Gets the order_id of this OtcOrderListItem. # noqa: E501 orderId # noqa: E501 - :return: The order_id of this InlineResponse20011DataList. # noqa: E501 + :return: The order_id of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._order_id @order_id.setter def order_id(self, order_id): - """Sets the order_id of this InlineResponse20011DataList. + """Sets the order_id of this OtcOrderListItem. orderId # noqa: E501 - :param order_id: The order_id of this InlineResponse20011DataList. # noqa: E501 + :param order_id: The order_id of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -204,22 +209,22 @@ def order_id(self, order_id): @property def trade_no(self): - """Gets the trade_no of this InlineResponse20011DataList. # noqa: E501 + """Gets the trade_no of this OtcOrderListItem. # noqa: E501 Trade number # noqa: E501 - :return: The trade_no of this InlineResponse20011DataList. # noqa: E501 + :return: The trade_no of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._trade_no @trade_no.setter def trade_no(self, trade_no): - """Sets the trade_no of this InlineResponse20011DataList. + """Sets the trade_no of this OtcOrderListItem. Trade number # noqa: E501 - :param trade_no: The trade_no of this InlineResponse20011DataList. # noqa: E501 + :param trade_no: The trade_no of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -227,22 +232,22 @@ def trade_no(self, trade_no): @property def type(self): - """Gets the type of this InlineResponse20011DataList. # noqa: E501 + """Gets the type of this OtcOrderListItem. # noqa: E501 Quote direction buy/sell/all # noqa: E501 - :return: The type of this InlineResponse20011DataList. # noqa: E501 + :return: The type of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this InlineResponse20011DataList. + """Sets the type of this OtcOrderListItem. Quote direction buy/sell/all # noqa: E501 - :param type: The type of this InlineResponse20011DataList. # noqa: E501 + :param type: The type of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -250,22 +255,22 @@ def type(self, type): @property def status(self): - """Gets the status of this InlineResponse20011DataList. # noqa: E501 + """Gets the status of this OtcOrderListItem. # noqa: E501 Order Status # noqa: E501 - :return: The status of this InlineResponse20011DataList. # noqa: E501 + :return: The status of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20011DataList. + """Sets the status of this OtcOrderListItem. Order Status # noqa: E501 - :param status: The status of this InlineResponse20011DataList. # noqa: E501 + :param status: The status of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -273,20 +278,20 @@ def status(self, status): @property def db_status(self): - """Gets the db_status of this InlineResponse20011DataList. # noqa: E501 + """Gets the db_status of this OtcOrderListItem. # noqa: E501 - :return: The db_status of this InlineResponse20011DataList. # noqa: E501 + :return: The db_status of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._db_status @db_status.setter def db_status(self, db_status): - """Sets the db_status of this InlineResponse20011DataList. + """Sets the db_status of this OtcOrderListItem. - :param db_status: The db_status of this InlineResponse20011DataList. # noqa: E501 + :param db_status: The db_status of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -294,22 +299,22 @@ def db_status(self, db_status): @property def fiat_currency(self): - """Gets the fiat_currency of this InlineResponse20011DataList. # noqa: E501 + """Gets the fiat_currency of this OtcOrderListItem. # noqa: E501 Fiat type # noqa: E501 - :return: The fiat_currency of this InlineResponse20011DataList. # noqa: E501 + :return: The fiat_currency of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._fiat_currency @fiat_currency.setter def fiat_currency(self, fiat_currency): - """Sets the fiat_currency of this InlineResponse20011DataList. + """Sets the fiat_currency of this OtcOrderListItem. Fiat type # noqa: E501 - :param fiat_currency: The fiat_currency of this InlineResponse20011DataList. # noqa: E501 + :param fiat_currency: The fiat_currency of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -317,43 +322,43 @@ def fiat_currency(self, fiat_currency): @property def fiat_currency_info(self): - """Gets the fiat_currency_info of this InlineResponse20011DataList. # noqa: E501 + """Gets the fiat_currency_info of this OtcOrderListItem. # noqa: E501 - :return: The fiat_currency_info of this InlineResponse20011DataList. # noqa: E501 - :rtype: InlineResponse20011DataFiatCurrencyInfo + :return: The fiat_currency_info of this OtcOrderListItem. # noqa: E501 + :rtype: OtcOrderListFiatCurrencyInfo """ return self._fiat_currency_info @fiat_currency_info.setter def fiat_currency_info(self, fiat_currency_info): - """Sets the fiat_currency_info of this InlineResponse20011DataList. + """Sets the fiat_currency_info of this OtcOrderListItem. - :param fiat_currency_info: The fiat_currency_info of this InlineResponse20011DataList. # noqa: E501 - :type: InlineResponse20011DataFiatCurrencyInfo + :param fiat_currency_info: The fiat_currency_info of this OtcOrderListItem. # noqa: E501 + :type: OtcOrderListFiatCurrencyInfo """ self._fiat_currency_info = fiat_currency_info @property def fiat_amount(self): - """Gets the fiat_amount of this InlineResponse20011DataList. # noqa: E501 + """Gets the fiat_amount of this OtcOrderListItem. # noqa: E501 Fiat amount # noqa: E501 - :return: The fiat_amount of this InlineResponse20011DataList. # noqa: E501 + :return: The fiat_amount of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._fiat_amount @fiat_amount.setter def fiat_amount(self, fiat_amount): - """Sets the fiat_amount of this InlineResponse20011DataList. + """Sets the fiat_amount of this OtcOrderListItem. Fiat amount # noqa: E501 - :param fiat_amount: The fiat_amount of this InlineResponse20011DataList. # noqa: E501 + :param fiat_amount: The fiat_amount of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -361,22 +366,22 @@ def fiat_amount(self, fiat_amount): @property def crypto_currency(self): - """Gets the crypto_currency of this InlineResponse20011DataList. # noqa: E501 + """Gets the crypto_currency of this OtcOrderListItem. # noqa: E501 Stablecoin # noqa: E501 - :return: The crypto_currency of this InlineResponse20011DataList. # noqa: E501 + :return: The crypto_currency of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._crypto_currency @crypto_currency.setter def crypto_currency(self, crypto_currency): - """Sets the crypto_currency of this InlineResponse20011DataList. + """Sets the crypto_currency of this OtcOrderListItem. Stablecoin # noqa: E501 - :param crypto_currency: The crypto_currency of this InlineResponse20011DataList. # noqa: E501 + :param crypto_currency: The crypto_currency of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -384,43 +389,43 @@ def crypto_currency(self, crypto_currency): @property def crypto_currency_info(self): - """Gets the crypto_currency_info of this InlineResponse20011DataList. # noqa: E501 + """Gets the crypto_currency_info of this OtcOrderListItem. # noqa: E501 - :return: The crypto_currency_info of this InlineResponse20011DataList. # noqa: E501 - :rtype: InlineResponse20011DataCryptoCurrencyInfo + :return: The crypto_currency_info of this OtcOrderListItem. # noqa: E501 + :rtype: OtcOrderListCryptoCurrencyInfo """ return self._crypto_currency_info @crypto_currency_info.setter def crypto_currency_info(self, crypto_currency_info): - """Sets the crypto_currency_info of this InlineResponse20011DataList. + """Sets the crypto_currency_info of this OtcOrderListItem. - :param crypto_currency_info: The crypto_currency_info of this InlineResponse20011DataList. # noqa: E501 - :type: InlineResponse20011DataCryptoCurrencyInfo + :param crypto_currency_info: The crypto_currency_info of this OtcOrderListItem. # noqa: E501 + :type: OtcOrderListCryptoCurrencyInfo """ self._crypto_currency_info = crypto_currency_info @property def crypto_amount(self): - """Gets the crypto_amount of this InlineResponse20011DataList. # noqa: E501 + """Gets the crypto_amount of this OtcOrderListItem. # noqa: E501 Stablecoin amount # noqa: E501 - :return: The crypto_amount of this InlineResponse20011DataList. # noqa: E501 + :return: The crypto_amount of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._crypto_amount @crypto_amount.setter def crypto_amount(self, crypto_amount): - """Sets the crypto_amount of this InlineResponse20011DataList. + """Sets the crypto_amount of this OtcOrderListItem. Stablecoin amount # noqa: E501 - :param crypto_amount: The crypto_amount of this InlineResponse20011DataList. # noqa: E501 + :param crypto_amount: The crypto_amount of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -428,22 +433,22 @@ def crypto_amount(self, crypto_amount): @property def rate(self): - """Gets the rate of this InlineResponse20011DataList. # noqa: E501 + """Gets the rate of this OtcOrderListItem. # noqa: E501 Exchange rate # noqa: E501 - :return: The rate of this InlineResponse20011DataList. # noqa: E501 + :return: The rate of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._rate @rate.setter def rate(self, rate): - """Sets the rate of this InlineResponse20011DataList. + """Sets the rate of this OtcOrderListItem. Exchange rate # noqa: E501 - :param rate: The rate of this InlineResponse20011DataList. # noqa: E501 + :param rate: The rate of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -451,45 +456,68 @@ def rate(self, rate): @property def transfer_remark(self): - """Gets the transfer_remark of this InlineResponse20011DataList. # noqa: E501 + """Gets the transfer_remark of this OtcOrderListItem. # noqa: E501 - Remark # noqa: E501 + Transfer remark (mutually exclusive with reference_code; empty string when the deposit buy order has a reference code) # noqa: E501 - :return: The transfer_remark of this InlineResponse20011DataList. # noqa: E501 + :return: The transfer_remark of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._transfer_remark @transfer_remark.setter def transfer_remark(self, transfer_remark): - """Sets the transfer_remark of this InlineResponse20011DataList. + """Sets the transfer_remark of this OtcOrderListItem. - Remark # noqa: E501 + Transfer remark (mutually exclusive with reference_code; empty string when the deposit buy order has a reference code) # noqa: E501 - :param transfer_remark: The transfer_remark of this InlineResponse20011DataList. # noqa: E501 + :param transfer_remark: The transfer_remark of this OtcOrderListItem. # noqa: E501 :type: str """ self._transfer_remark = transfer_remark + @property + def reference_code(self): + """Gets the reference_code of this OtcOrderListItem. # noqa: E501 + + Unique bank transfer reference code for deposit buy orders (SGB deposit scenario) # noqa: E501 + + :return: The reference_code of this OtcOrderListItem. # noqa: E501 + :rtype: str + """ + return self._reference_code + + @reference_code.setter + def reference_code(self, reference_code): + """Sets the reference_code of this OtcOrderListItem. + + Unique bank transfer reference code for deposit buy orders (SGB deposit scenario) # noqa: E501 + + :param reference_code: The reference_code of this OtcOrderListItem. # noqa: E501 + :type: str + """ + + self._reference_code = reference_code + @property def gate_bank_account_iban(self): - """Gets the gate_bank_account_iban of this InlineResponse20011DataList. # noqa: E501 + """Gets the gate_bank_account_iban of this OtcOrderListItem. # noqa: E501 Bank account # noqa: E501 - :return: The gate_bank_account_iban of this InlineResponse20011DataList. # noqa: E501 + :return: The gate_bank_account_iban of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._gate_bank_account_iban @gate_bank_account_iban.setter def gate_bank_account_iban(self, gate_bank_account_iban): - """Sets the gate_bank_account_iban of this InlineResponse20011DataList. + """Sets the gate_bank_account_iban of this OtcOrderListItem. Bank account # noqa: E501 - :param gate_bank_account_iban: The gate_bank_account_iban of this InlineResponse20011DataList. # noqa: E501 + :param gate_bank_account_iban: The gate_bank_account_iban of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -497,22 +525,22 @@ def gate_bank_account_iban(self, gate_bank_account_iban): @property def promotion_code(self): - """Gets the promotion_code of this InlineResponse20011DataList. # noqa: E501 + """Gets the promotion_code of this OtcOrderListItem. # noqa: E501 Promotion code # noqa: E501 - :return: The promotion_code of this InlineResponse20011DataList. # noqa: E501 + :return: The promotion_code of this OtcOrderListItem. # noqa: E501 :rtype: str """ return self._promotion_code @promotion_code.setter def promotion_code(self, promotion_code): - """Sets the promotion_code of this InlineResponse20011DataList. + """Sets the promotion_code of this OtcOrderListItem. Promotion code # noqa: E501 - :param promotion_code: The promotion_code of this InlineResponse20011DataList. # noqa: E501 + :param promotion_code: The promotion_code of this OtcOrderListItem. # noqa: E501 :type: str """ @@ -552,14 +580,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20011DataList): + if not isinstance(other, OtcOrderListItem): 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, InlineResponse20011DataList): + if not isinstance(other, OtcOrderListItem): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20012.py b/gate_api/models/otc_order_list_response.py similarity index 77% rename from gate_api/models/inline_response20012.py rename to gate_api/models/otc_order_list_response.py index d91919e5..83adc072 100644 --- a/gate_api/models/inline_response20012.py +++ b/gate_api/models/otc_order_list_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20012(object): +class OtcOrderListResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class InlineResponse20012(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'InlineResponse20012Data' + 'data': 'OtcOrderListResult' } attribute_map = { @@ -45,8 +45,8 @@ class InlineResponse20012(object): } def __init__(self, code=None, message=None, data=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, InlineResponse20012Data, Configuration) -> None - """InlineResponse20012 - a model defined in OpenAPI""" # noqa: E501 + # type: (int, str, OtcOrderListResult, Configuration) -> None + """OtcOrderListResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -62,20 +62,20 @@ def __init__(self, code=None, message=None, data=None, local_vars_configuration= @property def code(self): - """Gets the code of this InlineResponse20012. # noqa: E501 + """Gets the code of this OtcOrderListResponse. # noqa: E501 - :return: The code of this InlineResponse20012. # noqa: E501 + :return: The code of this OtcOrderListResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20012. + """Sets the code of this OtcOrderListResponse. - :param code: The code of this InlineResponse20012. # noqa: E501 + :param code: The code of this OtcOrderListResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 @@ -85,20 +85,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20012. # noqa: E501 + """Gets the message of this OtcOrderListResponse. # noqa: E501 - :return: The message of this InlineResponse20012. # noqa: E501 + :return: The message of this OtcOrderListResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20012. + """Sets the message of this OtcOrderListResponse. - :param message: The message of this InlineResponse20012. # noqa: E501 + :param message: The message of this OtcOrderListResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 @@ -108,21 +108,21 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20012. # noqa: E501 + """Gets the data of this OtcOrderListResponse. # noqa: E501 - :return: The data of this InlineResponse20012. # noqa: E501 - :rtype: InlineResponse20012Data + :return: The data of this OtcOrderListResponse. # noqa: E501 + :rtype: OtcOrderListResult """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20012. + """Sets the data of this OtcOrderListResponse. - :param data: The data of this InlineResponse20012. # noqa: E501 - :type: InlineResponse20012Data + :param data: The data of this OtcOrderListResponse. # noqa: E501 + :type: OtcOrderListResult """ if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 @@ -163,14 +163,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20012): + if not isinstance(other, OtcOrderListResponse): 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, InlineResponse20012): + if not isinstance(other, OtcOrderListResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20011_data.py b/gate_api/models/otc_order_list_result.py similarity index 73% rename from gate_api/models/inline_response20011_data.py rename to gate_api/models/otc_order_list_result.py index f0924c5a..9789216b 100644 --- a/gate_api/models/inline_response20011_data.py +++ b/gate_api/models/otc_order_list_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20011Data(object): +class OtcOrderListResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,7 @@ class InlineResponse20011Data(object): 'ps': 'int', 'total_pn': 'int', 'count': 'int', - 'list': 'list[InlineResponse20011DataList]' + 'list': 'list[OtcOrderListItem]' } attribute_map = { @@ -49,8 +49,8 @@ class InlineResponse20011Data(object): } def __init__(self, pn=None, ps=None, total_pn=None, count=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, int, list[InlineResponse20011DataList], Configuration) -> None - """InlineResponse20011Data - a model defined in OpenAPI""" # noqa: E501 + # type: (int, int, int, int, list[OtcOrderListItem], Configuration) -> None + """OtcOrderListResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -70,20 +70,20 @@ def __init__(self, pn=None, ps=None, total_pn=None, count=None, list=None, local @property def pn(self): - """Gets the pn of this InlineResponse20011Data. # noqa: E501 + """Gets the pn of this OtcOrderListResult. # noqa: E501 - :return: The pn of this InlineResponse20011Data. # noqa: E501 + :return: The pn of this OtcOrderListResult. # noqa: E501 :rtype: int """ return self._pn @pn.setter def pn(self, pn): - """Sets the pn of this InlineResponse20011Data. + """Sets the pn of this OtcOrderListResult. - :param pn: The pn of this InlineResponse20011Data. # noqa: E501 + :param pn: The pn of this OtcOrderListResult. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and pn is None: # noqa: E501 @@ -93,20 +93,20 @@ def pn(self, pn): @property def ps(self): - """Gets the ps of this InlineResponse20011Data. # noqa: E501 + """Gets the ps of this OtcOrderListResult. # noqa: E501 - :return: The ps of this InlineResponse20011Data. # noqa: E501 + :return: The ps of this OtcOrderListResult. # noqa: E501 :rtype: int """ return self._ps @ps.setter def ps(self, ps): - """Sets the ps of this InlineResponse20011Data. + """Sets the ps of this OtcOrderListResult. - :param ps: The ps of this InlineResponse20011Data. # noqa: E501 + :param ps: The ps of this OtcOrderListResult. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and ps is None: # noqa: E501 @@ -116,20 +116,20 @@ def ps(self, ps): @property def total_pn(self): - """Gets the total_pn of this InlineResponse20011Data. # noqa: E501 + """Gets the total_pn of this OtcOrderListResult. # noqa: E501 - :return: The total_pn of this InlineResponse20011Data. # noqa: E501 + :return: The total_pn of this OtcOrderListResult. # noqa: E501 :rtype: int """ return self._total_pn @total_pn.setter def total_pn(self, total_pn): - """Sets the total_pn of this InlineResponse20011Data. + """Sets the total_pn of this OtcOrderListResult. - :param total_pn: The total_pn of this InlineResponse20011Data. # noqa: E501 + :param total_pn: The total_pn of this OtcOrderListResult. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and total_pn is None: # noqa: E501 @@ -139,20 +139,20 @@ def total_pn(self, total_pn): @property def count(self): - """Gets the count of this InlineResponse20011Data. # noqa: E501 + """Gets the count of this OtcOrderListResult. # noqa: E501 - :return: The count of this InlineResponse20011Data. # noqa: E501 + :return: The count of this OtcOrderListResult. # noqa: E501 :rtype: int """ return self._count @count.setter def count(self, count): - """Sets the count of this InlineResponse20011Data. + """Sets the count of this OtcOrderListResult. - :param count: The count of this InlineResponse20011Data. # noqa: E501 + :param count: The count of this OtcOrderListResult. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501 @@ -162,21 +162,21 @@ def count(self, count): @property def list(self): - """Gets the list of this InlineResponse20011Data. # noqa: E501 + """Gets the list of this OtcOrderListResult. # noqa: E501 - :return: The list of this InlineResponse20011Data. # noqa: E501 - :rtype: list[InlineResponse20011DataList] + :return: The list of this OtcOrderListResult. # noqa: E501 + :rtype: list[OtcOrderListItem] """ return self._list @list.setter def list(self, list): - """Sets the list of this InlineResponse20011Data. + """Sets the list of this OtcOrderListResult. - :param list: The list of this InlineResponse20011Data. # noqa: E501 - :type: list[InlineResponse20011DataList] + :param list: The list of this OtcOrderListResult. # noqa: E501 + :type: list[OtcOrderListItem] """ if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 @@ -217,14 +217,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20011Data): + if not isinstance(other, OtcOrderListResult): 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, InlineResponse20011Data): + if not isinstance(other, OtcOrderListResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_order_request.py b/gate_api/models/otc_order_request.py index 550252db..a077feed 100644 --- a/gate_api/models/otc_order_request.py +++ b/gate_api/models/otc_order_request.py @@ -287,7 +287,7 @@ def quote_token(self, quote_token): def bank_id(self): """Gets the bank_id of this OtcOrderRequest. # noqa: E501 - Bank card ID used for the order (retrieved via the default bank card API) # noqa: E501 + The bank card ID used for placing the order; select it from the list returned by `GET /otc/bank_list` (or `GET /otc/bank/list`); the default card has `is_default=1` # noqa: E501 :return: The bank_id of this OtcOrderRequest. # noqa: E501 :rtype: str @@ -298,7 +298,7 @@ def bank_id(self): def bank_id(self, bank_id): """Sets the bank_id of this OtcOrderRequest. - Bank card ID used for the order (retrieved via the default bank card API) # noqa: E501 + The bank card ID used for placing the order; select it from the list returned by `GET /otc/bank_list` (or `GET /otc/bank/list`); the default card has `is_default=1` # noqa: E501 :param bank_id: The bank_id of this OtcOrderRequest. # noqa: E501 :type: str diff --git a/gate_api/models/inline_response2006.py b/gate_api/models/otc_quote_response.py similarity index 77% rename from gate_api/models/inline_response2006.py rename to gate_api/models/otc_quote_response.py index 687147b2..d1a89334 100644 --- a/gate_api/models/inline_response2006.py +++ b/gate_api/models/otc_quote_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2006(object): +class OtcQuoteResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class InlineResponse2006(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'InlineResponse2006Data' + 'data': 'OtcQuoteResult' } attribute_map = { @@ -45,8 +45,8 @@ class InlineResponse2006(object): } def __init__(self, code=None, message=None, data=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, InlineResponse2006Data, Configuration) -> None - """InlineResponse2006 - a model defined in OpenAPI""" # noqa: E501 + # type: (int, str, OtcQuoteResult, Configuration) -> None + """OtcQuoteResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -62,20 +62,20 @@ def __init__(self, code=None, message=None, data=None, local_vars_configuration= @property def code(self): - """Gets the code of this InlineResponse2006. # noqa: E501 + """Gets the code of this OtcQuoteResponse. # noqa: E501 - :return: The code of this InlineResponse2006. # noqa: E501 + :return: The code of this OtcQuoteResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse2006. + """Sets the code of this OtcQuoteResponse. - :param code: The code of this InlineResponse2006. # noqa: E501 + :param code: The code of this OtcQuoteResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 @@ -85,20 +85,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse2006. # noqa: E501 + """Gets the message of this OtcQuoteResponse. # noqa: E501 - :return: The message of this InlineResponse2006. # noqa: E501 + :return: The message of this OtcQuoteResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse2006. + """Sets the message of this OtcQuoteResponse. - :param message: The message of this InlineResponse2006. # noqa: E501 + :param message: The message of this OtcQuoteResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 @@ -108,21 +108,21 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse2006. # noqa: E501 + """Gets the data of this OtcQuoteResponse. # noqa: E501 - :return: The data of this InlineResponse2006. # noqa: E501 - :rtype: InlineResponse2006Data + :return: The data of this OtcQuoteResponse. # noqa: E501 + :rtype: OtcQuoteResult """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse2006. + """Sets the data of this OtcQuoteResponse. - :param data: The data of this InlineResponse2006. # noqa: E501 - :type: InlineResponse2006Data + :param data: The data of this OtcQuoteResponse. # noqa: E501 + :type: OtcQuoteResult """ if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 @@ -163,14 +163,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2006): + if not isinstance(other, OtcQuoteResponse): 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, InlineResponse2006): + if not isinstance(other, OtcQuoteResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2006_data.py b/gate_api/models/otc_quote_result.py similarity index 74% rename from gate_api/models/inline_response2006_data.py rename to gate_api/models/otc_quote_result.py index f68e5546..6fc4dc17 100644 --- a/gate_api/models/inline_response2006_data.py +++ b/gate_api/models/otc_quote_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2006Data(object): +class OtcQuoteResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -62,7 +62,7 @@ class InlineResponse2006Data(object): def __init__(self, type=None, pay_coin=None, get_coin=None, pay_amount=None, get_amount=None, rate=None, rate_reci=None, promotion_code=None, side=None, order_type=None, quote_token=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """InlineResponse2006Data - a model defined in OpenAPI""" # noqa: E501 + """OtcQuoteResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -94,22 +94,22 @@ def __init__(self, type=None, pay_coin=None, get_coin=None, pay_amount=None, get @property def type(self): - """Gets the type of this InlineResponse2006Data. # noqa: E501 + """Gets the type of this OtcQuoteResult. # noqa: E501 BUY (on-ramp) or SELL (off-ramp) # noqa: E501 - :return: The type of this InlineResponse2006Data. # noqa: E501 + :return: The type of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this InlineResponse2006Data. + """Sets the type of this OtcQuoteResult. BUY (on-ramp) or SELL (off-ramp) # noqa: E501 - :param type: The type of this InlineResponse2006Data. # noqa: E501 + :param type: The type of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 @@ -119,22 +119,22 @@ def type(self, type): @property def pay_coin(self): - """Gets the pay_coin of this InlineResponse2006Data. # noqa: E501 + """Gets the pay_coin of this OtcQuoteResult. # noqa: E501 Payment currency # noqa: E501 - :return: The pay_coin of this InlineResponse2006Data. # noqa: E501 + :return: The pay_coin of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._pay_coin @pay_coin.setter def pay_coin(self, pay_coin): - """Sets the pay_coin of this InlineResponse2006Data. + """Sets the pay_coin of this OtcQuoteResult. Payment currency # noqa: E501 - :param pay_coin: The pay_coin of this InlineResponse2006Data. # noqa: E501 + :param pay_coin: The pay_coin of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and pay_coin is None: # noqa: E501 @@ -144,22 +144,22 @@ def pay_coin(self, pay_coin): @property def get_coin(self): - """Gets the get_coin of this InlineResponse2006Data. # noqa: E501 + """Gets the get_coin of this OtcQuoteResult. # noqa: E501 Currency # noqa: E501 - :return: The get_coin of this InlineResponse2006Data. # noqa: E501 + :return: The get_coin of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._get_coin @get_coin.setter def get_coin(self, get_coin): - """Sets the get_coin of this InlineResponse2006Data. + """Sets the get_coin of this OtcQuoteResult. Currency # noqa: E501 - :param get_coin: The get_coin of this InlineResponse2006Data. # noqa: E501 + :param get_coin: The get_coin of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and get_coin is None: # noqa: E501 @@ -169,22 +169,22 @@ def get_coin(self, get_coin): @property def pay_amount(self): - """Gets the pay_amount of this InlineResponse2006Data. # noqa: E501 + """Gets the pay_amount of this OtcQuoteResult. # noqa: E501 Payment amount # noqa: E501 - :return: The pay_amount of this InlineResponse2006Data. # noqa: E501 + :return: The pay_amount of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._pay_amount @pay_amount.setter def pay_amount(self, pay_amount): - """Sets the pay_amount of this InlineResponse2006Data. + """Sets the pay_amount of this OtcQuoteResult. Payment amount # noqa: E501 - :param pay_amount: The pay_amount of this InlineResponse2006Data. # noqa: E501 + :param pay_amount: The pay_amount of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and pay_amount is None: # noqa: E501 @@ -194,22 +194,22 @@ def pay_amount(self, pay_amount): @property def get_amount(self): - """Gets the get_amount of this InlineResponse2006Data. # noqa: E501 + """Gets the get_amount of this OtcQuoteResult. # noqa: E501 Redemption Amount # noqa: E501 - :return: The get_amount of this InlineResponse2006Data. # noqa: E501 + :return: The get_amount of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._get_amount @get_amount.setter def get_amount(self, get_amount): - """Sets the get_amount of this InlineResponse2006Data. + """Sets the get_amount of this OtcQuoteResult. Redemption Amount # noqa: E501 - :param get_amount: The get_amount of this InlineResponse2006Data. # noqa: E501 + :param get_amount: The get_amount of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and get_amount is None: # noqa: E501 @@ -219,22 +219,22 @@ def get_amount(self, get_amount): @property def rate(self): - """Gets the rate of this InlineResponse2006Data. # noqa: E501 + """Gets the rate of this OtcQuoteResult. # noqa: E501 Exchange rate # noqa: E501 - :return: The rate of this InlineResponse2006Data. # noqa: E501 + :return: The rate of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._rate @rate.setter def rate(self, rate): - """Sets the rate of this InlineResponse2006Data. + """Sets the rate of this OtcQuoteResult. Exchange rate # noqa: E501 - :param rate: The rate of this InlineResponse2006Data. # noqa: E501 + :param rate: The rate of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and rate is None: # noqa: E501 @@ -244,22 +244,22 @@ def rate(self, rate): @property def rate_reci(self): - """Gets the rate_reci of this InlineResponse2006Data. # noqa: E501 + """Gets the rate_reci of this OtcQuoteResult. # noqa: E501 Reciprocal of the exchange rate # noqa: E501 - :return: The rate_reci of this InlineResponse2006Data. # noqa: E501 + :return: The rate_reci of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._rate_reci @rate_reci.setter def rate_reci(self, rate_reci): - """Sets the rate_reci of this InlineResponse2006Data. + """Sets the rate_reci of this OtcQuoteResult. Reciprocal of the exchange rate # noqa: E501 - :param rate_reci: The rate_reci of this InlineResponse2006Data. # noqa: E501 + :param rate_reci: The rate_reci of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and rate_reci is None: # noqa: E501 @@ -269,22 +269,22 @@ def rate_reci(self, rate_reci): @property def promotion_code(self): - """Gets the promotion_code of this InlineResponse2006Data. # noqa: E501 + """Gets the promotion_code of this OtcQuoteResult. # noqa: E501 Promotion code # noqa: E501 - :return: The promotion_code of this InlineResponse2006Data. # noqa: E501 + :return: The promotion_code of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._promotion_code @promotion_code.setter def promotion_code(self, promotion_code): - """Sets the promotion_code of this InlineResponse2006Data. + """Sets the promotion_code of this OtcQuoteResult. Promotion code # noqa: E501 - :param promotion_code: The promotion_code of this InlineResponse2006Data. # noqa: E501 + :param promotion_code: The promotion_code of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and promotion_code is None: # noqa: E501 @@ -294,22 +294,22 @@ def promotion_code(self, promotion_code): @property def side(self): - """Gets the side of this InlineResponse2006Data. # noqa: E501 + """Gets the side of this OtcQuoteResult. # noqa: E501 Quote method # noqa: E501 - :return: The side of this InlineResponse2006Data. # noqa: E501 + :return: The side of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._side @side.setter def side(self, side): - """Sets the side of this InlineResponse2006Data. + """Sets the side of this OtcQuoteResult. Quote method # noqa: E501 - :param side: The side of this InlineResponse2006Data. # noqa: E501 + :param side: The side of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 @@ -319,22 +319,22 @@ def side(self, side): @property def order_type(self): - """Gets the order_type of this InlineResponse2006Data. # noqa: E501 + """Gets the order_type of this OtcQuoteResult. # noqa: E501 Order type: FIAT (fiat) / STABLE (stablecoin) # noqa: E501 - :return: The order_type of this InlineResponse2006Data. # noqa: E501 + :return: The order_type of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._order_type @order_type.setter def order_type(self, order_type): - """Sets the order_type of this InlineResponse2006Data. + """Sets the order_type of this OtcQuoteResult. Order type: FIAT (fiat) / STABLE (stablecoin) # noqa: E501 - :param order_type: The order_type of this InlineResponse2006Data. # noqa: E501 + :param order_type: The order_type of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and order_type is None: # noqa: E501 @@ -344,22 +344,22 @@ def order_type(self, order_type): @property def quote_token(self): - """Gets the quote_token of this InlineResponse2006Data. # noqa: E501 + """Gets the quote_token of this OtcQuoteResult. # noqa: E501 Quote token required when placing an order # noqa: E501 - :return: The quote_token of this InlineResponse2006Data. # noqa: E501 + :return: The quote_token of this OtcQuoteResult. # noqa: E501 :rtype: str """ return self._quote_token @quote_token.setter def quote_token(self, quote_token): - """Sets the quote_token of this InlineResponse2006Data. + """Sets the quote_token of this OtcQuoteResult. Quote token required when placing an order # noqa: E501 - :param quote_token: The quote_token of this InlineResponse2006Data. # noqa: E501 + :param quote_token: The quote_token of this OtcQuoteResult. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and quote_token is None: # noqa: E501 @@ -401,14 +401,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2006Data): + if not isinstance(other, OtcQuoteResult): 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, InlineResponse2006Data): + if not isinstance(other, OtcQuoteResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/otc_stable_coin_order_create_response.py b/gate_api/models/otc_stable_coin_order_create_response.py new file mode 100644 index 00000000..7e552ee7 --- /dev/null +++ b/gate_api/models/otc_stable_coin_order_create_response.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 OtcStableCoinOrderCreateResponse(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 = { + 'code': 'int', + 'message': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message' + } + + def __init__(self, code=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """OtcStableCoinOrderCreateResponse - 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._code = None + self._message = None + self.discriminator = None + + self.code = code + self.message = message + + @property + def code(self): + """Gets the code of this OtcStableCoinOrderCreateResponse. # noqa: E501 + + + :return: The code of this OtcStableCoinOrderCreateResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this OtcStableCoinOrderCreateResponse. + + + :param code: The code of this OtcStableCoinOrderCreateResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this OtcStableCoinOrderCreateResponse. # noqa: E501 + + + :return: The message of this OtcStableCoinOrderCreateResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this OtcStableCoinOrderCreateResponse. + + + :param message: The message of this OtcStableCoinOrderCreateResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + 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, OtcStableCoinOrderCreateResponse): + 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, OtcStableCoinOrderCreateResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20012_data_list.py b/gate_api/models/otc_stable_coin_order_list_item.py similarity index 69% rename from gate_api/models/inline_response20012_data_list.py rename to gate_api/models/otc_stable_coin_order_list_item.py index 0157f952..1bac92e2 100644 --- a/gate_api/models/inline_response20012_data_list.py +++ b/gate_api/models/otc_stable_coin_order_list_item.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20012DataList(object): +class OtcStableCoinOrderListItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -62,7 +62,7 @@ class InlineResponse20012DataList(object): def __init__(self, id=None, trade_no=None, pay_coin=None, pay_amount=None, get_coin=None, get_amount=None, rate=None, rate_reci=None, status=None, create_timest=None, create_time=None, local_vars_configuration=None): # noqa: E501 # type: (int, str, str, str, str, str, str, str, str, int, str, Configuration) -> None - """InlineResponse20012DataList - a model defined in OpenAPI""" # noqa: E501 + """OtcStableCoinOrderListItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -105,22 +105,22 @@ def __init__(self, id=None, trade_no=None, pay_coin=None, pay_amount=None, get_c @property def id(self): - """Gets the id of this InlineResponse20012DataList. # noqa: E501 + """Gets the id of this OtcStableCoinOrderListItem. # noqa: E501 Order ID # noqa: E501 - :return: The id of this InlineResponse20012DataList. # noqa: E501 + :return: The id of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: int """ return self._id @id.setter def id(self, id): - """Sets the id of this InlineResponse20012DataList. + """Sets the id of this OtcStableCoinOrderListItem. Order ID # noqa: E501 - :param id: The id of this InlineResponse20012DataList. # noqa: E501 + :param id: The id of this OtcStableCoinOrderListItem. # noqa: E501 :type: int """ @@ -128,22 +128,22 @@ def id(self, id): @property def trade_no(self): - """Gets the trade_no of this InlineResponse20012DataList. # noqa: E501 + """Gets the trade_no of this OtcStableCoinOrderListItem. # noqa: E501 Transaction reference number # noqa: E501 - :return: The trade_no of this InlineResponse20012DataList. # noqa: E501 + :return: The trade_no of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._trade_no @trade_no.setter def trade_no(self, trade_no): - """Sets the trade_no of this InlineResponse20012DataList. + """Sets the trade_no of this OtcStableCoinOrderListItem. Transaction reference number # noqa: E501 - :param trade_no: The trade_no of this InlineResponse20012DataList. # noqa: E501 + :param trade_no: The trade_no of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -151,22 +151,22 @@ def trade_no(self, trade_no): @property def pay_coin(self): - """Gets the pay_coin of this InlineResponse20012DataList. # noqa: E501 + """Gets the pay_coin of this OtcStableCoinOrderListItem. # noqa: E501 Payment currency # noqa: E501 - :return: The pay_coin of this InlineResponse20012DataList. # noqa: E501 + :return: The pay_coin of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._pay_coin @pay_coin.setter def pay_coin(self, pay_coin): - """Sets the pay_coin of this InlineResponse20012DataList. + """Sets the pay_coin of this OtcStableCoinOrderListItem. Payment currency # noqa: E501 - :param pay_coin: The pay_coin of this InlineResponse20012DataList. # noqa: E501 + :param pay_coin: The pay_coin of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -174,22 +174,22 @@ def pay_coin(self, pay_coin): @property def pay_amount(self): - """Gets the pay_amount of this InlineResponse20012DataList. # noqa: E501 + """Gets the pay_amount of this OtcStableCoinOrderListItem. # noqa: E501 Payment amount # noqa: E501 - :return: The pay_amount of this InlineResponse20012DataList. # noqa: E501 + :return: The pay_amount of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._pay_amount @pay_amount.setter def pay_amount(self, pay_amount): - """Sets the pay_amount of this InlineResponse20012DataList. + """Sets the pay_amount of this OtcStableCoinOrderListItem. Payment amount # noqa: E501 - :param pay_amount: The pay_amount of this InlineResponse20012DataList. # noqa: E501 + :param pay_amount: The pay_amount of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -197,22 +197,22 @@ def pay_amount(self, pay_amount): @property def get_coin(self): - """Gets the get_coin of this InlineResponse20012DataList. # noqa: E501 + """Gets the get_coin of this OtcStableCoinOrderListItem. # noqa: E501 Received currency # noqa: E501 - :return: The get_coin of this InlineResponse20012DataList. # noqa: E501 + :return: The get_coin of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._get_coin @get_coin.setter def get_coin(self, get_coin): - """Sets the get_coin of this InlineResponse20012DataList. + """Sets the get_coin of this OtcStableCoinOrderListItem. Received currency # noqa: E501 - :param get_coin: The get_coin of this InlineResponse20012DataList. # noqa: E501 + :param get_coin: The get_coin of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -220,22 +220,22 @@ def get_coin(self, get_coin): @property def get_amount(self): - """Gets the get_amount of this InlineResponse20012DataList. # noqa: E501 + """Gets the get_amount of this OtcStableCoinOrderListItem. # noqa: E501 Received amount # noqa: E501 - :return: The get_amount of this InlineResponse20012DataList. # noqa: E501 + :return: The get_amount of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._get_amount @get_amount.setter def get_amount(self, get_amount): - """Sets the get_amount of this InlineResponse20012DataList. + """Sets the get_amount of this OtcStableCoinOrderListItem. Received amount # noqa: E501 - :param get_amount: The get_amount of this InlineResponse20012DataList. # noqa: E501 + :param get_amount: The get_amount of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -243,22 +243,22 @@ def get_amount(self, get_amount): @property def rate(self): - """Gets the rate of this InlineResponse20012DataList. # noqa: E501 + """Gets the rate of this OtcStableCoinOrderListItem. # noqa: E501 Exchange rate # noqa: E501 - :return: The rate of this InlineResponse20012DataList. # noqa: E501 + :return: The rate of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._rate @rate.setter def rate(self, rate): - """Sets the rate of this InlineResponse20012DataList. + """Sets the rate of this OtcStableCoinOrderListItem. Exchange rate # noqa: E501 - :param rate: The rate of this InlineResponse20012DataList. # noqa: E501 + :param rate: The rate of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -266,22 +266,22 @@ def rate(self, rate): @property def rate_reci(self): - """Gets the rate_reci of this InlineResponse20012DataList. # noqa: E501 + """Gets the rate_reci of this OtcStableCoinOrderListItem. # noqa: E501 Reciprocal of the exchange rate # noqa: E501 - :return: The rate_reci of this InlineResponse20012DataList. # noqa: E501 + :return: The rate_reci of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._rate_reci @rate_reci.setter def rate_reci(self, rate_reci): - """Sets the rate_reci of this InlineResponse20012DataList. + """Sets the rate_reci of this OtcStableCoinOrderListItem. Reciprocal of the exchange rate # noqa: E501 - :param rate_reci: The rate_reci of this InlineResponse20012DataList. # noqa: E501 + :param rate_reci: The rate_reci of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -289,22 +289,22 @@ def rate_reci(self, rate_reci): @property def status(self): - """Gets the status of this InlineResponse20012DataList. # noqa: E501 + """Gets the status of this OtcStableCoinOrderListItem. # noqa: E501 PROCESSING: in progress / DONE: completed / FAILED: failed # noqa: E501 - :return: The status of this InlineResponse20012DataList. # noqa: E501 + :return: The status of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20012DataList. + """Sets the status of this OtcStableCoinOrderListItem. PROCESSING: in progress / DONE: completed / FAILED: failed # noqa: E501 - :param status: The status of this InlineResponse20012DataList. # noqa: E501 + :param status: The status of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -312,22 +312,22 @@ def status(self, status): @property def create_timest(self): - """Gets the create_timest of this InlineResponse20012DataList. # noqa: E501 + """Gets the create_timest of this OtcStableCoinOrderListItem. # noqa: E501 timetimestamp # noqa: E501 - :return: The create_timest of this InlineResponse20012DataList. # noqa: E501 + :return: The create_timest of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: int """ return self._create_timest @create_timest.setter def create_timest(self, create_timest): - """Sets the create_timest of this InlineResponse20012DataList. + """Sets the create_timest of this OtcStableCoinOrderListItem. timetimestamp # noqa: E501 - :param create_timest: The create_timest of this InlineResponse20012DataList. # noqa: E501 + :param create_timest: The create_timest of this OtcStableCoinOrderListItem. # noqa: E501 :type: int """ @@ -335,22 +335,22 @@ def create_timest(self, create_timest): @property def create_time(self): - """Gets the create_time of this InlineResponse20012DataList. # noqa: E501 + """Gets the create_time of this OtcStableCoinOrderListItem. # noqa: E501 Created time # noqa: E501 - :return: The create_time of this InlineResponse20012DataList. # noqa: E501 + :return: The create_time of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: str """ return self._create_time @create_time.setter def create_time(self, create_time): - """Sets the create_time of this InlineResponse20012DataList. + """Sets the create_time of this OtcStableCoinOrderListItem. Created time # noqa: E501 - :param create_time: The create_time of this InlineResponse20012DataList. # noqa: E501 + :param create_time: The create_time of this OtcStableCoinOrderListItem. # noqa: E501 :type: str """ @@ -390,14 +390,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20012DataList): + if not isinstance(other, OtcStableCoinOrderListItem): 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, InlineResponse20012DataList): + if not isinstance(other, OtcStableCoinOrderListItem): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20011.py b/gate_api/models/otc_stable_coin_order_list_response.py similarity index 74% rename from gate_api/models/inline_response20011.py rename to gate_api/models/otc_stable_coin_order_list_response.py index c7d02297..afeceee9 100644 --- a/gate_api/models/inline_response20011.py +++ b/gate_api/models/otc_stable_coin_order_list_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20011(object): +class OtcStableCoinOrderListResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class InlineResponse20011(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'InlineResponse20011Data' + 'data': 'OtcStableCoinOrderListResult' } attribute_map = { @@ -45,8 +45,8 @@ class InlineResponse20011(object): } def __init__(self, code=None, message=None, data=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, InlineResponse20011Data, Configuration) -> None - """InlineResponse20011 - a model defined in OpenAPI""" # noqa: E501 + # type: (int, str, OtcStableCoinOrderListResult, Configuration) -> None + """OtcStableCoinOrderListResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -62,20 +62,20 @@ def __init__(self, code=None, message=None, data=None, local_vars_configuration= @property def code(self): - """Gets the code of this InlineResponse20011. # noqa: E501 + """Gets the code of this OtcStableCoinOrderListResponse. # noqa: E501 - :return: The code of this InlineResponse20011. # noqa: E501 + :return: The code of this OtcStableCoinOrderListResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20011. + """Sets the code of this OtcStableCoinOrderListResponse. - :param code: The code of this InlineResponse20011. # noqa: E501 + :param code: The code of this OtcStableCoinOrderListResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 @@ -85,20 +85,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20011. # noqa: E501 + """Gets the message of this OtcStableCoinOrderListResponse. # noqa: E501 - :return: The message of this InlineResponse20011. # noqa: E501 + :return: The message of this OtcStableCoinOrderListResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20011. + """Sets the message of this OtcStableCoinOrderListResponse. - :param message: The message of this InlineResponse20011. # noqa: E501 + :param message: The message of this OtcStableCoinOrderListResponse. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 @@ -108,21 +108,21 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20011. # noqa: E501 + """Gets the data of this OtcStableCoinOrderListResponse. # noqa: E501 - :return: The data of this InlineResponse20011. # noqa: E501 - :rtype: InlineResponse20011Data + :return: The data of this OtcStableCoinOrderListResponse. # noqa: E501 + :rtype: OtcStableCoinOrderListResult """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20011. + """Sets the data of this OtcStableCoinOrderListResponse. - :param data: The data of this InlineResponse20011. # noqa: E501 - :type: InlineResponse20011Data + :param data: The data of this OtcStableCoinOrderListResponse. # noqa: E501 + :type: OtcStableCoinOrderListResult """ if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 @@ -163,14 +163,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20011): + if not isinstance(other, OtcStableCoinOrderListResponse): 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, InlineResponse20011): + if not isinstance(other, OtcStableCoinOrderListResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20012_data.py b/gate_api/models/otc_stable_coin_order_list_result.py similarity index 72% rename from gate_api/models/inline_response20012_data.py rename to gate_api/models/otc_stable_coin_order_list_result.py index 244b00ca..7f57ef4c 100644 --- a/gate_api/models/inline_response20012_data.py +++ b/gate_api/models/otc_stable_coin_order_list_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20012Data(object): +class OtcStableCoinOrderListResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,7 @@ class InlineResponse20012Data(object): 'page_size': 'int', 'page_number': 'int', 'total_page': 'int', - 'list': 'list[InlineResponse20012DataList]' + 'list': 'list[OtcStableCoinOrderListItem]' } attribute_map = { @@ -49,8 +49,8 @@ class InlineResponse20012Data(object): } def __init__(self, total=None, page_size=None, page_number=None, total_page=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, int, list[InlineResponse20012DataList], Configuration) -> None - """InlineResponse20012Data - a model defined in OpenAPI""" # noqa: E501 + # type: (int, int, int, int, list[OtcStableCoinOrderListItem], Configuration) -> None + """OtcStableCoinOrderListResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -70,20 +70,20 @@ def __init__(self, total=None, page_size=None, page_number=None, total_page=None @property def total(self): - """Gets the total of this InlineResponse20012Data. # noqa: E501 + """Gets the total of this OtcStableCoinOrderListResult. # noqa: E501 - :return: The total of this InlineResponse20012Data. # noqa: E501 + :return: The total of this OtcStableCoinOrderListResult. # noqa: E501 :rtype: int """ return self._total @total.setter def total(self, total): - """Sets the total of this InlineResponse20012Data. + """Sets the total of this OtcStableCoinOrderListResult. - :param total: The total of this InlineResponse20012Data. # noqa: E501 + :param total: The total of this OtcStableCoinOrderListResult. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 @@ -93,20 +93,20 @@ def total(self, total): @property def page_size(self): - """Gets the page_size of this InlineResponse20012Data. # noqa: E501 + """Gets the page_size of this OtcStableCoinOrderListResult. # noqa: E501 - :return: The page_size of this InlineResponse20012Data. # noqa: E501 + :return: The page_size of this OtcStableCoinOrderListResult. # noqa: E501 :rtype: int """ return self._page_size @page_size.setter def page_size(self, page_size): - """Sets the page_size of this InlineResponse20012Data. + """Sets the page_size of this OtcStableCoinOrderListResult. - :param page_size: The page_size of this InlineResponse20012Data. # noqa: E501 + :param page_size: The page_size of this OtcStableCoinOrderListResult. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and page_size is None: # noqa: E501 @@ -116,20 +116,20 @@ def page_size(self, page_size): @property def page_number(self): - """Gets the page_number of this InlineResponse20012Data. # noqa: E501 + """Gets the page_number of this OtcStableCoinOrderListResult. # noqa: E501 - :return: The page_number of this InlineResponse20012Data. # noqa: E501 + :return: The page_number of this OtcStableCoinOrderListResult. # noqa: E501 :rtype: int """ return self._page_number @page_number.setter def page_number(self, page_number): - """Sets the page_number of this InlineResponse20012Data. + """Sets the page_number of this OtcStableCoinOrderListResult. - :param page_number: The page_number of this InlineResponse20012Data. # noqa: E501 + :param page_number: The page_number of this OtcStableCoinOrderListResult. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and page_number is None: # noqa: E501 @@ -139,20 +139,20 @@ def page_number(self, page_number): @property def total_page(self): - """Gets the total_page of this InlineResponse20012Data. # noqa: E501 + """Gets the total_page of this OtcStableCoinOrderListResult. # noqa: E501 - :return: The total_page of this InlineResponse20012Data. # noqa: E501 + :return: The total_page of this OtcStableCoinOrderListResult. # noqa: E501 :rtype: int """ return self._total_page @total_page.setter def total_page(self, total_page): - """Sets the total_page of this InlineResponse20012Data. + """Sets the total_page of this OtcStableCoinOrderListResult. - :param total_page: The total_page of this InlineResponse20012Data. # noqa: E501 + :param total_page: The total_page of this OtcStableCoinOrderListResult. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and total_page is None: # noqa: E501 @@ -162,21 +162,21 @@ def total_page(self, total_page): @property def list(self): - """Gets the list of this InlineResponse20012Data. # noqa: E501 + """Gets the list of this OtcStableCoinOrderListResult. # noqa: E501 - :return: The list of this InlineResponse20012Data. # noqa: E501 - :rtype: list[InlineResponse20012DataList] + :return: The list of this OtcStableCoinOrderListResult. # noqa: E501 + :rtype: list[OtcStableCoinOrderListItem] """ return self._list @list.setter def list(self, list): - """Sets the list of this InlineResponse20012Data. + """Sets the list of this OtcStableCoinOrderListResult. - :param list: The list of this InlineResponse20012Data. # noqa: E501 - :type: list[InlineResponse20012DataList] + :param list: The list of this OtcStableCoinOrderListResult. # noqa: E501 + :type: list[OtcStableCoinOrderListItem] """ if self.local_vars_configuration.client_side_validation and list is None: # noqa: E501 raise ValueError("Invalid value for `list`, must not be `None`") # noqa: E501 @@ -217,14 +217,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20012Data): + if not isinstance(other, OtcStableCoinOrderListResult): 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, InlineResponse20012Data): + if not isinstance(other, OtcStableCoinOrderListResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/other_contact.py b/gate_api/models/other_contact.py new file mode 100644 index 00000000..77940f51 --- /dev/null +++ b/gate_api/models/other_contact.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 OtherContact(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': 'int', + 'value': 'str' + } + + attribute_map = { + 'type': 'type', + 'value': 'value' + } + + def __init__(self, type=None, value=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """OtherContact - 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._value = None + self.discriminator = None + + if type is not None: + self.type = type + if value is not None: + self.value = value + + @property + def type(self): + """Gets the type of this OtherContact. # noqa: E501 + + Contact type # noqa: E501 + + :return: The type of this OtherContact. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this OtherContact. + + Contact type # noqa: E501 + + :param type: The type of this OtherContact. # noqa: E501 + :type: int + """ + + self._type = type + + @property + def value(self): + """Gets the value of this OtherContact. # noqa: E501 + + Contact value # noqa: E501 + + :return: The value of this OtherContact. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this OtherContact. + + Contact value # noqa: E501 + + :param value: The value of this OtherContact. # 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, OtherContact): + 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, OtherContact): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20021_data.py b/gate_api/models/p2p_ad_detail.py similarity index 54% rename from gate_api/models/inline_response20021_data.py rename to gate_api/models/p2p_ad_detail.py index edfee3de..ce8f7011 100644 --- a/gate_api/models/inline_response20021_data.py +++ b/gate_api/models/p2p_ad_detail.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20021Data(object): +class P2pAdDetail(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,7 +53,6 @@ class InlineResponse20021Data(object): 'hide_rate': 'str', 'trade_tips': 'str', 'auto_reply': 'str', - 'new_hand': 'str', 'rate_ref_id': 'int', 'rate_offset': 'float', 'status': 'str', @@ -63,17 +62,14 @@ class InlineResponse20021Data(object): 'tier_limit': 'int', 'reg_time_limit': 'int', 'advertisers_limit': 'int', - 'verified_limit': 'int', 'min_completed_limit': 'int', 'max_completed_limit': 'int', 'user_orders_limit': 'int', 'completed_rate_limit': 'float', - 'user_country_limit': 'int', 'limit_country_cn': 'str', 'limit_country_en': 'str', 'is_hedge': 'int', - 'hide_payment': 'int', - 'fee': 'int' + 'hide_payment': 'int' } attribute_map = { @@ -92,12 +88,11 @@ class InlineResponse20021Data(object): 'locked_amount': 'locked_amount', 'orderid': 'orderid', 'timestamp': 'timestamp', - 'currency_type': 'currencyType', + 'currency_type': 'currency_type', 'want_type': 'want_type', 'hide_rate': 'hide_rate', 'trade_tips': 'trade_tips', 'auto_reply': 'auto_reply', - 'new_hand': 'new_hand', 'rate_ref_id': 'rate_ref_id', 'rate_offset': 'rate_offset', 'status': 'status', @@ -107,22 +102,19 @@ class InlineResponse20021Data(object): 'tier_limit': 'tier_limit', 'reg_time_limit': 'reg_time_limit', 'advertisers_limit': 'advertisers_limit', - 'verified_limit': 'verified_limit', 'min_completed_limit': 'min_completed_limit', 'max_completed_limit': 'max_completed_limit', 'user_orders_limit': 'user_orders_limit', 'completed_rate_limit': 'completed_rate_limit', - 'user_country_limit': 'user_country_limit', 'limit_country_cn': 'limit_country_cn', 'limit_country_en': 'limit_country_en', 'is_hedge': 'is_hedge', - 'hide_payment': 'hide_payment', - 'fee': 'fee' + 'hide_payment': 'hide_payment' } - def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amount=None, total=None, pay_ali=None, pay_bank=None, pay_paypal=None, pay_wechat=None, pay_type_num=None, pay_type_json=None, locked_amount=None, orderid=None, timestamp=None, currency_type=None, want_type=None, hide_rate=None, trade_tips=None, auto_reply=None, new_hand=None, rate_ref_id=None, rate_offset=None, status=None, rate_fixed=None, float_trend=None, expire_min=None, tier_limit=None, reg_time_limit=None, advertisers_limit=None, verified_limit=None, min_completed_limit=None, max_completed_limit=None, user_orders_limit=None, completed_rate_limit=None, user_country_limit=None, limit_country_cn=None, limit_country_en=None, is_hedge=None, hide_payment=None, fee=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, int, int, int, int, str, str, str, int, int, str, str, str, str, str, str, int, float, str, int, int, int, int, int, int, int, int, int, int, float, int, str, str, int, int, int, Configuration) -> None - """InlineResponse20021Data - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amount=None, total=None, pay_ali=None, pay_bank=None, pay_paypal=None, pay_wechat=None, pay_type_num=None, pay_type_json=None, locked_amount=None, orderid=None, timestamp=None, currency_type=None, want_type=None, hide_rate=None, trade_tips=None, auto_reply=None, rate_ref_id=None, rate_offset=None, status=None, rate_fixed=None, float_trend=None, expire_min=None, tier_limit=None, reg_time_limit=None, advertisers_limit=None, min_completed_limit=None, max_completed_limit=None, user_orders_limit=None, completed_rate_limit=None, limit_country_cn=None, limit_country_en=None, is_hedge=None, hide_payment=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, int, int, int, int, str, str, str, int, int, str, str, str, str, str, int, float, str, int, int, int, int, int, int, int, int, int, float, str, str, int, int, Configuration) -> None + """P2pAdDetail - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -147,7 +139,6 @@ def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amoun self._hide_rate = None self._trade_tips = None self._auto_reply = None - self._new_hand = None self._rate_ref_id = None self._rate_offset = None self._status = None @@ -157,17 +148,14 @@ def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amoun self._tier_limit = None self._reg_time_limit = None self._advertisers_limit = None - self._verified_limit = None self._min_completed_limit = None self._max_completed_limit = None self._user_orders_limit = None self._completed_rate_limit = None - self._user_country_limit = None self._limit_country_cn = None self._limit_country_en = None self._is_hedge = None self._hide_payment = None - self._fee = None self.discriminator = None if rate is not None: @@ -210,8 +198,6 @@ def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amoun self.trade_tips = trade_tips if auto_reply is not None: self.auto_reply = auto_reply - if new_hand is not None: - self.new_hand = new_hand if rate_ref_id is not None: self.rate_ref_id = rate_ref_id if rate_offset is not None: @@ -230,8 +216,6 @@ def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amoun self.reg_time_limit = reg_time_limit if advertisers_limit is not None: self.advertisers_limit = advertisers_limit - if verified_limit is not None: - self.verified_limit = verified_limit if min_completed_limit is not None: self.min_completed_limit = min_completed_limit if max_completed_limit is not None: @@ -240,8 +224,6 @@ def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amoun self.user_orders_limit = user_orders_limit if completed_rate_limit is not None: self.completed_rate_limit = completed_rate_limit - if user_country_limit is not None: - self.user_country_limit = user_country_limit if limit_country_cn is not None: self.limit_country_cn = limit_country_cn if limit_country_en is not None: @@ -250,27 +232,25 @@ def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amoun self.is_hedge = is_hedge if hide_payment is not None: self.hide_payment = hide_payment - if fee is not None: - self.fee = fee @property def rate(self): - """Gets the rate of this InlineResponse20021Data. # noqa: E501 + """Gets the rate of this P2pAdDetail. # noqa: E501 - Price # noqa: E501 + Advertisement price. # noqa: E501 - :return: The rate of this InlineResponse20021Data. # noqa: E501 + :return: The rate of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._rate @rate.setter def rate(self, rate): - """Sets the rate of this InlineResponse20021Data. + """Sets the rate of this P2pAdDetail. - Price # noqa: E501 + Advertisement price. # noqa: E501 - :param rate: The rate of this InlineResponse20021Data. # noqa: E501 + :param rate: The rate of this P2pAdDetail. # noqa: E501 :type: str """ @@ -278,22 +258,22 @@ def rate(self, rate): @property def type(self): - """Gets the type of this InlineResponse20021Data. # noqa: E501 + """Gets the type of this P2pAdDetail. # noqa: E501 - Buy/Sell order # noqa: E501 + Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. # noqa: E501 - :return: The type of this InlineResponse20021Data. # noqa: E501 + :return: The type of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this InlineResponse20021Data. + """Sets the type of this P2pAdDetail. - Buy/Sell order # noqa: E501 + Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. # noqa: E501 - :param type: The type of this InlineResponse20021Data. # noqa: E501 + :param type: The type of this P2pAdDetail. # noqa: E501 :type: str """ @@ -301,22 +281,22 @@ def type(self, type): @property def amount(self): - """Gets the amount of this InlineResponse20021Data. # noqa: E501 + """Gets the amount of this P2pAdDetail. # noqa: E501 - Cryptocurrency amount # noqa: E501 + Remaining crypto amount on the ad. # noqa: E501 - :return: The amount of this InlineResponse20021Data. # noqa: E501 + :return: The amount of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._amount @amount.setter def amount(self, amount): - """Sets the amount of this InlineResponse20021Data. + """Sets the amount of this P2pAdDetail. - Cryptocurrency amount # noqa: E501 + Remaining crypto amount on the ad. # noqa: E501 - :param amount: The amount of this InlineResponse20021Data. # noqa: E501 + :param amount: The amount of this P2pAdDetail. # noqa: E501 :type: str """ @@ -324,22 +304,22 @@ def amount(self, amount): @property def min_amount(self): - """Gets the min_amount of this InlineResponse20021Data. # noqa: E501 + """Gets the min_amount of this P2pAdDetail. # noqa: E501 - Minimum limit # noqa: E501 + Minimum trade amount in `want_type`. # noqa: E501 - :return: The min_amount of this InlineResponse20021Data. # noqa: E501 + :return: The min_amount of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._min_amount @min_amount.setter def min_amount(self, min_amount): - """Sets the min_amount of this InlineResponse20021Data. + """Sets the min_amount of this P2pAdDetail. - Minimum limit # noqa: E501 + Minimum trade amount in `want_type`. # noqa: E501 - :param min_amount: The min_amount of this InlineResponse20021Data. # noqa: E501 + :param min_amount: The min_amount of this P2pAdDetail. # noqa: E501 :type: str """ @@ -347,22 +327,22 @@ def min_amount(self, min_amount): @property def max_amount(self): - """Gets the max_amount of this InlineResponse20021Data. # noqa: E501 + """Gets the max_amount of this P2pAdDetail. # noqa: E501 - Maximum limit # noqa: E501 + Maximum trade amount priced in `want_type`. # noqa: E501 - :return: The max_amount of this InlineResponse20021Data. # noqa: E501 + :return: The max_amount of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._max_amount @max_amount.setter def max_amount(self, max_amount): - """Sets the max_amount of this InlineResponse20021Data. + """Sets the max_amount of this P2pAdDetail. - Maximum limit # noqa: E501 + Maximum trade amount priced in `want_type`. # noqa: E501 - :param max_amount: The max_amount of this InlineResponse20021Data. # noqa: E501 + :param max_amount: The max_amount of this P2pAdDetail. # noqa: E501 :type: str """ @@ -370,22 +350,22 @@ def max_amount(self, max_amount): @property def total(self): - """Gets the total of this InlineResponse20021Data. # noqa: E501 + """Gets the total of this P2pAdDetail. # noqa: E501 Fiat amount # noqa: E501 - :return: The total of this InlineResponse20021Data. # noqa: E501 + :return: The total of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._total @total.setter def total(self, total): - """Sets the total of this InlineResponse20021Data. + """Sets the total of this P2pAdDetail. Fiat amount # noqa: E501 - :param total: The total of this InlineResponse20021Data. # noqa: E501 + :param total: The total of this P2pAdDetail. # noqa: E501 :type: str """ @@ -393,22 +373,22 @@ def total(self, total): @property def pay_ali(self): - """Gets the pay_ali of this InlineResponse20021Data. # noqa: E501 + """Gets the pay_ali of this P2pAdDetail. # noqa: E501 - Whether Alipay payment is supported # noqa: E501 + Whether Alipay is supported. `1`: yes; `0`: no. # noqa: E501 - :return: The pay_ali of this InlineResponse20021Data. # noqa: E501 + :return: The pay_ali of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._pay_ali @pay_ali.setter def pay_ali(self, pay_ali): - """Sets the pay_ali of this InlineResponse20021Data. + """Sets the pay_ali of this P2pAdDetail. - Whether Alipay payment is supported # noqa: E501 + Whether Alipay is supported. `1`: yes; `0`: no. # noqa: E501 - :param pay_ali: The pay_ali of this InlineResponse20021Data. # noqa: E501 + :param pay_ali: The pay_ali of this P2pAdDetail. # noqa: E501 :type: int """ @@ -416,22 +396,22 @@ def pay_ali(self, pay_ali): @property def pay_bank(self): - """Gets the pay_bank of this InlineResponse20021Data. # noqa: E501 + """Gets the pay_bank of this P2pAdDetail. # noqa: E501 - Whether bank payment is supported # noqa: E501 + Whether bank transfer is supported. `1`: yes; `0`: no. # noqa: E501 - :return: The pay_bank of this InlineResponse20021Data. # noqa: E501 + :return: The pay_bank of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._pay_bank @pay_bank.setter def pay_bank(self, pay_bank): - """Sets the pay_bank of this InlineResponse20021Data. + """Sets the pay_bank of this P2pAdDetail. - Whether bank payment is supported # noqa: E501 + Whether bank transfer is supported. `1`: yes; `0`: no. # noqa: E501 - :param pay_bank: The pay_bank of this InlineResponse20021Data. # noqa: E501 + :param pay_bank: The pay_bank of this P2pAdDetail. # noqa: E501 :type: int """ @@ -439,22 +419,22 @@ def pay_bank(self, pay_bank): @property def pay_paypal(self): - """Gets the pay_paypal of this InlineResponse20021Data. # noqa: E501 + """Gets the pay_paypal of this P2pAdDetail. # noqa: E501 - Whether PayPal payment is supported # noqa: E501 + Whether PayPal is supported. `1`: yes; `0`: no. # noqa: E501 - :return: The pay_paypal of this InlineResponse20021Data. # noqa: E501 + :return: The pay_paypal of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._pay_paypal @pay_paypal.setter def pay_paypal(self, pay_paypal): - """Sets the pay_paypal of this InlineResponse20021Data. + """Sets the pay_paypal of this P2pAdDetail. - Whether PayPal payment is supported # noqa: E501 + Whether PayPal is supported. `1`: yes; `0`: no. # noqa: E501 - :param pay_paypal: The pay_paypal of this InlineResponse20021Data. # noqa: E501 + :param pay_paypal: The pay_paypal of this P2pAdDetail. # noqa: E501 :type: int """ @@ -462,22 +442,22 @@ def pay_paypal(self, pay_paypal): @property def pay_wechat(self): - """Gets the pay_wechat of this InlineResponse20021Data. # noqa: E501 + """Gets the pay_wechat of this P2pAdDetail. # noqa: E501 - Whether WeChat payment is supported # noqa: E501 + Whether WeChat Pay is supported. `1`: yes; `0`: no. # noqa: E501 - :return: The pay_wechat of this InlineResponse20021Data. # noqa: E501 + :return: The pay_wechat of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._pay_wechat @pay_wechat.setter def pay_wechat(self, pay_wechat): - """Sets the pay_wechat of this InlineResponse20021Data. + """Sets the pay_wechat of this P2pAdDetail. - Whether WeChat payment is supported # noqa: E501 + Whether WeChat Pay is supported. `1`: yes; `0`: no. # noqa: E501 - :param pay_wechat: The pay_wechat of this InlineResponse20021Data. # noqa: E501 + :param pay_wechat: The pay_wechat of this P2pAdDetail. # noqa: E501 :type: int """ @@ -485,22 +465,22 @@ def pay_wechat(self, pay_wechat): @property def pay_type_num(self): - """Gets the pay_type_num of this InlineResponse20021Data. # noqa: E501 + """Gets the pay_type_num of this P2pAdDetail. # noqa: E501 Payment method ID list # noqa: E501 - :return: The pay_type_num of this InlineResponse20021Data. # noqa: E501 + :return: The pay_type_num of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._pay_type_num @pay_type_num.setter def pay_type_num(self, pay_type_num): - """Sets the pay_type_num of this InlineResponse20021Data. + """Sets the pay_type_num of this P2pAdDetail. Payment method ID list # noqa: E501 - :param pay_type_num: The pay_type_num of this InlineResponse20021Data. # noqa: E501 + :param pay_type_num: The pay_type_num of this P2pAdDetail. # noqa: E501 :type: str """ @@ -508,22 +488,22 @@ def pay_type_num(self, pay_type_num): @property def pay_type_json(self): - """Gets the pay_type_json of this InlineResponse20021Data. # noqa: E501 + """Gets the pay_type_json of this P2pAdDetail. # noqa: E501 - Payment method list # noqa: E501 + JSON map of payment type -> payment method ID. # noqa: E501 - :return: The pay_type_json of this InlineResponse20021Data. # noqa: E501 + :return: The pay_type_json of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._pay_type_json @pay_type_json.setter def pay_type_json(self, pay_type_json): - """Sets the pay_type_json of this InlineResponse20021Data. + """Sets the pay_type_json of this P2pAdDetail. - Payment method list # noqa: E501 + JSON map of payment type -> payment method ID. # noqa: E501 - :param pay_type_json: The pay_type_json of this InlineResponse20021Data. # noqa: E501 + :param pay_type_json: The pay_type_json of this P2pAdDetail. # noqa: E501 :type: str """ @@ -531,22 +511,22 @@ def pay_type_json(self, pay_type_json): @property def locked_amount(self): - """Gets the locked_amount of this InlineResponse20021Data. # noqa: E501 + """Gets the locked_amount of this P2pAdDetail. # noqa: E501 Locked amount # noqa: E501 - :return: The locked_amount of this InlineResponse20021Data. # noqa: E501 + :return: The locked_amount of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._locked_amount @locked_amount.setter def locked_amount(self, locked_amount): - """Sets the locked_amount of this InlineResponse20021Data. + """Sets the locked_amount of this P2pAdDetail. Locked amount # noqa: E501 - :param locked_amount: The locked_amount of this InlineResponse20021Data. # noqa: E501 + :param locked_amount: The locked_amount of this P2pAdDetail. # noqa: E501 :type: str """ @@ -554,22 +534,22 @@ def locked_amount(self, locked_amount): @property def orderid(self): - """Gets the orderid of this InlineResponse20021Data. # noqa: E501 + """Gets the orderid of this P2pAdDetail. # noqa: E501 Order ID # noqa: E501 - :return: The orderid of this InlineResponse20021Data. # noqa: E501 + :return: The orderid of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._orderid @orderid.setter def orderid(self, orderid): - """Sets the orderid of this InlineResponse20021Data. + """Sets the orderid of this P2pAdDetail. Order ID # noqa: E501 - :param orderid: The orderid of this InlineResponse20021Data. # noqa: E501 + :param orderid: The orderid of this P2pAdDetail. # noqa: E501 :type: int """ @@ -577,22 +557,22 @@ def orderid(self, orderid): @property def timestamp(self): - """Gets the timestamp of this InlineResponse20021Data. # noqa: E501 + """Gets the timestamp of this P2pAdDetail. # noqa: E501 Created time # noqa: E501 - :return: The timestamp of this InlineResponse20021Data. # noqa: E501 + :return: The timestamp of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20021Data. + """Sets the timestamp of this P2pAdDetail. Created time # noqa: E501 - :param timestamp: The timestamp of this InlineResponse20021Data. # noqa: E501 + :param timestamp: The timestamp of this P2pAdDetail. # noqa: E501 :type: int """ @@ -600,22 +580,22 @@ def timestamp(self, timestamp): @property def currency_type(self): - """Gets the currency_type of this InlineResponse20021Data. # noqa: E501 + """Gets the currency_type of this P2pAdDetail. # noqa: E501 - Cryptocurrency type # noqa: E501 + Cryptocurrency symbol. # noqa: E501 - :return: The currency_type of this InlineResponse20021Data. # noqa: E501 + :return: The currency_type of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._currency_type @currency_type.setter def currency_type(self, currency_type): - """Sets the currency_type of this InlineResponse20021Data. + """Sets the currency_type of this P2pAdDetail. - Cryptocurrency type # noqa: E501 + Cryptocurrency symbol. # noqa: E501 - :param currency_type: The currency_type of this InlineResponse20021Data. # noqa: E501 + :param currency_type: The currency_type of this P2pAdDetail. # noqa: E501 :type: str """ @@ -623,22 +603,22 @@ def currency_type(self, currency_type): @property def want_type(self): - """Gets the want_type of this InlineResponse20021Data. # noqa: E501 + """Gets the want_type of this P2pAdDetail. # noqa: E501 Fiat type # noqa: E501 - :return: The want_type of this InlineResponse20021Data. # noqa: E501 + :return: The want_type of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._want_type @want_type.setter def want_type(self, want_type): - """Sets the want_type of this InlineResponse20021Data. + """Sets the want_type of this P2pAdDetail. Fiat type # noqa: E501 - :param want_type: The want_type of this InlineResponse20021Data. # noqa: E501 + :param want_type: The want_type of this P2pAdDetail. # noqa: E501 :type: str """ @@ -646,22 +626,22 @@ def want_type(self, want_type): @property def hide_rate(self): - """Gets the hide_rate of this InlineResponse20021Data. # noqa: E501 + """Gets the hide_rate of this P2pAdDetail. # noqa: E501 Hidden price # noqa: E501 - :return: The hide_rate of this InlineResponse20021Data. # noqa: E501 + :return: The hide_rate of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._hide_rate @hide_rate.setter def hide_rate(self, hide_rate): - """Sets the hide_rate of this InlineResponse20021Data. + """Sets the hide_rate of this P2pAdDetail. Hidden price # noqa: E501 - :param hide_rate: The hide_rate of this InlineResponse20021Data. # noqa: E501 + :param hide_rate: The hide_rate of this P2pAdDetail. # noqa: E501 :type: str """ @@ -669,22 +649,22 @@ def hide_rate(self, hide_rate): @property def trade_tips(self): - """Gets the trade_tips of this InlineResponse20021Data. # noqa: E501 + """Gets the trade_tips of this P2pAdDetail. # noqa: E501 Trading terms # noqa: E501 - :return: The trade_tips of this InlineResponse20021Data. # noqa: E501 + :return: The trade_tips of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._trade_tips @trade_tips.setter def trade_tips(self, trade_tips): - """Sets the trade_tips of this InlineResponse20021Data. + """Sets the trade_tips of this P2pAdDetail. Trading terms # noqa: E501 - :param trade_tips: The trade_tips of this InlineResponse20021Data. # noqa: E501 + :param trade_tips: The trade_tips of this P2pAdDetail. # noqa: E501 :type: str """ @@ -692,68 +672,45 @@ def trade_tips(self, trade_tips): @property def auto_reply(self): - """Gets the auto_reply of this InlineResponse20021Data. # noqa: E501 + """Gets the auto_reply of this P2pAdDetail. # noqa: E501 Auto reply # noqa: E501 - :return: The auto_reply of this InlineResponse20021Data. # noqa: E501 + :return: The auto_reply of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._auto_reply @auto_reply.setter def auto_reply(self, auto_reply): - """Sets the auto_reply of this InlineResponse20021Data. + """Sets the auto_reply of this P2pAdDetail. Auto reply # noqa: E501 - :param auto_reply: The auto_reply of this InlineResponse20021Data. # noqa: E501 + :param auto_reply: The auto_reply of this P2pAdDetail. # noqa: E501 :type: str """ self._auto_reply = auto_reply - @property - def new_hand(self): - """Gets the new_hand of this InlineResponse20021Data. # noqa: E501 - - Merchant-friendly order # noqa: E501 - - :return: The new_hand of this InlineResponse20021Data. # noqa: E501 - :rtype: str - """ - return self._new_hand - - @new_hand.setter - def new_hand(self, new_hand): - """Sets the new_hand of this InlineResponse20021Data. - - Merchant-friendly order # noqa: E501 - - :param new_hand: The new_hand of this InlineResponse20021Data. # noqa: E501 - :type: str - """ - - self._new_hand = new_hand - @property def rate_ref_id(self): - """Gets the rate_ref_id of this InlineResponse20021Data. # noqa: E501 + """Gets the rate_ref_id of this P2pAdDetail. # noqa: E501 - Floating price reference ID: 1=Platform reference price, 3=Spot reference price (≤0 means fixed price, >0 means floating price) # noqa: E501 + Floating reference: `1` platform; `2` Gate; `3` spot; `<= 0` means fixed price. # noqa: E501 - :return: The rate_ref_id of this InlineResponse20021Data. # noqa: E501 + :return: The rate_ref_id of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._rate_ref_id @rate_ref_id.setter def rate_ref_id(self, rate_ref_id): - """Sets the rate_ref_id of this InlineResponse20021Data. + """Sets the rate_ref_id of this P2pAdDetail. - Floating price reference ID: 1=Platform reference price, 3=Spot reference price (≤0 means fixed price, >0 means floating price) # noqa: E501 + Floating reference: `1` platform; `2` Gate; `3` spot; `<= 0` means fixed price. # noqa: E501 - :param rate_ref_id: The rate_ref_id of this InlineResponse20021Data. # noqa: E501 + :param rate_ref_id: The rate_ref_id of this P2pAdDetail. # noqa: E501 :type: int """ @@ -761,22 +718,22 @@ def rate_ref_id(self, rate_ref_id): @property def rate_offset(self): - """Gets the rate_offset of this InlineResponse20021Data. # noqa: E501 + """Gets the rate_offset of this P2pAdDetail. # noqa: E501 Floating ratio (absolute value) # noqa: E501 - :return: The rate_offset of this InlineResponse20021Data. # noqa: E501 + :return: The rate_offset of this P2pAdDetail. # noqa: E501 :rtype: float """ return self._rate_offset @rate_offset.setter def rate_offset(self, rate_offset): - """Sets the rate_offset of this InlineResponse20021Data. + """Sets the rate_offset of this P2pAdDetail. Floating ratio (absolute value) # noqa: E501 - :param rate_offset: The rate_offset of this InlineResponse20021Data. # noqa: E501 + :param rate_offset: The rate_offset of this P2pAdDetail. # noqa: E501 :type: float """ @@ -784,22 +741,22 @@ def rate_offset(self, rate_offset): @property def status(self): - """Gets the status of this InlineResponse20021Data. # noqa: E501 + """Gets the status of this P2pAdDetail. # noqa: E501 - Status # noqa: E501 + Ad status: `OPEN` listed; `OFFLIN` delisted; `CLOSED` closed; `CANCEL` canceled. # noqa: E501 - :return: The status of this InlineResponse20021Data. # noqa: E501 + :return: The status of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20021Data. + """Sets the status of this P2pAdDetail. - Status # noqa: E501 + Ad status: `OPEN` listed; `OFFLIN` delisted; `CLOSED` closed; `CANCEL` canceled. # noqa: E501 - :param status: The status of this InlineResponse20021Data. # noqa: E501 + :param status: The status of this P2pAdDetail. # noqa: E501 :type: str """ @@ -807,22 +764,22 @@ def status(self, status): @property def rate_fixed(self): - """Gets the rate_fixed of this InlineResponse20021Data. # noqa: E501 + """Gets the rate_fixed of this P2pAdDetail. # noqa: E501 - 0=Floating, 1=Fixed # noqa: E501 + Price type: `0` floating; `1` fixed. # noqa: E501 - :return: The rate_fixed of this InlineResponse20021Data. # noqa: E501 + :return: The rate_fixed of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._rate_fixed @rate_fixed.setter def rate_fixed(self, rate_fixed): - """Sets the rate_fixed of this InlineResponse20021Data. + """Sets the rate_fixed of this P2pAdDetail. - 0=Floating, 1=Fixed # noqa: E501 + Price type: `0` floating; `1` fixed. # noqa: E501 - :param rate_fixed: The rate_fixed of this InlineResponse20021Data. # noqa: E501 + :param rate_fixed: The rate_fixed of this P2pAdDetail. # noqa: E501 :type: int """ @@ -830,22 +787,22 @@ def rate_fixed(self, rate_fixed): @property def float_trend(self): - """Gets the float_trend of this InlineResponse20021Data. # noqa: E501 + """Gets the float_trend of this P2pAdDetail. # noqa: E501 - 0=Upward float, 1=Downward float # noqa: E501 + Floating direction: `0` markup; `1` markdown. # noqa: E501 - :return: The float_trend of this InlineResponse20021Data. # noqa: E501 + :return: The float_trend of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._float_trend @float_trend.setter def float_trend(self, float_trend): - """Sets the float_trend of this InlineResponse20021Data. + """Sets the float_trend of this P2pAdDetail. - 0=Upward float, 1=Downward float # noqa: E501 + Floating direction: `0` markup; `1` markdown. # noqa: E501 - :param float_trend: The float_trend of this InlineResponse20021Data. # noqa: E501 + :param float_trend: The float_trend of this P2pAdDetail. # noqa: E501 :type: int """ @@ -853,22 +810,22 @@ def float_trend(self, float_trend): @property def expire_min(self): - """Gets the expire_min of this InlineResponse20021Data. # noqa: E501 + """Gets the expire_min of this P2pAdDetail. # noqa: E501 Timeout (minutes) # noqa: E501 - :return: The expire_min of this InlineResponse20021Data. # noqa: E501 + :return: The expire_min of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._expire_min @expire_min.setter def expire_min(self, expire_min): - """Sets the expire_min of this InlineResponse20021Data. + """Sets the expire_min of this P2pAdDetail. Timeout (minutes) # noqa: E501 - :param expire_min: The expire_min of this InlineResponse20021Data. # noqa: E501 + :param expire_min: The expire_min of this P2pAdDetail. # noqa: E501 :type: int """ @@ -876,22 +833,22 @@ def expire_min(self, expire_min): @property def tier_limit(self): - """Gets the tier_limit of this InlineResponse20021Data. # noqa: E501 + """Gets the tier_limit of this P2pAdDetail. # noqa: E501 Tier limit # noqa: E501 - :return: The tier_limit of this InlineResponse20021Data. # noqa: E501 + :return: The tier_limit of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._tier_limit @tier_limit.setter def tier_limit(self, tier_limit): - """Sets the tier_limit of this InlineResponse20021Data. + """Sets the tier_limit of this P2pAdDetail. Tier limit # noqa: E501 - :param tier_limit: The tier_limit of this InlineResponse20021Data. # noqa: E501 + :param tier_limit: The tier_limit of this P2pAdDetail. # noqa: E501 :type: int """ @@ -899,22 +856,22 @@ def tier_limit(self, tier_limit): @property def reg_time_limit(self): - """Gets the reg_time_limit of this InlineResponse20021Data. # noqa: E501 + """Gets the reg_time_limit of this P2pAdDetail. # noqa: E501 Registration time limit # noqa: E501 - :return: The reg_time_limit of this InlineResponse20021Data. # noqa: E501 + :return: The reg_time_limit of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._reg_time_limit @reg_time_limit.setter def reg_time_limit(self, reg_time_limit): - """Sets the reg_time_limit of this InlineResponse20021Data. + """Sets the reg_time_limit of this P2pAdDetail. Registration time limit # noqa: E501 - :param reg_time_limit: The reg_time_limit of this InlineResponse20021Data. # noqa: E501 + :param reg_time_limit: The reg_time_limit of this P2pAdDetail. # noqa: E501 :type: int """ @@ -922,68 +879,45 @@ def reg_time_limit(self, reg_time_limit): @property def advertisers_limit(self): - """Gets the advertisers_limit of this InlineResponse20021Data. # noqa: E501 + """Gets the advertisers_limit of this P2pAdDetail. # noqa: E501 - Do not trade with advertisers, advertiser limit: 0=No limit, 1=Limit # noqa: E501 + Whether trading with the advertiser is restricted. `0`: no; `1`: yes. # noqa: E501 - :return: The advertisers_limit of this InlineResponse20021Data. # noqa: E501 + :return: The advertisers_limit of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._advertisers_limit @advertisers_limit.setter def advertisers_limit(self, advertisers_limit): - """Sets the advertisers_limit of this InlineResponse20021Data. + """Sets the advertisers_limit of this P2pAdDetail. - Do not trade with advertisers, advertiser limit: 0=No limit, 1=Limit # noqa: E501 + Whether trading with the advertiser is restricted. `0`: no; `1`: yes. # noqa: E501 - :param advertisers_limit: The advertisers_limit of this InlineResponse20021Data. # noqa: E501 + :param advertisers_limit: The advertisers_limit of this P2pAdDetail. # noqa: E501 :type: int """ self._advertisers_limit = advertisers_limit - @property - def verified_limit(self): - """Gets the verified_limit of this InlineResponse20021Data. # noqa: E501 - - kyclimit # noqa: E501 - - :return: The verified_limit of this InlineResponse20021Data. # noqa: E501 - :rtype: int - """ - return self._verified_limit - - @verified_limit.setter - def verified_limit(self, verified_limit): - """Sets the verified_limit of this InlineResponse20021Data. - - kyclimit # noqa: E501 - - :param verified_limit: The verified_limit of this InlineResponse20021Data. # noqa: E501 - :type: int - """ - - self._verified_limit = verified_limit - @property def min_completed_limit(self): - """Gets the min_completed_limit of this InlineResponse20021Data. # noqa: E501 + """Gets the min_completed_limit of this P2pAdDetail. # noqa: E501 Minimum limit of completed orders # noqa: E501 - :return: The min_completed_limit of this InlineResponse20021Data. # noqa: E501 + :return: The min_completed_limit of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._min_completed_limit @min_completed_limit.setter def min_completed_limit(self, min_completed_limit): - """Sets the min_completed_limit of this InlineResponse20021Data. + """Sets the min_completed_limit of this P2pAdDetail. Minimum limit of completed orders # noqa: E501 - :param min_completed_limit: The min_completed_limit of this InlineResponse20021Data. # noqa: E501 + :param min_completed_limit: The min_completed_limit of this P2pAdDetail. # noqa: E501 :type: int """ @@ -991,22 +925,22 @@ def min_completed_limit(self, min_completed_limit): @property def max_completed_limit(self): - """Gets the max_completed_limit of this InlineResponse20021Data. # noqa: E501 + """Gets the max_completed_limit of this P2pAdDetail. # noqa: E501 Maximum limit of completed orders # noqa: E501 - :return: The max_completed_limit of this InlineResponse20021Data. # noqa: E501 + :return: The max_completed_limit of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._max_completed_limit @max_completed_limit.setter def max_completed_limit(self, max_completed_limit): - """Sets the max_completed_limit of this InlineResponse20021Data. + """Sets the max_completed_limit of this P2pAdDetail. Maximum limit of completed orders # noqa: E501 - :param max_completed_limit: The max_completed_limit of this InlineResponse20021Data. # noqa: E501 + :param max_completed_limit: The max_completed_limit of this P2pAdDetail. # noqa: E501 :type: int """ @@ -1014,22 +948,22 @@ def max_completed_limit(self, max_completed_limit): @property def user_orders_limit(self): - """Gets the user_orders_limit of this InlineResponse20021Data. # noqa: E501 + """Gets the user_orders_limit of this P2pAdDetail. # noqa: E501 Order count limit # noqa: E501 - :return: The user_orders_limit of this InlineResponse20021Data. # noqa: E501 + :return: The user_orders_limit of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._user_orders_limit @user_orders_limit.setter def user_orders_limit(self, user_orders_limit): - """Sets the user_orders_limit of this InlineResponse20021Data. + """Sets the user_orders_limit of this P2pAdDetail. Order count limit # noqa: E501 - :param user_orders_limit: The user_orders_limit of this InlineResponse20021Data. # noqa: E501 + :param user_orders_limit: The user_orders_limit of this P2pAdDetail. # noqa: E501 :type: int """ @@ -1037,68 +971,45 @@ def user_orders_limit(self, user_orders_limit): @property def completed_rate_limit(self): - """Gets the completed_rate_limit of this InlineResponse20021Data. # noqa: E501 + """Gets the completed_rate_limit of this P2pAdDetail. # noqa: E501 30-day completion rate limit # noqa: E501 - :return: The completed_rate_limit of this InlineResponse20021Data. # noqa: E501 + :return: The completed_rate_limit of this P2pAdDetail. # noqa: E501 :rtype: float """ return self._completed_rate_limit @completed_rate_limit.setter def completed_rate_limit(self, completed_rate_limit): - """Sets the completed_rate_limit of this InlineResponse20021Data. + """Sets the completed_rate_limit of this P2pAdDetail. 30-day completion rate limit # noqa: E501 - :param completed_rate_limit: The completed_rate_limit of this InlineResponse20021Data. # noqa: E501 + :param completed_rate_limit: The completed_rate_limit of this P2pAdDetail. # noqa: E501 :type: float """ self._completed_rate_limit = completed_rate_limit - @property - def user_country_limit(self): - """Gets the user_country_limit of this InlineResponse20021Data. # noqa: E501 - - KYC nationality restriction # noqa: E501 - - :return: The user_country_limit of this InlineResponse20021Data. # noqa: E501 - :rtype: int - """ - return self._user_country_limit - - @user_country_limit.setter - def user_country_limit(self, user_country_limit): - """Sets the user_country_limit of this InlineResponse20021Data. - - KYC nationality restriction # noqa: E501 - - :param user_country_limit: The user_country_limit of this InlineResponse20021Data. # noqa: E501 - :type: int - """ - - self._user_country_limit = user_country_limit - @property def limit_country_cn(self): - """Gets the limit_country_cn of this InlineResponse20021Data. # noqa: E501 + """Gets the limit_country_cn of this P2pAdDetail. # noqa: E501 Restricted nationality (Chinese) # noqa: E501 - :return: The limit_country_cn of this InlineResponse20021Data. # noqa: E501 + :return: The limit_country_cn of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._limit_country_cn @limit_country_cn.setter def limit_country_cn(self, limit_country_cn): - """Sets the limit_country_cn of this InlineResponse20021Data. + """Sets the limit_country_cn of this P2pAdDetail. Restricted nationality (Chinese) # noqa: E501 - :param limit_country_cn: The limit_country_cn of this InlineResponse20021Data. # noqa: E501 + :param limit_country_cn: The limit_country_cn of this P2pAdDetail. # noqa: E501 :type: str """ @@ -1106,22 +1017,22 @@ def limit_country_cn(self, limit_country_cn): @property def limit_country_en(self): - """Gets the limit_country_en of this InlineResponse20021Data. # noqa: E501 + """Gets the limit_country_en of this P2pAdDetail. # noqa: E501 Restricted nationality (English) # noqa: E501 - :return: The limit_country_en of this InlineResponse20021Data. # noqa: E501 + :return: The limit_country_en of this P2pAdDetail. # noqa: E501 :rtype: str """ return self._limit_country_en @limit_country_en.setter def limit_country_en(self, limit_country_en): - """Sets the limit_country_en of this InlineResponse20021Data. + """Sets the limit_country_en of this P2pAdDetail. Restricted nationality (English) # noqa: E501 - :param limit_country_en: The limit_country_en of this InlineResponse20021Data. # noqa: E501 + :param limit_country_en: The limit_country_en of this P2pAdDetail. # noqa: E501 :type: str """ @@ -1129,22 +1040,22 @@ def limit_country_en(self, limit_country_en): @property def is_hedge(self): - """Gets the is_hedge of this InlineResponse20021Data. # noqa: E501 + """Gets the is_hedge of this P2pAdDetail. # noqa: E501 - Whether auto delegation # noqa: E501 + Whether auto-delegation is enabled. `1`: yes; `0`: no. # noqa: E501 - :return: The is_hedge of this InlineResponse20021Data. # noqa: E501 + :return: The is_hedge of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._is_hedge @is_hedge.setter def is_hedge(self, is_hedge): - """Sets the is_hedge of this InlineResponse20021Data. + """Sets the is_hedge of this P2pAdDetail. - Whether auto delegation # noqa: E501 + Whether auto-delegation is enabled. `1`: yes; `0`: no. # noqa: E501 - :param is_hedge: The is_hedge of this InlineResponse20021Data. # noqa: E501 + :param is_hedge: The is_hedge of this P2pAdDetail. # noqa: E501 :type: int """ @@ -1152,50 +1063,27 @@ def is_hedge(self, is_hedge): @property def hide_payment(self): - """Gets the hide_payment of this InlineResponse20021Data. # noqa: E501 + """Gets the hide_payment of this P2pAdDetail. # noqa: E501 - Whether to hide payment method # noqa: E501 + Whether payment methods are hidden. `1`: hidden; `0`: visible. # noqa: E501 - :return: The hide_payment of this InlineResponse20021Data. # noqa: E501 + :return: The hide_payment of this P2pAdDetail. # noqa: E501 :rtype: int """ return self._hide_payment @hide_payment.setter def hide_payment(self, hide_payment): - """Sets the hide_payment of this InlineResponse20021Data. + """Sets the hide_payment of this P2pAdDetail. - Whether to hide payment method # noqa: E501 + Whether payment methods are hidden. `1`: hidden; `0`: visible. # noqa: E501 - :param hide_payment: The hide_payment of this InlineResponse20021Data. # noqa: E501 + :param hide_payment: The hide_payment of this P2pAdDetail. # noqa: E501 :type: int """ self._hide_payment = hide_payment - @property - def fee(self): - """Gets the fee of this InlineResponse20021Data. # noqa: E501 - - fee # noqa: E501 - - :return: The fee of this InlineResponse20021Data. # noqa: E501 - :rtype: int - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this InlineResponse20021Data. - - fee # noqa: E501 - - :param fee: The fee of this InlineResponse20021Data. # noqa: E501 - :type: int - """ - - self._fee = fee - def to_dict(self): """Returns the model properties as a dict""" result = {} @@ -1230,14 +1118,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20021Data): + if not isinstance(other, P2pAdDetail): 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, InlineResponse20021Data): + if not isinstance(other, P2pAdDetail): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20017.py b/gate_api/models/p2p_ad_detail_response.py similarity index 71% rename from gate_api/models/inline_response20017.py rename to gate_api/models/p2p_ad_detail_response.py index 88231b58..ac37f9a9 100644 --- a/gate_api/models/inline_response20017.py +++ b/gate_api/models/p2p_ad_detail_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20017(object): +class P2pAdDetailResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,7 @@ class InlineResponse20017(object): 'method': 'str', 'code': 'int', 'message': 'str', - 'data': 'InlineResponse20017Data', + 'data': 'P2pAdDetail', 'version': 'str' } @@ -51,8 +51,8 @@ class InlineResponse20017(object): } def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20017Data, str, Configuration) -> None - """InlineResponse20017 - a model defined in OpenAPI""" # noqa: E501 + # type: (float, str, int, str, P2pAdDetail, str, Configuration) -> None + """P2pAdDetailResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -80,20 +80,20 @@ def __init__(self, timestamp=None, method=None, code=None, message=None, data=No @property def timestamp(self): - """Gets the timestamp of this InlineResponse20017. # noqa: E501 + """Gets the timestamp of this P2pAdDetailResponse. # noqa: E501 - :return: The timestamp of this InlineResponse20017. # noqa: E501 + :return: The timestamp of this P2pAdDetailResponse. # noqa: E501 :rtype: float """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20017. + """Sets the timestamp of this P2pAdDetailResponse. - :param timestamp: The timestamp of this InlineResponse20017. # noqa: E501 + :param timestamp: The timestamp of this P2pAdDetailResponse. # noqa: E501 :type: float """ @@ -101,20 +101,20 @@ def timestamp(self, timestamp): @property def method(self): - """Gets the method of this InlineResponse20017. # noqa: E501 + """Gets the method of this P2pAdDetailResponse. # noqa: E501 - :return: The method of this InlineResponse20017. # noqa: E501 + :return: The method of this P2pAdDetailResponse. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): - """Sets the method of this InlineResponse20017. + """Sets the method of this P2pAdDetailResponse. - :param method: The method of this InlineResponse20017. # noqa: E501 + :param method: The method of this P2pAdDetailResponse. # noqa: E501 :type: str """ @@ -122,20 +122,20 @@ def method(self, method): @property def code(self): - """Gets the code of this InlineResponse20017. # noqa: E501 + """Gets the code of this P2pAdDetailResponse. # noqa: E501 - :return: The code of this InlineResponse20017. # noqa: E501 + :return: The code of this P2pAdDetailResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20017. + """Sets the code of this P2pAdDetailResponse. - :param code: The code of this InlineResponse20017. # noqa: E501 + :param code: The code of this P2pAdDetailResponse. # noqa: E501 :type: int """ @@ -143,20 +143,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20017. # noqa: E501 + """Gets the message of this P2pAdDetailResponse. # noqa: E501 - :return: The message of this InlineResponse20017. # noqa: E501 + :return: The message of this P2pAdDetailResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20017. + """Sets the message of this P2pAdDetailResponse. - :param message: The message of this InlineResponse20017. # noqa: E501 + :param message: The message of this P2pAdDetailResponse. # noqa: E501 :type: str """ @@ -164,41 +164,41 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20017. # noqa: E501 + """Gets the data of this P2pAdDetailResponse. # noqa: E501 - :return: The data of this InlineResponse20017. # noqa: E501 - :rtype: InlineResponse20017Data + :return: The data of this P2pAdDetailResponse. # noqa: E501 + :rtype: P2pAdDetail """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20017. + """Sets the data of this P2pAdDetailResponse. - :param data: The data of this InlineResponse20017. # noqa: E501 - :type: InlineResponse20017Data + :param data: The data of this P2pAdDetailResponse. # noqa: E501 + :type: P2pAdDetail """ self._data = data @property def version(self): - """Gets the version of this InlineResponse20017. # noqa: E501 + """Gets the version of this P2pAdDetailResponse. # noqa: E501 - :return: The version of this InlineResponse20017. # noqa: E501 + :return: The version of this P2pAdDetailResponse. # noqa: E501 :rtype: str """ return self._version @version.setter def version(self, version): - """Sets the version of this InlineResponse20017. + """Sets the version of this P2pAdDetailResponse. - :param version: The version of this InlineResponse20017. # noqa: E501 + :param version: The version of this P2pAdDetailResponse. # noqa: E501 :type: str """ @@ -238,14 +238,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20017): + if not isinstance(other, P2pAdDetailResponse): 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, InlineResponse20017): + if not isinstance(other, P2pAdDetailResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20023_data.py b/gate_api/models/p2p_ads_list_item.py similarity index 70% rename from gate_api/models/inline_response20023_data.py rename to gate_api/models/p2p_ads_list_item.py index 558b849f..d46d8413 100644 --- a/gate_api/models/inline_response20023_data.py +++ b/gate_api/models/p2p_ads_list_item.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20023Data(object): +class P2pAdsListItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -56,7 +56,7 @@ class InlineResponse20023Data(object): def __init__(self, index=None, asset=None, fiat_unit=None, adv_no=None, price=None, max_single_trans_amount=None, min_single_trans_amount=None, nick_name=None, local_vars_configuration=None): # noqa: E501 # type: (int, str, str, int, str, str, str, str, Configuration) -> None - """InlineResponse20023Data - a model defined in OpenAPI""" # noqa: E501 + """P2pAdsListItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -90,22 +90,22 @@ def __init__(self, index=None, asset=None, fiat_unit=None, adv_no=None, price=No @property def index(self): - """Gets the index of this InlineResponse20023Data. # noqa: E501 + """Gets the index of this P2pAdsListItem. # noqa: E501 Serial number # noqa: E501 - :return: The index of this InlineResponse20023Data. # noqa: E501 + :return: The index of this P2pAdsListItem. # noqa: E501 :rtype: int """ return self._index @index.setter def index(self, index): - """Sets the index of this InlineResponse20023Data. + """Sets the index of this P2pAdsListItem. Serial number # noqa: E501 - :param index: The index of this InlineResponse20023Data. # noqa: E501 + :param index: The index of this P2pAdsListItem. # noqa: E501 :type: int """ @@ -113,22 +113,22 @@ def index(self, index): @property def asset(self): - """Gets the asset of this InlineResponse20023Data. # noqa: E501 + """Gets the asset of this P2pAdsListItem. # noqa: E501 Cryptocurrency # noqa: E501 - :return: The asset of this InlineResponse20023Data. # noqa: E501 + :return: The asset of this P2pAdsListItem. # noqa: E501 :rtype: str """ return self._asset @asset.setter def asset(self, asset): - """Sets the asset of this InlineResponse20023Data. + """Sets the asset of this P2pAdsListItem. Cryptocurrency # noqa: E501 - :param asset: The asset of this InlineResponse20023Data. # noqa: E501 + :param asset: The asset of this P2pAdsListItem. # noqa: E501 :type: str """ @@ -136,22 +136,22 @@ def asset(self, asset): @property def fiat_unit(self): - """Gets the fiat_unit of this InlineResponse20023Data. # noqa: E501 + """Gets the fiat_unit of this P2pAdsListItem. # noqa: E501 Fiat currency # noqa: E501 - :return: The fiat_unit of this InlineResponse20023Data. # noqa: E501 + :return: The fiat_unit of this P2pAdsListItem. # noqa: E501 :rtype: str """ return self._fiat_unit @fiat_unit.setter def fiat_unit(self, fiat_unit): - """Sets the fiat_unit of this InlineResponse20023Data. + """Sets the fiat_unit of this P2pAdsListItem. Fiat currency # noqa: E501 - :param fiat_unit: The fiat_unit of this InlineResponse20023Data. # noqa: E501 + :param fiat_unit: The fiat_unit of this P2pAdsListItem. # noqa: E501 :type: str """ @@ -159,22 +159,22 @@ def fiat_unit(self, fiat_unit): @property def adv_no(self): - """Gets the adv_no of this InlineResponse20023Data. # noqa: E501 + """Gets the adv_no of this P2pAdsListItem. # noqa: E501 Ad ID # noqa: E501 - :return: The adv_no of this InlineResponse20023Data. # noqa: E501 + :return: The adv_no of this P2pAdsListItem. # noqa: E501 :rtype: int """ return self._adv_no @adv_no.setter def adv_no(self, adv_no): - """Sets the adv_no of this InlineResponse20023Data. + """Sets the adv_no of this P2pAdsListItem. Ad ID # noqa: E501 - :param adv_no: The adv_no of this InlineResponse20023Data. # noqa: E501 + :param adv_no: The adv_no of this P2pAdsListItem. # noqa: E501 :type: int """ @@ -182,22 +182,22 @@ def adv_no(self, adv_no): @property def price(self): - """Gets the price of this InlineResponse20023Data. # noqa: E501 + """Gets the price of this P2pAdsListItem. # noqa: E501 Price # noqa: E501 - :return: The price of this InlineResponse20023Data. # noqa: E501 + :return: The price of this P2pAdsListItem. # noqa: E501 :rtype: str """ return self._price @price.setter def price(self, price): - """Sets the price of this InlineResponse20023Data. + """Sets the price of this P2pAdsListItem. Price # noqa: E501 - :param price: The price of this InlineResponse20023Data. # noqa: E501 + :param price: The price of this P2pAdsListItem. # noqa: E501 :type: str """ @@ -205,22 +205,22 @@ def price(self, price): @property def max_single_trans_amount(self): - """Gets the max_single_trans_amount of this InlineResponse20023Data. # noqa: E501 + """Gets the max_single_trans_amount of this P2pAdsListItem. # noqa: E501 - Maximum Cryptocurrency Amount # noqa: E501 + Maximum crypto size per trade. # noqa: E501 - :return: The max_single_trans_amount of this InlineResponse20023Data. # noqa: E501 + :return: The max_single_trans_amount of this P2pAdsListItem. # noqa: E501 :rtype: str """ return self._max_single_trans_amount @max_single_trans_amount.setter def max_single_trans_amount(self, max_single_trans_amount): - """Sets the max_single_trans_amount of this InlineResponse20023Data. + """Sets the max_single_trans_amount of this P2pAdsListItem. - Maximum Cryptocurrency Amount # noqa: E501 + Maximum crypto size per trade. # noqa: E501 - :param max_single_trans_amount: The max_single_trans_amount of this InlineResponse20023Data. # noqa: E501 + :param max_single_trans_amount: The max_single_trans_amount of this P2pAdsListItem. # noqa: E501 :type: str """ @@ -228,22 +228,22 @@ def max_single_trans_amount(self, max_single_trans_amount): @property def min_single_trans_amount(self): - """Gets the min_single_trans_amount of this InlineResponse20023Data. # noqa: E501 + """Gets the min_single_trans_amount of this P2pAdsListItem. # noqa: E501 - Minimum Cryptocurrency Amount # noqa: E501 + Minimum crypto size per trade. # noqa: E501 - :return: The min_single_trans_amount of this InlineResponse20023Data. # noqa: E501 + :return: The min_single_trans_amount of this P2pAdsListItem. # noqa: E501 :rtype: str """ return self._min_single_trans_amount @min_single_trans_amount.setter def min_single_trans_amount(self, min_single_trans_amount): - """Sets the min_single_trans_amount of this InlineResponse20023Data. + """Sets the min_single_trans_amount of this P2pAdsListItem. - Minimum Cryptocurrency Amount # noqa: E501 + Minimum crypto size per trade. # noqa: E501 - :param min_single_trans_amount: The min_single_trans_amount of this InlineResponse20023Data. # noqa: E501 + :param min_single_trans_amount: The min_single_trans_amount of this P2pAdsListItem. # noqa: E501 :type: str """ @@ -251,22 +251,22 @@ def min_single_trans_amount(self, min_single_trans_amount): @property def nick_name(self): - """Gets the nick_name of this InlineResponse20023Data. # noqa: E501 + """Gets the nick_name of this P2pAdsListItem. # noqa: E501 Advertiser Nickname # noqa: E501 - :return: The nick_name of this InlineResponse20023Data. # noqa: E501 + :return: The nick_name of this P2pAdsListItem. # noqa: E501 :rtype: str """ return self._nick_name @nick_name.setter def nick_name(self, nick_name): - """Sets the nick_name of this InlineResponse20023Data. + """Sets the nick_name of this P2pAdsListItem. Advertiser Nickname # noqa: E501 - :param nick_name: The nick_name of this InlineResponse20023Data. # noqa: E501 + :param nick_name: The nick_name of this P2pAdsListItem. # noqa: E501 :type: str """ @@ -306,14 +306,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20023Data): + if not isinstance(other, P2pAdsListItem): 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, InlineResponse20023Data): + if not isinstance(other, P2pAdsListItem): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20015.py b/gate_api/models/p2p_ads_list_response.py similarity index 70% rename from gate_api/models/inline_response20015.py rename to gate_api/models/p2p_ads_list_response.py index 23e33d8d..b5c86e33 100644 --- a/gate_api/models/inline_response20015.py +++ b/gate_api/models/p2p_ads_list_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20015(object): +class P2pAdsListResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,7 @@ class InlineResponse20015(object): 'method': 'str', 'code': 'int', 'message': 'str', - 'data': 'InlineResponse20015Data', + 'data': 'list[P2pAdsListItem]', 'version': 'str' } @@ -51,8 +51,8 @@ class InlineResponse20015(object): } def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20015Data, str, Configuration) -> None - """InlineResponse20015 - a model defined in OpenAPI""" # noqa: E501 + # type: (float, str, int, str, list[P2pAdsListItem], str, Configuration) -> None + """P2pAdsListResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -80,20 +80,20 @@ def __init__(self, timestamp=None, method=None, code=None, message=None, data=No @property def timestamp(self): - """Gets the timestamp of this InlineResponse20015. # noqa: E501 + """Gets the timestamp of this P2pAdsListResponse. # noqa: E501 - :return: The timestamp of this InlineResponse20015. # noqa: E501 + :return: The timestamp of this P2pAdsListResponse. # noqa: E501 :rtype: float """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20015. + """Sets the timestamp of this P2pAdsListResponse. - :param timestamp: The timestamp of this InlineResponse20015. # noqa: E501 + :param timestamp: The timestamp of this P2pAdsListResponse. # noqa: E501 :type: float """ @@ -101,20 +101,20 @@ def timestamp(self, timestamp): @property def method(self): - """Gets the method of this InlineResponse20015. # noqa: E501 + """Gets the method of this P2pAdsListResponse. # noqa: E501 - :return: The method of this InlineResponse20015. # noqa: E501 + :return: The method of this P2pAdsListResponse. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): - """Sets the method of this InlineResponse20015. + """Sets the method of this P2pAdsListResponse. - :param method: The method of this InlineResponse20015. # noqa: E501 + :param method: The method of this P2pAdsListResponse. # noqa: E501 :type: str """ @@ -122,20 +122,20 @@ def method(self, method): @property def code(self): - """Gets the code of this InlineResponse20015. # noqa: E501 + """Gets the code of this P2pAdsListResponse. # noqa: E501 - :return: The code of this InlineResponse20015. # noqa: E501 + :return: The code of this P2pAdsListResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20015. + """Sets the code of this P2pAdsListResponse. - :param code: The code of this InlineResponse20015. # noqa: E501 + :param code: The code of this P2pAdsListResponse. # noqa: E501 :type: int """ @@ -143,20 +143,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20015. # noqa: E501 + """Gets the message of this P2pAdsListResponse. # noqa: E501 - :return: The message of this InlineResponse20015. # noqa: E501 + :return: The message of this P2pAdsListResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20015. + """Sets the message of this P2pAdsListResponse. - :param message: The message of this InlineResponse20015. # noqa: E501 + :param message: The message of this P2pAdsListResponse. # noqa: E501 :type: str """ @@ -164,41 +164,41 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20015. # noqa: E501 + """Gets the data of this P2pAdsListResponse. # noqa: E501 - :return: The data of this InlineResponse20015. # noqa: E501 - :rtype: InlineResponse20015Data + :return: The data of this P2pAdsListResponse. # noqa: E501 + :rtype: list[P2pAdsListItem] """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20015. + """Sets the data of this P2pAdsListResponse. - :param data: The data of this InlineResponse20015. # noqa: E501 - :type: InlineResponse20015Data + :param data: The data of this P2pAdsListResponse. # noqa: E501 + :type: list[P2pAdsListItem] """ self._data = data @property def version(self): - """Gets the version of this InlineResponse20015. # noqa: E501 + """Gets the version of this P2pAdsListResponse. # noqa: E501 - :return: The version of this InlineResponse20015. # noqa: E501 + :return: The version of this P2pAdsListResponse. # noqa: E501 :rtype: str """ return self._version @version.setter def version(self, version): - """Sets the version of this InlineResponse20015. + """Sets the version of this P2pAdsListResponse. - :param version: The version of this InlineResponse20015. # noqa: E501 + :param version: The version of this P2pAdsListResponse. # noqa: E501 :type: str """ @@ -238,14 +238,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20015): + if not isinstance(other, P2pAdsListResponse): 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, InlineResponse20015): + if not isinstance(other, P2pAdsListResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_ads_update_status_response.py b/gate_api/models/p2p_ads_update_status_response.py new file mode 100644 index 00000000..b9ef3f35 --- /dev/null +++ b/gate_api/models/p2p_ads_update_status_response.py @@ -0,0 +1,251 @@ +# 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 P2pAdsUpdateStatusResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'P2pAdsUpdateStatusResult', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, P2pAdsUpdateStatusResult, str, Configuration) -> None + """P2pAdsUpdateStatusResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pAdsUpdateStatusResponse. # noqa: E501 + + + :return: The timestamp of this P2pAdsUpdateStatusResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pAdsUpdateStatusResponse. + + + :param timestamp: The timestamp of this P2pAdsUpdateStatusResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pAdsUpdateStatusResponse. # noqa: E501 + + + :return: The method of this P2pAdsUpdateStatusResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pAdsUpdateStatusResponse. + + + :param method: The method of this P2pAdsUpdateStatusResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pAdsUpdateStatusResponse. # noqa: E501 + + + :return: The code of this P2pAdsUpdateStatusResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pAdsUpdateStatusResponse. + + + :param code: The code of this P2pAdsUpdateStatusResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pAdsUpdateStatusResponse. # noqa: E501 + + + :return: The message of this P2pAdsUpdateStatusResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pAdsUpdateStatusResponse. + + + :param message: The message of this P2pAdsUpdateStatusResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pAdsUpdateStatusResponse. # noqa: E501 + + + :return: The data of this P2pAdsUpdateStatusResponse. # noqa: E501 + :rtype: P2pAdsUpdateStatusResult + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pAdsUpdateStatusResponse. + + + :param data: The data of this P2pAdsUpdateStatusResponse. # noqa: E501 + :type: P2pAdsUpdateStatusResult + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pAdsUpdateStatusResponse. # noqa: E501 + + + :return: The version of this P2pAdsUpdateStatusResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pAdsUpdateStatusResponse. + + + :param version: The version of this P2pAdsUpdateStatusResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pAdsUpdateStatusResponse): + 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, P2pAdsUpdateStatusResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20020_data.py b/gate_api/models/p2p_ads_update_status_result.py similarity index 81% rename from gate_api/models/inline_response20020_data.py rename to gate_api/models/p2p_ads_update_status_result.py index 67ae6b78..e515240c 100644 --- a/gate_api/models/inline_response20020_data.py +++ b/gate_api/models/p2p_ads_update_status_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20020Data(object): +class P2pAdsUpdateStatusResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -42,7 +42,7 @@ class InlineResponse20020Data(object): def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 # type: (int, Configuration) -> None - """InlineResponse20020Data - a model defined in OpenAPI""" # noqa: E501 + """P2pAdsUpdateStatusResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -55,22 +55,22 @@ def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 @property def status(self): - """Gets the status of this InlineResponse20020Data. # noqa: E501 + """Gets the status of this P2pAdsUpdateStatusResult. # noqa: E501 - Ad status after successful update # noqa: E501 + Ad status after update: `1` listed; `3` delisted; `4` closed. # noqa: E501 - :return: The status of this InlineResponse20020Data. # noqa: E501 + :return: The status of this P2pAdsUpdateStatusResult. # noqa: E501 :rtype: int """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20020Data. + """Sets the status of this P2pAdsUpdateStatusResult. - Ad status after successful update # noqa: E501 + Ad status after update: `1` listed; `3` delisted; `4` closed. # noqa: E501 - :param status: The status of this InlineResponse20020Data. # noqa: E501 + :param status: The status of this P2pAdsUpdateStatusResult. # noqa: E501 :type: int """ @@ -110,14 +110,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20020Data): + if not isinstance(other, P2pAdsUpdateStatusResult): 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, InlineResponse20020Data): + if not isinstance(other, P2pAdsUpdateStatusResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20014.py b/gate_api/models/p2p_chat_list_response.py similarity index 71% rename from gate_api/models/inline_response20014.py rename to gate_api/models/p2p_chat_list_response.py index 9be13fe4..ffabf7a0 100644 --- a/gate_api/models/inline_response20014.py +++ b/gate_api/models/p2p_chat_list_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20014(object): +class P2pChatListResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,7 @@ class InlineResponse20014(object): 'method': 'str', 'code': 'int', 'message': 'str', - 'data': 'InlineResponse20014Data', + 'data': 'P2pChatListResult', 'version': 'str' } @@ -51,8 +51,8 @@ class InlineResponse20014(object): } def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20014Data, str, Configuration) -> None - """InlineResponse20014 - a model defined in OpenAPI""" # noqa: E501 + # type: (float, str, int, str, P2pChatListResult, str, Configuration) -> None + """P2pChatListResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -80,20 +80,20 @@ def __init__(self, timestamp=None, method=None, code=None, message=None, data=No @property def timestamp(self): - """Gets the timestamp of this InlineResponse20014. # noqa: E501 + """Gets the timestamp of this P2pChatListResponse. # noqa: E501 - :return: The timestamp of this InlineResponse20014. # noqa: E501 + :return: The timestamp of this P2pChatListResponse. # noqa: E501 :rtype: float """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20014. + """Sets the timestamp of this P2pChatListResponse. - :param timestamp: The timestamp of this InlineResponse20014. # noqa: E501 + :param timestamp: The timestamp of this P2pChatListResponse. # noqa: E501 :type: float """ @@ -101,20 +101,20 @@ def timestamp(self, timestamp): @property def method(self): - """Gets the method of this InlineResponse20014. # noqa: E501 + """Gets the method of this P2pChatListResponse. # noqa: E501 - :return: The method of this InlineResponse20014. # noqa: E501 + :return: The method of this P2pChatListResponse. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): - """Sets the method of this InlineResponse20014. + """Sets the method of this P2pChatListResponse. - :param method: The method of this InlineResponse20014. # noqa: E501 + :param method: The method of this P2pChatListResponse. # noqa: E501 :type: str """ @@ -122,20 +122,20 @@ def method(self, method): @property def code(self): - """Gets the code of this InlineResponse20014. # noqa: E501 + """Gets the code of this P2pChatListResponse. # noqa: E501 - :return: The code of this InlineResponse20014. # noqa: E501 + :return: The code of this P2pChatListResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20014. + """Sets the code of this P2pChatListResponse. - :param code: The code of this InlineResponse20014. # noqa: E501 + :param code: The code of this P2pChatListResponse. # noqa: E501 :type: int """ @@ -143,20 +143,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20014. # noqa: E501 + """Gets the message of this P2pChatListResponse. # noqa: E501 - :return: The message of this InlineResponse20014. # noqa: E501 + :return: The message of this P2pChatListResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20014. + """Sets the message of this P2pChatListResponse. - :param message: The message of this InlineResponse20014. # noqa: E501 + :param message: The message of this P2pChatListResponse. # noqa: E501 :type: str """ @@ -164,41 +164,41 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20014. # noqa: E501 + """Gets the data of this P2pChatListResponse. # noqa: E501 - :return: The data of this InlineResponse20014. # noqa: E501 - :rtype: InlineResponse20014Data + :return: The data of this P2pChatListResponse. # noqa: E501 + :rtype: P2pChatListResult """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20014. + """Sets the data of this P2pChatListResponse. - :param data: The data of this InlineResponse20014. # noqa: E501 - :type: InlineResponse20014Data + :param data: The data of this P2pChatListResponse. # noqa: E501 + :type: P2pChatListResult """ self._data = data @property def version(self): - """Gets the version of this InlineResponse20014. # noqa: E501 + """Gets the version of this P2pChatListResponse. # noqa: E501 - :return: The version of this InlineResponse20014. # noqa: E501 + :return: The version of this P2pChatListResponse. # noqa: E501 :rtype: str """ return self._version @version.setter def version(self, version): - """Sets the version of this InlineResponse20014. + """Sets the version of this P2pChatListResponse. - :param version: The version of this InlineResponse20014. # noqa: E501 + :param version: The version of this P2pChatListResponse. # noqa: E501 :type: str """ @@ -238,14 +238,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20014): + if not isinstance(other, P2pChatListResponse): 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, InlineResponse20014): + if not isinstance(other, P2pChatListResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20024_data.py b/gate_api/models/p2p_chat_list_result.py similarity index 68% rename from gate_api/models/inline_response20024_data.py rename to gate_api/models/p2p_chat_list_result.py index 7c3a5f54..541fa5a0 100644 --- a/gate_api/models/inline_response20024_data.py +++ b/gate_api/models/p2p_chat_list_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20024Data(object): +class P2pChatListResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,7 +33,7 @@ class InlineResponse20024Data(object): and the value is json key in definition. """ openapi_types = { - 'messages': 'list[InlineResponse20024DataMessages]', + 'messages': 'list[P2pChatMessage]', 'memo': 'str', 'has_history': 'bool', 'txid': 'int', @@ -51,8 +51,8 @@ class InlineResponse20024Data(object): } def __init__(self, messages=None, memo=None, has_history=None, txid=None, srvtm=None, order_status=None, local_vars_configuration=None): # noqa: E501 - # type: (list[InlineResponse20024DataMessages], str, bool, int, int, str, Configuration) -> None - """InlineResponse20024Data - a model defined in OpenAPI""" # noqa: E501 + # type: (list[P2pChatMessage], str, bool, int, int, str, Configuration) -> None + """P2pChatListResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -80,45 +80,45 @@ def __init__(self, messages=None, memo=None, has_history=None, txid=None, srvtm= @property def messages(self): - """Gets the messages of this InlineResponse20024Data. # noqa: E501 + """Gets the messages of this P2pChatListResult. # noqa: E501 Message List # noqa: E501 - :return: The messages of this InlineResponse20024Data. # noqa: E501 - :rtype: list[InlineResponse20024DataMessages] + :return: The messages of this P2pChatListResult. # noqa: E501 + :rtype: list[P2pChatMessage] """ return self._messages @messages.setter def messages(self, messages): - """Sets the messages of this InlineResponse20024Data. + """Sets the messages of this P2pChatListResult. Message List # noqa: E501 - :param messages: The messages of this InlineResponse20024Data. # noqa: E501 - :type: list[InlineResponse20024DataMessages] + :param messages: The messages of this P2pChatListResult. # noqa: E501 + :type: list[P2pChatMessage] """ self._messages = messages @property def memo(self): - """Gets the memo of this InlineResponse20024Data. # noqa: E501 + """Gets the memo of this P2pChatListResult. # noqa: E501 Payment tip (displayed on homepage only) # noqa: E501 - :return: The memo of this InlineResponse20024Data. # noqa: E501 + :return: The memo of this P2pChatListResult. # noqa: E501 :rtype: str """ return self._memo @memo.setter def memo(self, memo): - """Sets the memo of this InlineResponse20024Data. + """Sets the memo of this P2pChatListResult. Payment tip (displayed on homepage only) # noqa: E501 - :param memo: The memo of this InlineResponse20024Data. # noqa: E501 + :param memo: The memo of this P2pChatListResult. # noqa: E501 :type: str """ @@ -126,22 +126,22 @@ def memo(self, memo): @property def has_history(self): - """Gets the has_history of this InlineResponse20024Data. # noqa: E501 + """Gets the has_history of this P2pChatListResult. # noqa: E501 Whether historical records exist # noqa: E501 - :return: The has_history of this InlineResponse20024Data. # noqa: E501 + :return: The has_history of this P2pChatListResult. # noqa: E501 :rtype: bool """ return self._has_history @has_history.setter def has_history(self, has_history): - """Sets the has_history of this InlineResponse20024Data. + """Sets the has_history of this P2pChatListResult. Whether historical records exist # noqa: E501 - :param has_history: The has_history of this InlineResponse20024Data. # noqa: E501 + :param has_history: The has_history of this P2pChatListResult. # noqa: E501 :type: bool """ @@ -149,22 +149,22 @@ def has_history(self, has_history): @property def txid(self): - """Gets the txid of this InlineResponse20024Data. # noqa: E501 + """Gets the txid of this P2pChatListResult. # noqa: E501 Order ID # noqa: E501 - :return: The txid of this InlineResponse20024Data. # noqa: E501 + :return: The txid of this P2pChatListResult. # noqa: E501 :rtype: int """ return self._txid @txid.setter def txid(self, txid): - """Sets the txid of this InlineResponse20024Data. + """Sets the txid of this P2pChatListResult. Order ID # noqa: E501 - :param txid: The txid of this InlineResponse20024Data. # noqa: E501 + :param txid: The txid of this P2pChatListResult. # noqa: E501 :type: int """ @@ -172,22 +172,22 @@ def txid(self, txid): @property def srvtm(self): - """Gets the srvtm of this InlineResponse20024Data. # noqa: E501 + """Gets the srvtm of this P2pChatListResult. # noqa: E501 - Timestamp of the latest message # noqa: E501 + Timestamp of the latest message. # noqa: E501 - :return: The srvtm of this InlineResponse20024Data. # noqa: E501 + :return: The srvtm of this P2pChatListResult. # noqa: E501 :rtype: int """ return self._srvtm @srvtm.setter def srvtm(self, srvtm): - """Sets the srvtm of this InlineResponse20024Data. + """Sets the srvtm of this P2pChatListResult. - Timestamp of the latest message # noqa: E501 + Timestamp of the latest message. # noqa: E501 - :param srvtm: The srvtm of this InlineResponse20024Data. # noqa: E501 + :param srvtm: The srvtm of this P2pChatListResult. # noqa: E501 :type: int """ @@ -195,22 +195,22 @@ def srvtm(self, srvtm): @property def order_status(self): - """Gets the order_status of this InlineResponse20024Data. # noqa: E501 + """Gets the order_status of this P2pChatListResult. # noqa: E501 - Order Status # noqa: E501 + Raw order status in DB; typical values: `OPEN`, `PAID`, `LOCKED`, `ACCEPT`, `BCLOSED`, `CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`. # noqa: E501 - :return: The order_status of this InlineResponse20024Data. # noqa: E501 + :return: The order_status of this P2pChatListResult. # noqa: E501 :rtype: str """ return self._order_status @order_status.setter def order_status(self, order_status): - """Sets the order_status of this InlineResponse20024Data. + """Sets the order_status of this P2pChatListResult. - Order Status # noqa: E501 + Raw order status in DB; typical values: `OPEN`, `PAID`, `LOCKED`, `ACCEPT`, `BCLOSED`, `CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`. # noqa: E501 - :param order_status: The order_status of this InlineResponse20024Data. # noqa: E501 + :param order_status: The order_status of this P2pChatListResult. # noqa: E501 :type: str """ @@ -250,14 +250,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20024Data): + if not isinstance(other, P2pChatListResult): 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, InlineResponse20024Data): + if not isinstance(other, P2pChatListResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20024_data_messages.py b/gate_api/models/p2p_chat_message.py similarity index 52% rename from gate_api/models/inline_response20024_data_messages.py rename to gate_api/models/p2p_chat_message.py index d4653d64..9d854878 100644 --- a/gate_api/models/inline_response20024_data_messages.py +++ b/gate_api/models/p2p_chat_message.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20024DataMessages(object): +class P2pChatMessage(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -38,14 +38,14 @@ class InlineResponse20024DataMessages(object): 'msg': 'str', 'username': 'str', 'timest': 'int', - 'msg_obj': 'InlineResponse20024DataMsgObj', + 'msg_obj': 'P2pChatMessagePayload', 'uid': 'str', 'type': 'int', 'pic': 'str', 'file_key': 'str', 'file_type': 'str', - 'width': 'str', - 'height': 'str' + 'risk_type': 'int', + 'toast_msg': 'str' } attribute_map = { @@ -60,13 +60,13 @@ class InlineResponse20024DataMessages(object): 'pic': 'pic', 'file_key': 'file_key', 'file_type': 'file_type', - 'width': 'width', - 'height': 'height' + 'risk_type': 'risk_type', + 'toast_msg': 'toast_msg' } - def __init__(self, is_sell=None, msg_type=None, msg=None, username=None, timest=None, msg_obj=None, uid=None, type=None, pic=None, file_key=None, file_type=None, width=None, height=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, int, InlineResponse20024DataMsgObj, str, int, str, str, str, str, str, Configuration) -> None - """InlineResponse20024DataMessages - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, is_sell=None, msg_type=None, msg=None, username=None, timest=None, msg_obj=None, uid=None, type=None, pic=None, file_key=None, file_type=None, risk_type=None, toast_msg=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, int, P2pChatMessagePayload, str, int, str, str, str, int, str, Configuration) -> None + """P2pChatMessage - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -82,8 +82,8 @@ def __init__(self, is_sell=None, msg_type=None, msg=None, username=None, timest= self._pic = None self._file_key = None self._file_type = None - self._width = None - self._height = None + self._risk_type = None + self._toast_msg = None self.discriminator = None if is_sell is not None: @@ -108,29 +108,29 @@ def __init__(self, is_sell=None, msg_type=None, msg=None, username=None, timest= self.file_key = file_key if file_type is not None: self.file_type = file_type - if width is not None: - self.width = width - if height is not None: - self.height = height + if risk_type is not None: + self.risk_type = risk_type + if toast_msg is not None: + self.toast_msg = toast_msg @property def is_sell(self): - """Gets the is_sell of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the is_sell of this P2pChatMessage. # noqa: E501 - Whether seller # noqa: E501 + Whether the current user is the seller. `1`: yes; `0`: no. # noqa: E501 - :return: The is_sell of this InlineResponse20024DataMessages. # noqa: E501 + :return: The is_sell of this P2pChatMessage. # noqa: E501 :rtype: int """ return self._is_sell @is_sell.setter def is_sell(self, is_sell): - """Sets the is_sell of this InlineResponse20024DataMessages. + """Sets the is_sell of this P2pChatMessage. - Whether seller # noqa: E501 + Whether the current user is the seller. `1`: yes; `0`: no. # noqa: E501 - :param is_sell: The is_sell of this InlineResponse20024DataMessages. # noqa: E501 + :param is_sell: The is_sell of this P2pChatMessage. # noqa: E501 :type: int """ @@ -138,22 +138,22 @@ def is_sell(self, is_sell): @property def msg_type(self): - """Gets the msg_type of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the msg_type of this P2pChatMessage. # noqa: E501 - Message type # noqa: E501 + Message type: `0` text; `1` file; `2` template; `3` order-share; `4` payment-share; `5` status update. # noqa: E501 - :return: The msg_type of this InlineResponse20024DataMessages. # noqa: E501 + :return: The msg_type of this P2pChatMessage. # noqa: E501 :rtype: int """ return self._msg_type @msg_type.setter def msg_type(self, msg_type): - """Sets the msg_type of this InlineResponse20024DataMessages. + """Sets the msg_type of this P2pChatMessage. - Message type # noqa: E501 + Message type: `0` text; `1` file; `2` template; `3` order-share; `4` payment-share; `5` status update. # noqa: E501 - :param msg_type: The msg_type of this InlineResponse20024DataMessages. # noqa: E501 + :param msg_type: The msg_type of this P2pChatMessage. # noqa: E501 :type: int """ @@ -161,22 +161,22 @@ def msg_type(self, msg_type): @property def msg(self): - """Gets the msg of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the msg of this P2pChatMessage. # noqa: E501 - Message content # noqa: E501 + Message content; for file messages, usually URL or file key. # noqa: E501 - :return: The msg of this InlineResponse20024DataMessages. # noqa: E501 + :return: The msg of this P2pChatMessage. # noqa: E501 :rtype: str """ return self._msg @msg.setter def msg(self, msg): - """Sets the msg of this InlineResponse20024DataMessages. + """Sets the msg of this P2pChatMessage. - Message content # noqa: E501 + Message content; for file messages, usually URL or file key. # noqa: E501 - :param msg: The msg of this InlineResponse20024DataMessages. # noqa: E501 + :param msg: The msg of this P2pChatMessage. # noqa: E501 :type: str """ @@ -184,22 +184,22 @@ def msg(self, msg): @property def username(self): - """Gets the username of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the username of this P2pChatMessage. # noqa: E501 Message sender username # noqa: E501 - :return: The username of this InlineResponse20024DataMessages. # noqa: E501 + :return: The username of this P2pChatMessage. # noqa: E501 :rtype: str """ return self._username @username.setter def username(self, username): - """Sets the username of this InlineResponse20024DataMessages. + """Sets the username of this P2pChatMessage. Message sender username # noqa: E501 - :param username: The username of this InlineResponse20024DataMessages. # noqa: E501 + :param username: The username of this P2pChatMessage. # noqa: E501 :type: str """ @@ -207,22 +207,22 @@ def username(self, username): @property def timest(self): - """Gets the timest of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the timest of this P2pChatMessage. # noqa: E501 Message timestamp # noqa: E501 - :return: The timest of this InlineResponse20024DataMessages. # noqa: E501 + :return: The timest of this P2pChatMessage. # noqa: E501 :rtype: int """ return self._timest @timest.setter def timest(self, timest): - """Sets the timest of this InlineResponse20024DataMessages. + """Sets the timest of this P2pChatMessage. Message timestamp # noqa: E501 - :param timest: The timest of this InlineResponse20024DataMessages. # noqa: E501 + :param timest: The timest of this P2pChatMessage. # noqa: E501 :type: int """ @@ -230,43 +230,43 @@ def timest(self, timest): @property def msg_obj(self): - """Gets the msg_obj of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the msg_obj of this P2pChatMessage. # noqa: E501 - :return: The msg_obj of this InlineResponse20024DataMessages. # noqa: E501 - :rtype: InlineResponse20024DataMsgObj + :return: The msg_obj of this P2pChatMessage. # noqa: E501 + :rtype: P2pChatMessagePayload """ return self._msg_obj @msg_obj.setter def msg_obj(self, msg_obj): - """Sets the msg_obj of this InlineResponse20024DataMessages. + """Sets the msg_obj of this P2pChatMessage. - :param msg_obj: The msg_obj of this InlineResponse20024DataMessages. # noqa: E501 - :type: InlineResponse20024DataMsgObj + :param msg_obj: The msg_obj of this P2pChatMessage. # noqa: E501 + :type: P2pChatMessagePayload """ self._msg_obj = msg_obj @property def uid(self): - """Gets the uid of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the uid of this P2pChatMessage. # noqa: E501 - Message sender UID # noqa: E501 + Sender's crypto UID; system messages may use `System` or an empty string. # noqa: E501 - :return: The uid of this InlineResponse20024DataMessages. # noqa: E501 + :return: The uid of this P2pChatMessage. # noqa: E501 :rtype: str """ return self._uid @uid.setter def uid(self, uid): - """Sets the uid of this InlineResponse20024DataMessages. + """Sets the uid of this P2pChatMessage. - Message sender UID # noqa: E501 + Sender's crypto UID; system messages may use `System` or an empty string. # noqa: E501 - :param uid: The uid of this InlineResponse20024DataMessages. # noqa: E501 + :param uid: The uid of this P2pChatMessage. # noqa: E501 :type: str """ @@ -274,22 +274,22 @@ def uid(self, uid): @property def type(self): - """Gets the type of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the type of this P2pChatMessage. # noqa: E501 - Message type # noqa: E501 + Display type: `1` file message; `2` system message. # noqa: E501 - :return: The type of this InlineResponse20024DataMessages. # noqa: E501 + :return: The type of this P2pChatMessage. # noqa: E501 :rtype: int """ return self._type @type.setter def type(self, type): - """Sets the type of this InlineResponse20024DataMessages. + """Sets the type of this P2pChatMessage. - Message type # noqa: E501 + Display type: `1` file message; `2` system message. # noqa: E501 - :param type: The type of this InlineResponse20024DataMessages. # noqa: E501 + :param type: The type of this P2pChatMessage. # noqa: E501 :type: int """ @@ -297,22 +297,22 @@ def type(self, type): @property def pic(self): - """Gets the pic of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the pic of this P2pChatMessage. # noqa: E501 File link # noqa: E501 - :return: The pic of this InlineResponse20024DataMessages. # noqa: E501 + :return: The pic of this P2pChatMessage. # noqa: E501 :rtype: str """ return self._pic @pic.setter def pic(self, pic): - """Sets the pic of this InlineResponse20024DataMessages. + """Sets the pic of this P2pChatMessage. File link # noqa: E501 - :param pic: The pic of this InlineResponse20024DataMessages. # noqa: E501 + :param pic: The pic of this P2pChatMessage. # noqa: E501 :type: str """ @@ -320,22 +320,22 @@ def pic(self, pic): @property def file_key(self): - """Gets the file_key of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the file_key of this P2pChatMessage. # noqa: E501 File key # noqa: E501 - :return: The file_key of this InlineResponse20024DataMessages. # noqa: E501 + :return: The file_key of this P2pChatMessage. # noqa: E501 :rtype: str """ return self._file_key @file_key.setter def file_key(self, file_key): - """Sets the file_key of this InlineResponse20024DataMessages. + """Sets the file_key of this P2pChatMessage. File key # noqa: E501 - :param file_key: The file_key of this InlineResponse20024DataMessages. # noqa: E501 + :param file_key: The file_key of this P2pChatMessage. # noqa: E501 :type: str """ @@ -343,72 +343,78 @@ def file_key(self, file_key): @property def file_type(self): - """Gets the file_type of this InlineResponse20024DataMessages. # noqa: E501 + """Gets the file_type of this P2pChatMessage. # noqa: E501 - File type # noqa: E501 + File type: `image` for images, `video` for videos. # noqa: E501 - :return: The file_type of this InlineResponse20024DataMessages. # noqa: E501 + :return: The file_type of this P2pChatMessage. # noqa: E501 :rtype: str """ return self._file_type @file_type.setter def file_type(self, file_type): - """Sets the file_type of this InlineResponse20024DataMessages. + """Sets the file_type of this P2pChatMessage. - File type # noqa: E501 + File type: `image` for images, `video` for videos. # noqa: E501 - :param file_type: The file_type of this InlineResponse20024DataMessages. # noqa: E501 + :param file_type: The file_type of this P2pChatMessage. # noqa: E501 :type: str """ self._file_type = file_type @property - def width(self): - """Gets the width of this InlineResponse20024DataMessages. # noqa: E501 + def risk_type(self): + """Gets the risk_type of this P2pChatMessage. # noqa: E501 - Image width # noqa: E501 + Risk control display type. 1: off-platform traffic diversion risk; returned when a text message hits risk control # noqa: E501 - :return: The width of this InlineResponse20024DataMessages. # noqa: E501 - :rtype: str + :return: The risk_type of this P2pChatMessage. # noqa: E501 + :rtype: int """ - return self._width + return self._risk_type - @width.setter - def width(self, width): - """Sets the width of this InlineResponse20024DataMessages. + @risk_type.setter + def risk_type(self, risk_type): + """Sets the risk_type of this P2pChatMessage. - Image width # noqa: E501 + Risk control display type. 1: off-platform traffic diversion risk; returned when a text message hits risk control # noqa: E501 - :param width: The width of this InlineResponse20024DataMessages. # noqa: E501 - :type: str + :param risk_type: The risk_type of this P2pChatMessage. # noqa: E501 + :type: int """ + allowed_values = [1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and risk_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `risk_type` ({0}), must be one of {1}" # noqa: E501 + .format(risk_type, allowed_values) + ) - self._width = width + self._risk_type = risk_type @property - def height(self): - """Gets the height of this InlineResponse20024DataMessages. # noqa: E501 + def toast_msg(self): + """Gets the toast_msg of this P2pChatMessage. # noqa: E501 - Image height # noqa: E501 + Risk control prompt message; returned only when risk_type=1 # noqa: E501 - :return: The height of this InlineResponse20024DataMessages. # noqa: E501 + :return: The toast_msg of this P2pChatMessage. # noqa: E501 :rtype: str """ - return self._height + return self._toast_msg - @height.setter - def height(self, height): - """Sets the height of this InlineResponse20024DataMessages. + @toast_msg.setter + def toast_msg(self, toast_msg): + """Sets the toast_msg of this P2pChatMessage. - Image height # noqa: E501 + Risk control prompt message; returned only when risk_type=1 # noqa: E501 - :param height: The height of this InlineResponse20024DataMessages. # noqa: E501 + :param toast_msg: The toast_msg of this P2pChatMessage. # noqa: E501 :type: str """ - self._height = height + self._toast_msg = toast_msg def to_dict(self): """Returns the model properties as a dict""" @@ -444,14 +450,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20024DataMessages): + if not isinstance(other, P2pChatMessage): 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, InlineResponse20024DataMessages): + if not isinstance(other, P2pChatMessage): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20024_data_msg_obj.py b/gate_api/models/p2p_chat_message_payload.py similarity index 61% rename from gate_api/models/inline_response20024_data_msg_obj.py rename to gate_api/models/p2p_chat_message_payload.py index 057fa11a..1b31e9b9 100644 --- a/gate_api/models/inline_response20024_data_msg_obj.py +++ b/gate_api/models/p2p_chat_message_payload.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20024DataMsgObj(object): +class P2pChatMessagePayload(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -82,7 +82,7 @@ class InlineResponse20024DataMsgObj(object): def __init__(self, status=None, text=None, payment_voucher=None, reason_id=None, toast_id=None, reason_memo=None, cancel_time=None, seller_confirm=None, id=None, account_des=None, pay_type=None, file=None, file_key=None, account=None, memo=None, code=None, memo_ext=None, trade_tips=None, real_name=None, is_delete=None, pay_name=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, list[str], int, int, str, int, int, str, str, str, str, str, str, str, str, str, str, str, int, str, Configuration) -> None - """InlineResponse20024DataMsgObj - a model defined in OpenAPI""" # noqa: E501 + """P2pChatMessagePayload - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -155,22 +155,22 @@ def __init__(self, status=None, text=None, payment_voucher=None, reason_id=None, @property def status(self): - """Gets the status of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the status of this P2pChatMessagePayload. # noqa: E501 - Order status when message was sent # noqa: E501 + Order status when sending a message. Typical values: `OPEN`, `PAID`, `LOCKED`, `ACCEPT`, `BCLOSED`, `CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`. # noqa: E501 - :return: The status of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The status of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20024DataMsgObj. + """Sets the status of this P2pChatMessagePayload. - Order status when message was sent # noqa: E501 + Order status when sending a message. Typical values: `OPEN`, `PAID`, `LOCKED`, `ACCEPT`, `BCLOSED`, `CANCEL`, `BECANCEL`, `SCLOSED`, `SCANCEL`. # noqa: E501 - :param status: The status of this InlineResponse20024DataMsgObj. # noqa: E501 + :param status: The status of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -178,22 +178,22 @@ def status(self, status): @property def text(self): - """Gets the text of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the text of this P2pChatMessagePayload. # noqa: E501 Message content # noqa: E501 - :return: The text of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The text of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): - """Sets the text of this InlineResponse20024DataMsgObj. + """Sets the text of this P2pChatMessagePayload. Message content # noqa: E501 - :param text: The text of this InlineResponse20024DataMsgObj. # noqa: E501 + :param text: The text of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -201,22 +201,22 @@ def text(self, text): @property def payment_voucher(self): - """Gets the payment_voucher of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the payment_voucher of this P2pChatMessagePayload. # noqa: E501 Payment voucher # noqa: E501 - :return: The payment_voucher of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The payment_voucher of this P2pChatMessagePayload. # noqa: E501 :rtype: list[str] """ return self._payment_voucher @payment_voucher.setter def payment_voucher(self, payment_voucher): - """Sets the payment_voucher of this InlineResponse20024DataMsgObj. + """Sets the payment_voucher of this P2pChatMessagePayload. Payment voucher # noqa: E501 - :param payment_voucher: The payment_voucher of this InlineResponse20024DataMsgObj. # noqa: E501 + :param payment_voucher: The payment_voucher of this P2pChatMessagePayload. # noqa: E501 :type: list[str] """ @@ -224,22 +224,22 @@ def payment_voucher(self, payment_voucher): @property def reason_id(self): - """Gets the reason_id of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the reason_id of this P2pChatMessagePayload. # noqa: E501 - Cancellation reason ID # noqa: E501 + Cancel reason ID. `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller account not real; `5` payout account issue; `6` price mismatch; `7` mutually agreed cancel; `8` poor communication; `9` other; `10` seller cannot release with refund; `11` terms not met; `12` seller payout risk-controlled. # noqa: E501 - :return: The reason_id of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The reason_id of this P2pChatMessagePayload. # noqa: E501 :rtype: int """ return self._reason_id @reason_id.setter def reason_id(self, reason_id): - """Sets the reason_id of this InlineResponse20024DataMsgObj. + """Sets the reason_id of this P2pChatMessagePayload. - Cancellation reason ID # noqa: E501 + Cancel reason ID. `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller account not real; `5` payout account issue; `6` price mismatch; `7` mutually agreed cancel; `8` poor communication; `9` other; `10` seller cannot release with refund; `11` terms not met; `12` seller payout risk-controlled. # noqa: E501 - :param reason_id: The reason_id of this InlineResponse20024DataMsgObj. # noqa: E501 + :param reason_id: The reason_id of this P2pChatMessagePayload. # noqa: E501 :type: int """ @@ -247,22 +247,22 @@ def reason_id(self, reason_id): @property def toast_id(self): - """Gets the toast_id of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the toast_id of this P2pChatMessagePayload. # noqa: E501 Cancellation reason popup # noqa: E501 - :return: The toast_id of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The toast_id of this P2pChatMessagePayload. # noqa: E501 :rtype: int """ return self._toast_id @toast_id.setter def toast_id(self, toast_id): - """Sets the toast_id of this InlineResponse20024DataMsgObj. + """Sets the toast_id of this P2pChatMessagePayload. Cancellation reason popup # noqa: E501 - :param toast_id: The toast_id of this InlineResponse20024DataMsgObj. # noqa: E501 + :param toast_id: The toast_id of this P2pChatMessagePayload. # noqa: E501 :type: int """ @@ -270,22 +270,22 @@ def toast_id(self, toast_id): @property def reason_memo(self): - """Gets the reason_memo of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the reason_memo of this P2pChatMessagePayload. # noqa: E501 - Cancellation reason title # noqa: E501 + Cancel reason description. # noqa: E501 - :return: The reason_memo of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The reason_memo of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._reason_memo @reason_memo.setter def reason_memo(self, reason_memo): - """Sets the reason_memo of this InlineResponse20024DataMsgObj. + """Sets the reason_memo of this P2pChatMessagePayload. - Cancellation reason title # noqa: E501 + Cancel reason description. # noqa: E501 - :param reason_memo: The reason_memo of this InlineResponse20024DataMsgObj. # noqa: E501 + :param reason_memo: The reason_memo of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -293,22 +293,22 @@ def reason_memo(self, reason_memo): @property def cancel_time(self): - """Gets the cancel_time of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the cancel_time of this P2pChatMessagePayload. # noqa: E501 Cancellation time # noqa: E501 - :return: The cancel_time of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The cancel_time of this P2pChatMessagePayload. # noqa: E501 :rtype: int """ return self._cancel_time @cancel_time.setter def cancel_time(self, cancel_time): - """Sets the cancel_time of this InlineResponse20024DataMsgObj. + """Sets the cancel_time of this P2pChatMessagePayload. Cancellation time # noqa: E501 - :param cancel_time: The cancel_time of this InlineResponse20024DataMsgObj. # noqa: E501 + :param cancel_time: The cancel_time of this P2pChatMessagePayload. # noqa: E501 :type: int """ @@ -316,22 +316,22 @@ def cancel_time(self, cancel_time): @property def seller_confirm(self): - """Gets the seller_confirm of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the seller_confirm of this P2pChatMessagePayload. # noqa: E501 - Whether seller confirmed the reason # noqa: E501 + Seller confirmation of cancel reason: `0` pending; `1` confirmed; `2` rejected. # noqa: E501 - :return: The seller_confirm of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The seller_confirm of this P2pChatMessagePayload. # noqa: E501 :rtype: int """ return self._seller_confirm @seller_confirm.setter def seller_confirm(self, seller_confirm): - """Sets the seller_confirm of this InlineResponse20024DataMsgObj. + """Sets the seller_confirm of this P2pChatMessagePayload. - Whether seller confirmed the reason # noqa: E501 + Seller confirmation of cancel reason: `0` pending; `1` confirmed; `2` rejected. # noqa: E501 - :param seller_confirm: The seller_confirm of this InlineResponse20024DataMsgObj. # noqa: E501 + :param seller_confirm: The seller_confirm of this P2pChatMessagePayload. # noqa: E501 :type: int """ @@ -339,22 +339,22 @@ def seller_confirm(self, seller_confirm): @property def id(self): - """Gets the id of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the id of this P2pChatMessagePayload. # noqa: E501 Payment method information ID # noqa: E501 - :return: The id of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The id of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this InlineResponse20024DataMsgObj. + """Sets the id of this P2pChatMessagePayload. Payment method information ID # noqa: E501 - :param id: The id of this InlineResponse20024DataMsgObj. # noqa: E501 + :param id: The id of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -362,22 +362,22 @@ def id(self, id): @property def account_des(self): - """Gets the account_des of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the account_des of this P2pChatMessagePayload. # noqa: E501 Payment method description # noqa: E501 - :return: The account_des of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The account_des of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._account_des @account_des.setter def account_des(self, account_des): - """Sets the account_des of this InlineResponse20024DataMsgObj. + """Sets the account_des of this P2pChatMessagePayload. Payment method description # noqa: E501 - :param account_des: The account_des of this InlineResponse20024DataMsgObj. # noqa: E501 + :param account_des: The account_des of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -385,22 +385,22 @@ def account_des(self, account_des): @property def pay_type(self): - """Gets the pay_type of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the pay_type of this P2pChatMessagePayload. # noqa: E501 Payment method type # noqa: E501 - :return: The pay_type of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The pay_type of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._pay_type @pay_type.setter def pay_type(self, pay_type): - """Sets the pay_type of this InlineResponse20024DataMsgObj. + """Sets the pay_type of this P2pChatMessagePayload. Payment method type # noqa: E501 - :param pay_type: The pay_type of this InlineResponse20024DataMsgObj. # noqa: E501 + :param pay_type: The pay_type of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -408,22 +408,22 @@ def pay_type(self, pay_type): @property def file(self): - """Gets the file of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the file of this P2pChatMessagePayload. # noqa: E501 Payment method file link # noqa: E501 - :return: The file of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The file of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._file @file.setter def file(self, file): - """Sets the file of this InlineResponse20024DataMsgObj. + """Sets the file of this P2pChatMessagePayload. Payment method file link # noqa: E501 - :param file: The file of this InlineResponse20024DataMsgObj. # noqa: E501 + :param file: The file of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -431,22 +431,22 @@ def file(self, file): @property def file_key(self): - """Gets the file_key of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the file_key of this P2pChatMessagePayload. # noqa: E501 Payment method file key # noqa: E501 - :return: The file_key of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The file_key of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._file_key @file_key.setter def file_key(self, file_key): - """Sets the file_key of this InlineResponse20024DataMsgObj. + """Sets the file_key of this P2pChatMessagePayload. Payment method file key # noqa: E501 - :param file_key: The file_key of this InlineResponse20024DataMsgObj. # noqa: E501 + :param file_key: The file_key of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -454,22 +454,22 @@ def file_key(self, file_key): @property def account(self): - """Gets the account of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the account of this P2pChatMessagePayload. # noqa: E501 - Payment method name # noqa: E501 + Payment account or masked payment account. # noqa: E501 - :return: The account of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The account of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._account @account.setter def account(self, account): - """Sets the account of this InlineResponse20024DataMsgObj. + """Sets the account of this P2pChatMessagePayload. - Payment method name # noqa: E501 + Payment account or masked payment account. # noqa: E501 - :param account: The account of this InlineResponse20024DataMsgObj. # noqa: E501 + :param account: The account of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -477,22 +477,22 @@ def account(self, account): @property def memo(self): - """Gets the memo of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the memo of this P2pChatMessagePayload. # noqa: E501 Payment method note # noqa: E501 - :return: The memo of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The memo of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._memo @memo.setter def memo(self, memo): - """Sets the memo of this InlineResponse20024DataMsgObj. + """Sets the memo of this P2pChatMessagePayload. Payment method note # noqa: E501 - :param memo: The memo of this InlineResponse20024DataMsgObj. # noqa: E501 + :param memo: The memo of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -500,22 +500,22 @@ def memo(self, memo): @property def code(self): - """Gets the code of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the code of this P2pChatMessagePayload. # noqa: E501 Payment method code # noqa: E501 - :return: The code of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The code of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20024DataMsgObj. + """Sets the code of this P2pChatMessagePayload. Payment method code # noqa: E501 - :param code: The code of this InlineResponse20024DataMsgObj. # noqa: E501 + :param code: The code of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -523,22 +523,22 @@ def code(self, code): @property def memo_ext(self): - """Gets the memo_ext of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the memo_ext of this P2pChatMessagePayload. # noqa: E501 Payment method additional note # noqa: E501 - :return: The memo_ext of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The memo_ext of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._memo_ext @memo_ext.setter def memo_ext(self, memo_ext): - """Sets the memo_ext of this InlineResponse20024DataMsgObj. + """Sets the memo_ext of this P2pChatMessagePayload. Payment method additional note # noqa: E501 - :param memo_ext: The memo_ext of this InlineResponse20024DataMsgObj. # noqa: E501 + :param memo_ext: The memo_ext of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -546,22 +546,22 @@ def memo_ext(self, memo_ext): @property def trade_tips(self): - """Gets the trade_tips of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the trade_tips of this P2pChatMessagePayload. # noqa: E501 Payment method tip # noqa: E501 - :return: The trade_tips of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The trade_tips of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._trade_tips @trade_tips.setter def trade_tips(self, trade_tips): - """Sets the trade_tips of this InlineResponse20024DataMsgObj. + """Sets the trade_tips of this P2pChatMessagePayload. Payment method tip # noqa: E501 - :param trade_tips: The trade_tips of this InlineResponse20024DataMsgObj. # noqa: E501 + :param trade_tips: The trade_tips of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -569,22 +569,22 @@ def trade_tips(self, trade_tips): @property def real_name(self): - """Gets the real_name of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the real_name of this P2pChatMessagePayload. # noqa: E501 Payment method username # noqa: E501 - :return: The real_name of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The real_name of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._real_name @real_name.setter def real_name(self, real_name): - """Sets the real_name of this InlineResponse20024DataMsgObj. + """Sets the real_name of this P2pChatMessagePayload. Payment method username # noqa: E501 - :param real_name: The real_name of this InlineResponse20024DataMsgObj. # noqa: E501 + :param real_name: The real_name of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -592,22 +592,22 @@ def real_name(self, real_name): @property def is_delete(self): - """Gets the is_delete of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the is_delete of this P2pChatMessagePayload. # noqa: E501 - Whether deleted # noqa: E501 + Whether the payment method was deleted. `1`: deleted; `0`: not deleted. # noqa: E501 - :return: The is_delete of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The is_delete of this P2pChatMessagePayload. # noqa: E501 :rtype: int """ return self._is_delete @is_delete.setter def is_delete(self, is_delete): - """Sets the is_delete of this InlineResponse20024DataMsgObj. + """Sets the is_delete of this P2pChatMessagePayload. - Whether deleted # noqa: E501 + Whether the payment method was deleted. `1`: deleted; `0`: not deleted. # noqa: E501 - :param is_delete: The is_delete of this InlineResponse20024DataMsgObj. # noqa: E501 + :param is_delete: The is_delete of this P2pChatMessagePayload. # noqa: E501 :type: int """ @@ -615,22 +615,22 @@ def is_delete(self, is_delete): @property def pay_name(self): - """Gets the pay_name of this InlineResponse20024DataMsgObj. # noqa: E501 + """Gets the pay_name of this P2pChatMessagePayload. # noqa: E501 Payment method full name # noqa: E501 - :return: The pay_name of this InlineResponse20024DataMsgObj. # noqa: E501 + :return: The pay_name of this P2pChatMessagePayload. # noqa: E501 :rtype: str """ return self._pay_name @pay_name.setter def pay_name(self, pay_name): - """Sets the pay_name of this InlineResponse20024DataMsgObj. + """Sets the pay_name of this P2pChatMessagePayload. Payment method full name # noqa: E501 - :param pay_name: The pay_name of this InlineResponse20024DataMsgObj. # noqa: E501 + :param pay_name: The pay_name of this P2pChatMessagePayload. # noqa: E501 :type: str """ @@ -670,14 +670,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20024DataMsgObj): + if not isinstance(other, P2pChatMessagePayload): 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, InlineResponse20024DataMsgObj): + if not isinstance(other, P2pChatMessagePayload): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20015_data.py b/gate_api/models/p2p_counterparty_user_info.py similarity index 68% rename from gate_api/models/inline_response20015_data.py rename to gate_api/models/p2p_counterparty_user_info.py index b6d9acc4..3bc68d7e 100644 --- a/gate_api/models/inline_response20015_data.py +++ b/gate_api/models/p2p_counterparty_user_info.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20015Data(object): +class P2pCounterpartyUserInfo(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -78,7 +78,7 @@ class InlineResponse20015Data(object): def __init__(self, user_timest=None, email_verified=None, verified=None, has_phone=None, user_name=None, user_note=None, complete_transactions=None, paid_transactions=None, accepted_transactions=None, transactions_used_time=None, cancelled_used_time_month=None, complete_transactions_month=None, complete_rate_month=None, is_follow=None, have_traded=None, biz_uid=None, registration_days=None, first_trade_days=None, trade_versatile=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, str, str, str, float, int, int, str, int, int, bool, Configuration) -> None - """InlineResponse20015Data - a model defined in OpenAPI""" # noqa: E501 + """P2pCounterpartyUserInfo - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -145,22 +145,22 @@ def __init__(self, user_timest=None, email_verified=None, verified=None, has_pho @property def user_timest(self): - """Gets the user_timest of this InlineResponse20015Data. # noqa: E501 + """Gets the user_timest of this P2pCounterpartyUserInfo. # noqa: E501 User registration time (formatted string) # noqa: E501 - :return: The user_timest of this InlineResponse20015Data. # noqa: E501 + :return: The user_timest of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._user_timest @user_timest.setter def user_timest(self, user_timest): - """Sets the user_timest of this InlineResponse20015Data. + """Sets the user_timest of this P2pCounterpartyUserInfo. User registration time (formatted string) # noqa: E501 - :param user_timest: The user_timest of this InlineResponse20015Data. # noqa: E501 + :param user_timest: The user_timest of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -168,22 +168,22 @@ def user_timest(self, user_timest): @property def email_verified(self): - """Gets the email_verified of this InlineResponse20015Data. # noqa: E501 + """Gets the email_verified of this P2pCounterpartyUserInfo. # noqa: E501 - Whether email is verified # noqa: E501 + Whether email is verified. `1`: yes; `0`: no. # noqa: E501 - :return: The email_verified of this InlineResponse20015Data. # noqa: E501 + :return: The email_verified of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._email_verified @email_verified.setter def email_verified(self, email_verified): - """Sets the email_verified of this InlineResponse20015Data. + """Sets the email_verified of this P2pCounterpartyUserInfo. - Whether email is verified # noqa: E501 + Whether email is verified. `1`: yes; `0`: no. # noqa: E501 - :param email_verified: The email_verified of this InlineResponse20015Data. # noqa: E501 + :param email_verified: The email_verified of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -191,22 +191,22 @@ def email_verified(self, email_verified): @property def verified(self): - """Gets the verified of this InlineResponse20015Data. # noqa: E501 + """Gets the verified of this P2pCounterpartyUserInfo. # noqa: E501 - Whether KYC verification is completed # noqa: E501 + Whether KYC is completed. `1`: yes; `0`: no. # noqa: E501 - :return: The verified of this InlineResponse20015Data. # noqa: E501 + :return: The verified of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._verified @verified.setter def verified(self, verified): - """Sets the verified of this InlineResponse20015Data. + """Sets the verified of this P2pCounterpartyUserInfo. - Whether KYC verification is completed # noqa: E501 + Whether KYC is completed. `1`: yes; `0`: no. # noqa: E501 - :param verified: The verified of this InlineResponse20015Data. # noqa: E501 + :param verified: The verified of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -214,22 +214,22 @@ def verified(self, verified): @property def has_phone(self): - """Gets the has_phone of this InlineResponse20015Data. # noqa: E501 + """Gets the has_phone of this P2pCounterpartyUserInfo. # noqa: E501 - Whether phone is bound # noqa: E501 + Whether a phone number is bound. `1`: yes; `0`: no. # noqa: E501 - :return: The has_phone of this InlineResponse20015Data. # noqa: E501 + :return: The has_phone of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._has_phone @has_phone.setter def has_phone(self, has_phone): - """Sets the has_phone of this InlineResponse20015Data. + """Sets the has_phone of this P2pCounterpartyUserInfo. - Whether phone is bound # noqa: E501 + Whether a phone number is bound. `1`: yes; `0`: no. # noqa: E501 - :param has_phone: The has_phone of this InlineResponse20015Data. # noqa: E501 + :param has_phone: The has_phone of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -237,22 +237,22 @@ def has_phone(self, has_phone): @property def user_name(self): - """Gets the user_name of this InlineResponse20015Data. # noqa: E501 + """Gets the user_name of this P2pCounterpartyUserInfo. # noqa: E501 Username # noqa: E501 - :return: The user_name of this InlineResponse20015Data. # noqa: E501 + :return: The user_name of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._user_name @user_name.setter def user_name(self, user_name): - """Sets the user_name of this InlineResponse20015Data. + """Sets the user_name of this P2pCounterpartyUserInfo. Username # noqa: E501 - :param user_name: The user_name of this InlineResponse20015Data. # noqa: E501 + :param user_name: The user_name of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -260,22 +260,22 @@ def user_name(self, user_name): @property def user_note(self): - """Gets the user_note of this InlineResponse20015Data. # noqa: E501 + """Gets the user_note of this P2pCounterpartyUserInfo. # noqa: E501 User note information # noqa: E501 - :return: The user_note of this InlineResponse20015Data. # noqa: E501 + :return: The user_note of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._user_note @user_note.setter def user_note(self, user_note): - """Sets the user_note of this InlineResponse20015Data. + """Sets the user_note of this P2pCounterpartyUserInfo. User note information # noqa: E501 - :param user_note: The user_note of this InlineResponse20015Data. # noqa: E501 + :param user_note: The user_note of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -283,22 +283,22 @@ def user_note(self, user_note): @property def complete_transactions(self): - """Gets the complete_transactions of this InlineResponse20015Data. # noqa: E501 + """Gets the complete_transactions of this P2pCounterpartyUserInfo. # noqa: E501 Total completed orders # noqa: E501 - :return: The complete_transactions of this InlineResponse20015Data. # noqa: E501 + :return: The complete_transactions of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._complete_transactions @complete_transactions.setter def complete_transactions(self, complete_transactions): - """Sets the complete_transactions of this InlineResponse20015Data. + """Sets the complete_transactions of this P2pCounterpartyUserInfo. Total completed orders # noqa: E501 - :param complete_transactions: The complete_transactions of this InlineResponse20015Data. # noqa: E501 + :param complete_transactions: The complete_transactions of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -306,22 +306,22 @@ def complete_transactions(self, complete_transactions): @property def paid_transactions(self): - """Gets the paid_transactions of this InlineResponse20015Data. # noqa: E501 + """Gets the paid_transactions of this P2pCounterpartyUserInfo. # noqa: E501 Number of completed buy orders # noqa: E501 - :return: The paid_transactions of this InlineResponse20015Data. # noqa: E501 + :return: The paid_transactions of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._paid_transactions @paid_transactions.setter def paid_transactions(self, paid_transactions): - """Sets the paid_transactions of this InlineResponse20015Data. + """Sets the paid_transactions of this P2pCounterpartyUserInfo. Number of completed buy orders # noqa: E501 - :param paid_transactions: The paid_transactions of this InlineResponse20015Data. # noqa: E501 + :param paid_transactions: The paid_transactions of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -329,22 +329,22 @@ def paid_transactions(self, paid_transactions): @property def accepted_transactions(self): - """Gets the accepted_transactions of this InlineResponse20015Data. # noqa: E501 + """Gets the accepted_transactions of this P2pCounterpartyUserInfo. # noqa: E501 Number of completed sell orders # noqa: E501 - :return: The accepted_transactions of this InlineResponse20015Data. # noqa: E501 + :return: The accepted_transactions of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._accepted_transactions @accepted_transactions.setter def accepted_transactions(self, accepted_transactions): - """Sets the accepted_transactions of this InlineResponse20015Data. + """Sets the accepted_transactions of this P2pCounterpartyUserInfo. Number of completed sell orders # noqa: E501 - :param accepted_transactions: The accepted_transactions of this InlineResponse20015Data. # noqa: E501 + :param accepted_transactions: The accepted_transactions of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -352,22 +352,22 @@ def accepted_transactions(self, accepted_transactions): @property def transactions_used_time(self): - """Gets the transactions_used_time of this InlineResponse20015Data. # noqa: E501 + """Gets the transactions_used_time of this P2pCounterpartyUserInfo. # noqa: E501 Average time to confirm receipt # noqa: E501 - :return: The transactions_used_time of this InlineResponse20015Data. # noqa: E501 + :return: The transactions_used_time of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._transactions_used_time @transactions_used_time.setter def transactions_used_time(self, transactions_used_time): - """Sets the transactions_used_time of this InlineResponse20015Data. + """Sets the transactions_used_time of this P2pCounterpartyUserInfo. Average time to confirm receipt # noqa: E501 - :param transactions_used_time: The transactions_used_time of this InlineResponse20015Data. # noqa: E501 + :param transactions_used_time: The transactions_used_time of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -375,22 +375,22 @@ def transactions_used_time(self, transactions_used_time): @property def cancelled_used_time_month(self): - """Gets the cancelled_used_time_month of this InlineResponse20015Data. # noqa: E501 + """Gets the cancelled_used_time_month of this P2pCounterpartyUserInfo. # noqa: E501 Cancellation time in last 30 days # noqa: E501 - :return: The cancelled_used_time_month of this InlineResponse20015Data. # noqa: E501 + :return: The cancelled_used_time_month of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._cancelled_used_time_month @cancelled_used_time_month.setter def cancelled_used_time_month(self, cancelled_used_time_month): - """Sets the cancelled_used_time_month of this InlineResponse20015Data. + """Sets the cancelled_used_time_month of this P2pCounterpartyUserInfo. Cancellation time in last 30 days # noqa: E501 - :param cancelled_used_time_month: The cancelled_used_time_month of this InlineResponse20015Data. # noqa: E501 + :param cancelled_used_time_month: The cancelled_used_time_month of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -398,22 +398,22 @@ def cancelled_used_time_month(self, cancelled_used_time_month): @property def complete_transactions_month(self): - """Gets the complete_transactions_month of this InlineResponse20015Data. # noqa: E501 + """Gets the complete_transactions_month of this P2pCounterpartyUserInfo. # noqa: E501 Number of completed orders in last 30 days # noqa: E501 - :return: The complete_transactions_month of this InlineResponse20015Data. # noqa: E501 + :return: The complete_transactions_month of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._complete_transactions_month @complete_transactions_month.setter def complete_transactions_month(self, complete_transactions_month): - """Sets the complete_transactions_month of this InlineResponse20015Data. + """Sets the complete_transactions_month of this P2pCounterpartyUserInfo. Number of completed orders in last 30 days # noqa: E501 - :param complete_transactions_month: The complete_transactions_month of this InlineResponse20015Data. # noqa: E501 + :param complete_transactions_month: The complete_transactions_month of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -421,22 +421,22 @@ def complete_transactions_month(self, complete_transactions_month): @property def complete_rate_month(self): - """Gets the complete_rate_month of this InlineResponse20015Data. # noqa: E501 + """Gets the complete_rate_month of this P2pCounterpartyUserInfo. # noqa: E501 Completion rate in last 30 days # noqa: E501 - :return: The complete_rate_month of this InlineResponse20015Data. # noqa: E501 + :return: The complete_rate_month of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: float """ return self._complete_rate_month @complete_rate_month.setter def complete_rate_month(self, complete_rate_month): - """Sets the complete_rate_month of this InlineResponse20015Data. + """Sets the complete_rate_month of this P2pCounterpartyUserInfo. Completion rate in last 30 days # noqa: E501 - :param complete_rate_month: The complete_rate_month of this InlineResponse20015Data. # noqa: E501 + :param complete_rate_month: The complete_rate_month of this P2pCounterpartyUserInfo. # noqa: E501 :type: float """ @@ -444,22 +444,22 @@ def complete_rate_month(self, complete_rate_month): @property def is_follow(self): - """Gets the is_follow of this InlineResponse20015Data. # noqa: E501 + """Gets the is_follow of this P2pCounterpartyUserInfo. # noqa: E501 - Whether following # noqa: E501 + Whether you follow this user. `1`: yes; `0`: no. # noqa: E501 - :return: The is_follow of this InlineResponse20015Data. # noqa: E501 + :return: The is_follow of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: int """ return self._is_follow @is_follow.setter def is_follow(self, is_follow): - """Sets the is_follow of this InlineResponse20015Data. + """Sets the is_follow of this P2pCounterpartyUserInfo. - Whether following # noqa: E501 + Whether you follow this user. `1`: yes; `0`: no. # noqa: E501 - :param is_follow: The is_follow of this InlineResponse20015Data. # noqa: E501 + :param is_follow: The is_follow of this P2pCounterpartyUserInfo. # noqa: E501 :type: int """ @@ -467,22 +467,22 @@ def is_follow(self, is_follow): @property def have_traded(self): - """Gets the have_traded of this InlineResponse20015Data. # noqa: E501 + """Gets the have_traded of this P2pCounterpartyUserInfo. # noqa: E501 - Whether traded with self # noqa: E501 + Whether you have traded with this user before. `1`: yes; `0`: no. # noqa: E501 - :return: The have_traded of this InlineResponse20015Data. # noqa: E501 + :return: The have_traded of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: int """ return self._have_traded @have_traded.setter def have_traded(self, have_traded): - """Sets the have_traded of this InlineResponse20015Data. + """Sets the have_traded of this P2pCounterpartyUserInfo. - Whether traded with self # noqa: E501 + Whether you have traded with this user before. `1`: yes; `0`: no. # noqa: E501 - :param have_traded: The have_traded of this InlineResponse20015Data. # noqa: E501 + :param have_traded: The have_traded of this P2pCounterpartyUserInfo. # noqa: E501 :type: int """ @@ -490,22 +490,22 @@ def have_traded(self, have_traded): @property def biz_uid(self): - """Gets the biz_uid of this InlineResponse20015Data. # noqa: E501 + """Gets the biz_uid of this P2pCounterpartyUserInfo. # noqa: E501 Encrypted UID # noqa: E501 - :return: The biz_uid of this InlineResponse20015Data. # noqa: E501 + :return: The biz_uid of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: str """ return self._biz_uid @biz_uid.setter def biz_uid(self, biz_uid): - """Sets the biz_uid of this InlineResponse20015Data. + """Sets the biz_uid of this P2pCounterpartyUserInfo. Encrypted UID # noqa: E501 - :param biz_uid: The biz_uid of this InlineResponse20015Data. # noqa: E501 + :param biz_uid: The biz_uid of this P2pCounterpartyUserInfo. # noqa: E501 :type: str """ @@ -513,22 +513,22 @@ def biz_uid(self, biz_uid): @property def registration_days(self): - """Gets the registration_days of this InlineResponse20015Data. # noqa: E501 + """Gets the registration_days of this P2pCounterpartyUserInfo. # noqa: E501 Registration days # noqa: E501 - :return: The registration_days of this InlineResponse20015Data. # noqa: E501 + :return: The registration_days of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: int """ return self._registration_days @registration_days.setter def registration_days(self, registration_days): - """Sets the registration_days of this InlineResponse20015Data. + """Sets the registration_days of this P2pCounterpartyUserInfo. Registration days # noqa: E501 - :param registration_days: The registration_days of this InlineResponse20015Data. # noqa: E501 + :param registration_days: The registration_days of this P2pCounterpartyUserInfo. # noqa: E501 :type: int """ @@ -536,22 +536,22 @@ def registration_days(self, registration_days): @property def first_trade_days(self): - """Gets the first_trade_days of this InlineResponse20015Data. # noqa: E501 + """Gets the first_trade_days of this P2pCounterpartyUserInfo. # noqa: E501 Days since first trade # noqa: E501 - :return: The first_trade_days of this InlineResponse20015Data. # noqa: E501 + :return: The first_trade_days of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: int """ return self._first_trade_days @first_trade_days.setter def first_trade_days(self, first_trade_days): - """Sets the first_trade_days of this InlineResponse20015Data. + """Sets the first_trade_days of this P2pCounterpartyUserInfo. Days since first trade # noqa: E501 - :param first_trade_days: The first_trade_days of this InlineResponse20015Data. # noqa: E501 + :param first_trade_days: The first_trade_days of this P2pCounterpartyUserInfo. # noqa: E501 :type: int """ @@ -559,22 +559,22 @@ def first_trade_days(self, first_trade_days): @property def trade_versatile(self): - """Gets the trade_versatile of this InlineResponse20015Data. # noqa: E501 + """Gets the trade_versatile of this P2pCounterpartyUserInfo. # noqa: E501 Single user or composite user # noqa: E501 - :return: The trade_versatile of this InlineResponse20015Data. # noqa: E501 + :return: The trade_versatile of this P2pCounterpartyUserInfo. # noqa: E501 :rtype: bool """ return self._trade_versatile @trade_versatile.setter def trade_versatile(self, trade_versatile): - """Sets the trade_versatile of this InlineResponse20015Data. + """Sets the trade_versatile of this P2pCounterpartyUserInfo. Single user or composite user # noqa: E501 - :param trade_versatile: The trade_versatile of this InlineResponse20015Data. # noqa: E501 + :param trade_versatile: The trade_versatile of this P2pCounterpartyUserInfo. # noqa: E501 :type: bool """ @@ -614,14 +614,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20015Data): + if not isinstance(other, P2pCounterpartyUserInfo): 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, InlineResponse20015Data): + if not isinstance(other, P2pCounterpartyUserInfo): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_counterparty_user_info_response.py b/gate_api/models/p2p_counterparty_user_info_response.py new file mode 100644 index 00000000..43f23ea2 --- /dev/null +++ b/gate_api/models/p2p_counterparty_user_info_response.py @@ -0,0 +1,251 @@ +# 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 P2pCounterpartyUserInfoResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'P2pCounterpartyUserInfo', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, P2pCounterpartyUserInfo, str, Configuration) -> None + """P2pCounterpartyUserInfoResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pCounterpartyUserInfoResponse. # noqa: E501 + + + :return: The timestamp of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pCounterpartyUserInfoResponse. + + + :param timestamp: The timestamp of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pCounterpartyUserInfoResponse. # noqa: E501 + + + :return: The method of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pCounterpartyUserInfoResponse. + + + :param method: The method of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pCounterpartyUserInfoResponse. # noqa: E501 + + + :return: The code of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pCounterpartyUserInfoResponse. + + + :param code: The code of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pCounterpartyUserInfoResponse. # noqa: E501 + + + :return: The message of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pCounterpartyUserInfoResponse. + + + :param message: The message of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pCounterpartyUserInfoResponse. # noqa: E501 + + + :return: The data of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :rtype: P2pCounterpartyUserInfo + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pCounterpartyUserInfoResponse. + + + :param data: The data of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :type: P2pCounterpartyUserInfo + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pCounterpartyUserInfoResponse. # noqa: E501 + + + :return: The version of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pCounterpartyUserInfoResponse. + + + :param version: The version of this P2pCounterpartyUserInfoResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pCounterpartyUserInfoResponse): + 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, P2pCounterpartyUserInfoResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_merchant_books_place_biz_push_order_response.py b/gate_api/models/p2p_merchant_books_place_biz_push_order_response.py new file mode 100644 index 00000000..ef4e3aa4 --- /dev/null +++ b/gate_api/models/p2p_merchant_books_place_biz_push_order_response.py @@ -0,0 +1,261 @@ +# 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 P2pMerchantBooksPlaceBizPushOrderResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'P2pMerchantBooksPlaceBizPushOrderResponseData', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, P2pMerchantBooksPlaceBizPushOrderResponseData, str, Configuration) -> None + """P2pMerchantBooksPlaceBizPushOrderResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + + Response timestamp. # noqa: E501 + + :return: The timestamp of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pMerchantBooksPlaceBizPushOrderResponse. + + Response timestamp. # noqa: E501 + + :param timestamp: The timestamp of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + + Placeholder for request method. # noqa: E501 + + :return: The method of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pMerchantBooksPlaceBizPushOrderResponse. + + Placeholder for request method. # noqa: E501 + + :param method: The method of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + + Response code. 0 means success; 70305102 means the advertisement trade terms or auto reply hit off-platform traffic diversion risk control # noqa: E501 + + :return: The code of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pMerchantBooksPlaceBizPushOrderResponse. + + Response code. 0 means success; 70305102 means the advertisement trade terms or auto reply hit off-platform traffic diversion risk control # noqa: E501 + + :param code: The code of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pMerchantBooksPlaceBizPushOrderResponse. + + Response message # noqa: E501 + + :param message: The message of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + + + :return: The data of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :rtype: P2pMerchantBooksPlaceBizPushOrderResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pMerchantBooksPlaceBizPushOrderResponse. + + + :param data: The data of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :type: P2pMerchantBooksPlaceBizPushOrderResponseData + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + + API version. # noqa: E501 + + :return: The version of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pMerchantBooksPlaceBizPushOrderResponse. + + API version. # noqa: E501 + + :param version: The version of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pMerchantBooksPlaceBizPushOrderResponse): + 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, P2pMerchantBooksPlaceBizPushOrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20019.py b/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data.py similarity index 52% rename from gate_api/models/inline_response20019.py rename to gate_api/models/p2p_merchant_books_place_biz_push_order_response_data.py index 676d85f1..a0e64baf 100644 --- a/gate_api/models/inline_response20019.py +++ b/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20019(object): +class P2pMerchantBooksPlaceBizPushOrderResponseData(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,98 +33,74 @@ class InlineResponse20019(object): and the value is json key in definition. """ openapi_types = { - 'code': 'int', - 'message': 'str', - 'timestamp': 'int' + 'risk_code': 'int', + 'risk_event': 'P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent' } attribute_map = { - 'code': 'code', - 'message': 'message', - 'timestamp': 'timestamp' + 'risk_code': 'risk_code', + 'risk_event': 'risk_event' } - def __init__(self, code=None, message=None, timestamp=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, Configuration) -> None - """InlineResponse20019 - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, risk_code=None, risk_event=None, local_vars_configuration=None): # noqa: E501 + # type: (int, P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent, Configuration) -> None + """P2pMerchantBooksPlaceBizPushOrderResponseData - 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._code = None - self._message = None - self._timestamp = None + self._risk_code = None + self._risk_event = None self.discriminator = None - if code is not None: - self.code = code - if message is not None: - self.message = message - if timestamp is not None: - self.timestamp = timestamp + if risk_code is not None: + self.risk_code = risk_code + if risk_event is not None: + self.risk_event = risk_event @property - def code(self): - """Gets the code of this InlineResponse20019. # noqa: E501 + def risk_code(self): + """Gets the risk_code of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 + Risk control sub-code; 0 for advertisement content traffic diversion risk control # noqa: E501 - :return: The code of this InlineResponse20019. # noqa: E501 + :return: The risk_code of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 :rtype: int """ - return self._code + return self._risk_code - @code.setter - def code(self, code): - """Sets the code of this InlineResponse20019. + @risk_code.setter + def risk_code(self, risk_code): + """Sets the risk_code of this P2pMerchantBooksPlaceBizPushOrderResponseData. + Risk control sub-code; 0 for advertisement content traffic diversion risk control # noqa: E501 - :param code: The code of this InlineResponse20019. # noqa: E501 + :param risk_code: The risk_code of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 :type: int """ - self._code = code + self._risk_code = risk_code @property - def message(self): - """Gets the message of this InlineResponse20019. # noqa: E501 + def risk_event(self): + """Gets the risk_event of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 - :return: The message of this InlineResponse20019. # noqa: E501 - :rtype: str + :return: The risk_event of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 + :rtype: P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent """ - return self._message + return self._risk_event - @message.setter - def message(self, message): - """Sets the message of this InlineResponse20019. + @risk_event.setter + def risk_event(self, risk_event): + """Sets the risk_event of this P2pMerchantBooksPlaceBizPushOrderResponseData. - :param message: The message of this InlineResponse20019. # noqa: E501 - :type: str + :param risk_event: The risk_event of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 + :type: P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent """ - self._message = message - - @property - def timestamp(self): - """Gets the timestamp of this InlineResponse20019. # noqa: E501 - - - :return: The timestamp of this InlineResponse20019. # noqa: E501 - :rtype: int - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20019. - - - :param timestamp: The timestamp of this InlineResponse20019. # noqa: E501 - :type: int - """ - - self._timestamp = timestamp + self._risk_event = risk_event def to_dict(self): """Returns the model properties as a dict""" @@ -160,14 +136,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20019): + if not isinstance(other, P2pMerchantBooksPlaceBizPushOrderResponseData): 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, InlineResponse20019): + if not isinstance(other, P2pMerchantBooksPlaceBizPushOrderResponseData): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data_risk_event.py b/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data_risk_event.py new file mode 100644 index 00000000..084499d5 --- /dev/null +++ b/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data_risk_event.py @@ -0,0 +1,303 @@ +# 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 P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent(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', + 'title': 'str', + 'msg': 'str', + 'action': 'list[P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction]', + 'content_risk_type': 'str', + 'trade_tips': 'str', + 'auto_reply': 'str' + } + + attribute_map = { + 'type': 'type', + 'title': 'title', + 'msg': 'msg', + 'action': 'action', + 'content_risk_type': 'content_risk_type', + 'trade_tips': 'trade_tips', + 'auto_reply': 'auto_reply' + } + + def __init__(self, type=None, title=None, msg=None, action=None, content_risk_type=None, trade_tips=None, auto_reply=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, list[P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction], str, str, str, Configuration) -> None + """P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent - 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._title = None + self._msg = None + self._action = None + self._content_risk_type = None + self._trade_tips = None + self._auto_reply = None + self.discriminator = None + + if type is not None: + self.type = type + if title is not None: + self.title = title + if msg is not None: + self.msg = msg + if action is not None: + self.action = action + if content_risk_type is not None: + self.content_risk_type = content_risk_type + if trade_tips is not None: + self.trade_tips = trade_tips + if auto_reply is not None: + self.auto_reply = auto_reply + + @property + def type(self): + """Gets the type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + + Prompt display type # noqa: E501 + + :return: The type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. + + Prompt display type # noqa: E501 + + :param type: The type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :type: str + """ + allowed_values = ["modal"] # 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 + + @property + def title(self): + """Gets the title of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + + Risk control prompt title # noqa: E501 + + :return: The title of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. + + Risk control prompt title # noqa: E501 + + :param title: The title of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def msg(self): + """Gets the msg of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + + Risk control prompt message generated based on the field that hit risk control # noqa: E501 + + :return: The msg of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :rtype: str + """ + return self._msg + + @msg.setter + def msg(self, msg): + """Sets the msg of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. + + Risk control prompt message generated based on the field that hit risk control # noqa: E501 + + :param msg: The msg of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :type: str + """ + + self._msg = msg + + @property + def action(self): + """Gets the action of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + + Available actions; advertisement content risk control only returns the close action # noqa: E501 + + :return: The action of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :rtype: list[P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction] + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. + + Available actions; advertisement content risk control only returns the close action # noqa: E501 + + :param action: The action of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :type: list[P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction] + """ + + self._action = action + + @property + def content_risk_type(self): + """Gets the content_risk_type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + + Advertisement content field that hit risk control # noqa: E501 + + :return: The content_risk_type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :rtype: str + """ + return self._content_risk_type + + @content_risk_type.setter + def content_risk_type(self, content_risk_type): + """Sets the content_risk_type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. + + Advertisement content field that hit risk control # noqa: E501 + + :param content_risk_type: The content_risk_type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :type: str + """ + allowed_values = ["trade_tips", "auto_reply", "trade_tips_auto_reply"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and content_risk_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `content_risk_type` ({0}), must be one of {1}" # noqa: E501 + .format(content_risk_type, allowed_values) + ) + + self._content_risk_type = content_risk_type + + @property + def trade_tips(self): + """Gets the trade_tips of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + + Prompt message returned when the trade terms hit risk control # noqa: E501 + + :return: The trade_tips of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :rtype: str + """ + return self._trade_tips + + @trade_tips.setter + def trade_tips(self, trade_tips): + """Sets the trade_tips of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. + + Prompt message returned when the trade terms hit risk control # noqa: E501 + + :param trade_tips: The trade_tips of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :type: str + """ + + self._trade_tips = trade_tips + + @property + def auto_reply(self): + """Gets the auto_reply of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + + Prompt message returned when the auto reply hits risk control # noqa: E501 + + :return: The auto_reply of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :rtype: str + """ + return self._auto_reply + + @auto_reply.setter + def auto_reply(self, auto_reply): + """Sets the auto_reply of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. + + Prompt message returned when the auto reply hits risk control # noqa: E501 + + :param auto_reply: The auto_reply of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent. # noqa: E501 + :type: str + """ + + self._auto_reply = auto_reply + + 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, P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent): + 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, P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data_risk_event_action.py b/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data_risk_event_action.py new file mode 100644 index 00000000..b2aaf271 --- /dev/null +++ b/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data_risk_event_action.py @@ -0,0 +1,219 @@ +# 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 P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction(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 = { + 'action_type': 'str', + 'title': 'str', + 'mainly': 'int', + 'action_data': 'object' + } + + attribute_map = { + 'action_type': 'action_type', + 'title': 'title', + 'mainly': 'mainly', + 'action_data': 'action_data' + } + + def __init__(self, action_type=None, title=None, mainly=None, action_data=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, object, Configuration) -> None + """P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction - 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._action_type = None + self._title = None + self._mainly = None + self._action_data = None + self.discriminator = None + + if action_type is not None: + self.action_type = action_type + if title is not None: + self.title = title + if mainly is not None: + self.mainly = mainly + if action_data is not None: + self.action_data = action_data + + @property + def action_type(self): + """Gets the action_type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + + Action type # noqa: E501 + + :return: The action_type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + :rtype: str + """ + return self._action_type + + @action_type.setter + def action_type(self, action_type): + """Sets the action_type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. + + Action type # noqa: E501 + + :param action_type: The action_type of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + :type: str + """ + allowed_values = ["close"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and action_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `action_type` ({0}), must be one of {1}" # noqa: E501 + .format(action_type, allowed_values) + ) + + self._action_type = action_type + + @property + def title(self): + """Gets the title of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + + Action button text # noqa: E501 + + :return: The title of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. + + Action button text # noqa: E501 + + :param title: The title of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def mainly(self): + """Gets the mainly of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + + Whether it is the primary action. 0: no # noqa: E501 + + :return: The mainly of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + :rtype: int + """ + return self._mainly + + @mainly.setter + def mainly(self, mainly): + """Sets the mainly of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. + + Whether it is the primary action. 0: no # noqa: E501 + + :param mainly: The mainly of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + :type: int + """ + allowed_values = [0] # noqa: E501 + if self.local_vars_configuration.client_side_validation and mainly not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `mainly` ({0}), must be one of {1}" # noqa: E501 + .format(mainly, allowed_values) + ) + + self._mainly = mainly + + @property + def action_data(self): + """Gets the action_data of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + + Additional data of the action; empty object for the close action # noqa: E501 + + :return: The action_data of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + :rtype: object + """ + return self._action_data + + @action_data.setter + def action_data(self, action_data): + """Sets the action_data of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. + + Additional data of the action; empty object for the close action # noqa: E501 + + :param action_data: The action_data of this P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction. # noqa: E501 + :type: object + """ + + self._action_data = action_data + + 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, P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction): + 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, P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20014_data_merchant_info.py b/gate_api/models/p2p_merchant_market_info.py similarity index 77% rename from gate_api/models/inline_response20014_data_merchant_info.py rename to gate_api/models/p2p_merchant_market_info.py index 20f3acf8..64056353 100644 --- a/gate_api/models/inline_response20014_data_merchant_info.py +++ b/gate_api/models/p2p_merchant_market_info.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20014DataMerchantInfo(object): +class P2pMerchantMarketInfo(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse20014DataMerchantInfo(object): def __init__(self, type=None, market=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """InlineResponse20014DataMerchantInfo - a model defined in OpenAPI""" # noqa: E501 + """P2pMerchantMarketInfo - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -60,20 +60,20 @@ def __init__(self, type=None, market=None, local_vars_configuration=None): # no @property def type(self): - """Gets the type of this InlineResponse20014DataMerchantInfo. # noqa: E501 + """Gets the type of this P2pMerchantMarketInfo. # noqa: E501 - :return: The type of this InlineResponse20014DataMerchantInfo. # noqa: E501 + :return: The type of this P2pMerchantMarketInfo. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this InlineResponse20014DataMerchantInfo. + """Sets the type of this P2pMerchantMarketInfo. - :param type: The type of this InlineResponse20014DataMerchantInfo. # noqa: E501 + :param type: The type of this P2pMerchantMarketInfo. # noqa: E501 :type: str """ @@ -81,20 +81,20 @@ def type(self, type): @property def market(self): - """Gets the market of this InlineResponse20014DataMerchantInfo. # noqa: E501 + """Gets the market of this P2pMerchantMarketInfo. # noqa: E501 - :return: The market of this InlineResponse20014DataMerchantInfo. # noqa: E501 + :return: The market of this P2pMerchantMarketInfo. # noqa: E501 :rtype: str """ return self._market @market.setter def market(self, market): - """Sets the market of this InlineResponse20014DataMerchantInfo. + """Sets the market of this P2pMerchantMarketInfo. - :param market: The market of this InlineResponse20014DataMerchantInfo. # noqa: E501 + :param market: The market of this P2pMerchantMarketInfo. # noqa: E501 :type: str """ @@ -134,14 +134,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20014DataMerchantInfo): + if not isinstance(other, P2pMerchantMarketInfo): 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, InlineResponse20014DataMerchantInfo): + if not isinstance(other, P2pMerchantMarketInfo): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20014_data.py b/gate_api/models/p2p_merchant_user_info.py similarity index 66% rename from gate_api/models/inline_response20014_data.py rename to gate_api/models/p2p_merchant_user_info.py index 2396010c..05f87c5c 100644 --- a/gate_api/models/inline_response20014_data.py +++ b/gate_api/models/p2p_merchant_user_info.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20014Data(object): +class P2pMerchantUserInfo(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -58,7 +58,7 @@ class InlineResponse20014Data(object): 'registration_days': 'int', 'first_trade_days': 'int', 'need_replenish': 'int', - 'merchant_info': 'InlineResponse20014DataMerchantInfo', + 'merchant_info': 'P2pMerchantMarketInfo', 'online_status': 'int', 'work_hours': 'object', 'transactions_month': 'float', @@ -101,8 +101,8 @@ class InlineResponse20014Data(object): } def __init__(self, is_self=None, user_timest=None, counterparties_num=None, email_verified=None, verified=None, has_phone=None, user_name=None, user_note=None, complete_transactions=None, paid_transactions=None, accepted_transactions=None, transactions_used_time=None, cancelled_used_time_month=None, complete_transactions_month=None, complete_rate_month=None, orders_buy_rate_month=None, is_black=None, is_follow=None, have_traded=None, biz_uid=None, blue_vip=None, work_status=None, registration_days=None, first_trade_days=None, need_replenish=None, merchant_info=None, online_status=None, work_hours=None, transactions_month=None, transactions_all=None, trade_versatile=None, local_vars_configuration=None): # noqa: E501 - # type: (bool, str, int, str, str, str, str, str, str, str, str, str, str, str, float, float, int, int, int, str, int, int, int, int, int, InlineResponse20014DataMerchantInfo, int, object, float, float, bool, Configuration) -> None - """InlineResponse20014Data - a model defined in OpenAPI""" # noqa: E501 + # type: (bool, str, int, str, str, str, str, str, str, str, str, str, str, str, float, float, int, int, int, str, int, int, int, int, int, P2pMerchantMarketInfo, int, object, float, float, bool, Configuration) -> None + """P2pMerchantUserInfo - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -204,22 +204,22 @@ def __init__(self, is_self=None, user_timest=None, counterparties_num=None, emai @property def is_self(self): - """Gets the is_self of this InlineResponse20014Data. # noqa: E501 + """Gets the is_self of this P2pMerchantUserInfo. # noqa: E501 Whether self # noqa: E501 - :return: The is_self of this InlineResponse20014Data. # noqa: E501 + :return: The is_self of this P2pMerchantUserInfo. # noqa: E501 :rtype: bool """ return self._is_self @is_self.setter def is_self(self, is_self): - """Sets the is_self of this InlineResponse20014Data. + """Sets the is_self of this P2pMerchantUserInfo. Whether self # noqa: E501 - :param is_self: The is_self of this InlineResponse20014Data. # noqa: E501 + :param is_self: The is_self of this P2pMerchantUserInfo. # noqa: E501 :type: bool """ @@ -227,22 +227,22 @@ def is_self(self, is_self): @property def user_timest(self): - """Gets the user_timest of this InlineResponse20014Data. # noqa: E501 + """Gets the user_timest of this P2pMerchantUserInfo. # noqa: E501 User registration time (formatted string) # noqa: E501 - :return: The user_timest of this InlineResponse20014Data. # noqa: E501 + :return: The user_timest of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._user_timest @user_timest.setter def user_timest(self, user_timest): - """Sets the user_timest of this InlineResponse20014Data. + """Sets the user_timest of this P2pMerchantUserInfo. User registration time (formatted string) # noqa: E501 - :param user_timest: The user_timest of this InlineResponse20014Data. # noqa: E501 + :param user_timest: The user_timest of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -250,22 +250,22 @@ def user_timest(self, user_timest): @property def counterparties_num(self): - """Gets the counterparties_num of this InlineResponse20014Data. # noqa: E501 + """Gets the counterparties_num of this P2pMerchantUserInfo. # noqa: E501 Number of counterparties # noqa: E501 - :return: The counterparties_num of this InlineResponse20014Data. # noqa: E501 + :return: The counterparties_num of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._counterparties_num @counterparties_num.setter def counterparties_num(self, counterparties_num): - """Sets the counterparties_num of this InlineResponse20014Data. + """Sets the counterparties_num of this P2pMerchantUserInfo. Number of counterparties # noqa: E501 - :param counterparties_num: The counterparties_num of this InlineResponse20014Data. # noqa: E501 + :param counterparties_num: The counterparties_num of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -273,22 +273,22 @@ def counterparties_num(self, counterparties_num): @property def email_verified(self): - """Gets the email_verified of this InlineResponse20014Data. # noqa: E501 + """Gets the email_verified of this P2pMerchantUserInfo. # noqa: E501 - Whether email is verified # noqa: E501 + Whether email is verified. `1`: yes; `0`: no. # noqa: E501 - :return: The email_verified of this InlineResponse20014Data. # noqa: E501 + :return: The email_verified of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._email_verified @email_verified.setter def email_verified(self, email_verified): - """Sets the email_verified of this InlineResponse20014Data. + """Sets the email_verified of this P2pMerchantUserInfo. - Whether email is verified # noqa: E501 + Whether email is verified. `1`: yes; `0`: no. # noqa: E501 - :param email_verified: The email_verified of this InlineResponse20014Data. # noqa: E501 + :param email_verified: The email_verified of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -296,22 +296,22 @@ def email_verified(self, email_verified): @property def verified(self): - """Gets the verified of this InlineResponse20014Data. # noqa: E501 + """Gets the verified of this P2pMerchantUserInfo. # noqa: E501 - Whether KYC verification is completed # noqa: E501 + Whether KYC is completed. `1`: yes; `0`: no. # noqa: E501 - :return: The verified of this InlineResponse20014Data. # noqa: E501 + :return: The verified of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._verified @verified.setter def verified(self, verified): - """Sets the verified of this InlineResponse20014Data. + """Sets the verified of this P2pMerchantUserInfo. - Whether KYC verification is completed # noqa: E501 + Whether KYC is completed. `1`: yes; `0`: no. # noqa: E501 - :param verified: The verified of this InlineResponse20014Data. # noqa: E501 + :param verified: The verified of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -319,22 +319,22 @@ def verified(self, verified): @property def has_phone(self): - """Gets the has_phone of this InlineResponse20014Data. # noqa: E501 + """Gets the has_phone of this P2pMerchantUserInfo. # noqa: E501 - Whether phone is bound # noqa: E501 + Whether a phone number is bound. `1`: yes; `0`: no. # noqa: E501 - :return: The has_phone of this InlineResponse20014Data. # noqa: E501 + :return: The has_phone of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._has_phone @has_phone.setter def has_phone(self, has_phone): - """Sets the has_phone of this InlineResponse20014Data. + """Sets the has_phone of this P2pMerchantUserInfo. - Whether phone is bound # noqa: E501 + Whether a phone number is bound. `1`: yes; `0`: no. # noqa: E501 - :param has_phone: The has_phone of this InlineResponse20014Data. # noqa: E501 + :param has_phone: The has_phone of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -342,22 +342,22 @@ def has_phone(self, has_phone): @property def user_name(self): - """Gets the user_name of this InlineResponse20014Data. # noqa: E501 + """Gets the user_name of this P2pMerchantUserInfo. # noqa: E501 Username # noqa: E501 - :return: The user_name of this InlineResponse20014Data. # noqa: E501 + :return: The user_name of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._user_name @user_name.setter def user_name(self, user_name): - """Sets the user_name of this InlineResponse20014Data. + """Sets the user_name of this P2pMerchantUserInfo. Username # noqa: E501 - :param user_name: The user_name of this InlineResponse20014Data. # noqa: E501 + :param user_name: The user_name of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -365,22 +365,22 @@ def user_name(self, user_name): @property def user_note(self): - """Gets the user_note of this InlineResponse20014Data. # noqa: E501 + """Gets the user_note of this P2pMerchantUserInfo. # noqa: E501 User note information # noqa: E501 - :return: The user_note of this InlineResponse20014Data. # noqa: E501 + :return: The user_note of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._user_note @user_note.setter def user_note(self, user_note): - """Sets the user_note of this InlineResponse20014Data. + """Sets the user_note of this P2pMerchantUserInfo. User note information # noqa: E501 - :param user_note: The user_note of this InlineResponse20014Data. # noqa: E501 + :param user_note: The user_note of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -388,22 +388,22 @@ def user_note(self, user_note): @property def complete_transactions(self): - """Gets the complete_transactions of this InlineResponse20014Data. # noqa: E501 + """Gets the complete_transactions of this P2pMerchantUserInfo. # noqa: E501 Total completed orders # noqa: E501 - :return: The complete_transactions of this InlineResponse20014Data. # noqa: E501 + :return: The complete_transactions of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._complete_transactions @complete_transactions.setter def complete_transactions(self, complete_transactions): - """Sets the complete_transactions of this InlineResponse20014Data. + """Sets the complete_transactions of this P2pMerchantUserInfo. Total completed orders # noqa: E501 - :param complete_transactions: The complete_transactions of this InlineResponse20014Data. # noqa: E501 + :param complete_transactions: The complete_transactions of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -411,22 +411,22 @@ def complete_transactions(self, complete_transactions): @property def paid_transactions(self): - """Gets the paid_transactions of this InlineResponse20014Data. # noqa: E501 + """Gets the paid_transactions of this P2pMerchantUserInfo. # noqa: E501 Number of completed buy orders # noqa: E501 - :return: The paid_transactions of this InlineResponse20014Data. # noqa: E501 + :return: The paid_transactions of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._paid_transactions @paid_transactions.setter def paid_transactions(self, paid_transactions): - """Sets the paid_transactions of this InlineResponse20014Data. + """Sets the paid_transactions of this P2pMerchantUserInfo. Number of completed buy orders # noqa: E501 - :param paid_transactions: The paid_transactions of this InlineResponse20014Data. # noqa: E501 + :param paid_transactions: The paid_transactions of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -434,22 +434,22 @@ def paid_transactions(self, paid_transactions): @property def accepted_transactions(self): - """Gets the accepted_transactions of this InlineResponse20014Data. # noqa: E501 + """Gets the accepted_transactions of this P2pMerchantUserInfo. # noqa: E501 Number of completed sell orders # noqa: E501 - :return: The accepted_transactions of this InlineResponse20014Data. # noqa: E501 + :return: The accepted_transactions of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._accepted_transactions @accepted_transactions.setter def accepted_transactions(self, accepted_transactions): - """Sets the accepted_transactions of this InlineResponse20014Data. + """Sets the accepted_transactions of this P2pMerchantUserInfo. Number of completed sell orders # noqa: E501 - :param accepted_transactions: The accepted_transactions of this InlineResponse20014Data. # noqa: E501 + :param accepted_transactions: The accepted_transactions of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -457,22 +457,22 @@ def accepted_transactions(self, accepted_transactions): @property def transactions_used_time(self): - """Gets the transactions_used_time of this InlineResponse20014Data. # noqa: E501 + """Gets the transactions_used_time of this P2pMerchantUserInfo. # noqa: E501 Average time to confirm receipt # noqa: E501 - :return: The transactions_used_time of this InlineResponse20014Data. # noqa: E501 + :return: The transactions_used_time of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._transactions_used_time @transactions_used_time.setter def transactions_used_time(self, transactions_used_time): - """Sets the transactions_used_time of this InlineResponse20014Data. + """Sets the transactions_used_time of this P2pMerchantUserInfo. Average time to confirm receipt # noqa: E501 - :param transactions_used_time: The transactions_used_time of this InlineResponse20014Data. # noqa: E501 + :param transactions_used_time: The transactions_used_time of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -480,22 +480,22 @@ def transactions_used_time(self, transactions_used_time): @property def cancelled_used_time_month(self): - """Gets the cancelled_used_time_month of this InlineResponse20014Data. # noqa: E501 + """Gets the cancelled_used_time_month of this P2pMerchantUserInfo. # noqa: E501 Cancellation time in last 30 days # noqa: E501 - :return: The cancelled_used_time_month of this InlineResponse20014Data. # noqa: E501 + :return: The cancelled_used_time_month of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._cancelled_used_time_month @cancelled_used_time_month.setter def cancelled_used_time_month(self, cancelled_used_time_month): - """Sets the cancelled_used_time_month of this InlineResponse20014Data. + """Sets the cancelled_used_time_month of this P2pMerchantUserInfo. Cancellation time in last 30 days # noqa: E501 - :param cancelled_used_time_month: The cancelled_used_time_month of this InlineResponse20014Data. # noqa: E501 + :param cancelled_used_time_month: The cancelled_used_time_month of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -503,22 +503,22 @@ def cancelled_used_time_month(self, cancelled_used_time_month): @property def complete_transactions_month(self): - """Gets the complete_transactions_month of this InlineResponse20014Data. # noqa: E501 + """Gets the complete_transactions_month of this P2pMerchantUserInfo. # noqa: E501 Number of completed orders in last 30 days # noqa: E501 - :return: The complete_transactions_month of this InlineResponse20014Data. # noqa: E501 + :return: The complete_transactions_month of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._complete_transactions_month @complete_transactions_month.setter def complete_transactions_month(self, complete_transactions_month): - """Sets the complete_transactions_month of this InlineResponse20014Data. + """Sets the complete_transactions_month of this P2pMerchantUserInfo. Number of completed orders in last 30 days # noqa: E501 - :param complete_transactions_month: The complete_transactions_month of this InlineResponse20014Data. # noqa: E501 + :param complete_transactions_month: The complete_transactions_month of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -526,22 +526,22 @@ def complete_transactions_month(self, complete_transactions_month): @property def complete_rate_month(self): - """Gets the complete_rate_month of this InlineResponse20014Data. # noqa: E501 + """Gets the complete_rate_month of this P2pMerchantUserInfo. # noqa: E501 Completion rate in last 30 days # noqa: E501 - :return: The complete_rate_month of this InlineResponse20014Data. # noqa: E501 + :return: The complete_rate_month of this P2pMerchantUserInfo. # noqa: E501 :rtype: float """ return self._complete_rate_month @complete_rate_month.setter def complete_rate_month(self, complete_rate_month): - """Sets the complete_rate_month of this InlineResponse20014Data. + """Sets the complete_rate_month of this P2pMerchantUserInfo. Completion rate in last 30 days # noqa: E501 - :param complete_rate_month: The complete_rate_month of this InlineResponse20014Data. # noqa: E501 + :param complete_rate_month: The complete_rate_month of this P2pMerchantUserInfo. # noqa: E501 :type: float """ @@ -549,22 +549,22 @@ def complete_rate_month(self, complete_rate_month): @property def orders_buy_rate_month(self): - """Gets the orders_buy_rate_month of this InlineResponse20014Data. # noqa: E501 + """Gets the orders_buy_rate_month of this P2pMerchantUserInfo. # noqa: E501 Buy order ratio in last 30 days # noqa: E501 - :return: The orders_buy_rate_month of this InlineResponse20014Data. # noqa: E501 + :return: The orders_buy_rate_month of this P2pMerchantUserInfo. # noqa: E501 :rtype: float """ return self._orders_buy_rate_month @orders_buy_rate_month.setter def orders_buy_rate_month(self, orders_buy_rate_month): - """Sets the orders_buy_rate_month of this InlineResponse20014Data. + """Sets the orders_buy_rate_month of this P2pMerchantUserInfo. Buy order ratio in last 30 days # noqa: E501 - :param orders_buy_rate_month: The orders_buy_rate_month of this InlineResponse20014Data. # noqa: E501 + :param orders_buy_rate_month: The orders_buy_rate_month of this P2pMerchantUserInfo. # noqa: E501 :type: float """ @@ -572,22 +572,22 @@ def orders_buy_rate_month(self, orders_buy_rate_month): @property def is_black(self): - """Gets the is_black of this InlineResponse20014Data. # noqa: E501 + """Gets the is_black of this P2pMerchantUserInfo. # noqa: E501 - Whether blocked # noqa: E501 + Whether the user is blocked. `1`: yes; `0`: no. # noqa: E501 - :return: The is_black of this InlineResponse20014Data. # noqa: E501 + :return: The is_black of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._is_black @is_black.setter def is_black(self, is_black): - """Sets the is_black of this InlineResponse20014Data. + """Sets the is_black of this P2pMerchantUserInfo. - Whether blocked # noqa: E501 + Whether the user is blocked. `1`: yes; `0`: no. # noqa: E501 - :param is_black: The is_black of this InlineResponse20014Data. # noqa: E501 + :param is_black: The is_black of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -595,22 +595,22 @@ def is_black(self, is_black): @property def is_follow(self): - """Gets the is_follow of this InlineResponse20014Data. # noqa: E501 + """Gets the is_follow of this P2pMerchantUserInfo. # noqa: E501 - Whether following # noqa: E501 + Whether you follow this user. `1`: yes; `0`: no. # noqa: E501 - :return: The is_follow of this InlineResponse20014Data. # noqa: E501 + :return: The is_follow of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._is_follow @is_follow.setter def is_follow(self, is_follow): - """Sets the is_follow of this InlineResponse20014Data. + """Sets the is_follow of this P2pMerchantUserInfo. - Whether following # noqa: E501 + Whether you follow this user. `1`: yes; `0`: no. # noqa: E501 - :param is_follow: The is_follow of this InlineResponse20014Data. # noqa: E501 + :param is_follow: The is_follow of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -618,22 +618,22 @@ def is_follow(self, is_follow): @property def have_traded(self): - """Gets the have_traded of this InlineResponse20014Data. # noqa: E501 + """Gets the have_traded of this P2pMerchantUserInfo. # noqa: E501 - Whether traded with self # noqa: E501 + Whether you have traded with this user before. `1`: yes; `0`: no. # noqa: E501 - :return: The have_traded of this InlineResponse20014Data. # noqa: E501 + :return: The have_traded of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._have_traded @have_traded.setter def have_traded(self, have_traded): - """Sets the have_traded of this InlineResponse20014Data. + """Sets the have_traded of this P2pMerchantUserInfo. - Whether traded with self # noqa: E501 + Whether you have traded with this user before. `1`: yes; `0`: no. # noqa: E501 - :param have_traded: The have_traded of this InlineResponse20014Data. # noqa: E501 + :param have_traded: The have_traded of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -641,22 +641,22 @@ def have_traded(self, have_traded): @property def biz_uid(self): - """Gets the biz_uid of this InlineResponse20014Data. # noqa: E501 + """Gets the biz_uid of this P2pMerchantUserInfo. # noqa: E501 Encrypted UID # noqa: E501 - :return: The biz_uid of this InlineResponse20014Data. # noqa: E501 + :return: The biz_uid of this P2pMerchantUserInfo. # noqa: E501 :rtype: str """ return self._biz_uid @biz_uid.setter def biz_uid(self, biz_uid): - """Sets the biz_uid of this InlineResponse20014Data. + """Sets the biz_uid of this P2pMerchantUserInfo. Encrypted UID # noqa: E501 - :param biz_uid: The biz_uid of this InlineResponse20014Data. # noqa: E501 + :param biz_uid: The biz_uid of this P2pMerchantUserInfo. # noqa: E501 :type: str """ @@ -664,22 +664,22 @@ def biz_uid(self, biz_uid): @property def blue_vip(self): - """Gets the blue_vip of this InlineResponse20014Data. # noqa: E501 + """Gets the blue_vip of this P2pMerchantUserInfo. # noqa: E501 Blue V Crown Shield # noqa: E501 - :return: The blue_vip of this InlineResponse20014Data. # noqa: E501 + :return: The blue_vip of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._blue_vip @blue_vip.setter def blue_vip(self, blue_vip): - """Sets the blue_vip of this InlineResponse20014Data. + """Sets the blue_vip of this P2pMerchantUserInfo. Blue V Crown Shield # noqa: E501 - :param blue_vip: The blue_vip of this InlineResponse20014Data. # noqa: E501 + :param blue_vip: The blue_vip of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -687,22 +687,22 @@ def blue_vip(self, blue_vip): @property def work_status(self): - """Gets the work_status of this InlineResponse20014Data. # noqa: E501 + """Gets the work_status of this P2pMerchantUserInfo. # noqa: E501 Merchant work status # noqa: E501 - :return: The work_status of this InlineResponse20014Data. # noqa: E501 + :return: The work_status of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._work_status @work_status.setter def work_status(self, work_status): - """Sets the work_status of this InlineResponse20014Data. + """Sets the work_status of this P2pMerchantUserInfo. Merchant work status # noqa: E501 - :param work_status: The work_status of this InlineResponse20014Data. # noqa: E501 + :param work_status: The work_status of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -710,22 +710,22 @@ def work_status(self, work_status): @property def registration_days(self): - """Gets the registration_days of this InlineResponse20014Data. # noqa: E501 + """Gets the registration_days of this P2pMerchantUserInfo. # noqa: E501 Registration days # noqa: E501 - :return: The registration_days of this InlineResponse20014Data. # noqa: E501 + :return: The registration_days of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._registration_days @registration_days.setter def registration_days(self, registration_days): - """Sets the registration_days of this InlineResponse20014Data. + """Sets the registration_days of this P2pMerchantUserInfo. Registration days # noqa: E501 - :param registration_days: The registration_days of this InlineResponse20014Data. # noqa: E501 + :param registration_days: The registration_days of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -733,22 +733,22 @@ def registration_days(self, registration_days): @property def first_trade_days(self): - """Gets the first_trade_days of this InlineResponse20014Data. # noqa: E501 + """Gets the first_trade_days of this P2pMerchantUserInfo. # noqa: E501 Days since first trade # noqa: E501 - :return: The first_trade_days of this InlineResponse20014Data. # noqa: E501 + :return: The first_trade_days of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._first_trade_days @first_trade_days.setter def first_trade_days(self, first_trade_days): - """Sets the first_trade_days of this InlineResponse20014Data. + """Sets the first_trade_days of this P2pMerchantUserInfo. Days since first trade # noqa: E501 - :param first_trade_days: The first_trade_days of this InlineResponse20014Data. # noqa: E501 + :param first_trade_days: The first_trade_days of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -756,22 +756,22 @@ def first_trade_days(self, first_trade_days): @property def need_replenish(self): - """Gets the need_replenish of this InlineResponse20014Data. # noqa: E501 + """Gets the need_replenish of this P2pMerchantUserInfo. # noqa: E501 - Whether margin replenishment is needed # noqa: E501 + Whether additional margin is required. `1`: yes; `0`: no. # noqa: E501 - :return: The need_replenish of this InlineResponse20014Data. # noqa: E501 + :return: The need_replenish of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._need_replenish @need_replenish.setter def need_replenish(self, need_replenish): - """Sets the need_replenish of this InlineResponse20014Data. + """Sets the need_replenish of this P2pMerchantUserInfo. - Whether margin replenishment is needed # noqa: E501 + Whether additional margin is required. `1`: yes; `0`: no. # noqa: E501 - :param need_replenish: The need_replenish of this InlineResponse20014Data. # noqa: E501 + :param need_replenish: The need_replenish of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -779,43 +779,43 @@ def need_replenish(self, need_replenish): @property def merchant_info(self): - """Gets the merchant_info of this InlineResponse20014Data. # noqa: E501 + """Gets the merchant_info of this P2pMerchantUserInfo. # noqa: E501 - :return: The merchant_info of this InlineResponse20014Data. # noqa: E501 - :rtype: InlineResponse20014DataMerchantInfo + :return: The merchant_info of this P2pMerchantUserInfo. # noqa: E501 + :rtype: P2pMerchantMarketInfo """ return self._merchant_info @merchant_info.setter def merchant_info(self, merchant_info): - """Sets the merchant_info of this InlineResponse20014Data. + """Sets the merchant_info of this P2pMerchantUserInfo. - :param merchant_info: The merchant_info of this InlineResponse20014Data. # noqa: E501 - :type: InlineResponse20014DataMerchantInfo + :param merchant_info: The merchant_info of this P2pMerchantUserInfo. # noqa: E501 + :type: P2pMerchantMarketInfo """ self._merchant_info = merchant_info @property def online_status(self): - """Gets the online_status of this InlineResponse20014Data. # noqa: E501 + """Gets the online_status of this P2pMerchantUserInfo. # noqa: E501 - Merchant online status # noqa: E501 + Merchant online status: `1` online; `0` offline. # noqa: E501 - :return: The online_status of this InlineResponse20014Data. # noqa: E501 + :return: The online_status of this P2pMerchantUserInfo. # noqa: E501 :rtype: int """ return self._online_status @online_status.setter def online_status(self, online_status): - """Sets the online_status of this InlineResponse20014Data. + """Sets the online_status of this P2pMerchantUserInfo. - Merchant online status # noqa: E501 + Merchant online status: `1` online; `0` offline. # noqa: E501 - :param online_status: The online_status of this InlineResponse20014Data. # noqa: E501 + :param online_status: The online_status of this P2pMerchantUserInfo. # noqa: E501 :type: int """ @@ -823,22 +823,22 @@ def online_status(self, online_status): @property def work_hours(self): - """Gets the work_hours of this InlineResponse20014Data. # noqa: E501 + """Gets the work_hours of this P2pMerchantUserInfo. # noqa: E501 Merchant online status details # noqa: E501 - :return: The work_hours of this InlineResponse20014Data. # noqa: E501 + :return: The work_hours of this P2pMerchantUserInfo. # noqa: E501 :rtype: object """ return self._work_hours @work_hours.setter def work_hours(self, work_hours): - """Sets the work_hours of this InlineResponse20014Data. + """Sets the work_hours of this P2pMerchantUserInfo. Merchant online status details # noqa: E501 - :param work_hours: The work_hours of this InlineResponse20014Data. # noqa: E501 + :param work_hours: The work_hours of this P2pMerchantUserInfo. # noqa: E501 :type: object """ @@ -846,22 +846,22 @@ def work_hours(self, work_hours): @property def transactions_month(self): - """Gets the transactions_month of this InlineResponse20014Data. # noqa: E501 + """Gets the transactions_month of this P2pMerchantUserInfo. # noqa: E501 30-day transaction volume # noqa: E501 - :return: The transactions_month of this InlineResponse20014Data. # noqa: E501 + :return: The transactions_month of this P2pMerchantUserInfo. # noqa: E501 :rtype: float """ return self._transactions_month @transactions_month.setter def transactions_month(self, transactions_month): - """Sets the transactions_month of this InlineResponse20014Data. + """Sets the transactions_month of this P2pMerchantUserInfo. 30-day transaction volume # noqa: E501 - :param transactions_month: The transactions_month of this InlineResponse20014Data. # noqa: E501 + :param transactions_month: The transactions_month of this P2pMerchantUserInfo. # noqa: E501 :type: float """ @@ -869,22 +869,22 @@ def transactions_month(self, transactions_month): @property def transactions_all(self): - """Gets the transactions_all of this InlineResponse20014Data. # noqa: E501 + """Gets the transactions_all of this P2pMerchantUserInfo. # noqa: E501 Total transaction volume # noqa: E501 - :return: The transactions_all of this InlineResponse20014Data. # noqa: E501 + :return: The transactions_all of this P2pMerchantUserInfo. # noqa: E501 :rtype: float """ return self._transactions_all @transactions_all.setter def transactions_all(self, transactions_all): - """Sets the transactions_all of this InlineResponse20014Data. + """Sets the transactions_all of this P2pMerchantUserInfo. Total transaction volume # noqa: E501 - :param transactions_all: The transactions_all of this InlineResponse20014Data. # noqa: E501 + :param transactions_all: The transactions_all of this P2pMerchantUserInfo. # noqa: E501 :type: float """ @@ -892,22 +892,22 @@ def transactions_all(self, transactions_all): @property def trade_versatile(self): - """Gets the trade_versatile of this InlineResponse20014Data. # noqa: E501 + """Gets the trade_versatile of this P2pMerchantUserInfo. # noqa: E501 Single user or composite user # noqa: E501 - :return: The trade_versatile of this InlineResponse20014Data. # noqa: E501 + :return: The trade_versatile of this P2pMerchantUserInfo. # noqa: E501 :rtype: bool """ return self._trade_versatile @trade_versatile.setter def trade_versatile(self, trade_versatile): - """Sets the trade_versatile of this InlineResponse20014Data. + """Sets the trade_versatile of this P2pMerchantUserInfo. Single user or composite user # noqa: E501 - :param trade_versatile: The trade_versatile of this InlineResponse20014Data. # noqa: E501 + :param trade_versatile: The trade_versatile of this P2pMerchantUserInfo. # noqa: E501 :type: bool """ @@ -947,14 +947,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20014Data): + if not isinstance(other, P2pMerchantUserInfo): 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, InlineResponse20014Data): + if not isinstance(other, P2pMerchantUserInfo): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_merchant_user_info_response.py b/gate_api/models/p2p_merchant_user_info_response.py new file mode 100644 index 00000000..11c6ab54 --- /dev/null +++ b/gate_api/models/p2p_merchant_user_info_response.py @@ -0,0 +1,251 @@ +# 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 P2pMerchantUserInfoResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'P2pMerchantUserInfo', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, P2pMerchantUserInfo, str, Configuration) -> None + """P2pMerchantUserInfoResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pMerchantUserInfoResponse. # noqa: E501 + + + :return: The timestamp of this P2pMerchantUserInfoResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pMerchantUserInfoResponse. + + + :param timestamp: The timestamp of this P2pMerchantUserInfoResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pMerchantUserInfoResponse. # noqa: E501 + + + :return: The method of this P2pMerchantUserInfoResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pMerchantUserInfoResponse. + + + :param method: The method of this P2pMerchantUserInfoResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pMerchantUserInfoResponse. # noqa: E501 + + + :return: The code of this P2pMerchantUserInfoResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pMerchantUserInfoResponse. + + + :param code: The code of this P2pMerchantUserInfoResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pMerchantUserInfoResponse. # noqa: E501 + + + :return: The message of this P2pMerchantUserInfoResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pMerchantUserInfoResponse. + + + :param message: The message of this P2pMerchantUserInfoResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pMerchantUserInfoResponse. # noqa: E501 + + + :return: The data of this P2pMerchantUserInfoResponse. # noqa: E501 + :rtype: P2pMerchantUserInfo + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pMerchantUserInfoResponse. + + + :param data: The data of this P2pMerchantUserInfoResponse. # noqa: E501 + :type: P2pMerchantUserInfo + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pMerchantUserInfoResponse. # noqa: E501 + + + :return: The version of this P2pMerchantUserInfoResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pMerchantUserInfoResponse. + + + :param version: The version of this P2pMerchantUserInfoResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pMerchantUserInfoResponse): + 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, P2pMerchantUserInfoResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_merchant_work_hours.py b/gate_api/models/p2p_merchant_work_hours.py new file mode 100644 index 00000000..12cca1a6 --- /dev/null +++ b/gate_api/models/p2p_merchant_work_hours.py @@ -0,0 +1,129 @@ +# 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 P2pMerchantWorkHours(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 = { + 'work_status': 'int' + } + + attribute_map = { + 'work_status': 'work_status' + } + + def __init__(self, work_status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """P2pMerchantWorkHours - 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._work_status = None + self.discriminator = None + + if work_status is not None: + self.work_status = work_status + + @property + def work_status(self): + """Gets the work_status of this P2pMerchantWorkHours. # noqa: E501 + + Merchant's current working status. 0: normal resting, 1: normal working, 2: custom resting, 3: custom working # noqa: E501 + + :return: The work_status of this P2pMerchantWorkHours. # noqa: E501 + :rtype: int + """ + return self._work_status + + @work_status.setter + def work_status(self, work_status): + """Sets the work_status of this P2pMerchantWorkHours. + + Merchant's current working status. 0: normal resting, 1: normal working, 2: custom resting, 3: custom working # noqa: E501 + + :param work_status: The work_status of this P2pMerchantWorkHours. # noqa: E501 + :type: int + """ + allowed_values = [0, 1, 2, 3] # noqa: E501 + if self.local_vars_configuration.client_side_validation and work_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `work_status` ({0}), must be one of {1}" # noqa: E501 + .format(work_status, allowed_values) + ) + + self._work_status = work_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, P2pMerchantWorkHours): + 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, P2pMerchantWorkHours): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_merchant_work_hours_response.py b/gate_api/models/p2p_merchant_work_hours_response.py new file mode 100644 index 00000000..5d7ca894 --- /dev/null +++ b/gate_api/models/p2p_merchant_work_hours_response.py @@ -0,0 +1,261 @@ +# 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 P2pMerchantWorkHoursResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'P2pMerchantWorkHours', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, P2pMerchantWorkHours, str, Configuration) -> None + """P2pMerchantWorkHoursResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pMerchantWorkHoursResponse. # noqa: E501 + + Response timestamp. # noqa: E501 + + :return: The timestamp of this P2pMerchantWorkHoursResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pMerchantWorkHoursResponse. + + Response timestamp. # noqa: E501 + + :param timestamp: The timestamp of this P2pMerchantWorkHoursResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pMerchantWorkHoursResponse. # noqa: E501 + + Placeholder for request method. # noqa: E501 + + :return: The method of this P2pMerchantWorkHoursResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pMerchantWorkHoursResponse. + + Placeholder for request method. # noqa: E501 + + :param method: The method of this P2pMerchantWorkHoursResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pMerchantWorkHoursResponse. # noqa: E501 + + Response code, 0 means success # noqa: E501 + + :return: The code of this P2pMerchantWorkHoursResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pMerchantWorkHoursResponse. + + Response code, 0 means success # noqa: E501 + + :param code: The code of this P2pMerchantWorkHoursResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pMerchantWorkHoursResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this P2pMerchantWorkHoursResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pMerchantWorkHoursResponse. + + Response message # noqa: E501 + + :param message: The message of this P2pMerchantWorkHoursResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pMerchantWorkHoursResponse. # noqa: E501 + + + :return: The data of this P2pMerchantWorkHoursResponse. # noqa: E501 + :rtype: P2pMerchantWorkHours + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pMerchantWorkHoursResponse. + + + :param data: The data of this P2pMerchantWorkHoursResponse. # noqa: E501 + :type: P2pMerchantWorkHours + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pMerchantWorkHoursResponse. # noqa: E501 + + API version. # noqa: E501 + + :return: The version of this P2pMerchantWorkHoursResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pMerchantWorkHoursResponse. + + API version. # noqa: E501 + + :param version: The version of this P2pMerchantWorkHoursResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pMerchantWorkHoursResponse): + 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, P2pMerchantWorkHoursResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20022_data_lists.py b/gate_api/models/p2p_my_ad.py similarity index 61% rename from gate_api/models/inline_response20022_data_lists.py rename to gate_api/models/p2p_my_ad.py index edb7726c..d1ba71e0 100644 --- a/gate_api/models/inline_response20022_data_lists.py +++ b/gate_api/models/p2p_my_ad.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20022DataLists(object): +class P2pMyAd(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -118,7 +118,7 @@ class InlineResponse20022DataLists(object): def __init__(self, type=None, rate=None, original_rate=None, amount=None, total=None, limit_total=None, limit_fiat=None, min_amount=None, max_amount=None, pay_type_num=None, pay_type_json=None, expire_min=None, tier_limit=None, advertisers_limit=None, reg_time_limit=None, verified_limit=None, min_completed_limit=None, max_completed_limit=None, user_country_limit=None, completed_rate_limit=None, user_orders_limit=None, hide_payment=None, currency_type=None, want_type=None, trade_tips=None, new_hand=None, id=None, status=None, locked_amount=None, hide_rate=None, is_out_time=None, rate_ref_id=None, rate_offset=None, rate_fixed=None, float_trend=None, in_dispute=None, auto_reply=None, timestamp=None, is_hedge=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, int, int, int, int, float, int, str, str, str, str, int, str, str, str, str, int, int, str, int, int, int, str, int, int, Configuration) -> None - """InlineResponse20022DataLists - a model defined in OpenAPI""" # noqa: E501 + """P2pMyAd - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -245,22 +245,22 @@ def __init__(self, type=None, rate=None, original_rate=None, amount=None, total= @property def type(self): - """Gets the type of this InlineResponse20022DataLists. # noqa: E501 + """Gets the type of this P2pMyAd. # noqa: E501 - Ad buy/sell direction # noqa: E501 + Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. # noqa: E501 - :return: The type of this InlineResponse20022DataLists. # noqa: E501 + :return: The type of this P2pMyAd. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this InlineResponse20022DataLists. + """Sets the type of this P2pMyAd. - Ad buy/sell direction # noqa: E501 + Ad side: `buy` buy-crypto ad; `sell` sell-crypto ad. # noqa: E501 - :param type: The type of this InlineResponse20022DataLists. # noqa: E501 + :param type: The type of this P2pMyAd. # noqa: E501 :type: str """ @@ -268,22 +268,22 @@ def type(self, type): @property def rate(self): - """Gets the rate of this InlineResponse20022DataLists. # noqa: E501 + """Gets the rate of this P2pMyAd. # noqa: E501 Price # noqa: E501 - :return: The rate of this InlineResponse20022DataLists. # noqa: E501 + :return: The rate of this P2pMyAd. # noqa: E501 :rtype: str """ return self._rate @rate.setter def rate(self, rate): - """Sets the rate of this InlineResponse20022DataLists. + """Sets the rate of this P2pMyAd. Price # noqa: E501 - :param rate: The rate of this InlineResponse20022DataLists. # noqa: E501 + :param rate: The rate of this P2pMyAd. # noqa: E501 :type: str """ @@ -291,22 +291,22 @@ def rate(self, rate): @property def original_rate(self): - """Gets the original_rate of this InlineResponse20022DataLists. # noqa: E501 + """Gets the original_rate of this P2pMyAd. # noqa: E501 Original price # noqa: E501 - :return: The original_rate of this InlineResponse20022DataLists. # noqa: E501 + :return: The original_rate of this P2pMyAd. # noqa: E501 :rtype: str """ return self._original_rate @original_rate.setter def original_rate(self, original_rate): - """Sets the original_rate of this InlineResponse20022DataLists. + """Sets the original_rate of this P2pMyAd. Original price # noqa: E501 - :param original_rate: The original_rate of this InlineResponse20022DataLists. # noqa: E501 + :param original_rate: The original_rate of this P2pMyAd. # noqa: E501 :type: str """ @@ -314,22 +314,22 @@ def original_rate(self, original_rate): @property def amount(self): - """Gets the amount of this InlineResponse20022DataLists. # noqa: E501 + """Gets the amount of this P2pMyAd. # noqa: E501 - Remaining cryptocurrency amount of ad # noqa: E501 + Remaining crypto amount on the ad. # noqa: E501 - :return: The amount of this InlineResponse20022DataLists. # noqa: E501 + :return: The amount of this P2pMyAd. # noqa: E501 :rtype: str """ return self._amount @amount.setter def amount(self, amount): - """Sets the amount of this InlineResponse20022DataLists. + """Sets the amount of this P2pMyAd. - Remaining cryptocurrency amount of ad # noqa: E501 + Remaining crypto amount on the ad. # noqa: E501 - :param amount: The amount of this InlineResponse20022DataLists. # noqa: E501 + :param amount: The amount of this P2pMyAd. # noqa: E501 :type: str """ @@ -337,22 +337,22 @@ def amount(self, amount): @property def total(self): - """Gets the total of this InlineResponse20022DataLists. # noqa: E501 + """Gets the total of this P2pMyAd. # noqa: E501 Remaining fiat amount of ad # noqa: E501 - :return: The total of this InlineResponse20022DataLists. # noqa: E501 + :return: The total of this P2pMyAd. # noqa: E501 :rtype: str """ return self._total @total.setter def total(self, total): - """Sets the total of this InlineResponse20022DataLists. + """Sets the total of this P2pMyAd. Remaining fiat amount of ad # noqa: E501 - :param total: The total of this InlineResponse20022DataLists. # noqa: E501 + :param total: The total of this P2pMyAd. # noqa: E501 :type: str """ @@ -360,22 +360,22 @@ def total(self, total): @property def limit_total(self): - """Gets the limit_total of this InlineResponse20022DataLists. # noqa: E501 + """Gets the limit_total of this P2pMyAd. # noqa: E501 Single order limit range (cryptocurrency) # noqa: E501 - :return: The limit_total of this InlineResponse20022DataLists. # noqa: E501 + :return: The limit_total of this P2pMyAd. # noqa: E501 :rtype: str """ return self._limit_total @limit_total.setter def limit_total(self, limit_total): - """Sets the limit_total of this InlineResponse20022DataLists. + """Sets the limit_total of this P2pMyAd. Single order limit range (cryptocurrency) # noqa: E501 - :param limit_total: The limit_total of this InlineResponse20022DataLists. # noqa: E501 + :param limit_total: The limit_total of this P2pMyAd. # noqa: E501 :type: str """ @@ -383,22 +383,22 @@ def limit_total(self, limit_total): @property def limit_fiat(self): - """Gets the limit_fiat of this InlineResponse20022DataLists. # noqa: E501 + """Gets the limit_fiat of this P2pMyAd. # noqa: E501 Single order limit range (fiat) # noqa: E501 - :return: The limit_fiat of this InlineResponse20022DataLists. # noqa: E501 + :return: The limit_fiat of this P2pMyAd. # noqa: E501 :rtype: str """ return self._limit_fiat @limit_fiat.setter def limit_fiat(self, limit_fiat): - """Sets the limit_fiat of this InlineResponse20022DataLists. + """Sets the limit_fiat of this P2pMyAd. Single order limit range (fiat) # noqa: E501 - :param limit_fiat: The limit_fiat of this InlineResponse20022DataLists. # noqa: E501 + :param limit_fiat: The limit_fiat of this P2pMyAd. # noqa: E501 :type: str """ @@ -406,22 +406,22 @@ def limit_fiat(self, limit_fiat): @property def min_amount(self): - """Gets the min_amount of this InlineResponse20022DataLists. # noqa: E501 + """Gets the min_amount of this P2pMyAd. # noqa: E501 Minimum quantity per order # noqa: E501 - :return: The min_amount of this InlineResponse20022DataLists. # noqa: E501 + :return: The min_amount of this P2pMyAd. # noqa: E501 :rtype: str """ return self._min_amount @min_amount.setter def min_amount(self, min_amount): - """Sets the min_amount of this InlineResponse20022DataLists. + """Sets the min_amount of this P2pMyAd. Minimum quantity per order # noqa: E501 - :param min_amount: The min_amount of this InlineResponse20022DataLists. # noqa: E501 + :param min_amount: The min_amount of this P2pMyAd. # noqa: E501 :type: str """ @@ -429,22 +429,22 @@ def min_amount(self, min_amount): @property def max_amount(self): - """Gets the max_amount of this InlineResponse20022DataLists. # noqa: E501 + """Gets the max_amount of this P2pMyAd. # noqa: E501 Maximum quantity per order # noqa: E501 - :return: The max_amount of this InlineResponse20022DataLists. # noqa: E501 + :return: The max_amount of this P2pMyAd. # noqa: E501 :rtype: str """ return self._max_amount @max_amount.setter def max_amount(self, max_amount): - """Sets the max_amount of this InlineResponse20022DataLists. + """Sets the max_amount of this P2pMyAd. Maximum quantity per order # noqa: E501 - :param max_amount: The max_amount of this InlineResponse20022DataLists. # noqa: E501 + :param max_amount: The max_amount of this P2pMyAd. # noqa: E501 :type: str """ @@ -452,22 +452,22 @@ def max_amount(self, max_amount): @property def pay_type_num(self): - """Gets the pay_type_num of this InlineResponse20022DataLists. # noqa: E501 + """Gets the pay_type_num of this P2pMyAd. # noqa: E501 Payment method ID list # noqa: E501 - :return: The pay_type_num of this InlineResponse20022DataLists. # noqa: E501 + :return: The pay_type_num of this P2pMyAd. # noqa: E501 :rtype: str """ return self._pay_type_num @pay_type_num.setter def pay_type_num(self, pay_type_num): - """Sets the pay_type_num of this InlineResponse20022DataLists. + """Sets the pay_type_num of this P2pMyAd. Payment method ID list # noqa: E501 - :param pay_type_num: The pay_type_num of this InlineResponse20022DataLists. # noqa: E501 + :param pay_type_num: The pay_type_num of this P2pMyAd. # noqa: E501 :type: str """ @@ -475,22 +475,22 @@ def pay_type_num(self, pay_type_num): @property def pay_type_json(self): - """Gets the pay_type_json of this InlineResponse20022DataLists. # noqa: E501 + """Gets the pay_type_json of this P2pMyAd. # noqa: E501 - Payment method configuration details # noqa: E501 + JSON map of payment type -> payment method ID. # noqa: E501 - :return: The pay_type_json of this InlineResponse20022DataLists. # noqa: E501 + :return: The pay_type_json of this P2pMyAd. # noqa: E501 :rtype: str """ return self._pay_type_json @pay_type_json.setter def pay_type_json(self, pay_type_json): - """Sets the pay_type_json of this InlineResponse20022DataLists. + """Sets the pay_type_json of this P2pMyAd. - Payment method configuration details # noqa: E501 + JSON map of payment type -> payment method ID. # noqa: E501 - :param pay_type_json: The pay_type_json of this InlineResponse20022DataLists. # noqa: E501 + :param pay_type_json: The pay_type_json of this P2pMyAd. # noqa: E501 :type: str """ @@ -498,22 +498,22 @@ def pay_type_json(self, pay_type_json): @property def expire_min(self): - """Gets the expire_min of this InlineResponse20022DataLists. # noqa: E501 + """Gets the expire_min of this P2pMyAd. # noqa: E501 Ad expiration time (minutes) # noqa: E501 - :return: The expire_min of this InlineResponse20022DataLists. # noqa: E501 + :return: The expire_min of this P2pMyAd. # noqa: E501 :rtype: str """ return self._expire_min @expire_min.setter def expire_min(self, expire_min): - """Sets the expire_min of this InlineResponse20022DataLists. + """Sets the expire_min of this P2pMyAd. Ad expiration time (minutes) # noqa: E501 - :param expire_min: The expire_min of this InlineResponse20022DataLists. # noqa: E501 + :param expire_min: The expire_min of this P2pMyAd. # noqa: E501 :type: str """ @@ -521,22 +521,22 @@ def expire_min(self, expire_min): @property def tier_limit(self): - """Gets the tier_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the tier_limit of this P2pMyAd. # noqa: E501 VIP limit # noqa: E501 - :return: The tier_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The tier_limit of this P2pMyAd. # noqa: E501 :rtype: str """ return self._tier_limit @tier_limit.setter def tier_limit(self, tier_limit): - """Sets the tier_limit of this InlineResponse20022DataLists. + """Sets the tier_limit of this P2pMyAd. VIP limit # noqa: E501 - :param tier_limit: The tier_limit of this InlineResponse20022DataLists. # noqa: E501 + :param tier_limit: The tier_limit of this P2pMyAd. # noqa: E501 :type: str """ @@ -544,22 +544,22 @@ def tier_limit(self, tier_limit): @property def advertisers_limit(self): - """Gets the advertisers_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the advertisers_limit of this P2pMyAd. # noqa: E501 - Whether merchant trading restriction is allowed # noqa: E501 + Whether trading with the advertiser is restricted. `0`: no; `1`: yes. # noqa: E501 - :return: The advertisers_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The advertisers_limit of this P2pMyAd. # noqa: E501 :rtype: int """ return self._advertisers_limit @advertisers_limit.setter def advertisers_limit(self, advertisers_limit): - """Sets the advertisers_limit of this InlineResponse20022DataLists. + """Sets the advertisers_limit of this P2pMyAd. - Whether merchant trading restriction is allowed # noqa: E501 + Whether trading with the advertiser is restricted. `0`: no; `1`: yes. # noqa: E501 - :param advertisers_limit: The advertisers_limit of this InlineResponse20022DataLists. # noqa: E501 + :param advertisers_limit: The advertisers_limit of this P2pMyAd. # noqa: E501 :type: int """ @@ -567,22 +567,22 @@ def advertisers_limit(self, advertisers_limit): @property def reg_time_limit(self): - """Gets the reg_time_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the reg_time_limit of this P2pMyAd. # noqa: E501 Registration time limit # noqa: E501 - :return: The reg_time_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The reg_time_limit of this P2pMyAd. # noqa: E501 :rtype: int """ return self._reg_time_limit @reg_time_limit.setter def reg_time_limit(self, reg_time_limit): - """Sets the reg_time_limit of this InlineResponse20022DataLists. + """Sets the reg_time_limit of this P2pMyAd. Registration time limit # noqa: E501 - :param reg_time_limit: The reg_time_limit of this InlineResponse20022DataLists. # noqa: E501 + :param reg_time_limit: The reg_time_limit of this P2pMyAd. # noqa: E501 :type: int """ @@ -590,22 +590,22 @@ def reg_time_limit(self, reg_time_limit): @property def verified_limit(self): - """Gets the verified_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the verified_limit of this P2pMyAd. # noqa: E501 KYC level limit # noqa: E501 - :return: The verified_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The verified_limit of this P2pMyAd. # noqa: E501 :rtype: int """ return self._verified_limit @verified_limit.setter def verified_limit(self, verified_limit): - """Sets the verified_limit of this InlineResponse20022DataLists. + """Sets the verified_limit of this P2pMyAd. KYC level limit # noqa: E501 - :param verified_limit: The verified_limit of this InlineResponse20022DataLists. # noqa: E501 + :param verified_limit: The verified_limit of this P2pMyAd. # noqa: E501 :type: int """ @@ -613,22 +613,22 @@ def verified_limit(self, verified_limit): @property def min_completed_limit(self): - """Gets the min_completed_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the min_completed_limit of this P2pMyAd. # noqa: E501 Minimum limit of completed orders by counterparty # noqa: E501 - :return: The min_completed_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The min_completed_limit of this P2pMyAd. # noqa: E501 :rtype: int """ return self._min_completed_limit @min_completed_limit.setter def min_completed_limit(self, min_completed_limit): - """Sets the min_completed_limit of this InlineResponse20022DataLists. + """Sets the min_completed_limit of this P2pMyAd. Minimum limit of completed orders by counterparty # noqa: E501 - :param min_completed_limit: The min_completed_limit of this InlineResponse20022DataLists. # noqa: E501 + :param min_completed_limit: The min_completed_limit of this P2pMyAd. # noqa: E501 :type: int """ @@ -636,22 +636,22 @@ def min_completed_limit(self, min_completed_limit): @property def max_completed_limit(self): - """Gets the max_completed_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the max_completed_limit of this P2pMyAd. # noqa: E501 Maximum limit of completed orders by counterparty # noqa: E501 - :return: The max_completed_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The max_completed_limit of this P2pMyAd. # noqa: E501 :rtype: int """ return self._max_completed_limit @max_completed_limit.setter def max_completed_limit(self, max_completed_limit): - """Sets the max_completed_limit of this InlineResponse20022DataLists. + """Sets the max_completed_limit of this P2pMyAd. Maximum limit of completed orders by counterparty # noqa: E501 - :param max_completed_limit: The max_completed_limit of this InlineResponse20022DataLists. # noqa: E501 + :param max_completed_limit: The max_completed_limit of this P2pMyAd. # noqa: E501 :type: int """ @@ -659,22 +659,22 @@ def max_completed_limit(self, max_completed_limit): @property def user_country_limit(self): - """Gets the user_country_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the user_country_limit of this P2pMyAd. # noqa: E501 KYC nationality restriction # noqa: E501 - :return: The user_country_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The user_country_limit of this P2pMyAd. # noqa: E501 :rtype: int """ return self._user_country_limit @user_country_limit.setter def user_country_limit(self, user_country_limit): - """Sets the user_country_limit of this InlineResponse20022DataLists. + """Sets the user_country_limit of this P2pMyAd. KYC nationality restriction # noqa: E501 - :param user_country_limit: The user_country_limit of this InlineResponse20022DataLists. # noqa: E501 + :param user_country_limit: The user_country_limit of this P2pMyAd. # noqa: E501 :type: int """ @@ -682,22 +682,22 @@ def user_country_limit(self, user_country_limit): @property def completed_rate_limit(self): - """Gets the completed_rate_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the completed_rate_limit of this P2pMyAd. # noqa: E501 30-day completion rate limit # noqa: E501 - :return: The completed_rate_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The completed_rate_limit of this P2pMyAd. # noqa: E501 :rtype: float """ return self._completed_rate_limit @completed_rate_limit.setter def completed_rate_limit(self, completed_rate_limit): - """Sets the completed_rate_limit of this InlineResponse20022DataLists. + """Sets the completed_rate_limit of this P2pMyAd. 30-day completion rate limit # noqa: E501 - :param completed_rate_limit: The completed_rate_limit of this InlineResponse20022DataLists. # noqa: E501 + :param completed_rate_limit: The completed_rate_limit of this P2pMyAd. # noqa: E501 :type: float """ @@ -705,22 +705,22 @@ def completed_rate_limit(self, completed_rate_limit): @property def user_orders_limit(self): - """Gets the user_orders_limit of this InlineResponse20022DataLists. # noqa: E501 + """Gets the user_orders_limit of this P2pMyAd. # noqa: E501 Maximum order limit for counterparty # noqa: E501 - :return: The user_orders_limit of this InlineResponse20022DataLists. # noqa: E501 + :return: The user_orders_limit of this P2pMyAd. # noqa: E501 :rtype: int """ return self._user_orders_limit @user_orders_limit.setter def user_orders_limit(self, user_orders_limit): - """Sets the user_orders_limit of this InlineResponse20022DataLists. + """Sets the user_orders_limit of this P2pMyAd. Maximum order limit for counterparty # noqa: E501 - :param user_orders_limit: The user_orders_limit of this InlineResponse20022DataLists. # noqa: E501 + :param user_orders_limit: The user_orders_limit of this P2pMyAd. # noqa: E501 :type: int """ @@ -728,22 +728,22 @@ def user_orders_limit(self, user_orders_limit): @property def hide_payment(self): - """Gets the hide_payment of this InlineResponse20022DataLists. # noqa: E501 + """Gets the hide_payment of this P2pMyAd. # noqa: E501 - Whether to hide payment method # noqa: E501 + Whether payment methods are hidden. `1`: hidden; `0`: visible. # noqa: E501 - :return: The hide_payment of this InlineResponse20022DataLists. # noqa: E501 + :return: The hide_payment of this P2pMyAd. # noqa: E501 :rtype: str """ return self._hide_payment @hide_payment.setter def hide_payment(self, hide_payment): - """Sets the hide_payment of this InlineResponse20022DataLists. + """Sets the hide_payment of this P2pMyAd. - Whether to hide payment method # noqa: E501 + Whether payment methods are hidden. `1`: hidden; `0`: visible. # noqa: E501 - :param hide_payment: The hide_payment of this InlineResponse20022DataLists. # noqa: E501 + :param hide_payment: The hide_payment of this P2pMyAd. # noqa: E501 :type: str """ @@ -751,22 +751,22 @@ def hide_payment(self, hide_payment): @property def currency_type(self): - """Gets the currency_type of this InlineResponse20022DataLists. # noqa: E501 + """Gets the currency_type of this P2pMyAd. # noqa: E501 - Digital currency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 - :return: The currency_type of this InlineResponse20022DataLists. # noqa: E501 + :return: The currency_type of this P2pMyAd. # noqa: E501 :rtype: str """ return self._currency_type @currency_type.setter def currency_type(self, currency_type): - """Sets the currency_type of this InlineResponse20022DataLists. + """Sets the currency_type of this P2pMyAd. - Digital currency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 - :param currency_type: The currency_type of this InlineResponse20022DataLists. # noqa: E501 + :param currency_type: The currency_type of this P2pMyAd. # noqa: E501 :type: str """ @@ -774,22 +774,22 @@ def currency_type(self, currency_type): @property def want_type(self): - """Gets the want_type of this InlineResponse20022DataLists. # noqa: E501 + """Gets the want_type of this P2pMyAd. # noqa: E501 Fiat currency # noqa: E501 - :return: The want_type of this InlineResponse20022DataLists. # noqa: E501 + :return: The want_type of this P2pMyAd. # noqa: E501 :rtype: str """ return self._want_type @want_type.setter def want_type(self, want_type): - """Sets the want_type of this InlineResponse20022DataLists. + """Sets the want_type of this P2pMyAd. Fiat currency # noqa: E501 - :param want_type: The want_type of this InlineResponse20022DataLists. # noqa: E501 + :param want_type: The want_type of this P2pMyAd. # noqa: E501 :type: str """ @@ -797,22 +797,22 @@ def want_type(self, want_type): @property def trade_tips(self): - """Gets the trade_tips of this InlineResponse20022DataLists. # noqa: E501 + """Gets the trade_tips of this P2pMyAd. # noqa: E501 Trading terms # noqa: E501 - :return: The trade_tips of this InlineResponse20022DataLists. # noqa: E501 + :return: The trade_tips of this P2pMyAd. # noqa: E501 :rtype: str """ return self._trade_tips @trade_tips.setter def trade_tips(self, trade_tips): - """Sets the trade_tips of this InlineResponse20022DataLists. + """Sets the trade_tips of this P2pMyAd. Trading terms # noqa: E501 - :param trade_tips: The trade_tips of this InlineResponse20022DataLists. # noqa: E501 + :param trade_tips: The trade_tips of this P2pMyAd. # noqa: E501 :type: str """ @@ -820,22 +820,22 @@ def trade_tips(self, trade_tips): @property def new_hand(self): - """Gets the new_hand of this InlineResponse20022DataLists. # noqa: E501 + """Gets the new_hand of this P2pMyAd. # noqa: E501 - Special ad type # noqa: E501 + Special ad type. `0` normal; `1` newcomer guide; `2` newcomer discount; `3` featured promo; `4` KOL ad; `5` coupon ad. # noqa: E501 - :return: The new_hand of this InlineResponse20022DataLists. # noqa: E501 + :return: The new_hand of this P2pMyAd. # noqa: E501 :rtype: int """ return self._new_hand @new_hand.setter def new_hand(self, new_hand): - """Sets the new_hand of this InlineResponse20022DataLists. + """Sets the new_hand of this P2pMyAd. - Special ad type # noqa: E501 + Special ad type. `0` normal; `1` newcomer guide; `2` newcomer discount; `3` featured promo; `4` KOL ad; `5` coupon ad. # noqa: E501 - :param new_hand: The new_hand of this InlineResponse20022DataLists. # noqa: E501 + :param new_hand: The new_hand of this P2pMyAd. # noqa: E501 :type: int """ @@ -843,22 +843,22 @@ def new_hand(self, new_hand): @property def id(self): - """Gets the id of this InlineResponse20022DataLists. # noqa: E501 + """Gets the id of this P2pMyAd. # noqa: E501 - Ad ID # noqa: E501 + Advertisement ID. # noqa: E501 - :return: The id of this InlineResponse20022DataLists. # noqa: E501 + :return: The id of this P2pMyAd. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this InlineResponse20022DataLists. + """Sets the id of this P2pMyAd. - Ad ID # noqa: E501 + Advertisement ID. # noqa: E501 - :param id: The id of this InlineResponse20022DataLists. # noqa: E501 + :param id: The id of this P2pMyAd. # noqa: E501 :type: str """ @@ -866,22 +866,22 @@ def id(self, id): @property def status(self): - """Gets the status of this InlineResponse20022DataLists. # noqa: E501 + """Gets the status of this P2pMyAd. # noqa: E501 - Ad status # noqa: E501 + Ad status: `OPEN` listed; `OFFLIN` delisted; `CLOSED` closed; `CANCEL` canceled. # noqa: E501 - :return: The status of this InlineResponse20022DataLists. # noqa: E501 + :return: The status of this P2pMyAd. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20022DataLists. + """Sets the status of this P2pMyAd. - Ad status # noqa: E501 + Ad status: `OPEN` listed; `OFFLIN` delisted; `CLOSED` closed; `CANCEL` canceled. # noqa: E501 - :param status: The status of this InlineResponse20022DataLists. # noqa: E501 + :param status: The status of this P2pMyAd. # noqa: E501 :type: str """ @@ -889,22 +889,22 @@ def status(self, status): @property def locked_amount(self): - """Gets the locked_amount of this InlineResponse20022DataLists. # noqa: E501 + """Gets the locked_amount of this P2pMyAd. # noqa: E501 Ad frozen amount # noqa: E501 - :return: The locked_amount of this InlineResponse20022DataLists. # noqa: E501 + :return: The locked_amount of this P2pMyAd. # noqa: E501 :rtype: str """ return self._locked_amount @locked_amount.setter def locked_amount(self, locked_amount): - """Sets the locked_amount of this InlineResponse20022DataLists. + """Sets the locked_amount of this P2pMyAd. Ad frozen amount # noqa: E501 - :param locked_amount: The locked_amount of this InlineResponse20022DataLists. # noqa: E501 + :param locked_amount: The locked_amount of this P2pMyAd. # noqa: E501 :type: str """ @@ -912,22 +912,22 @@ def locked_amount(self, locked_amount): @property def hide_rate(self): - """Gets the hide_rate of this InlineResponse20022DataLists. # noqa: E501 + """Gets the hide_rate of this P2pMyAd. # noqa: E501 Hidden price # noqa: E501 - :return: The hide_rate of this InlineResponse20022DataLists. # noqa: E501 + :return: The hide_rate of this P2pMyAd. # noqa: E501 :rtype: str """ return self._hide_rate @hide_rate.setter def hide_rate(self, hide_rate): - """Sets the hide_rate of this InlineResponse20022DataLists. + """Sets the hide_rate of this P2pMyAd. Hidden price # noqa: E501 - :param hide_rate: The hide_rate of this InlineResponse20022DataLists. # noqa: E501 + :param hide_rate: The hide_rate of this P2pMyAd. # noqa: E501 :type: str """ @@ -935,22 +935,22 @@ def hide_rate(self, hide_rate): @property def is_out_time(self): - """Gets the is_out_time of this InlineResponse20022DataLists. # noqa: E501 + """Gets the is_out_time of this P2pMyAd. # noqa: E501 - Whether ad is currently expired # noqa: E501 + Whether the ad timed out. `1`: timed out; `0`: not yet. # noqa: E501 - :return: The is_out_time of this InlineResponse20022DataLists. # noqa: E501 + :return: The is_out_time of this P2pMyAd. # noqa: E501 :rtype: int """ return self._is_out_time @is_out_time.setter def is_out_time(self, is_out_time): - """Sets the is_out_time of this InlineResponse20022DataLists. + """Sets the is_out_time of this P2pMyAd. - Whether ad is currently expired # noqa: E501 + Whether the ad timed out. `1`: timed out; `0`: not yet. # noqa: E501 - :param is_out_time: The is_out_time of this InlineResponse20022DataLists. # noqa: E501 + :param is_out_time: The is_out_time of this P2pMyAd. # noqa: E501 :type: int """ @@ -958,22 +958,22 @@ def is_out_time(self, is_out_time): @property def rate_ref_id(self): - """Gets the rate_ref_id of this InlineResponse20022DataLists. # noqa: E501 + """Gets the rate_ref_id of this P2pMyAd. # noqa: E501 - Floating price reference configuration # noqa: E501 + Floating reference: `1` platform; `2` Gate; `3` spot; `<= 0` means fixed price. # noqa: E501 - :return: The rate_ref_id of this InlineResponse20022DataLists. # noqa: E501 + :return: The rate_ref_id of this P2pMyAd. # noqa: E501 :rtype: int """ return self._rate_ref_id @rate_ref_id.setter def rate_ref_id(self, rate_ref_id): - """Sets the rate_ref_id of this InlineResponse20022DataLists. + """Sets the rate_ref_id of this P2pMyAd. - Floating price reference configuration # noqa: E501 + Floating reference: `1` platform; `2` Gate; `3` spot; `<= 0` means fixed price. # noqa: E501 - :param rate_ref_id: The rate_ref_id of this InlineResponse20022DataLists. # noqa: E501 + :param rate_ref_id: The rate_ref_id of this P2pMyAd. # noqa: E501 :type: int """ @@ -981,22 +981,22 @@ def rate_ref_id(self, rate_ref_id): @property def rate_offset(self): - """Gets the rate_offset of this InlineResponse20022DataLists. # noqa: E501 + """Gets the rate_offset of this P2pMyAd. # noqa: E501 Floating ratio # noqa: E501 - :return: The rate_offset of this InlineResponse20022DataLists. # noqa: E501 + :return: The rate_offset of this P2pMyAd. # noqa: E501 :rtype: str """ return self._rate_offset @rate_offset.setter def rate_offset(self, rate_offset): - """Sets the rate_offset of this InlineResponse20022DataLists. + """Sets the rate_offset of this P2pMyAd. Floating ratio # noqa: E501 - :param rate_offset: The rate_offset of this InlineResponse20022DataLists. # noqa: E501 + :param rate_offset: The rate_offset of this P2pMyAd. # noqa: E501 :type: str """ @@ -1004,22 +1004,22 @@ def rate_offset(self, rate_offset): @property def rate_fixed(self): - """Gets the rate_fixed of this InlineResponse20022DataLists. # noqa: E501 + """Gets the rate_fixed of this P2pMyAd. # noqa: E501 - Reference price type: 0=Floating, 1=Fixed # noqa: E501 + Price type: `0` floating; `1` fixed. # noqa: E501 - :return: The rate_fixed of this InlineResponse20022DataLists. # noqa: E501 + :return: The rate_fixed of this P2pMyAd. # noqa: E501 :rtype: int """ return self._rate_fixed @rate_fixed.setter def rate_fixed(self, rate_fixed): - """Sets the rate_fixed of this InlineResponse20022DataLists. + """Sets the rate_fixed of this P2pMyAd. - Reference price type: 0=Floating, 1=Fixed # noqa: E501 + Price type: `0` floating; `1` fixed. # noqa: E501 - :param rate_fixed: The rate_fixed of this InlineResponse20022DataLists. # noqa: E501 + :param rate_fixed: The rate_fixed of this P2pMyAd. # noqa: E501 :type: int """ @@ -1027,22 +1027,22 @@ def rate_fixed(self, rate_fixed): @property def float_trend(self): - """Gets the float_trend of this InlineResponse20022DataLists. # noqa: E501 + """Gets the float_trend of this P2pMyAd. # noqa: E501 - Floating order direction # noqa: E501 + Floating direction: `0` markup; `1` markdown. # noqa: E501 - :return: The float_trend of this InlineResponse20022DataLists. # noqa: E501 + :return: The float_trend of this P2pMyAd. # noqa: E501 :rtype: int """ return self._float_trend @float_trend.setter def float_trend(self, float_trend): - """Sets the float_trend of this InlineResponse20022DataLists. + """Sets the float_trend of this P2pMyAd. - Floating order direction # noqa: E501 + Floating direction: `0` markup; `1` markdown. # noqa: E501 - :param float_trend: The float_trend of this InlineResponse20022DataLists. # noqa: E501 + :param float_trend: The float_trend of this P2pMyAd. # noqa: E501 :type: int """ @@ -1050,22 +1050,22 @@ def float_trend(self, float_trend): @property def in_dispute(self): - """Gets the in_dispute of this InlineResponse20022DataLists. # noqa: E501 + """Gets the in_dispute of this P2pMyAd. # noqa: E501 - Whether ad has disputed transactions # noqa: E501 + Whether the ad had a disputed trade. `1`: yes; `0`: no. # noqa: E501 - :return: The in_dispute of this InlineResponse20022DataLists. # noqa: E501 + :return: The in_dispute of this P2pMyAd. # noqa: E501 :rtype: int """ return self._in_dispute @in_dispute.setter def in_dispute(self, in_dispute): - """Sets the in_dispute of this InlineResponse20022DataLists. + """Sets the in_dispute of this P2pMyAd. - Whether ad has disputed transactions # noqa: E501 + Whether the ad had a disputed trade. `1`: yes; `0`: no. # noqa: E501 - :param in_dispute: The in_dispute of this InlineResponse20022DataLists. # noqa: E501 + :param in_dispute: The in_dispute of this P2pMyAd. # noqa: E501 :type: int """ @@ -1073,22 +1073,22 @@ def in_dispute(self, in_dispute): @property def auto_reply(self): - """Gets the auto_reply of this InlineResponse20022DataLists. # noqa: E501 + """Gets the auto_reply of this P2pMyAd. # noqa: E501 Auto reply data # noqa: E501 - :return: The auto_reply of this InlineResponse20022DataLists. # noqa: E501 + :return: The auto_reply of this P2pMyAd. # noqa: E501 :rtype: str """ return self._auto_reply @auto_reply.setter def auto_reply(self, auto_reply): - """Sets the auto_reply of this InlineResponse20022DataLists. + """Sets the auto_reply of this P2pMyAd. Auto reply data # noqa: E501 - :param auto_reply: The auto_reply of this InlineResponse20022DataLists. # noqa: E501 + :param auto_reply: The auto_reply of this P2pMyAd. # noqa: E501 :type: str """ @@ -1096,22 +1096,22 @@ def auto_reply(self, auto_reply): @property def timestamp(self): - """Gets the timestamp of this InlineResponse20022DataLists. # noqa: E501 + """Gets the timestamp of this P2pMyAd. # noqa: E501 Ad creation time # noqa: E501 - :return: The timestamp of this InlineResponse20022DataLists. # noqa: E501 + :return: The timestamp of this P2pMyAd. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20022DataLists. + """Sets the timestamp of this P2pMyAd. Ad creation time # noqa: E501 - :param timestamp: The timestamp of this InlineResponse20022DataLists. # noqa: E501 + :param timestamp: The timestamp of this P2pMyAd. # noqa: E501 :type: int """ @@ -1119,22 +1119,22 @@ def timestamp(self, timestamp): @property def is_hedge(self): - """Gets the is_hedge of this InlineResponse20022DataLists. # noqa: E501 + """Gets the is_hedge of this P2pMyAd. # noqa: E501 - Auto delegation # noqa: E501 + Whether auto-delegation is enabled. `1`: yes; `0`: no. # noqa: E501 - :return: The is_hedge of this InlineResponse20022DataLists. # noqa: E501 + :return: The is_hedge of this P2pMyAd. # noqa: E501 :rtype: int """ return self._is_hedge @is_hedge.setter def is_hedge(self, is_hedge): - """Sets the is_hedge of this InlineResponse20022DataLists. + """Sets the is_hedge of this P2pMyAd. - Auto delegation # noqa: E501 + Whether auto-delegation is enabled. `1`: yes; `0`: no. # noqa: E501 - :param is_hedge: The is_hedge of this InlineResponse20022DataLists. # noqa: E501 + :param is_hedge: The is_hedge of this P2pMyAd. # noqa: E501 :type: int """ @@ -1174,14 +1174,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20022DataLists): + if not isinstance(other, P2pMyAd): 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, InlineResponse20022DataLists): + if not isinstance(other, P2pMyAd): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20022.py b/gate_api/models/p2p_my_ads_list_response.py similarity index 70% rename from gate_api/models/inline_response20022.py rename to gate_api/models/p2p_my_ads_list_response.py index c93afaa0..592f4c0f 100644 --- a/gate_api/models/inline_response20022.py +++ b/gate_api/models/p2p_my_ads_list_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20022(object): +class P2pMyAdsListResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,7 @@ class InlineResponse20022(object): 'method': 'str', 'code': 'int', 'message': 'str', - 'data': 'InlineResponse20022Data', + 'data': 'P2pMyAdsListResult', 'version': 'str' } @@ -51,8 +51,8 @@ class InlineResponse20022(object): } def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20022Data, str, Configuration) -> None - """InlineResponse20022 - a model defined in OpenAPI""" # noqa: E501 + # type: (float, str, int, str, P2pMyAdsListResult, str, Configuration) -> None + """P2pMyAdsListResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -80,20 +80,20 @@ def __init__(self, timestamp=None, method=None, code=None, message=None, data=No @property def timestamp(self): - """Gets the timestamp of this InlineResponse20022. # noqa: E501 + """Gets the timestamp of this P2pMyAdsListResponse. # noqa: E501 - :return: The timestamp of this InlineResponse20022. # noqa: E501 + :return: The timestamp of this P2pMyAdsListResponse. # noqa: E501 :rtype: float """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20022. + """Sets the timestamp of this P2pMyAdsListResponse. - :param timestamp: The timestamp of this InlineResponse20022. # noqa: E501 + :param timestamp: The timestamp of this P2pMyAdsListResponse. # noqa: E501 :type: float """ @@ -101,20 +101,20 @@ def timestamp(self, timestamp): @property def method(self): - """Gets the method of this InlineResponse20022. # noqa: E501 + """Gets the method of this P2pMyAdsListResponse. # noqa: E501 - :return: The method of this InlineResponse20022. # noqa: E501 + :return: The method of this P2pMyAdsListResponse. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): - """Sets the method of this InlineResponse20022. + """Sets the method of this P2pMyAdsListResponse. - :param method: The method of this InlineResponse20022. # noqa: E501 + :param method: The method of this P2pMyAdsListResponse. # noqa: E501 :type: str """ @@ -122,20 +122,20 @@ def method(self, method): @property def code(self): - """Gets the code of this InlineResponse20022. # noqa: E501 + """Gets the code of this P2pMyAdsListResponse. # noqa: E501 - :return: The code of this InlineResponse20022. # noqa: E501 + :return: The code of this P2pMyAdsListResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20022. + """Sets the code of this P2pMyAdsListResponse. - :param code: The code of this InlineResponse20022. # noqa: E501 + :param code: The code of this P2pMyAdsListResponse. # noqa: E501 :type: int """ @@ -143,20 +143,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20022. # noqa: E501 + """Gets the message of this P2pMyAdsListResponse. # noqa: E501 - :return: The message of this InlineResponse20022. # noqa: E501 + :return: The message of this P2pMyAdsListResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20022. + """Sets the message of this P2pMyAdsListResponse. - :param message: The message of this InlineResponse20022. # noqa: E501 + :param message: The message of this P2pMyAdsListResponse. # noqa: E501 :type: str """ @@ -164,43 +164,43 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20022. # noqa: E501 + """Gets the data of this P2pMyAdsListResponse. # noqa: E501 - :return: The data of this InlineResponse20022. # noqa: E501 - :rtype: InlineResponse20022Data + :return: The data of this P2pMyAdsListResponse. # noqa: E501 + :rtype: P2pMyAdsListResult """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20022. + """Sets the data of this P2pMyAdsListResponse. - :param data: The data of this InlineResponse20022. # noqa: E501 - :type: InlineResponse20022Data + :param data: The data of this P2pMyAdsListResponse. # noqa: E501 + :type: P2pMyAdsListResult """ self._data = data @property def version(self): - """Gets the version of this InlineResponse20022. # noqa: E501 + """Gets the version of this P2pMyAdsListResponse. # noqa: E501 Version number # noqa: E501 - :return: The version of this InlineResponse20022. # noqa: E501 + :return: The version of this P2pMyAdsListResponse. # noqa: E501 :rtype: str """ return self._version @version.setter def version(self, version): - """Sets the version of this InlineResponse20022. + """Sets the version of this P2pMyAdsListResponse. Version number # noqa: E501 - :param version: The version of this InlineResponse20022. # noqa: E501 + :param version: The version of this P2pMyAdsListResponse. # noqa: E501 :type: str """ @@ -240,14 +240,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20022): + if not isinstance(other, P2pMyAdsListResponse): 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, InlineResponse20022): + if not isinstance(other, P2pMyAdsListResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20022_data.py b/gate_api/models/p2p_my_ads_list_result.py similarity index 79% rename from gate_api/models/inline_response20022_data.py rename to gate_api/models/p2p_my_ads_list_result.py index 6eecf733..6bfe4658 100644 --- a/gate_api/models/inline_response20022_data.py +++ b/gate_api/models/p2p_my_ads_list_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20022Data(object): +class P2pMyAdsListResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,7 +33,7 @@ class InlineResponse20022Data(object): and the value is json key in definition. """ openapi_types = { - 'lists': 'list[InlineResponse20022DataLists]' + 'lists': 'list[P2pMyAd]' } attribute_map = { @@ -41,8 +41,8 @@ class InlineResponse20022Data(object): } def __init__(self, lists=None, local_vars_configuration=None): # noqa: E501 - # type: (list[InlineResponse20022DataLists], Configuration) -> None - """InlineResponse20022Data - a model defined in OpenAPI""" # noqa: E501 + # type: (list[P2pMyAd], Configuration) -> None + """P2pMyAdsListResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -55,21 +55,21 @@ def __init__(self, lists=None, local_vars_configuration=None): # noqa: E501 @property def lists(self): - """Gets the lists of this InlineResponse20022Data. # noqa: E501 + """Gets the lists of this P2pMyAdsListResult. # noqa: E501 - :return: The lists of this InlineResponse20022Data. # noqa: E501 - :rtype: list[InlineResponse20022DataLists] + :return: The lists of this P2pMyAdsListResult. # noqa: E501 + :rtype: list[P2pMyAd] """ return self._lists @lists.setter def lists(self, lists): - """Sets the lists of this InlineResponse20022Data. + """Sets the lists of this P2pMyAdsListResult. - :param lists: The lists of this InlineResponse20022Data. # noqa: E501 - :type: list[InlineResponse20022DataLists] + :param lists: The lists of this P2pMyAdsListResult. # noqa: E501 + :type: list[P2pMyAd] """ self._lists = lists @@ -108,14 +108,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20022Data): + if not isinstance(other, P2pMyAdsListResult): 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, InlineResponse20022Data): + if not isinstance(other, P2pMyAdsListResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20016_list.py b/gate_api/models/p2p_payment_method_account.py similarity index 67% rename from gate_api/models/inline_response20016_list.py rename to gate_api/models/p2p_payment_method_account.py index f1e65aaa..f3a15e07 100644 --- a/gate_api/models/inline_response20016_list.py +++ b/gate_api/models/p2p_payment_method_account.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20016List(object): +class P2pPaymentMethodAccount(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -67,7 +67,7 @@ class InlineResponse20016List(object): 'bankprov': 'bankprov', 'bankaddr': 'bankaddr', 'bankdesc': 'bankdesc', - 'hold_uid': 'holdUid', + 'hold_uid': 'hold_uid', 'hold_username': 'hold_username', 'real_name': 'real_name', 'id': 'id', @@ -84,7 +84,7 @@ class InlineResponse20016List(object): def __init__(self, uid=None, bankid=None, nickname=None, bankname=None, bankbranch=None, bankcity=None, bankprov=None, bankaddr=None, bankdesc=None, hold_uid=None, hold_username=None, real_name=None, id=None, account_des=None, pay_type=None, file=None, file_key=None, account=None, memo=None, code=None, memo_ext=None, trade_tips=None, local_vars_configuration=None): # noqa: E501 # type: (int, str, int, str, str, str, str, str, str, int, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """InlineResponse20016List - a model defined in OpenAPI""" # noqa: E501 + """P2pPaymentMethodAccount - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -160,22 +160,22 @@ def __init__(self, uid=None, bankid=None, nickname=None, bankname=None, bankbran @property def uid(self): - """Gets the uid of this InlineResponse20016List. # noqa: E501 + """Gets the uid of this P2pPaymentMethodAccount. # noqa: E501 useruID # noqa: E501 - :return: The uid of this InlineResponse20016List. # noqa: E501 + :return: The uid of this P2pPaymentMethodAccount. # noqa: E501 :rtype: int """ return self._uid @uid.setter def uid(self, uid): - """Sets the uid of this InlineResponse20016List. + """Sets the uid of this P2pPaymentMethodAccount. useruID # noqa: E501 - :param uid: The uid of this InlineResponse20016List. # noqa: E501 + :param uid: The uid of this P2pPaymentMethodAccount. # noqa: E501 :type: int """ @@ -183,22 +183,22 @@ def uid(self, uid): @property def bankid(self): - """Gets the bankid of this InlineResponse20016List. # noqa: E501 + """Gets the bankid of this P2pPaymentMethodAccount. # noqa: E501 User's currently bound payment method (primary key ID) # noqa: E501 - :return: The bankid of this InlineResponse20016List. # noqa: E501 + :return: The bankid of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._bankid @bankid.setter def bankid(self, bankid): - """Sets the bankid of this InlineResponse20016List. + """Sets the bankid of this P2pPaymentMethodAccount. User's currently bound payment method (primary key ID) # noqa: E501 - :param bankid: The bankid of this InlineResponse20016List. # noqa: E501 + :param bankid: The bankid of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -206,22 +206,22 @@ def bankid(self, bankid): @property def nickname(self): - """Gets the nickname of this InlineResponse20016List. # noqa: E501 + """Gets the nickname of this P2pPaymentMethodAccount. # noqa: E501 Cardholder UID # noqa: E501 - :return: The nickname of this InlineResponse20016List. # noqa: E501 + :return: The nickname of this P2pPaymentMethodAccount. # noqa: E501 :rtype: int """ return self._nickname @nickname.setter def nickname(self, nickname): - """Sets the nickname of this InlineResponse20016List. + """Sets the nickname of this P2pPaymentMethodAccount. Cardholder UID # noqa: E501 - :param nickname: The nickname of this InlineResponse20016List. # noqa: E501 + :param nickname: The nickname of this P2pPaymentMethodAccount. # noqa: E501 :type: int """ @@ -229,22 +229,22 @@ def nickname(self, nickname): @property def bankname(self): - """Gets the bankname of this InlineResponse20016List. # noqa: E501 + """Gets the bankname of this P2pPaymentMethodAccount. # noqa: E501 Bank name # noqa: E501 - :return: The bankname of this InlineResponse20016List. # noqa: E501 + :return: The bankname of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._bankname @bankname.setter def bankname(self, bankname): - """Sets the bankname of this InlineResponse20016List. + """Sets the bankname of this P2pPaymentMethodAccount. Bank name # noqa: E501 - :param bankname: The bankname of this InlineResponse20016List. # noqa: E501 + :param bankname: The bankname of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -252,22 +252,22 @@ def bankname(self, bankname): @property def bankbranch(self): - """Gets the bankbranch of this InlineResponse20016List. # noqa: E501 + """Gets the bankbranch of this P2pPaymentMethodAccount. # noqa: E501 Bank branch name # noqa: E501 - :return: The bankbranch of this InlineResponse20016List. # noqa: E501 + :return: The bankbranch of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._bankbranch @bankbranch.setter def bankbranch(self, bankbranch): - """Sets the bankbranch of this InlineResponse20016List. + """Sets the bankbranch of this P2pPaymentMethodAccount. Bank branch name # noqa: E501 - :param bankbranch: The bankbranch of this InlineResponse20016List. # noqa: E501 + :param bankbranch: The bankbranch of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -275,22 +275,22 @@ def bankbranch(self, bankbranch): @property def bankcity(self): - """Gets the bankcity of this InlineResponse20016List. # noqa: E501 + """Gets the bankcity of this P2pPaymentMethodAccount. # noqa: E501 Bank city # noqa: E501 - :return: The bankcity of this InlineResponse20016List. # noqa: E501 + :return: The bankcity of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._bankcity @bankcity.setter def bankcity(self, bankcity): - """Sets the bankcity of this InlineResponse20016List. + """Sets the bankcity of this P2pPaymentMethodAccount. Bank city # noqa: E501 - :param bankcity: The bankcity of this InlineResponse20016List. # noqa: E501 + :param bankcity: The bankcity of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -298,22 +298,22 @@ def bankcity(self, bankcity): @property def bankprov(self): - """Gets the bankprov of this InlineResponse20016List. # noqa: E501 + """Gets the bankprov of this P2pPaymentMethodAccount. # noqa: E501 Bank province # noqa: E501 - :return: The bankprov of this InlineResponse20016List. # noqa: E501 + :return: The bankprov of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._bankprov @bankprov.setter def bankprov(self, bankprov): - """Sets the bankprov of this InlineResponse20016List. + """Sets the bankprov of this P2pPaymentMethodAccount. Bank province # noqa: E501 - :param bankprov: The bankprov of this InlineResponse20016List. # noqa: E501 + :param bankprov: The bankprov of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -321,22 +321,22 @@ def bankprov(self, bankprov): @property def bankaddr(self): - """Gets the bankaddr of this InlineResponse20016List. # noqa: E501 + """Gets the bankaddr of this P2pPaymentMethodAccount. # noqa: E501 - Bank card number # noqa: E501 + Bank card number or masked card number. # noqa: E501 - :return: The bankaddr of this InlineResponse20016List. # noqa: E501 + :return: The bankaddr of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._bankaddr @bankaddr.setter def bankaddr(self, bankaddr): - """Sets the bankaddr of this InlineResponse20016List. + """Sets the bankaddr of this P2pPaymentMethodAccount. - Bank card number # noqa: E501 + Bank card number or masked card number. # noqa: E501 - :param bankaddr: The bankaddr of this InlineResponse20016List. # noqa: E501 + :param bankaddr: The bankaddr of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -344,22 +344,22 @@ def bankaddr(self, bankaddr): @property def bankdesc(self): - """Gets the bankdesc of this InlineResponse20016List. # noqa: E501 + """Gets the bankdesc of this P2pPaymentMethodAccount. # noqa: E501 Bank note # noqa: E501 - :return: The bankdesc of this InlineResponse20016List. # noqa: E501 + :return: The bankdesc of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._bankdesc @bankdesc.setter def bankdesc(self, bankdesc): - """Sets the bankdesc of this InlineResponse20016List. + """Sets the bankdesc of this P2pPaymentMethodAccount. Bank note # noqa: E501 - :param bankdesc: The bankdesc of this InlineResponse20016List. # noqa: E501 + :param bankdesc: The bankdesc of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -367,22 +367,22 @@ def bankdesc(self, bankdesc): @property def hold_uid(self): - """Gets the hold_uid of this InlineResponse20016List. # noqa: E501 + """Gets the hold_uid of this P2pPaymentMethodAccount. # noqa: E501 Cardholder UID # noqa: E501 - :return: The hold_uid of this InlineResponse20016List. # noqa: E501 + :return: The hold_uid of this P2pPaymentMethodAccount. # noqa: E501 :rtype: int """ return self._hold_uid @hold_uid.setter def hold_uid(self, hold_uid): - """Sets the hold_uid of this InlineResponse20016List. + """Sets the hold_uid of this P2pPaymentMethodAccount. Cardholder UID # noqa: E501 - :param hold_uid: The hold_uid of this InlineResponse20016List. # noqa: E501 + :param hold_uid: The hold_uid of this P2pPaymentMethodAccount. # noqa: E501 :type: int """ @@ -390,22 +390,22 @@ def hold_uid(self, hold_uid): @property def hold_username(self): - """Gets the hold_username of this InlineResponse20016List. # noqa: E501 + """Gets the hold_username of this P2pPaymentMethodAccount. # noqa: E501 Cardholder name # noqa: E501 - :return: The hold_username of this InlineResponse20016List. # noqa: E501 + :return: The hold_username of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._hold_username @hold_username.setter def hold_username(self, hold_username): - """Sets the hold_username of this InlineResponse20016List. + """Sets the hold_username of this P2pPaymentMethodAccount. Cardholder name # noqa: E501 - :param hold_username: The hold_username of this InlineResponse20016List. # noqa: E501 + :param hold_username: The hold_username of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -413,22 +413,22 @@ def hold_username(self, hold_username): @property def real_name(self): - """Gets the real_name of this InlineResponse20016List. # noqa: E501 + """Gets the real_name of this P2pPaymentMethodAccount. # noqa: E501 - userfirst name # noqa: E501 + User verified display name. # noqa: E501 - :return: The real_name of this InlineResponse20016List. # noqa: E501 + :return: The real_name of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._real_name @real_name.setter def real_name(self, real_name): - """Sets the real_name of this InlineResponse20016List. + """Sets the real_name of this P2pPaymentMethodAccount. - userfirst name # noqa: E501 + User verified display name. # noqa: E501 - :param real_name: The real_name of this InlineResponse20016List. # noqa: E501 + :param real_name: The real_name of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -436,22 +436,22 @@ def real_name(self, real_name): @property def id(self): - """Gets the id of this InlineResponse20016List. # noqa: E501 + """Gets the id of this P2pPaymentMethodAccount. # noqa: E501 User's currently bound payment method (primary key ID) # noqa: E501 - :return: The id of this InlineResponse20016List. # noqa: E501 + :return: The id of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this InlineResponse20016List. + """Sets the id of this P2pPaymentMethodAccount. User's currently bound payment method (primary key ID) # noqa: E501 - :param id: The id of this InlineResponse20016List. # noqa: E501 + :param id: The id of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -459,22 +459,22 @@ def id(self, id): @property def account_des(self): - """Gets the account_des of this InlineResponse20016List. # noqa: E501 + """Gets the account_des of this P2pPaymentMethodAccount. # noqa: E501 Payment method description # noqa: E501 - :return: The account_des of this InlineResponse20016List. # noqa: E501 + :return: The account_des of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._account_des @account_des.setter def account_des(self, account_des): - """Sets the account_des of this InlineResponse20016List. + """Sets the account_des of this P2pPaymentMethodAccount. Payment method description # noqa: E501 - :param account_des: The account_des of this InlineResponse20016List. # noqa: E501 + :param account_des: The account_des of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -482,22 +482,22 @@ def account_des(self, account_des): @property def pay_type(self): - """Gets the pay_type of this InlineResponse20016List. # noqa: E501 + """Gets the pay_type of this P2pPaymentMethodAccount. # noqa: E501 Payment method type # noqa: E501 - :return: The pay_type of this InlineResponse20016List. # noqa: E501 + :return: The pay_type of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._pay_type @pay_type.setter def pay_type(self, pay_type): - """Sets the pay_type of this InlineResponse20016List. + """Sets the pay_type of this P2pPaymentMethodAccount. Payment method type # noqa: E501 - :param pay_type: The pay_type of this InlineResponse20016List. # noqa: E501 + :param pay_type: The pay_type of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -505,22 +505,22 @@ def pay_type(self, pay_type): @property def file(self): - """Gets the file of this InlineResponse20016List. # noqa: E501 + """Gets the file of this P2pPaymentMethodAccount. # noqa: E501 Payment method file link # noqa: E501 - :return: The file of this InlineResponse20016List. # noqa: E501 + :return: The file of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._file @file.setter def file(self, file): - """Sets the file of this InlineResponse20016List. + """Sets the file of this P2pPaymentMethodAccount. Payment method file link # noqa: E501 - :param file: The file of this InlineResponse20016List. # noqa: E501 + :param file: The file of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -528,22 +528,22 @@ def file(self, file): @property def file_key(self): - """Gets the file_key of this InlineResponse20016List. # noqa: E501 + """Gets the file_key of this P2pPaymentMethodAccount. # noqa: E501 Payment method file key # noqa: E501 - :return: The file_key of this InlineResponse20016List. # noqa: E501 + :return: The file_key of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._file_key @file_key.setter def file_key(self, file_key): - """Sets the file_key of this InlineResponse20016List. + """Sets the file_key of this P2pPaymentMethodAccount. Payment method file key # noqa: E501 - :param file_key: The file_key of this InlineResponse20016List. # noqa: E501 + :param file_key: The file_key of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -551,22 +551,22 @@ def file_key(self, file_key): @property def account(self): - """Gets the account of this InlineResponse20016List. # noqa: E501 + """Gets the account of this P2pPaymentMethodAccount. # noqa: E501 - Payment method name # noqa: E501 + Payment account or masked payment account. # noqa: E501 - :return: The account of this InlineResponse20016List. # noqa: E501 + :return: The account of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._account @account.setter def account(self, account): - """Sets the account of this InlineResponse20016List. + """Sets the account of this P2pPaymentMethodAccount. - Payment method name # noqa: E501 + Payment account or masked payment account. # noqa: E501 - :param account: The account of this InlineResponse20016List. # noqa: E501 + :param account: The account of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -574,22 +574,22 @@ def account(self, account): @property def memo(self): - """Gets the memo of this InlineResponse20016List. # noqa: E501 + """Gets the memo of this P2pPaymentMethodAccount. # noqa: E501 Payment method note # noqa: E501 - :return: The memo of this InlineResponse20016List. # noqa: E501 + :return: The memo of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._memo @memo.setter def memo(self, memo): - """Sets the memo of this InlineResponse20016List. + """Sets the memo of this P2pPaymentMethodAccount. Payment method note # noqa: E501 - :param memo: The memo of this InlineResponse20016List. # noqa: E501 + :param memo: The memo of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -597,22 +597,22 @@ def memo(self, memo): @property def code(self): - """Gets the code of this InlineResponse20016List. # noqa: E501 + """Gets the code of this P2pPaymentMethodAccount. # noqa: E501 Payment method code # noqa: E501 - :return: The code of this InlineResponse20016List. # noqa: E501 + :return: The code of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20016List. + """Sets the code of this P2pPaymentMethodAccount. Payment method code # noqa: E501 - :param code: The code of this InlineResponse20016List. # noqa: E501 + :param code: The code of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -620,22 +620,22 @@ def code(self, code): @property def memo_ext(self): - """Gets the memo_ext of this InlineResponse20016List. # noqa: E501 + """Gets the memo_ext of this P2pPaymentMethodAccount. # noqa: E501 Payment method additional note # noqa: E501 - :return: The memo_ext of this InlineResponse20016List. # noqa: E501 + :return: The memo_ext of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._memo_ext @memo_ext.setter def memo_ext(self, memo_ext): - """Sets the memo_ext of this InlineResponse20016List. + """Sets the memo_ext of this P2pPaymentMethodAccount. Payment method additional note # noqa: E501 - :param memo_ext: The memo_ext of this InlineResponse20016List. # noqa: E501 + :param memo_ext: The memo_ext of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -643,22 +643,22 @@ def memo_ext(self, memo_ext): @property def trade_tips(self): - """Gets the trade_tips of this InlineResponse20016List. # noqa: E501 + """Gets the trade_tips of this P2pPaymentMethodAccount. # noqa: E501 Payment method transaction information # noqa: E501 - :return: The trade_tips of this InlineResponse20016List. # noqa: E501 + :return: The trade_tips of this P2pPaymentMethodAccount. # noqa: E501 :rtype: str """ return self._trade_tips @trade_tips.setter def trade_tips(self, trade_tips): - """Sets the trade_tips of this InlineResponse20016List. + """Sets the trade_tips of this P2pPaymentMethodAccount. Payment method transaction information # noqa: E501 - :param trade_tips: The trade_tips of this InlineResponse20016List. # noqa: E501 + :param trade_tips: The trade_tips of this P2pPaymentMethodAccount. # noqa: E501 :type: str """ @@ -698,14 +698,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20016List): + if not isinstance(other, P2pPaymentMethodAccount): 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, InlineResponse20016List): + if not isinstance(other, P2pPaymentMethodAccount): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20016_data.py b/gate_api/models/p2p_payment_method_group.py similarity index 73% rename from gate_api/models/inline_response20016_data.py rename to gate_api/models/p2p_payment_method_group.py index f9d76faf..104186e8 100644 --- a/gate_api/models/inline_response20016_data.py +++ b/gate_api/models/p2p_payment_method_group.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20016Data(object): +class P2pPaymentMethodGroup(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -36,7 +36,7 @@ class InlineResponse20016Data(object): 'pay_type': 'str', 'pay_name': 'str', 'ids': 'list[int]', - 'list': 'list[InlineResponse20016List]' + 'list': 'list[P2pPaymentMethodAccount]' } attribute_map = { @@ -47,8 +47,8 @@ class InlineResponse20016Data(object): } def __init__(self, pay_type=None, pay_name=None, ids=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, list[int], list[InlineResponse20016List], Configuration) -> None - """InlineResponse20016Data - a model defined in OpenAPI""" # noqa: E501 + # type: (str, str, list[int], list[P2pPaymentMethodAccount], Configuration) -> None + """P2pPaymentMethodGroup - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -70,22 +70,22 @@ def __init__(self, pay_type=None, pay_name=None, ids=None, list=None, local_vars @property def pay_type(self): - """Gets the pay_type of this InlineResponse20016Data. # noqa: E501 + """Gets the pay_type of this P2pPaymentMethodGroup. # noqa: E501 Payment method type # noqa: E501 - :return: The pay_type of this InlineResponse20016Data. # noqa: E501 + :return: The pay_type of this P2pPaymentMethodGroup. # noqa: E501 :rtype: str """ return self._pay_type @pay_type.setter def pay_type(self, pay_type): - """Sets the pay_type of this InlineResponse20016Data. + """Sets the pay_type of this P2pPaymentMethodGroup. Payment method type # noqa: E501 - :param pay_type: The pay_type of this InlineResponse20016Data. # noqa: E501 + :param pay_type: The pay_type of this P2pPaymentMethodGroup. # noqa: E501 :type: str """ @@ -93,22 +93,22 @@ def pay_type(self, pay_type): @property def pay_name(self): - """Gets the pay_name of this InlineResponse20016Data. # noqa: E501 + """Gets the pay_name of this P2pPaymentMethodGroup. # noqa: E501 Payment method name # noqa: E501 - :return: The pay_name of this InlineResponse20016Data. # noqa: E501 + :return: The pay_name of this P2pPaymentMethodGroup. # noqa: E501 :rtype: str """ return self._pay_name @pay_name.setter def pay_name(self, pay_name): - """Sets the pay_name of this InlineResponse20016Data. + """Sets the pay_name of this P2pPaymentMethodGroup. Payment method name # noqa: E501 - :param pay_name: The pay_name of this InlineResponse20016Data. # noqa: E501 + :param pay_name: The pay_name of this P2pPaymentMethodGroup. # noqa: E501 :type: str """ @@ -116,22 +116,22 @@ def pay_name(self, pay_name): @property def ids(self): - """Gets the ids of this InlineResponse20016Data. # noqa: E501 + """Gets the ids of this P2pPaymentMethodGroup. # noqa: E501 User's currently bound payment method (primary key ID) # noqa: E501 - :return: The ids of this InlineResponse20016Data. # noqa: E501 + :return: The ids of this P2pPaymentMethodGroup. # noqa: E501 :rtype: list[int] """ return self._ids @ids.setter def ids(self, ids): - """Sets the ids of this InlineResponse20016Data. + """Sets the ids of this P2pPaymentMethodGroup. User's currently bound payment method (primary key ID) # noqa: E501 - :param ids: The ids of this InlineResponse20016Data. # noqa: E501 + :param ids: The ids of this P2pPaymentMethodGroup. # noqa: E501 :type: list[int] """ @@ -139,21 +139,21 @@ def ids(self, ids): @property def list(self): - """Gets the list of this InlineResponse20016Data. # noqa: E501 + """Gets the list of this P2pPaymentMethodGroup. # noqa: E501 - :return: The list of this InlineResponse20016Data. # noqa: E501 - :rtype: list[InlineResponse20016List] + :return: The list of this P2pPaymentMethodGroup. # noqa: E501 + :rtype: list[P2pPaymentMethodAccount] """ return self._list @list.setter def list(self, list): - """Sets the list of this InlineResponse20016Data. + """Sets the list of this P2pPaymentMethodGroup. - :param list: The list of this InlineResponse20016Data. # noqa: E501 - :type: list[InlineResponse20016List] + :param list: The list of this P2pPaymentMethodGroup. # noqa: E501 + :type: list[P2pPaymentMethodAccount] """ self._list = list @@ -192,14 +192,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20016Data): + if not isinstance(other, P2pPaymentMethodGroup): 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, InlineResponse20016Data): + if not isinstance(other, P2pPaymentMethodGroup): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20016.py b/gate_api/models/p2p_payment_methods_response.py similarity index 68% rename from gate_api/models/inline_response20016.py rename to gate_api/models/p2p_payment_methods_response.py index 02bc76da..71b3e8ef 100644 --- a/gate_api/models/inline_response20016.py +++ b/gate_api/models/p2p_payment_methods_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20016(object): +class P2pPaymentMethodsResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,7 @@ class InlineResponse20016(object): 'method': 'str', 'code': 'int', 'message': 'str', - 'data': 'list[InlineResponse20016Data]', + 'data': 'list[P2pPaymentMethodGroup]', 'version': 'str' } @@ -51,8 +51,8 @@ class InlineResponse20016(object): } def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, list[InlineResponse20016Data], str, Configuration) -> None - """InlineResponse20016 - a model defined in OpenAPI""" # noqa: E501 + # type: (float, str, int, str, list[P2pPaymentMethodGroup], str, Configuration) -> None + """P2pPaymentMethodsResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -80,20 +80,20 @@ def __init__(self, timestamp=None, method=None, code=None, message=None, data=No @property def timestamp(self): - """Gets the timestamp of this InlineResponse20016. # noqa: E501 + """Gets the timestamp of this P2pPaymentMethodsResponse. # noqa: E501 - :return: The timestamp of this InlineResponse20016. # noqa: E501 + :return: The timestamp of this P2pPaymentMethodsResponse. # noqa: E501 :rtype: float """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20016. + """Sets the timestamp of this P2pPaymentMethodsResponse. - :param timestamp: The timestamp of this InlineResponse20016. # noqa: E501 + :param timestamp: The timestamp of this P2pPaymentMethodsResponse. # noqa: E501 :type: float """ @@ -101,20 +101,20 @@ def timestamp(self, timestamp): @property def method(self): - """Gets the method of this InlineResponse20016. # noqa: E501 + """Gets the method of this P2pPaymentMethodsResponse. # noqa: E501 - :return: The method of this InlineResponse20016. # noqa: E501 + :return: The method of this P2pPaymentMethodsResponse. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): - """Sets the method of this InlineResponse20016. + """Sets the method of this P2pPaymentMethodsResponse. - :param method: The method of this InlineResponse20016. # noqa: E501 + :param method: The method of this P2pPaymentMethodsResponse. # noqa: E501 :type: str """ @@ -122,20 +122,20 @@ def method(self, method): @property def code(self): - """Gets the code of this InlineResponse20016. # noqa: E501 + """Gets the code of this P2pPaymentMethodsResponse. # noqa: E501 - :return: The code of this InlineResponse20016. # noqa: E501 + :return: The code of this P2pPaymentMethodsResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20016. + """Sets the code of this P2pPaymentMethodsResponse. - :param code: The code of this InlineResponse20016. # noqa: E501 + :param code: The code of this P2pPaymentMethodsResponse. # noqa: E501 :type: int """ @@ -143,20 +143,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20016. # noqa: E501 + """Gets the message of this P2pPaymentMethodsResponse. # noqa: E501 - :return: The message of this InlineResponse20016. # noqa: E501 + :return: The message of this P2pPaymentMethodsResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20016. + """Sets the message of this P2pPaymentMethodsResponse. - :param message: The message of this InlineResponse20016. # noqa: E501 + :param message: The message of this P2pPaymentMethodsResponse. # noqa: E501 :type: str """ @@ -164,41 +164,41 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20016. # noqa: E501 + """Gets the data of this P2pPaymentMethodsResponse. # noqa: E501 - :return: The data of this InlineResponse20016. # noqa: E501 - :rtype: list[InlineResponse20016Data] + :return: The data of this P2pPaymentMethodsResponse. # noqa: E501 + :rtype: list[P2pPaymentMethodGroup] """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20016. + """Sets the data of this P2pPaymentMethodsResponse. - :param data: The data of this InlineResponse20016. # noqa: E501 - :type: list[InlineResponse20016Data] + :param data: The data of this P2pPaymentMethodsResponse. # noqa: E501 + :type: list[P2pPaymentMethodGroup] """ self._data = data @property def version(self): - """Gets the version of this InlineResponse20016. # noqa: E501 + """Gets the version of this P2pPaymentMethodsResponse. # noqa: E501 - :return: The version of this InlineResponse20016. # noqa: E501 + :return: The version of this P2pPaymentMethodsResponse. # noqa: E501 :rtype: str """ return self._version @version.setter def version(self, version): - """Sets the version of this InlineResponse20016. + """Sets the version of this P2pPaymentMethodsResponse. - :param version: The version of this InlineResponse20016. # noqa: E501 + :param version: The version of this P2pPaymentMethodsResponse. # noqa: E501 :type: str """ @@ -238,14 +238,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20016): + if not isinstance(other, P2pPaymentMethodsResponse): 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, InlineResponse20016): + if not isinstance(other, P2pPaymentMethodsResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_send_chat_message_response.py b/gate_api/models/p2p_send_chat_message_response.py new file mode 100644 index 00000000..4f3e8f89 --- /dev/null +++ b/gate_api/models/p2p_send_chat_message_response.py @@ -0,0 +1,251 @@ +# 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 P2pSendChatMessageResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'P2pSendChatMessageResult', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, P2pSendChatMessageResult, str, Configuration) -> None + """P2pSendChatMessageResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pSendChatMessageResponse. # noqa: E501 + + + :return: The timestamp of this P2pSendChatMessageResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pSendChatMessageResponse. + + + :param timestamp: The timestamp of this P2pSendChatMessageResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pSendChatMessageResponse. # noqa: E501 + + + :return: The method of this P2pSendChatMessageResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pSendChatMessageResponse. + + + :param method: The method of this P2pSendChatMessageResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pSendChatMessageResponse. # noqa: E501 + + + :return: The code of this P2pSendChatMessageResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pSendChatMessageResponse. + + + :param code: The code of this P2pSendChatMessageResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pSendChatMessageResponse. # noqa: E501 + + + :return: The message of this P2pSendChatMessageResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pSendChatMessageResponse. + + + :param message: The message of this P2pSendChatMessageResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pSendChatMessageResponse. # noqa: E501 + + + :return: The data of this P2pSendChatMessageResponse. # noqa: E501 + :rtype: P2pSendChatMessageResult + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pSendChatMessageResponse. + + + :param data: The data of this P2pSendChatMessageResponse. # noqa: E501 + :type: P2pSendChatMessageResult + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pSendChatMessageResponse. # noqa: E501 + + + :return: The version of this P2pSendChatMessageResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pSendChatMessageResponse. + + + :param version: The version of this P2pSendChatMessageResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pSendChatMessageResponse): + 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, P2pSendChatMessageResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_send_chat_message_result.py b/gate_api/models/p2p_send_chat_message_result.py new file mode 100644 index 00000000..d67875f2 --- /dev/null +++ b/gate_api/models/p2p_send_chat_message_result.py @@ -0,0 +1,275 @@ +# 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 P2pSendChatMessageResult(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 = { + 'srvtm': 'int', + 'txid': 'int', + 'conversation_id': 'str', + 'msg_type': 'int', + 'risk_type': 'int', + 'toast_msg': 'str' + } + + attribute_map = { + 'srvtm': 'SRVTM', + 'txid': 'txid', + 'conversation_id': 'conversation_id', + 'msg_type': 'msg_type', + 'risk_type': 'risk_type', + 'toast_msg': 'toast_msg' + } + + def __init__(self, srvtm=None, txid=None, conversation_id=None, msg_type=None, risk_type=None, toast_msg=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, int, int, str, Configuration) -> None + """P2pSendChatMessageResult - 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._srvtm = None + self._txid = None + self._conversation_id = None + self._msg_type = None + self._risk_type = None + self._toast_msg = None + self.discriminator = None + + if srvtm is not None: + self.srvtm = srvtm + if txid is not None: + self.txid = txid + if conversation_id is not None: + self.conversation_id = conversation_id + if msg_type is not None: + self.msg_type = msg_type + if risk_type is not None: + self.risk_type = risk_type + if toast_msg is not None: + self.toast_msg = toast_msg + + @property + def srvtm(self): + """Gets the srvtm of this P2pSendChatMessageResult. # noqa: E501 + + Timestamp when message was successfully sent (current timestamp) # noqa: E501 + + :return: The srvtm of this P2pSendChatMessageResult. # noqa: E501 + :rtype: int + """ + return self._srvtm + + @srvtm.setter + def srvtm(self, srvtm): + """Sets the srvtm of this P2pSendChatMessageResult. + + Timestamp when message was successfully sent (current timestamp) # noqa: E501 + + :param srvtm: The srvtm of this P2pSendChatMessageResult. # noqa: E501 + :type: int + """ + + self._srvtm = srvtm + + @property + def txid(self): + """Gets the txid of this P2pSendChatMessageResult. # noqa: E501 + + Order ID # noqa: E501 + + :return: The txid of this P2pSendChatMessageResult. # noqa: E501 + :rtype: int + """ + return self._txid + + @txid.setter + def txid(self, txid): + """Sets the txid of this P2pSendChatMessageResult. + + Order ID # noqa: E501 + + :param txid: The txid of this P2pSendChatMessageResult. # noqa: E501 + :type: int + """ + + self._txid = txid + + @property + def conversation_id(self): + """Gets the conversation_id of this P2pSendChatMessageResult. # noqa: E501 + + Chat ID, formatted as both parties' UIDs concatenated in ascending order # noqa: E501 + + :return: The conversation_id of this P2pSendChatMessageResult. # noqa: E501 + :rtype: str + """ + return self._conversation_id + + @conversation_id.setter + def conversation_id(self, conversation_id): + """Sets the conversation_id of this P2pSendChatMessageResult. + + Chat ID, formatted as both parties' UIDs concatenated in ascending order # noqa: E501 + + :param conversation_id: The conversation_id of this P2pSendChatMessageResult. # noqa: E501 + :type: str + """ + + self._conversation_id = conversation_id + + @property + def msg_type(self): + """Gets the msg_type of this P2pSendChatMessageResult. # noqa: E501 + + Message content type when risk control is hit. 0: text # noqa: E501 + + :return: The msg_type of this P2pSendChatMessageResult. # noqa: E501 + :rtype: int + """ + return self._msg_type + + @msg_type.setter + def msg_type(self, msg_type): + """Sets the msg_type of this P2pSendChatMessageResult. + + Message content type when risk control is hit. 0: text # noqa: E501 + + :param msg_type: The msg_type of this P2pSendChatMessageResult. # noqa: E501 + :type: int + """ + allowed_values = [0] # noqa: E501 + if self.local_vars_configuration.client_side_validation and msg_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `msg_type` ({0}), must be one of {1}" # noqa: E501 + .format(msg_type, allowed_values) + ) + + self._msg_type = msg_type + + @property + def risk_type(self): + """Gets the risk_type of this P2pSendChatMessageResult. # noqa: E501 + + Risk control display type. 1: off-platform traffic diversion risk; returned only when risk control is hit # noqa: E501 + + :return: The risk_type of this P2pSendChatMessageResult. # noqa: E501 + :rtype: int + """ + return self._risk_type + + @risk_type.setter + def risk_type(self, risk_type): + """Sets the risk_type of this P2pSendChatMessageResult. + + Risk control display type. 1: off-platform traffic diversion risk; returned only when risk control is hit # noqa: E501 + + :param risk_type: The risk_type of this P2pSendChatMessageResult. # noqa: E501 + :type: int + """ + allowed_values = [1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and risk_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `risk_type` ({0}), must be one of {1}" # noqa: E501 + .format(risk_type, allowed_values) + ) + + self._risk_type = risk_type + + @property + def toast_msg(self): + """Gets the toast_msg of this P2pSendChatMessageResult. # noqa: E501 + + Risk control prompt message; returned only when risk_type=1 # noqa: E501 + + :return: The toast_msg of this P2pSendChatMessageResult. # noqa: E501 + :rtype: str + """ + return self._toast_msg + + @toast_msg.setter + def toast_msg(self, toast_msg): + """Sets the toast_msg of this P2pSendChatMessageResult. + + Risk control prompt message; returned only when risk_type=1 # noqa: E501 + + :param toast_msg: The toast_msg of this P2pSendChatMessageResult. # noqa: E501 + :type: str + """ + + self._toast_msg = toast_msg + + 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, P2pSendChatMessageResult): + 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, P2pSendChatMessageResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_transaction_action_response.py b/gate_api/models/p2p_transaction_action_response.py new file mode 100644 index 00000000..ef545166 --- /dev/null +++ b/gate_api/models/p2p_transaction_action_response.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 P2pTransactionActionResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'object', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, object, str, Configuration) -> None + """P2pTransactionActionResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pTransactionActionResponse. # noqa: E501 + + Response timestamp. # noqa: E501 + + :return: The timestamp of this P2pTransactionActionResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pTransactionActionResponse. + + Response timestamp. # noqa: E501 + + :param timestamp: The timestamp of this P2pTransactionActionResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pTransactionActionResponse. # noqa: E501 + + Placeholder for request method. # noqa: E501 + + :return: The method of this P2pTransactionActionResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pTransactionActionResponse. + + Placeholder for request method. # noqa: E501 + + :param method: The method of this P2pTransactionActionResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pTransactionActionResponse. # noqa: E501 + + Response code, 0 means success # noqa: E501 + + :return: The code of this P2pTransactionActionResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pTransactionActionResponse. + + Response code, 0 means success # noqa: E501 + + :param code: The code of this P2pTransactionActionResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pTransactionActionResponse. # noqa: E501 + + Response message # noqa: E501 + + :return: The message of this P2pTransactionActionResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pTransactionActionResponse. + + Response message # noqa: E501 + + :param message: The message of this P2pTransactionActionResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pTransactionActionResponse. # noqa: E501 + + Empty object on success. # noqa: E501 + + :return: The data of this P2pTransactionActionResponse. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pTransactionActionResponse. + + Empty object on success. # noqa: E501 + + :param data: The data of this P2pTransactionActionResponse. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pTransactionActionResponse. # noqa: E501 + + API version. # noqa: E501 + + :return: The version of this P2pTransactionActionResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pTransactionActionResponse. + + API version. # noqa: E501 + + :param version: The version of this P2pTransactionActionResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pTransactionActionResponse): + 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, P2pTransactionActionResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20017_data_convert_info.py b/gate_api/models/p2p_transaction_convert_info.py similarity index 69% rename from gate_api/models/inline_response20017_data_convert_info.py rename to gate_api/models/p2p_transaction_convert_info.py index 074ede0b..1c4a95fd 100644 --- a/gate_api/models/inline_response20017_data_convert_info.py +++ b/gate_api/models/p2p_transaction_convert_info.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20017DataConvertInfo(object): +class P2pTransactionConvertInfo(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -60,7 +60,7 @@ class InlineResponse20017DataConvertInfo(object): def __init__(self, convert_type=None, convert_status=None, pre_rate=None, rate=None, pre_fiat_rate=None, fiat_rate=None, amount=None, convert_amount=None, slippage=None, status=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """InlineResponse20017DataConvertInfo - a model defined in OpenAPI""" # noqa: E501 + """P2pTransactionConvertInfo - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -100,22 +100,22 @@ def __init__(self, convert_type=None, convert_status=None, pre_rate=None, rate=N @property def convert_type(self): - """Gets the convert_type of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the convert_type of this P2pTransactionConvertInfo. # noqa: E501 Flash swap target currency # noqa: E501 - :return: The convert_type of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The convert_type of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._convert_type @convert_type.setter def convert_type(self, convert_type): - """Sets the convert_type of this InlineResponse20017DataConvertInfo. + """Sets the convert_type of this P2pTransactionConvertInfo. Flash swap target currency # noqa: E501 - :param convert_type: The convert_type of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param convert_type: The convert_type of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -123,22 +123,22 @@ def convert_type(self, convert_type): @property def convert_status(self): - """Gets the convert_status of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the convert_status of this P2pTransactionConvertInfo. # noqa: E501 Flash swap order status # noqa: E501 - :return: The convert_status of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The convert_status of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._convert_status @convert_status.setter def convert_status(self, convert_status): - """Sets the convert_status of this InlineResponse20017DataConvertInfo. + """Sets the convert_status of this P2pTransactionConvertInfo. Flash swap order status # noqa: E501 - :param convert_status: The convert_status of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param convert_status: The convert_status of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -146,22 +146,22 @@ def convert_status(self, convert_status): @property def pre_rate(self): - """Gets the pre_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the pre_rate of this P2pTransactionConvertInfo. # noqa: E501 Expected price when placing order # noqa: E501 - :return: The pre_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The pre_rate of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._pre_rate @pre_rate.setter def pre_rate(self, pre_rate): - """Sets the pre_rate of this InlineResponse20017DataConvertInfo. + """Sets the pre_rate of this P2pTransactionConvertInfo. Expected price when placing order # noqa: E501 - :param pre_rate: The pre_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param pre_rate: The pre_rate of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -169,22 +169,22 @@ def pre_rate(self, pre_rate): @property def rate(self): - """Gets the rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the rate of this P2pTransactionConvertInfo. # noqa: E501 Execution price # noqa: E501 - :return: The rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The rate of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._rate @rate.setter def rate(self, rate): - """Sets the rate of this InlineResponse20017DataConvertInfo. + """Sets the rate of this P2pTransactionConvertInfo. Execution price # noqa: E501 - :param rate: The rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param rate: The rate of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -192,22 +192,22 @@ def rate(self, rate): @property def pre_fiat_rate(self): - """Gets the pre_fiat_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the pre_fiat_rate of this P2pTransactionConvertInfo. # noqa: E501 Expected fiat price when placing order # noqa: E501 - :return: The pre_fiat_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The pre_fiat_rate of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._pre_fiat_rate @pre_fiat_rate.setter def pre_fiat_rate(self, pre_fiat_rate): - """Sets the pre_fiat_rate of this InlineResponse20017DataConvertInfo. + """Sets the pre_fiat_rate of this P2pTransactionConvertInfo. Expected fiat price when placing order # noqa: E501 - :param pre_fiat_rate: The pre_fiat_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param pre_fiat_rate: The pre_fiat_rate of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -215,22 +215,22 @@ def pre_fiat_rate(self, pre_fiat_rate): @property def fiat_rate(self): - """Gets the fiat_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the fiat_rate of this P2pTransactionConvertInfo. # noqa: E501 Fiat price at execution # noqa: E501 - :return: The fiat_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The fiat_rate of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._fiat_rate @fiat_rate.setter def fiat_rate(self, fiat_rate): - """Sets the fiat_rate of this InlineResponse20017DataConvertInfo. + """Sets the fiat_rate of this P2pTransactionConvertInfo. Fiat price at execution # noqa: E501 - :param fiat_rate: The fiat_rate of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param fiat_rate: The fiat_rate of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -238,22 +238,22 @@ def fiat_rate(self, fiat_rate): @property def amount(self): - """Gets the amount of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the amount of this P2pTransactionConvertInfo. # noqa: E501 Size # noqa: E501 - :return: The amount of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The amount of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._amount @amount.setter def amount(self, amount): - """Sets the amount of this InlineResponse20017DataConvertInfo. + """Sets the amount of this P2pTransactionConvertInfo. Size # noqa: E501 - :param amount: The amount of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param amount: The amount of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -261,22 +261,22 @@ def amount(self, amount): @property def convert_amount(self): - """Gets the convert_amount of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the convert_amount of this P2pTransactionConvertInfo. # noqa: E501 Swap Amount # noqa: E501 - :return: The convert_amount of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The convert_amount of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._convert_amount @convert_amount.setter def convert_amount(self, convert_amount): - """Sets the convert_amount of this InlineResponse20017DataConvertInfo. + """Sets the convert_amount of this P2pTransactionConvertInfo. Swap Amount # noqa: E501 - :param convert_amount: The convert_amount of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param convert_amount: The convert_amount of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -284,22 +284,22 @@ def convert_amount(self, convert_amount): @property def slippage(self): - """Gets the slippage of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the slippage of this P2pTransactionConvertInfo. # noqa: E501 Slippage calculation: slippage = (expected price when placing order - real-time price during auto swap) / expected price when placing order # noqa: E501 - :return: The slippage of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The slippage of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._slippage @slippage.setter def slippage(self, slippage): - """Sets the slippage of this InlineResponse20017DataConvertInfo. + """Sets the slippage of this P2pTransactionConvertInfo. Slippage calculation: slippage = (expected price when placing order - real-time price during auto swap) / expected price when placing order # noqa: E501 - :param slippage: The slippage of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param slippage: The slippage of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -307,22 +307,22 @@ def slippage(self, slippage): @property def status(self): - """Gets the status of this InlineResponse20017DataConvertInfo. # noqa: E501 + """Gets the status of this P2pTransactionConvertInfo. # noqa: E501 Flash swap order display status # noqa: E501 - :return: The status of this InlineResponse20017DataConvertInfo. # noqa: E501 + :return: The status of this P2pTransactionConvertInfo. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this InlineResponse20017DataConvertInfo. + """Sets the status of this P2pTransactionConvertInfo. Flash swap order display status # noqa: E501 - :param status: The status of this InlineResponse20017DataConvertInfo. # noqa: E501 + :param status: The status of this P2pTransactionConvertInfo. # noqa: E501 :type: str """ @@ -362,14 +362,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20017DataConvertInfo): + if not isinstance(other, P2pTransactionConvertInfo): 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, InlineResponse20017DataConvertInfo): + if not isinstance(other, P2pTransactionConvertInfo): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_transaction_detail.py b/gate_api/models/p2p_transaction_detail.py new file mode 100644 index 00000000..17f879e7 --- /dev/null +++ b/gate_api/models/p2p_transaction_detail.py @@ -0,0 +1,1439 @@ +# 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 P2pTransactionDetail(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_sell': 'int', + 'txid': 'int', + 'orderid': 'int', + 'timest': 'int', + 'last_pay_time': 'int', + 'remain_pay_time': 'int', + 'currency_type': 'str', + 'want_type': 'str', + 'symbol': 'str', + 'rate': 'str', + 'amount': 'str', + 'total': 'str', + 'status': 'str', + 'reason_id': 'str', + 'reason_desc': 'str', + 'cancel_time': 'str', + 'in_appeal': 'int', + 'dispute_time': 'int', + 'cancelable': 'int', + 'hide_payment': 'int', + 'trade_tips': 'str', + 'show_bank': 'str', + 'bankname': 'str', + 'bankbranch': 'str', + 'bankid': 'str', + 'bank_holder_realname': 'str', + 'show_ali': 'str', + 'aliname': 'str', + 'is_alicode': 'int', + 'show_wechat': 'str', + 'wename': 'str', + 'show_others': 'str', + 'pay_others': 'list[P2pTransactionDetailPayOthers]', + 'sel_paytype': 'str', + 'its_uid': 'str', + 'its_nickname': 'str', + 'its_realname': 'str', + 'have_traded': 'int', + 'appeal_allow_cancel': 'int', + 'appeal_verdict_has_open': 'str', + 'im_unread': 'int', + 'payment_voucher_url': 'list[str]', + 'timest_paid': 'int', + 'own_realname': 'str', + 'order_type': 'int', + 'is_show_receive': 'int', + 'show_seller_contact_info': 'bool', + 'supported_pay_types': 'list[str]' + } + + attribute_map = { + 'is_sell': 'is_sell', + 'txid': 'txid', + 'orderid': 'orderid', + 'timest': 'timest', + 'last_pay_time': 'last_pay_time', + 'remain_pay_time': 'remain_pay_time', + 'currency_type': 'currency_type', + 'want_type': 'want_type', + 'symbol': 'symbol', + 'rate': 'rate', + 'amount': 'amount', + 'total': 'total', + 'status': 'status', + 'reason_id': 'reason_id', + 'reason_desc': 'reason_desc', + 'cancel_time': 'cancel_time', + 'in_appeal': 'in_appeal', + 'dispute_time': 'dispute_time', + 'cancelable': 'cancelable', + 'hide_payment': 'hide_payment', + 'trade_tips': 'trade_tips', + 'show_bank': 'show_bank', + 'bankname': 'bankname', + 'bankbranch': 'bankbranch', + 'bankid': 'bankid', + 'bank_holder_realname': 'bank_holder_realname', + 'show_ali': 'show_ali', + 'aliname': 'aliname', + 'is_alicode': 'is_alicode', + 'show_wechat': 'show_wechat', + 'wename': 'wename', + 'show_others': 'show_others', + 'pay_others': 'pay_others', + 'sel_paytype': 'sel_paytype', + 'its_uid': 'its_uid', + 'its_nickname': 'its_nickname', + 'its_realname': 'its_realname', + 'have_traded': 'have_traded', + 'appeal_allow_cancel': 'appeal_allow_cancel', + 'appeal_verdict_has_open': 'appeal_verdict_has_open', + 'im_unread': 'im_unread', + 'payment_voucher_url': 'payment_voucher_url', + 'timest_paid': 'timest_paid', + 'own_realname': 'own_realname', + 'order_type': 'order_type', + 'is_show_receive': 'is_show_receive', + 'show_seller_contact_info': 'show_seller_contact_info', + 'supported_pay_types': 'supported_pay_types' + } + + def __init__(self, is_sell=None, txid=None, orderid=None, timest=None, last_pay_time=None, remain_pay_time=None, currency_type=None, want_type=None, symbol=None, rate=None, amount=None, total=None, status=None, reason_id=None, reason_desc=None, cancel_time=None, in_appeal=None, dispute_time=None, cancelable=None, hide_payment=None, trade_tips=None, show_bank=None, bankname=None, bankbranch=None, bankid=None, bank_holder_realname=None, show_ali=None, aliname=None, is_alicode=None, show_wechat=None, wename=None, show_others=None, pay_others=None, sel_paytype=None, its_uid=None, its_nickname=None, its_realname=None, have_traded=None, appeal_allow_cancel=None, appeal_verdict_has_open=None, im_unread=None, payment_voucher_url=None, timest_paid=None, own_realname=None, order_type=None, is_show_receive=None, show_seller_contact_info=None, supported_pay_types=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, int, int, int, str, str, str, str, str, str, str, str, str, str, int, int, int, int, str, str, str, str, str, str, str, str, int, str, str, str, list[P2pTransactionDetailPayOthers], str, str, str, str, int, int, str, int, list[str], int, str, int, int, bool, list[str], Configuration) -> None + """P2pTransactionDetail - 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_sell = None + self._txid = None + self._orderid = None + self._timest = None + self._last_pay_time = None + self._remain_pay_time = None + self._currency_type = None + self._want_type = None + self._symbol = None + self._rate = None + self._amount = None + self._total = None + self._status = None + self._reason_id = None + self._reason_desc = None + self._cancel_time = None + self._in_appeal = None + self._dispute_time = None + self._cancelable = None + self._hide_payment = None + self._trade_tips = None + self._show_bank = None + self._bankname = None + self._bankbranch = None + self._bankid = None + self._bank_holder_realname = None + self._show_ali = None + self._aliname = None + self._is_alicode = None + self._show_wechat = None + self._wename = None + self._show_others = None + self._pay_others = None + self._sel_paytype = None + self._its_uid = None + self._its_nickname = None + self._its_realname = None + self._have_traded = None + self._appeal_allow_cancel = None + self._appeal_verdict_has_open = None + self._im_unread = None + self._payment_voucher_url = None + self._timest_paid = None + self._own_realname = None + self._order_type = None + self._is_show_receive = None + self._show_seller_contact_info = None + self._supported_pay_types = None + self.discriminator = None + + if is_sell is not None: + self.is_sell = is_sell + if txid is not None: + self.txid = txid + if orderid is not None: + self.orderid = orderid + if timest is not None: + self.timest = timest + if last_pay_time is not None: + self.last_pay_time = last_pay_time + if remain_pay_time is not None: + self.remain_pay_time = remain_pay_time + if currency_type is not None: + self.currency_type = currency_type + if want_type is not None: + self.want_type = want_type + if symbol is not None: + self.symbol = symbol + if rate is not None: + self.rate = rate + if amount is not None: + self.amount = amount + if total is not None: + self.total = total + if status is not None: + self.status = status + if reason_id is not None: + self.reason_id = reason_id + if reason_desc is not None: + self.reason_desc = reason_desc + if cancel_time is not None: + self.cancel_time = cancel_time + if in_appeal is not None: + self.in_appeal = in_appeal + if dispute_time is not None: + self.dispute_time = dispute_time + if cancelable is not None: + self.cancelable = cancelable + if hide_payment is not None: + self.hide_payment = hide_payment + if trade_tips is not None: + self.trade_tips = trade_tips + if show_bank is not None: + self.show_bank = show_bank + if bankname is not None: + self.bankname = bankname + if bankbranch is not None: + self.bankbranch = bankbranch + if bankid is not None: + self.bankid = bankid + if bank_holder_realname is not None: + self.bank_holder_realname = bank_holder_realname + if show_ali is not None: + self.show_ali = show_ali + if aliname is not None: + self.aliname = aliname + if is_alicode is not None: + self.is_alicode = is_alicode + if show_wechat is not None: + self.show_wechat = show_wechat + if wename is not None: + self.wename = wename + if show_others is not None: + self.show_others = show_others + if pay_others is not None: + self.pay_others = pay_others + if sel_paytype is not None: + self.sel_paytype = sel_paytype + if its_uid is not None: + self.its_uid = its_uid + if its_nickname is not None: + self.its_nickname = its_nickname + if its_realname is not None: + self.its_realname = its_realname + if have_traded is not None: + self.have_traded = have_traded + if appeal_allow_cancel is not None: + self.appeal_allow_cancel = appeal_allow_cancel + if appeal_verdict_has_open is not None: + self.appeal_verdict_has_open = appeal_verdict_has_open + if im_unread is not None: + self.im_unread = im_unread + if payment_voucher_url is not None: + self.payment_voucher_url = payment_voucher_url + if timest_paid is not None: + self.timest_paid = timest_paid + if own_realname is not None: + self.own_realname = own_realname + if order_type is not None: + self.order_type = order_type + if is_show_receive is not None: + self.is_show_receive = is_show_receive + if show_seller_contact_info is not None: + self.show_seller_contact_info = show_seller_contact_info + if supported_pay_types is not None: + self.supported_pay_types = supported_pay_types + + @property + def is_sell(self): + """Gets the is_sell of this P2pTransactionDetail. # noqa: E501 + + Whether the current user is the seller. `1`: yes; `0`: no. # noqa: E501 + + :return: The is_sell of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._is_sell + + @is_sell.setter + def is_sell(self, is_sell): + """Sets the is_sell of this P2pTransactionDetail. + + Whether the current user is the seller. `1`: yes; `0`: no. # noqa: E501 + + :param is_sell: The is_sell of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._is_sell = is_sell + + @property + def txid(self): + """Gets the txid of this P2pTransactionDetail. # noqa: E501 + + Order ID # noqa: E501 + + :return: The txid of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._txid + + @txid.setter + def txid(self, txid): + """Sets the txid of this P2pTransactionDetail. + + Order ID # noqa: E501 + + :param txid: The txid of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._txid = txid + + @property + def orderid(self): + """Gets the orderid of this P2pTransactionDetail. # noqa: E501 + + Order ID # noqa: E501 + + :return: The orderid of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._orderid + + @orderid.setter + def orderid(self, orderid): + """Sets the orderid of this P2pTransactionDetail. + + Order ID # noqa: E501 + + :param orderid: The orderid of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._orderid = orderid + + @property + def timest(self): + """Gets the timest of this P2pTransactionDetail. # noqa: E501 + + Order creation timestamp # noqa: E501 + + :return: The timest of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._timest + + @timest.setter + def timest(self, timest): + """Sets the timest of this P2pTransactionDetail. + + Order creation timestamp # noqa: E501 + + :param timest: The timest of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._timest = timest + + @property + def last_pay_time(self): + """Gets the last_pay_time of this P2pTransactionDetail. # noqa: E501 + + Payment deadline # noqa: E501 + + :return: The last_pay_time of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._last_pay_time + + @last_pay_time.setter + def last_pay_time(self, last_pay_time): + """Sets the last_pay_time of this P2pTransactionDetail. + + Payment deadline # noqa: E501 + + :param last_pay_time: The last_pay_time of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._last_pay_time = last_pay_time + + @property + def remain_pay_time(self): + """Gets the remain_pay_time of this P2pTransactionDetail. # noqa: E501 + + Seconds left to pay; `<= 0` means overdue. # noqa: E501 + + :return: The remain_pay_time of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._remain_pay_time + + @remain_pay_time.setter + def remain_pay_time(self, remain_pay_time): + """Sets the remain_pay_time of this P2pTransactionDetail. + + Seconds left to pay; `<= 0` means overdue. # noqa: E501 + + :param remain_pay_time: The remain_pay_time of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._remain_pay_time = remain_pay_time + + @property + def currency_type(self): + """Gets the currency_type of this P2pTransactionDetail. # noqa: E501 + + Cryptocurrency symbol. # noqa: E501 + + :return: The currency_type of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._currency_type + + @currency_type.setter + def currency_type(self, currency_type): + """Sets the currency_type of this P2pTransactionDetail. + + Cryptocurrency symbol. # noqa: E501 + + :param currency_type: The currency_type of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._currency_type = currency_type + + @property + def want_type(self): + """Gets the want_type of this P2pTransactionDetail. # noqa: E501 + + Fiat currency # noqa: E501 + + :return: The want_type of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._want_type + + @want_type.setter + def want_type(self, want_type): + """Sets the want_type of this P2pTransactionDetail. + + Fiat currency # noqa: E501 + + :param want_type: The want_type of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._want_type = want_type + + @property + def symbol(self): + """Gets the symbol of this P2pTransactionDetail. # noqa: E501 + + Fiat currency symbol # noqa: E501 + + :return: The symbol of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this P2pTransactionDetail. + + Fiat currency symbol # noqa: E501 + + :param symbol: The symbol of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def rate(self): + """Gets the rate of this P2pTransactionDetail. # noqa: E501 + + Order price in `want_type` units. # noqa: E501 + + :return: The rate of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this P2pTransactionDetail. + + Order price in `want_type` units. # noqa: E501 + + :param rate: The rate of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._rate = rate + + @property + def amount(self): + """Gets the amount of this P2pTransactionDetail. # noqa: E501 + + Order size in cryptocurrency. # noqa: E501 + + :return: The amount of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this P2pTransactionDetail. + + Order size in cryptocurrency. # noqa: E501 + + :param amount: The amount of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def total(self): + """Gets the total of this P2pTransactionDetail. # noqa: E501 + + Total fiat amount of the order. # noqa: E501 + + :return: The total of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this P2pTransactionDetail. + + Total fiat amount of the order. # noqa: E501 + + :param total: The total of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._total = total + + @property + def status(self): + """Gets the status of this P2pTransactionDetail. # noqa: E501 + + Display status: `unpay` unpaid; `hide_payment` unpaid with payment info hidden; `paid` buyer paid; `unconfirmed` awaiting seller confirmation; `locked` locked; `finished` done; `cancel` canceled; `expired` expired; `bclosed` arbitration filled; `sclosed` arbitration canceled. # noqa: E501 + + :return: The status of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this P2pTransactionDetail. + + Display status: `unpay` unpaid; `hide_payment` unpaid with payment info hidden; `paid` buyer paid; `unconfirmed` awaiting seller confirmation; `locked` locked; `finished` done; `cancel` canceled; `expired` expired; `bclosed` arbitration filled; `sclosed` arbitration canceled. # noqa: E501 + + :param status: The status of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def reason_id(self): + """Gets the reason_id of this P2pTransactionDetail. # noqa: E501 + + Cancel reason ID; empty string means none. Examples: `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller did not provide a real account; `6` price/amount mismatch; `9` other; `10` seller cannot release and refund issued; `11` terms not met; `12` seller payout account risk-controlled. # noqa: E501 + + :return: The reason_id of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._reason_id + + @reason_id.setter + def reason_id(self, reason_id): + """Sets the reason_id of this P2pTransactionDetail. + + Cancel reason ID; empty string means none. Examples: `1` no longer want to buy; `2` cannot reach seller; `3` will not pay; `4` seller did not provide a real account; `6` price/amount mismatch; `9` other; `10` seller cannot release and refund issued; `11` terms not met; `12` seller payout account risk-controlled. # noqa: E501 + + :param reason_id: The reason_id of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._reason_id = reason_id + + @property + def reason_desc(self): + """Gets the reason_desc of this P2pTransactionDetail. # noqa: E501 + + Cancel reason description. # noqa: E501 + + :return: The reason_desc of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._reason_desc + + @reason_desc.setter + def reason_desc(self, reason_desc): + """Sets the reason_desc of this P2pTransactionDetail. + + Cancel reason description. # noqa: E501 + + :param reason_desc: The reason_desc of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._reason_desc = reason_desc + + @property + def cancel_time(self): + """Gets the cancel_time of this P2pTransactionDetail. # noqa: E501 + + Cancellation time # noqa: E501 + + :return: The cancel_time of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._cancel_time + + @cancel_time.setter + def cancel_time(self, cancel_time): + """Sets the cancel_time of this P2pTransactionDetail. + + Cancellation time # noqa: E501 + + :param cancel_time: The cancel_time of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._cancel_time = cancel_time + + @property + def in_appeal(self): + """Gets the in_appeal of this P2pTransactionDetail. # noqa: E501 + + Whether a dispute is active. `1`: yes; `0`: no. # noqa: E501 + + :return: The in_appeal of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._in_appeal + + @in_appeal.setter + def in_appeal(self, in_appeal): + """Sets the in_appeal of this P2pTransactionDetail. + + Whether a dispute is active. `1`: yes; `0`: no. # noqa: E501 + + :param in_appeal: The in_appeal of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._in_appeal = in_appeal + + @property + def dispute_time(self): + """Gets the dispute_time of this P2pTransactionDetail. # noqa: E501 + + Earliest timestamp when a dispute may be opened. # noqa: E501 + + :return: The dispute_time of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._dispute_time + + @dispute_time.setter + def dispute_time(self, dispute_time): + """Sets the dispute_time of this P2pTransactionDetail. + + Earliest timestamp when a dispute may be opened. # noqa: E501 + + :param dispute_time: The dispute_time of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._dispute_time = dispute_time + + @property + def cancelable(self): + """Gets the cancelable of this P2pTransactionDetail. # noqa: E501 + + Whether cancellation is allowed. `1`: yes; `0`: no. # noqa: E501 + + :return: The cancelable of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._cancelable + + @cancelable.setter + def cancelable(self, cancelable): + """Sets the cancelable of this P2pTransactionDetail. + + Whether cancellation is allowed. `1`: yes; `0`: no. # noqa: E501 + + :param cancelable: The cancelable of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._cancelable = cancelable + + @property + def hide_payment(self): + """Gets the hide_payment of this P2pTransactionDetail. # noqa: E501 + + Whether payment methods are hidden. `1`: hidden; `0`: visible. # noqa: E501 + + :return: The hide_payment of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._hide_payment + + @hide_payment.setter + def hide_payment(self, hide_payment): + """Sets the hide_payment of this P2pTransactionDetail. + + Whether payment methods are hidden. `1`: hidden; `0`: visible. # noqa: E501 + + :param hide_payment: The hide_payment of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._hide_payment = hide_payment + + @property + def trade_tips(self): + """Gets the trade_tips of this P2pTransactionDetail. # noqa: E501 + + Trading terms # noqa: E501 + + :return: The trade_tips of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._trade_tips + + @trade_tips.setter + def trade_tips(self, trade_tips): + """Sets the trade_tips of this P2pTransactionDetail. + + Trading terms # noqa: E501 + + :param trade_tips: The trade_tips of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._trade_tips = trade_tips + + @property + def show_bank(self): + """Gets the show_bank of this P2pTransactionDetail. # noqa: E501 + + Whether to show bank transfer details. `1`: show; `0`: hide. # noqa: E501 + + :return: The show_bank of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._show_bank + + @show_bank.setter + def show_bank(self, show_bank): + """Sets the show_bank of this P2pTransactionDetail. + + Whether to show bank transfer details. `1`: show; `0`: hide. # noqa: E501 + + :param show_bank: The show_bank of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._show_bank = show_bank + + @property + def bankname(self): + """Gets the bankname of this P2pTransactionDetail. # noqa: E501 + + Bank name # noqa: E501 + + :return: The bankname of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._bankname + + @bankname.setter + def bankname(self, bankname): + """Sets the bankname of this P2pTransactionDetail. + + Bank name # noqa: E501 + + :param bankname: The bankname of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._bankname = bankname + + @property + def bankbranch(self): + """Gets the bankbranch of this P2pTransactionDetail. # noqa: E501 + + Bank branch name # noqa: E501 + + :return: The bankbranch of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._bankbranch + + @bankbranch.setter + def bankbranch(self, bankbranch): + """Sets the bankbranch of this P2pTransactionDetail. + + Bank branch name # noqa: E501 + + :param bankbranch: The bankbranch of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._bankbranch = bankbranch + + @property + def bankid(self): + """Gets the bankid of this P2pTransactionDetail. # noqa: E501 + + Bank account or masked account. # noqa: E501 + + :return: The bankid of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._bankid + + @bankid.setter + def bankid(self, bankid): + """Sets the bankid of this P2pTransactionDetail. + + Bank account or masked account. # noqa: E501 + + :param bankid: The bankid of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._bankid = bankid + + @property + def bank_holder_realname(self): + """Gets the bank_holder_realname of this P2pTransactionDetail. # noqa: E501 + + Bank cardholder name # noqa: E501 + + :return: The bank_holder_realname of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._bank_holder_realname + + @bank_holder_realname.setter + def bank_holder_realname(self, bank_holder_realname): + """Sets the bank_holder_realname of this P2pTransactionDetail. + + Bank cardholder name # noqa: E501 + + :param bank_holder_realname: The bank_holder_realname of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._bank_holder_realname = bank_holder_realname + + @property + def show_ali(self): + """Gets the show_ali of this P2pTransactionDetail. # noqa: E501 + + Whether to show Alipay details. `1`: show; `0`: hide. # noqa: E501 + + :return: The show_ali of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._show_ali + + @show_ali.setter + def show_ali(self, show_ali): + """Sets the show_ali of this P2pTransactionDetail. + + Whether to show Alipay details. `1`: show; `0`: hide. # noqa: E501 + + :param show_ali: The show_ali of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._show_ali = show_ali + + @property + def aliname(self): + """Gets the aliname of this P2pTransactionDetail. # noqa: E501 + + Alipay account name # noqa: E501 + + :return: The aliname of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._aliname + + @aliname.setter + def aliname(self, aliname): + """Sets the aliname of this P2pTransactionDetail. + + Alipay account name # noqa: E501 + + :param aliname: The aliname of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._aliname = aliname + + @property + def is_alicode(self): + """Gets the is_alicode of this P2pTransactionDetail. # noqa: E501 + + Whether an Alipay QR exists. `1`: yes; `0`: no. # noqa: E501 + + :return: The is_alicode of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._is_alicode + + @is_alicode.setter + def is_alicode(self, is_alicode): + """Sets the is_alicode of this P2pTransactionDetail. + + Whether an Alipay QR exists. `1`: yes; `0`: no. # noqa: E501 + + :param is_alicode: The is_alicode of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._is_alicode = is_alicode + + @property + def show_wechat(self): + """Gets the show_wechat of this P2pTransactionDetail. # noqa: E501 + + Whether to show WeChat details. `1`: show; `0`: hide. # noqa: E501 + + :return: The show_wechat of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._show_wechat + + @show_wechat.setter + def show_wechat(self, show_wechat): + """Sets the show_wechat of this P2pTransactionDetail. + + Whether to show WeChat details. `1`: show; `0`: hide. # noqa: E501 + + :param show_wechat: The show_wechat of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._show_wechat = show_wechat + + @property + def wename(self): + """Gets the wename of this P2pTransactionDetail. # noqa: E501 + + WeChat account name # noqa: E501 + + :return: The wename of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._wename + + @wename.setter + def wename(self, wename): + """Sets the wename of this P2pTransactionDetail. + + WeChat account name # noqa: E501 + + :param wename: The wename of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._wename = wename + + @property + def show_others(self): + """Gets the show_others of this P2pTransactionDetail. # noqa: E501 + + Whether to show other payment methods. `1`: show; `0`: hide. # noqa: E501 + + :return: The show_others of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._show_others + + @show_others.setter + def show_others(self, show_others): + """Sets the show_others of this P2pTransactionDetail. + + Whether to show other payment methods. `1`: show; `0`: hide. # noqa: E501 + + :param show_others: The show_others of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._show_others = show_others + + @property + def pay_others(self): + """Gets the pay_others of this P2pTransactionDetail. # noqa: E501 + + Other payment methods # noqa: E501 + + :return: The pay_others of this P2pTransactionDetail. # noqa: E501 + :rtype: list[P2pTransactionDetailPayOthers] + """ + return self._pay_others + + @pay_others.setter + def pay_others(self, pay_others): + """Sets the pay_others of this P2pTransactionDetail. + + Other payment methods # noqa: E501 + + :param pay_others: The pay_others of this P2pTransactionDetail. # noqa: E501 + :type: list[P2pTransactionDetailPayOthers] + """ + + self._pay_others = pay_others + + @property + def sel_paytype(self): + """Gets the sel_paytype of this P2pTransactionDetail. # noqa: E501 + + Selected payment type for this order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 + + :return: The sel_paytype of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._sel_paytype + + @sel_paytype.setter + def sel_paytype(self, sel_paytype): + """Sets the sel_paytype of this P2pTransactionDetail. + + Selected payment type for this order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 + + :param sel_paytype: The sel_paytype of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._sel_paytype = sel_paytype + + @property + def its_uid(self): + """Gets the its_uid of this P2pTransactionDetail. # noqa: E501 + + Counterparty crypto UID. # noqa: E501 + + :return: The its_uid of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._its_uid + + @its_uid.setter + def its_uid(self, its_uid): + """Sets the its_uid of this P2pTransactionDetail. + + Counterparty crypto UID. # noqa: E501 + + :param its_uid: The its_uid of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._its_uid = its_uid + + @property + def its_nickname(self): + """Gets the its_nickname of this P2pTransactionDetail. # noqa: E501 + + Counterparty nickname # noqa: E501 + + :return: The its_nickname of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._its_nickname + + @its_nickname.setter + def its_nickname(self, its_nickname): + """Sets the its_nickname of this P2pTransactionDetail. + + Counterparty nickname # noqa: E501 + + :param its_nickname: The its_nickname of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._its_nickname = its_nickname + + @property + def its_realname(self): + """Gets the its_realname of this P2pTransactionDetail. # noqa: E501 + + Counterparty real name or verified display name. # noqa: E501 + + :return: The its_realname of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._its_realname + + @its_realname.setter + def its_realname(self, its_realname): + """Sets the its_realname of this P2pTransactionDetail. + + Counterparty real name or verified display name. # noqa: E501 + + :param its_realname: The its_realname of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._its_realname = its_realname + + @property + def have_traded(self): + """Gets the have_traded of this P2pTransactionDetail. # noqa: E501 + + Whether you traded with the counterparty before. `1`: yes; `0`: no. # noqa: E501 + + :return: The have_traded of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._have_traded + + @have_traded.setter + def have_traded(self, have_traded): + """Sets the have_traded of this P2pTransactionDetail. + + Whether you traded with the counterparty before. `1`: yes; `0`: no. # noqa: E501 + + :param have_traded: The have_traded of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._have_traded = have_traded + + @property + def appeal_allow_cancel(self): + """Gets the appeal_allow_cancel of this P2pTransactionDetail. # noqa: E501 + + Whether the dispute can be withdrawn. `1`: allowed; `0`: not allowed. # noqa: E501 + + :return: The appeal_allow_cancel of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._appeal_allow_cancel + + @appeal_allow_cancel.setter + def appeal_allow_cancel(self, appeal_allow_cancel): + """Sets the appeal_allow_cancel of this P2pTransactionDetail. + + Whether the dispute can be withdrawn. `1`: allowed; `0`: not allowed. # noqa: E501 + + :param appeal_allow_cancel: The appeal_allow_cancel of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._appeal_allow_cancel = appeal_allow_cancel + + @property + def appeal_verdict_has_open(self): + """Gets the appeal_verdict_has_open of this P2pTransactionDetail. # noqa: E501 + + Dispute outcome or in-dispute notice text. # noqa: E501 + + :return: The appeal_verdict_has_open of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._appeal_verdict_has_open + + @appeal_verdict_has_open.setter + def appeal_verdict_has_open(self, appeal_verdict_has_open): + """Sets the appeal_verdict_has_open of this P2pTransactionDetail. + + Dispute outcome or in-dispute notice text. # noqa: E501 + + :param appeal_verdict_has_open: The appeal_verdict_has_open of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._appeal_verdict_has_open = appeal_verdict_has_open + + @property + def im_unread(self): + """Gets the im_unread of this P2pTransactionDetail. # noqa: E501 + + Unread chat message count. # noqa: E501 + + :return: The im_unread of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._im_unread + + @im_unread.setter + def im_unread(self, im_unread): + """Sets the im_unread of this P2pTransactionDetail. + + Unread chat message count. # noqa: E501 + + :param im_unread: The im_unread of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._im_unread = im_unread + + @property + def payment_voucher_url(self): + """Gets the payment_voucher_url of this P2pTransactionDetail. # noqa: E501 + + Payment voucher # noqa: E501 + + :return: The payment_voucher_url of this P2pTransactionDetail. # noqa: E501 + :rtype: list[str] + """ + return self._payment_voucher_url + + @payment_voucher_url.setter + def payment_voucher_url(self, payment_voucher_url): + """Sets the payment_voucher_url of this P2pTransactionDetail. + + Payment voucher # noqa: E501 + + :param payment_voucher_url: The payment_voucher_url of this P2pTransactionDetail. # noqa: E501 + :type: list[str] + """ + + self._payment_voucher_url = payment_voucher_url + + @property + def timest_paid(self): + """Gets the timest_paid of this P2pTransactionDetail. # noqa: E501 + + Timestamp when the buyer confirmed payment. # noqa: E501 + + :return: The timest_paid of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._timest_paid + + @timest_paid.setter + def timest_paid(self, timest_paid): + """Sets the timest_paid of this P2pTransactionDetail. + + Timestamp when the buyer confirmed payment. # noqa: E501 + + :param timest_paid: The timest_paid of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._timest_paid = timest_paid + + @property + def own_realname(self): + """Gets the own_realname of this P2pTransactionDetail. # noqa: E501 + + Current user's real name or verified display name. # noqa: E501 + + :return: The own_realname of this P2pTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._own_realname + + @own_realname.setter + def own_realname(self, own_realname): + """Sets the own_realname of this P2pTransactionDetail. + + Current user's real name or verified display name. # noqa: E501 + + :param own_realname: The own_realname of this P2pTransactionDetail. # noqa: E501 + :type: str + """ + + self._own_realname = own_realname + + @property + def order_type(self): + """Gets the order_type of this P2pTransactionDetail. # noqa: E501 + + Order type: `1` standard; `2` partner; `3` flash swap; `4` Web3. # noqa: E501 + + :return: The order_type of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._order_type + + @order_type.setter + def order_type(self, order_type): + """Sets the order_type of this P2pTransactionDetail. + + Order type: `1` standard; `2` partner; `3` flash swap; `4` Web3. # noqa: E501 + + :param order_type: The order_type of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._order_type = order_type + + @property + def is_show_receive(self): + """Gets the is_show_receive of this P2pTransactionDetail. # noqa: E501 + + Whether to show confirm-receipt during dispute. `1`: show; `0`: hide. # noqa: E501 + + :return: The is_show_receive of this P2pTransactionDetail. # noqa: E501 + :rtype: int + """ + return self._is_show_receive + + @is_show_receive.setter + def is_show_receive(self, is_show_receive): + """Sets the is_show_receive of this P2pTransactionDetail. + + Whether to show confirm-receipt during dispute. `1`: show; `0`: hide. # noqa: E501 + + :param is_show_receive: The is_show_receive of this P2pTransactionDetail. # noqa: E501 + :type: int + """ + + self._is_show_receive = is_show_receive + + @property + def show_seller_contact_info(self): + """Gets the show_seller_contact_info of this P2pTransactionDetail. # noqa: E501 + + Whether to display seller contact information # noqa: E501 + + :return: The show_seller_contact_info of this P2pTransactionDetail. # noqa: E501 + :rtype: bool + """ + return self._show_seller_contact_info + + @show_seller_contact_info.setter + def show_seller_contact_info(self, show_seller_contact_info): + """Sets the show_seller_contact_info of this P2pTransactionDetail. + + Whether to display seller contact information # noqa: E501 + + :param show_seller_contact_info: The show_seller_contact_info of this P2pTransactionDetail. # noqa: E501 + :type: bool + """ + + self._show_seller_contact_info = show_seller_contact_info + + @property + def supported_pay_types(self): + """Gets the supported_pay_types of this P2pTransactionDetail. # noqa: E501 + + Supported payment method types for the order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 + + :return: The supported_pay_types of this P2pTransactionDetail. # noqa: E501 + :rtype: list[str] + """ + return self._supported_pay_types + + @supported_pay_types.setter + def supported_pay_types(self, supported_pay_types): + """Sets the supported_pay_types of this P2pTransactionDetail. + + Supported payment method types for the order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 + + :param supported_pay_types: The supported_pay_types of this P2pTransactionDetail. # noqa: E501 + :type: list[str] + """ + + self._supported_pay_types = supported_pay_types + + 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, P2pTransactionDetail): + 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, P2pTransactionDetail): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_transaction_detail_pay_others.py b/gate_api/models/p2p_transaction_detail_pay_others.py new file mode 100644 index 00000000..2f2cf280 --- /dev/null +++ b/gate_api/models/p2p_transaction_detail_pay_others.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 P2pTransactionDetailPayOthers(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', + 'account_des': 'str', + 'pay_type': 'str', + 'account': 'str', + 'memo': 'str', + 'trade_tips': 'str', + 'pay_name': 'str' + } + + attribute_map = { + 'id': 'id', + 'account_des': 'account_des', + 'pay_type': 'pay_type', + 'account': 'account', + 'memo': 'memo', + 'trade_tips': 'trade_tips', + 'pay_name': 'pay_name' + } + + def __init__(self, id=None, account_des=None, pay_type=None, account=None, memo=None, trade_tips=None, pay_name=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, Configuration) -> None + """P2pTransactionDetailPayOthers - 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._account_des = None + self._pay_type = None + self._account = None + self._memo = None + self._trade_tips = None + self._pay_name = None + self.discriminator = None + + if id is not None: + self.id = id + if account_des is not None: + self.account_des = account_des + if pay_type is not None: + self.pay_type = pay_type + if account is not None: + self.account = account + if memo is not None: + self.memo = memo + if trade_tips is not None: + self.trade_tips = trade_tips + if pay_name is not None: + self.pay_name = pay_name + + @property + def id(self): + """Gets the id of this P2pTransactionDetailPayOthers. # noqa: E501 + + Payment method record ID. # noqa: E501 + + :return: The id of this P2pTransactionDetailPayOthers. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this P2pTransactionDetailPayOthers. + + Payment method record ID. # noqa: E501 + + :param id: The id of this P2pTransactionDetailPayOthers. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def account_des(self): + """Gets the account_des of this P2pTransactionDetailPayOthers. # noqa: E501 + + Payment method description # noqa: E501 + + :return: The account_des of this P2pTransactionDetailPayOthers. # noqa: E501 + :rtype: str + """ + return self._account_des + + @account_des.setter + def account_des(self, account_des): + """Sets the account_des of this P2pTransactionDetailPayOthers. + + Payment method description # noqa: E501 + + :param account_des: The account_des of this P2pTransactionDetailPayOthers. # noqa: E501 + :type: str + """ + + self._account_des = account_des + + @property + def pay_type(self): + """Gets the pay_type of this P2pTransactionDetailPayOthers. # noqa: E501 + + Payment method type # noqa: E501 + + :return: The pay_type of this P2pTransactionDetailPayOthers. # noqa: E501 + :rtype: str + """ + return self._pay_type + + @pay_type.setter + def pay_type(self, pay_type): + """Sets the pay_type of this P2pTransactionDetailPayOthers. + + Payment method type # noqa: E501 + + :param pay_type: The pay_type of this P2pTransactionDetailPayOthers. # noqa: E501 + :type: str + """ + + self._pay_type = pay_type + + @property + def account(self): + """Gets the account of this P2pTransactionDetailPayOthers. # noqa: E501 + + Payment account or masked account. # noqa: E501 + + :return: The account of this P2pTransactionDetailPayOthers. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this P2pTransactionDetailPayOthers. + + Payment account or masked account. # noqa: E501 + + :param account: The account of this P2pTransactionDetailPayOthers. # noqa: E501 + :type: str + """ + + self._account = account + + @property + def memo(self): + """Gets the memo of this P2pTransactionDetailPayOthers. # noqa: E501 + + Payment note or memo. # noqa: E501 + + :return: The memo of this P2pTransactionDetailPayOthers. # noqa: E501 + :rtype: str + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this P2pTransactionDetailPayOthers. + + Payment note or memo. # noqa: E501 + + :param memo: The memo of this P2pTransactionDetailPayOthers. # noqa: E501 + :type: str + """ + + self._memo = memo + + @property + def trade_tips(self): + """Gets the trade_tips of this P2pTransactionDetailPayOthers. # noqa: E501 + + Payment instructions or tips. # noqa: E501 + + :return: The trade_tips of this P2pTransactionDetailPayOthers. # noqa: E501 + :rtype: str + """ + return self._trade_tips + + @trade_tips.setter + def trade_tips(self, trade_tips): + """Sets the trade_tips of this P2pTransactionDetailPayOthers. + + Payment instructions or tips. # noqa: E501 + + :param trade_tips: The trade_tips of this P2pTransactionDetailPayOthers. # noqa: E501 + :type: str + """ + + self._trade_tips = trade_tips + + @property + def pay_name(self): + """Gets the pay_name of this P2pTransactionDetailPayOthers. # noqa: E501 + + Display name of the payment method. # noqa: E501 + + :return: The pay_name of this P2pTransactionDetailPayOthers. # noqa: E501 + :rtype: str + """ + return self._pay_name + + @pay_name.setter + def pay_name(self, pay_name): + """Sets the pay_name of this P2pTransactionDetailPayOthers. + + Display name of the payment method. # noqa: E501 + + :param pay_name: The pay_name of this P2pTransactionDetailPayOthers. # noqa: E501 + :type: str + """ + + self._pay_name = pay_name + + 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, P2pTransactionDetailPayOthers): + 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, P2pTransactionDetailPayOthers): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_transaction_detail_response.py b/gate_api/models/p2p_transaction_detail_response.py new file mode 100644 index 00000000..a300d3ec --- /dev/null +++ b/gate_api/models/p2p_transaction_detail_response.py @@ -0,0 +1,251 @@ +# 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 P2pTransactionDetailResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'P2pTransactionDetail', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, P2pTransactionDetail, str, Configuration) -> None + """P2pTransactionDetailResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pTransactionDetailResponse. # noqa: E501 + + + :return: The timestamp of this P2pTransactionDetailResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pTransactionDetailResponse. + + + :param timestamp: The timestamp of this P2pTransactionDetailResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pTransactionDetailResponse. # noqa: E501 + + + :return: The method of this P2pTransactionDetailResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pTransactionDetailResponse. + + + :param method: The method of this P2pTransactionDetailResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pTransactionDetailResponse. # noqa: E501 + + + :return: The code of this P2pTransactionDetailResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pTransactionDetailResponse. + + + :param code: The code of this P2pTransactionDetailResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pTransactionDetailResponse. # noqa: E501 + + + :return: The message of this P2pTransactionDetailResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pTransactionDetailResponse. + + + :param message: The message of this P2pTransactionDetailResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pTransactionDetailResponse. # noqa: E501 + + + :return: The data of this P2pTransactionDetailResponse. # noqa: E501 + :rtype: P2pTransactionDetail + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pTransactionDetailResponse. + + + :param data: The data of this P2pTransactionDetailResponse. # noqa: E501 + :type: P2pTransactionDetail + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pTransactionDetailResponse. # noqa: E501 + + + :return: The version of this P2pTransactionDetailResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pTransactionDetailResponse. + + + :param version: The version of this P2pTransactionDetailResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pTransactionDetailResponse): + 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, P2pTransactionDetailResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_transaction_list_item.py b/gate_api/models/p2p_transaction_list_item.py new file mode 100644 index 00000000..0c5e5255 --- /dev/null +++ b/gate_api/models/p2p_transaction_list_item.py @@ -0,0 +1,765 @@ +# 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 P2pTransactionListItem(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_buy': 'int', + 'timest': 'str', + 'timest_expire': 'str', + 'timestamp': 'int', + 'rate': 'str', + 'amount': 'str', + 'total': 'str', + 'txid': 'int', + 'status': 'str', + 'its_realname': 'str', + 'its_uid': 'str', + 'its_nick': 'str', + 'seller_realname': 'str', + 'buyer_realname': 'str', + 'cancelable': 'int', + 'currency_type': 'str', + 'want_type': 'str', + 'hide_payment': 'int', + 'sel_paytype': 'str', + 'pay_others': 'list[P2pTransactionListResultPayOthers]', + 'cd_time': 'int', + 'order_type': 'int', + 'order_tag': 'list[str]', + 'convert_info': 'P2pTransactionConvertInfo' + } + + attribute_map = { + 'type_buy': 'type_buy', + 'timest': 'timest', + 'timest_expire': 'timest_expire', + 'timestamp': 'timestamp', + 'rate': 'rate', + 'amount': 'amount', + 'total': 'total', + 'txid': 'txid', + 'status': 'status', + 'its_realname': 'its_realname', + 'its_uid': 'its_uid', + 'its_nick': 'its_nick', + 'seller_realname': 'seller_realname', + 'buyer_realname': 'buyer_realname', + 'cancelable': 'cancelable', + 'currency_type': 'currency_type', + 'want_type': 'want_type', + 'hide_payment': 'hide_payment', + 'sel_paytype': 'sel_paytype', + 'pay_others': 'pay_others', + 'cd_time': 'cd_time', + 'order_type': 'order_type', + 'order_tag': 'order_tag', + 'convert_info': 'convert_info' + } + + def __init__(self, type_buy=None, timest=None, timest_expire=None, timestamp=None, rate=None, amount=None, total=None, txid=None, status=None, its_realname=None, its_uid=None, its_nick=None, seller_realname=None, buyer_realname=None, cancelable=None, currency_type=None, want_type=None, hide_payment=None, sel_paytype=None, pay_others=None, cd_time=None, order_type=None, order_tag=None, convert_info=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, str, str, str, int, str, str, str, str, str, str, int, str, str, int, str, list[P2pTransactionListResultPayOthers], int, int, list[str], P2pTransactionConvertInfo, Configuration) -> None + """P2pTransactionListItem - 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_buy = None + self._timest = None + self._timest_expire = None + self._timestamp = None + self._rate = None + self._amount = None + self._total = None + self._txid = None + self._status = None + self._its_realname = None + self._its_uid = None + self._its_nick = None + self._seller_realname = None + self._buyer_realname = None + self._cancelable = None + self._currency_type = None + self._want_type = None + self._hide_payment = None + self._sel_paytype = None + self._pay_others = None + self._cd_time = None + self._order_type = None + self._order_tag = None + self._convert_info = None + self.discriminator = None + + if type_buy is not None: + self.type_buy = type_buy + if timest is not None: + self.timest = timest + if timest_expire is not None: + self.timest_expire = timest_expire + if timestamp is not None: + self.timestamp = timestamp + if rate is not None: + self.rate = rate + if amount is not None: + self.amount = amount + if total is not None: + self.total = total + if txid is not None: + self.txid = txid + if status is not None: + self.status = status + if its_realname is not None: + self.its_realname = its_realname + if its_uid is not None: + self.its_uid = its_uid + if its_nick is not None: + self.its_nick = its_nick + if seller_realname is not None: + self.seller_realname = seller_realname + if buyer_realname is not None: + self.buyer_realname = buyer_realname + if cancelable is not None: + self.cancelable = cancelable + if currency_type is not None: + self.currency_type = currency_type + if want_type is not None: + self.want_type = want_type + if hide_payment is not None: + self.hide_payment = hide_payment + if sel_paytype is not None: + self.sel_paytype = sel_paytype + if pay_others is not None: + self.pay_others = pay_others + if cd_time is not None: + self.cd_time = cd_time + if order_type is not None: + self.order_type = order_type + if order_tag is not None: + self.order_tag = order_tag + if convert_info is not None: + self.convert_info = convert_info + + @property + def type_buy(self): + """Gets the type_buy of this P2pTransactionListItem. # noqa: E501 + + Order side from current user's view. `1`: buy; `0`: sell. # noqa: E501 + + :return: The type_buy of this P2pTransactionListItem. # noqa: E501 + :rtype: int + """ + return self._type_buy + + @type_buy.setter + def type_buy(self, type_buy): + """Sets the type_buy of this P2pTransactionListItem. + + Order side from current user's view. `1`: buy; `0`: sell. # noqa: E501 + + :param type_buy: The type_buy of this P2pTransactionListItem. # noqa: E501 + :type: int + """ + + self._type_buy = type_buy + + @property + def timest(self): + """Gets the timest of this P2pTransactionListItem. # noqa: E501 + + Creation time of order # noqa: E501 + + :return: The timest of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._timest + + @timest.setter + def timest(self, timest): + """Sets the timest of this P2pTransactionListItem. + + Creation time of order # noqa: E501 + + :param timest: The timest of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._timest = timest + + @property + def timest_expire(self): + """Gets the timest_expire of this P2pTransactionListItem. # noqa: E501 + + Order expiration time # noqa: E501 + + :return: The timest_expire of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._timest_expire + + @timest_expire.setter + def timest_expire(self, timest_expire): + """Sets the timest_expire of this P2pTransactionListItem. + + Order expiration time # noqa: E501 + + :param timest_expire: The timest_expire of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._timest_expire = timest_expire + + @property + def timestamp(self): + """Gets the timestamp of this P2pTransactionListItem. # noqa: E501 + + Order creation timestamp # noqa: E501 + + :return: The timestamp of this P2pTransactionListItem. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pTransactionListItem. + + Order creation timestamp # noqa: E501 + + :param timestamp: The timestamp of this P2pTransactionListItem. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + @property + def rate(self): + """Gets the rate of this P2pTransactionListItem. # noqa: E501 + + Order price in fiat currency. # noqa: E501 + + :return: The rate of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this P2pTransactionListItem. + + Order price in fiat currency. # noqa: E501 + + :param rate: The rate of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._rate = rate + + @property + def amount(self): + """Gets the amount of this P2pTransactionListItem. # noqa: E501 + + Order size in cryptocurrency. # noqa: E501 + + :return: The amount of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this P2pTransactionListItem. + + Order size in cryptocurrency. # noqa: E501 + + :param amount: The amount of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def total(self): + """Gets the total of this P2pTransactionListItem. # noqa: E501 + + Total fiat amount of the order. # noqa: E501 + + :return: The total of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this P2pTransactionListItem. + + Total fiat amount of the order. # noqa: E501 + + :param total: The total of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._total = total + + @property + def txid(self): + """Gets the txid of this P2pTransactionListItem. # noqa: E501 + + Order ID # noqa: E501 + + :return: The txid of this P2pTransactionListItem. # noqa: E501 + :rtype: int + """ + return self._txid + + @txid.setter + def txid(self, txid): + """Sets the txid of this P2pTransactionListItem. + + Order ID # noqa: E501 + + :param txid: The txid of this P2pTransactionListItem. # noqa: E501 + :type: int + """ + + self._txid = txid + + @property + def status(self): + """Gets the status of this P2pTransactionListItem. # noqa: E501 + + Display status: `unpay` awaiting payment; `paid` buyer paid; `unconfirmed` awaiting seller confirmation; `locked` locked; `finished` completed; `cancel` canceled; `expired` expired; `bclosed` arbitration filled; `sclosed` arbitration canceled. # noqa: E501 + + :return: The status of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this P2pTransactionListItem. + + Display status: `unpay` awaiting payment; `paid` buyer paid; `unconfirmed` awaiting seller confirmation; `locked` locked; `finished` completed; `cancel` canceled; `expired` expired; `bclosed` arbitration filled; `sclosed` arbitration canceled. # noqa: E501 + + :param status: The status of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def its_realname(self): + """Gets the its_realname of this P2pTransactionListItem. # noqa: E501 + + Counterparty real name or verified display name. # noqa: E501 + + :return: The its_realname of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._its_realname + + @its_realname.setter + def its_realname(self, its_realname): + """Sets the its_realname of this P2pTransactionListItem. + + Counterparty real name or verified display name. # noqa: E501 + + :param its_realname: The its_realname of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._its_realname = its_realname + + @property + def its_uid(self): + """Gets the its_uid of this P2pTransactionListItem. # noqa: E501 + + Counterparty crypto UID. # noqa: E501 + + :return: The its_uid of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._its_uid + + @its_uid.setter + def its_uid(self, its_uid): + """Sets the its_uid of this P2pTransactionListItem. + + Counterparty crypto UID. # noqa: E501 + + :param its_uid: The its_uid of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._its_uid = its_uid + + @property + def its_nick(self): + """Gets the its_nick of this P2pTransactionListItem. # noqa: E501 + + Counterparty nickname # noqa: E501 + + :return: The its_nick of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._its_nick + + @its_nick.setter + def its_nick(self, its_nick): + """Sets the its_nick of this P2pTransactionListItem. + + Counterparty nickname # noqa: E501 + + :param its_nick: The its_nick of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._its_nick = its_nick + + @property + def seller_realname(self): + """Gets the seller_realname of this P2pTransactionListItem. # noqa: E501 + + Seller real name or verified display name. # noqa: E501 + + :return: The seller_realname of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._seller_realname + + @seller_realname.setter + def seller_realname(self, seller_realname): + """Sets the seller_realname of this P2pTransactionListItem. + + Seller real name or verified display name. # noqa: E501 + + :param seller_realname: The seller_realname of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._seller_realname = seller_realname + + @property + def buyer_realname(self): + """Gets the buyer_realname of this P2pTransactionListItem. # noqa: E501 + + Buyer real name or verified display name. # noqa: E501 + + :return: The buyer_realname of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._buyer_realname + + @buyer_realname.setter + def buyer_realname(self, buyer_realname): + """Sets the buyer_realname of this P2pTransactionListItem. + + Buyer real name or verified display name. # noqa: E501 + + :param buyer_realname: The buyer_realname of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._buyer_realname = buyer_realname + + @property + def cancelable(self): + """Gets the cancelable of this P2pTransactionListItem. # noqa: E501 + + Whether the order can be canceled. `1`: yes; `0`: no. # noqa: E501 + + :return: The cancelable of this P2pTransactionListItem. # noqa: E501 + :rtype: int + """ + return self._cancelable + + @cancelable.setter + def cancelable(self, cancelable): + """Sets the cancelable of this P2pTransactionListItem. + + Whether the order can be canceled. `1`: yes; `0`: no. # noqa: E501 + + :param cancelable: The cancelable of this P2pTransactionListItem. # noqa: E501 + :type: int + """ + + self._cancelable = cancelable + + @property + def currency_type(self): + """Gets the currency_type of this P2pTransactionListItem. # noqa: E501 + + Cryptocurrency symbol. # noqa: E501 + + :return: The currency_type of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._currency_type + + @currency_type.setter + def currency_type(self, currency_type): + """Sets the currency_type of this P2pTransactionListItem. + + Cryptocurrency symbol. # noqa: E501 + + :param currency_type: The currency_type of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._currency_type = currency_type + + @property + def want_type(self): + """Gets the want_type of this P2pTransactionListItem. # noqa: E501 + + Fiat currency # noqa: E501 + + :return: The want_type of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._want_type + + @want_type.setter + def want_type(self, want_type): + """Sets the want_type of this P2pTransactionListItem. + + Fiat currency # noqa: E501 + + :param want_type: The want_type of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._want_type = want_type + + @property + def hide_payment(self): + """Gets the hide_payment of this P2pTransactionListItem. # noqa: E501 + + Whether payment methods are hidden. `1`: hidden; `0`: visible. # noqa: E501 + + :return: The hide_payment of this P2pTransactionListItem. # noqa: E501 + :rtype: int + """ + return self._hide_payment + + @hide_payment.setter + def hide_payment(self, hide_payment): + """Sets the hide_payment of this P2pTransactionListItem. + + Whether payment methods are hidden. `1`: hidden; `0`: visible. # noqa: E501 + + :param hide_payment: The hide_payment of this P2pTransactionListItem. # noqa: E501 + :type: int + """ + + self._hide_payment = hide_payment + + @property + def sel_paytype(self): + """Gets the sel_paytype of this P2pTransactionListItem. # noqa: E501 + + Selected payment type for this order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 + + :return: The sel_paytype of this P2pTransactionListItem. # noqa: E501 + :rtype: str + """ + return self._sel_paytype + + @sel_paytype.setter + def sel_paytype(self, sel_paytype): + """Sets the sel_paytype of this P2pTransactionListItem. + + Selected payment type for this order, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 + + :param sel_paytype: The sel_paytype of this P2pTransactionListItem. # noqa: E501 + :type: str + """ + + self._sel_paytype = sel_paytype + + @property + def pay_others(self): + """Gets the pay_others of this P2pTransactionListItem. # noqa: E501 + + Other payment method details; may appear on historical orders. # noqa: E501 + + :return: The pay_others of this P2pTransactionListItem. # noqa: E501 + :rtype: list[P2pTransactionListResultPayOthers] + """ + return self._pay_others + + @pay_others.setter + def pay_others(self, pay_others): + """Sets the pay_others of this P2pTransactionListItem. + + Other payment method details; may appear on historical orders. # noqa: E501 + + :param pay_others: The pay_others of this P2pTransactionListItem. # noqa: E501 + :type: list[P2pTransactionListResultPayOthers] + """ + + self._pay_others = pay_others + + @property + def cd_time(self): + """Gets the cd_time of this P2pTransactionListItem. # noqa: E501 + + Countdown seconds for the current order. # noqa: E501 + + :return: The cd_time of this P2pTransactionListItem. # noqa: E501 + :rtype: int + """ + return self._cd_time + + @cd_time.setter + def cd_time(self, cd_time): + """Sets the cd_time of this P2pTransactionListItem. + + Countdown seconds for the current order. # noqa: E501 + + :param cd_time: The cd_time of this P2pTransactionListItem. # noqa: E501 + :type: int + """ + + self._cd_time = cd_time + + @property + def order_type(self): + """Gets the order_type of this P2pTransactionListItem. # noqa: E501 + + Order type: `1` standard; `2` partner; `3` flash swap; `4` Web3. # noqa: E501 + + :return: The order_type of this P2pTransactionListItem. # noqa: E501 + :rtype: int + """ + return self._order_type + + @order_type.setter + def order_type(self, order_type): + """Sets the order_type of this P2pTransactionListItem. + + Order type: `1` standard; `2` partner; `3` flash swap; `4` Web3. # noqa: E501 + + :param order_type: The order_type of this P2pTransactionListItem. # noqa: E501 + :type: int + """ + + self._order_type = order_type + + @property + def order_tag(self): + """Gets the order_tag of this P2pTransactionListItem. # noqa: E501 + + Order tags # noqa: E501 + + :return: The order_tag of this P2pTransactionListItem. # noqa: E501 + :rtype: list[str] + """ + return self._order_tag + + @order_tag.setter + def order_tag(self, order_tag): + """Sets the order_tag of this P2pTransactionListItem. + + Order tags # noqa: E501 + + :param order_tag: The order_tag of this P2pTransactionListItem. # noqa: E501 + :type: list[str] + """ + + self._order_tag = order_tag + + @property + def convert_info(self): + """Gets the convert_info of this P2pTransactionListItem. # noqa: E501 + + + :return: The convert_info of this P2pTransactionListItem. # noqa: E501 + :rtype: P2pTransactionConvertInfo + """ + return self._convert_info + + @convert_info.setter + def convert_info(self, convert_info): + """Sets the convert_info of this P2pTransactionListItem. + + + :param convert_info: The convert_info of this P2pTransactionListItem. # noqa: E501 + :type: P2pTransactionConvertInfo + """ + + self._convert_info = convert_info + + 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, P2pTransactionListItem): + 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, P2pTransactionListItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_transaction_list_response.py b/gate_api/models/p2p_transaction_list_response.py new file mode 100644 index 00000000..cc72d7e5 --- /dev/null +++ b/gate_api/models/p2p_transaction_list_response.py @@ -0,0 +1,251 @@ +# 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 P2pTransactionListResponse(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 = { + 'timestamp': 'float', + 'method': 'str', + 'code': 'int', + 'message': 'str', + 'data': 'P2pTransactionListResult', + 'version': 'str' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'method': 'method', + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'version': 'version' + } + + def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, int, str, P2pTransactionListResult, str, Configuration) -> None + """P2pTransactionListResponse - 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._timestamp = None + self._method = None + self._code = None + self._message = None + self._data = None + self._version = None + self.discriminator = None + + if timestamp is not None: + self.timestamp = timestamp + if method is not None: + self.method = method + if code is not None: + self.code = code + if message is not None: + self.message = message + if data is not None: + self.data = data + if version is not None: + self.version = version + + @property + def timestamp(self): + """Gets the timestamp of this P2pTransactionListResponse. # noqa: E501 + + + :return: The timestamp of this P2pTransactionListResponse. # noqa: E501 + :rtype: float + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this P2pTransactionListResponse. + + + :param timestamp: The timestamp of this P2pTransactionListResponse. # noqa: E501 + :type: float + """ + + self._timestamp = timestamp + + @property + def method(self): + """Gets the method of this P2pTransactionListResponse. # noqa: E501 + + + :return: The method of this P2pTransactionListResponse. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this P2pTransactionListResponse. + + + :param method: The method of this P2pTransactionListResponse. # noqa: E501 + :type: str + """ + + self._method = method + + @property + def code(self): + """Gets the code of this P2pTransactionListResponse. # noqa: E501 + + + :return: The code of this P2pTransactionListResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this P2pTransactionListResponse. + + + :param code: The code of this P2pTransactionListResponse. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this P2pTransactionListResponse. # noqa: E501 + + + :return: The message of this P2pTransactionListResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this P2pTransactionListResponse. + + + :param message: The message of this P2pTransactionListResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this P2pTransactionListResponse. # noqa: E501 + + + :return: The data of this P2pTransactionListResponse. # noqa: E501 + :rtype: P2pTransactionListResult + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this P2pTransactionListResponse. + + + :param data: The data of this P2pTransactionListResponse. # noqa: E501 + :type: P2pTransactionListResult + """ + + self._data = data + + @property + def version(self): + """Gets the version of this P2pTransactionListResponse. # noqa: E501 + + + :return: The version of this P2pTransactionListResponse. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this P2pTransactionListResponse. + + + :param version: The version of this P2pTransactionListResponse. # noqa: E501 + :type: str + """ + + self._version = version + + 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, P2pTransactionListResponse): + 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, P2pTransactionListResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20017_data.py b/gate_api/models/p2p_transaction_list_result.py similarity index 70% rename from gate_api/models/inline_response20017_data.py rename to gate_api/models/p2p_transaction_list_result.py index 31a4e44f..30aa50a4 100644 --- a/gate_api/models/inline_response20017_data.py +++ b/gate_api/models/p2p_transaction_list_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20017Data(object): +class P2pTransactionListResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,8 +33,8 @@ class InlineResponse20017Data(object): and the value is json key in definition. """ openapi_types = { - 'list': 'list[InlineResponse20017DataList]', - 'trans_time': 'list[InlineResponse20017DataTransTime]', + 'list': 'list[P2pTransactionListItem]', + 'trans_time': 'list[P2pTransactionTimeMarker]', 'count': 'int', 'exported_num': 'int' } @@ -47,8 +47,8 @@ class InlineResponse20017Data(object): } def __init__(self, list=None, trans_time=None, count=None, exported_num=None, local_vars_configuration=None): # noqa: E501 - # type: (list[InlineResponse20017DataList], list[InlineResponse20017DataTransTime], int, int, Configuration) -> None - """InlineResponse20017Data - a model defined in OpenAPI""" # noqa: E501 + # type: (list[P2pTransactionListItem], list[P2pTransactionTimeMarker], int, int, Configuration) -> None + """P2pTransactionListResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -70,66 +70,66 @@ def __init__(self, list=None, trans_time=None, count=None, exported_num=None, lo @property def list(self): - """Gets the list of this InlineResponse20017Data. # noqa: E501 + """Gets the list of this P2pTransactionListResult. # noqa: E501 - :return: The list of this InlineResponse20017Data. # noqa: E501 - :rtype: list[InlineResponse20017DataList] + :return: The list of this P2pTransactionListResult. # noqa: E501 + :rtype: list[P2pTransactionListItem] """ return self._list @list.setter def list(self, list): - """Sets the list of this InlineResponse20017Data. + """Sets the list of this P2pTransactionListResult. - :param list: The list of this InlineResponse20017Data. # noqa: E501 - :type: list[InlineResponse20017DataList] + :param list: The list of this P2pTransactionListResult. # noqa: E501 + :type: list[P2pTransactionListItem] """ self._list = list @property def trans_time(self): - """Gets the trans_time of this InlineResponse20017Data. # noqa: E501 + """Gets the trans_time of this P2pTransactionListResult. # noqa: E501 Countdown time # noqa: E501 - :return: The trans_time of this InlineResponse20017Data. # noqa: E501 - :rtype: list[InlineResponse20017DataTransTime] + :return: The trans_time of this P2pTransactionListResult. # noqa: E501 + :rtype: list[P2pTransactionTimeMarker] """ return self._trans_time @trans_time.setter def trans_time(self, trans_time): - """Sets the trans_time of this InlineResponse20017Data. + """Sets the trans_time of this P2pTransactionListResult. Countdown time # noqa: E501 - :param trans_time: The trans_time of this InlineResponse20017Data. # noqa: E501 - :type: list[InlineResponse20017DataTransTime] + :param trans_time: The trans_time of this P2pTransactionListResult. # noqa: E501 + :type: list[P2pTransactionTimeMarker] """ self._trans_time = trans_time @property def count(self): - """Gets the count of this InlineResponse20017Data. # noqa: E501 + """Gets the count of this P2pTransactionListResult. # noqa: E501 Number of orders # noqa: E501 - :return: The count of this InlineResponse20017Data. # noqa: E501 + :return: The count of this P2pTransactionListResult. # noqa: E501 :rtype: int """ return self._count @count.setter def count(self, count): - """Sets the count of this InlineResponse20017Data. + """Sets the count of this P2pTransactionListResult. Number of orders # noqa: E501 - :param count: The count of this InlineResponse20017Data. # noqa: E501 + :param count: The count of this P2pTransactionListResult. # noqa: E501 :type: int """ @@ -137,22 +137,22 @@ def count(self, count): @property def exported_num(self): - """Gets the exported_num of this InlineResponse20017Data. # noqa: E501 + """Gets the exported_num of this P2pTransactionListResult. # noqa: E501 Export count # noqa: E501 - :return: The exported_num of this InlineResponse20017Data. # noqa: E501 + :return: The exported_num of this P2pTransactionListResult. # noqa: E501 :rtype: int """ return self._exported_num @exported_num.setter def exported_num(self, exported_num): - """Sets the exported_num of this InlineResponse20017Data. + """Sets the exported_num of this P2pTransactionListResult. Export count # noqa: E501 - :param exported_num: The exported_num of this InlineResponse20017Data. # noqa: E501 + :param exported_num: The exported_num of this P2pTransactionListResult. # noqa: E501 :type: int """ @@ -192,14 +192,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20017Data): + if not isinstance(other, P2pTransactionListResult): 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, InlineResponse20017Data): + if not isinstance(other, P2pTransactionListResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_transaction_list_result_pay_others.py b/gate_api/models/p2p_transaction_list_result_pay_others.py new file mode 100644 index 00000000..b45f3900 --- /dev/null +++ b/gate_api/models/p2p_transaction_list_result_pay_others.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 P2pTransactionListResultPayOthers(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 = { + 'pay_type': 'str', + 'pay_name': 'str' + } + + attribute_map = { + 'pay_type': 'pay_type', + 'pay_name': 'pay_name' + } + + def __init__(self, pay_type=None, pay_name=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """P2pTransactionListResultPayOthers - 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._pay_type = None + self._pay_name = None + self.discriminator = None + + if pay_type is not None: + self.pay_type = pay_type + if pay_name is not None: + self.pay_name = pay_name + + @property + def pay_type(self): + """Gets the pay_type of this P2pTransactionListResultPayOthers. # noqa: E501 + + Payment method type # noqa: E501 + + :return: The pay_type of this P2pTransactionListResultPayOthers. # noqa: E501 + :rtype: str + """ + return self._pay_type + + @pay_type.setter + def pay_type(self, pay_type): + """Sets the pay_type of this P2pTransactionListResultPayOthers. + + Payment method type # noqa: E501 + + :param pay_type: The pay_type of this P2pTransactionListResultPayOthers. # noqa: E501 + :type: str + """ + + self._pay_type = pay_type + + @property + def pay_name(self): + """Gets the pay_name of this P2pTransactionListResultPayOthers. # noqa: E501 + + Payment method name # noqa: E501 + + :return: The pay_name of this P2pTransactionListResultPayOthers. # noqa: E501 + :rtype: str + """ + return self._pay_name + + @pay_name.setter + def pay_name(self, pay_name): + """Sets the pay_name of this P2pTransactionListResultPayOthers. + + Payment method name # noqa: E501 + + :param pay_name: The pay_name of this P2pTransactionListResultPayOthers. # noqa: E501 + :type: str + """ + + self._pay_name = pay_name + + 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, P2pTransactionListResultPayOthers): + 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, P2pTransactionListResultPayOthers): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20017_data_trans_time.py b/gate_api/models/p2p_transaction_time_marker.py similarity index 83% rename from gate_api/models/inline_response20017_data_trans_time.py rename to gate_api/models/p2p_transaction_time_marker.py index cfe1cfa8..d2c76a64 100644 --- a/gate_api/models/inline_response20017_data_trans_time.py +++ b/gate_api/models/p2p_transaction_time_marker.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20017DataTransTime(object): +class P2pTransactionTimeMarker(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -42,7 +42,7 @@ class InlineResponse20017DataTransTime(object): def __init__(self, od_time=None, local_vars_configuration=None): # noqa: E501 # type: (int, Configuration) -> None - """InlineResponse20017DataTransTime - a model defined in OpenAPI""" # noqa: E501 + """P2pTransactionTimeMarker - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -55,20 +55,20 @@ def __init__(self, od_time=None, local_vars_configuration=None): # noqa: E501 @property def od_time(self): - """Gets the od_time of this InlineResponse20017DataTransTime. # noqa: E501 + """Gets the od_time of this P2pTransactionTimeMarker. # noqa: E501 - :return: The od_time of this InlineResponse20017DataTransTime. # noqa: E501 + :return: The od_time of this P2pTransactionTimeMarker. # noqa: E501 :rtype: int """ return self._od_time @od_time.setter def od_time(self, od_time): - """Sets the od_time of this InlineResponse20017DataTransTime. + """Sets the od_time of this P2pTransactionTimeMarker. - :param od_time: The od_time of this InlineResponse20017DataTransTime. # noqa: E501 + :param od_time: The od_time of this P2pTransactionTimeMarker. # noqa: E501 :type: int """ @@ -108,14 +108,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20017DataTransTime): + if not isinstance(other, P2pTransactionTimeMarker): 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, InlineResponse20017DataTransTime): + if not isinstance(other, P2pTransactionTimeMarker): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20018.py b/gate_api/models/p2p_upload_chat_file_response.py similarity index 69% rename from gate_api/models/inline_response20018.py rename to gate_api/models/p2p_upload_chat_file_response.py index e416af3a..cf53231b 100644 --- a/gate_api/models/inline_response20018.py +++ b/gate_api/models/p2p_upload_chat_file_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20018(object): +class P2pUploadChatFileResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,7 @@ class InlineResponse20018(object): 'method': 'str', 'code': 'int', 'message': 'str', - 'data': 'InlineResponse20018Data', + 'data': 'P2pUploadChatFileResult', 'version': 'str' } @@ -51,8 +51,8 @@ class InlineResponse20018(object): } def __init__(self, timestamp=None, method=None, code=None, message=None, data=None, version=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, int, str, InlineResponse20018Data, str, Configuration) -> None - """InlineResponse20018 - a model defined in OpenAPI""" # noqa: E501 + # type: (float, str, int, str, P2pUploadChatFileResult, str, Configuration) -> None + """P2pUploadChatFileResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -80,20 +80,20 @@ def __init__(self, timestamp=None, method=None, code=None, message=None, data=No @property def timestamp(self): - """Gets the timestamp of this InlineResponse20018. # noqa: E501 + """Gets the timestamp of this P2pUploadChatFileResponse. # noqa: E501 - :return: The timestamp of this InlineResponse20018. # noqa: E501 + :return: The timestamp of this P2pUploadChatFileResponse. # noqa: E501 :rtype: float """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse20018. + """Sets the timestamp of this P2pUploadChatFileResponse. - :param timestamp: The timestamp of this InlineResponse20018. # noqa: E501 + :param timestamp: The timestamp of this P2pUploadChatFileResponse. # noqa: E501 :type: float """ @@ -101,20 +101,20 @@ def timestamp(self, timestamp): @property def method(self): - """Gets the method of this InlineResponse20018. # noqa: E501 + """Gets the method of this P2pUploadChatFileResponse. # noqa: E501 - :return: The method of this InlineResponse20018. # noqa: E501 + :return: The method of this P2pUploadChatFileResponse. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): - """Sets the method of this InlineResponse20018. + """Sets the method of this P2pUploadChatFileResponse. - :param method: The method of this InlineResponse20018. # noqa: E501 + :param method: The method of this P2pUploadChatFileResponse. # noqa: E501 :type: str """ @@ -122,20 +122,20 @@ def method(self, method): @property def code(self): - """Gets the code of this InlineResponse20018. # noqa: E501 + """Gets the code of this P2pUploadChatFileResponse. # noqa: E501 - :return: The code of this InlineResponse20018. # noqa: E501 + :return: The code of this P2pUploadChatFileResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse20018. + """Sets the code of this P2pUploadChatFileResponse. - :param code: The code of this InlineResponse20018. # noqa: E501 + :param code: The code of this P2pUploadChatFileResponse. # noqa: E501 :type: int """ @@ -143,20 +143,20 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse20018. # noqa: E501 + """Gets the message of this P2pUploadChatFileResponse. # noqa: E501 - :return: The message of this InlineResponse20018. # noqa: E501 + :return: The message of this P2pUploadChatFileResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse20018. + """Sets the message of this P2pUploadChatFileResponse. - :param message: The message of this InlineResponse20018. # noqa: E501 + :param message: The message of this P2pUploadChatFileResponse. # noqa: E501 :type: str """ @@ -164,41 +164,41 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse20018. # noqa: E501 + """Gets the data of this P2pUploadChatFileResponse. # noqa: E501 - :return: The data of this InlineResponse20018. # noqa: E501 - :rtype: InlineResponse20018Data + :return: The data of this P2pUploadChatFileResponse. # noqa: E501 + :rtype: P2pUploadChatFileResult """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse20018. + """Sets the data of this P2pUploadChatFileResponse. - :param data: The data of this InlineResponse20018. # noqa: E501 - :type: InlineResponse20018Data + :param data: The data of this P2pUploadChatFileResponse. # noqa: E501 + :type: P2pUploadChatFileResult """ self._data = data @property def version(self): - """Gets the version of this InlineResponse20018. # noqa: E501 + """Gets the version of this P2pUploadChatFileResponse. # noqa: E501 - :return: The version of this InlineResponse20018. # noqa: E501 + :return: The version of this P2pUploadChatFileResponse. # noqa: E501 :rtype: str """ return self._version @version.setter def version(self, version): - """Sets the version of this InlineResponse20018. + """Sets the version of this P2pUploadChatFileResponse. - :param version: The version of this InlineResponse20018. # noqa: E501 + :param version: The version of this P2pUploadChatFileResponse. # noqa: E501 :type: str """ @@ -238,14 +238,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20018): + if not isinstance(other, P2pUploadChatFileResponse): 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, InlineResponse20018): + if not isinstance(other, P2pUploadChatFileResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response20026_data.py b/gate_api/models/p2p_upload_chat_file_result.py similarity index 86% rename from gate_api/models/inline_response20026_data.py rename to gate_api/models/p2p_upload_chat_file_result.py index 32a9ec02..3046fb43 100644 --- a/gate_api/models/inline_response20026_data.py +++ b/gate_api/models/p2p_upload_chat_file_result.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse20026Data(object): +class P2pUploadChatFileResult(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -42,7 +42,7 @@ class InlineResponse20026Data(object): def __init__(self, file_key=None, local_vars_configuration=None): # noqa: E501 # type: (str, Configuration) -> None - """InlineResponse20026Data - a model defined in OpenAPI""" # noqa: E501 + """P2pUploadChatFileResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -55,22 +55,22 @@ def __init__(self, file_key=None, local_vars_configuration=None): # noqa: E501 @property def file_key(self): - """Gets the file_key of this InlineResponse20026Data. # noqa: E501 + """Gets the file_key of this P2pUploadChatFileResult. # noqa: E501 File key # noqa: E501 - :return: The file_key of this InlineResponse20026Data. # noqa: E501 + :return: The file_key of this P2pUploadChatFileResult. # noqa: E501 :rtype: str """ return self._file_key @file_key.setter def file_key(self, file_key): - """Sets the file_key of this InlineResponse20026Data. + """Sets the file_key of this P2pUploadChatFileResult. File key # noqa: E501 - :param file_key: The file_key of this InlineResponse20026Data. # noqa: E501 + :param file_key: The file_key of this P2pUploadChatFileResult. # noqa: E501 :type: str """ @@ -110,14 +110,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse20026Data): + if not isinstance(other, P2pUploadChatFileResult): 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, InlineResponse20026Data): + if not isinstance(other, P2pUploadChatFileResult): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_application.py b/gate_api/models/partner_application.py new file mode 100644 index 00000000..b5d7651a --- /dev/null +++ b/gate_api/models/partner_application.py @@ -0,0 +1,989 @@ +# 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 PartnerApplication(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', + 'uid': 'int', + 'language': 'str', + 'country_id': 'int', + 'firstname': 'str', + 'lastname': 'str', + 'email': 'str', + 'join_uid': 'int', + 'join_country_id': 'int', + 'identity_comment': 'str', + 'promotion_channels': 'str', + 'contact_details': 'str', + 'know_details': 'str', + 'question_lang': 'str', + 'create_timest': 'datetime', + 'update_timest': 'datetime', + 'apply_type': 'int', + 'audit_status': 'int', + 'edit_counts': 'int', + 'proof_images': 'str', + 'proof_videos': 'str', + 'proof_url': 'str', + 'audit_reason': 'int', + 'channel_type': 'int', + 'region': 'str', + 'phone': 'str', + 'telegram': 'str', + 'other_contact': 'OtherContact', + 'proof_images_url_list': 'list[str]', + 'proof_videos_url_list': 'list[str]', + 'apply_msg': 'str', + 'jump_url': 'str' + } + + attribute_map = { + 'id': 'id', + 'uid': 'uid', + 'language': 'language', + 'country_id': 'country_id', + 'firstname': 'firstname', + 'lastname': 'lastname', + 'email': 'email', + 'join_uid': 'join_uid', + 'join_country_id': 'join_country_id', + 'identity_comment': 'identity_comment', + 'promotion_channels': 'promotion_channels', + 'contact_details': 'contact_details', + 'know_details': 'know_details', + 'question_lang': 'question_lang', + 'create_timest': 'create_timest', + 'update_timest': 'update_timest', + 'apply_type': 'apply_type', + 'audit_status': 'audit_status', + 'edit_counts': 'edit_counts', + 'proof_images': 'proof_images', + 'proof_videos': 'proof_videos', + 'proof_url': 'proof_url', + 'audit_reason': 'audit_reason', + 'channel_type': 'channel_type', + 'region': 'region', + 'phone': 'phone', + 'telegram': 'telegram', + 'other_contact': 'other_contact', + 'proof_images_url_list': 'proof_images_url_list', + 'proof_videos_url_list': 'proof_videos_url_list', + 'apply_msg': 'apply_msg', + 'jump_url': 'jump_url' + } + + def __init__(self, id=None, uid=None, language=None, country_id=None, firstname=None, lastname=None, email=None, join_uid=None, join_country_id=None, identity_comment=None, promotion_channels=None, contact_details=None, know_details=None, question_lang=None, create_timest=None, update_timest=None, apply_type=None, audit_status=None, edit_counts=None, proof_images=None, proof_videos=None, proof_url=None, audit_reason=None, channel_type=None, region=None, phone=None, telegram=None, other_contact=None, proof_images_url_list=None, proof_videos_url_list=None, apply_msg=None, jump_url=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, int, str, str, str, int, int, str, str, str, str, str, datetime, datetime, int, int, int, str, str, str, int, int, str, str, str, OtherContact, list[str], list[str], str, str, Configuration) -> None + """PartnerApplication - 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._uid = None + self._language = None + self._country_id = None + self._firstname = None + self._lastname = None + self._email = None + self._join_uid = None + self._join_country_id = None + self._identity_comment = None + self._promotion_channels = None + self._contact_details = None + self._know_details = None + self._question_lang = None + self._create_timest = None + self._update_timest = None + self._apply_type = None + self._audit_status = None + self._edit_counts = None + self._proof_images = None + self._proof_videos = None + self._proof_url = None + self._audit_reason = None + self._channel_type = None + self._region = None + self._phone = None + self._telegram = None + self._other_contact = None + self._proof_images_url_list = None + self._proof_videos_url_list = None + self._apply_msg = None + self._jump_url = None + self.discriminator = None + + if id is not None: + self.id = id + if uid is not None: + self.uid = uid + if language is not None: + self.language = language + if country_id is not None: + self.country_id = country_id + if firstname is not None: + self.firstname = firstname + if lastname is not None: + self.lastname = lastname + if email is not None: + self.email = email + if join_uid is not None: + self.join_uid = join_uid + if join_country_id is not None: + self.join_country_id = join_country_id + if identity_comment is not None: + self.identity_comment = identity_comment + if promotion_channels is not None: + self.promotion_channels = promotion_channels + if contact_details is not None: + self.contact_details = contact_details + if know_details is not None: + self.know_details = know_details + if question_lang is not None: + self.question_lang = question_lang + if create_timest is not None: + self.create_timest = create_timest + if update_timest is not None: + self.update_timest = update_timest + if apply_type is not None: + self.apply_type = apply_type + if audit_status is not None: + self.audit_status = audit_status + if edit_counts is not None: + self.edit_counts = edit_counts + if proof_images is not None: + self.proof_images = proof_images + if proof_videos is not None: + self.proof_videos = proof_videos + if proof_url is not None: + self.proof_url = proof_url + if audit_reason is not None: + self.audit_reason = audit_reason + if channel_type is not None: + self.channel_type = channel_type + if region is not None: + self.region = region + if phone is not None: + self.phone = phone + if telegram is not None: + self.telegram = telegram + if other_contact is not None: + self.other_contact = other_contact + if proof_images_url_list is not None: + self.proof_images_url_list = proof_images_url_list + if proof_videos_url_list is not None: + self.proof_videos_url_list = proof_videos_url_list + if apply_msg is not None: + self.apply_msg = apply_msg + if jump_url is not None: + self.jump_url = jump_url + + @property + def id(self): + """Gets the id of this PartnerApplication. # noqa: E501 + + Application record ID # noqa: E501 + + :return: The id of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PartnerApplication. + + Application record ID # noqa: E501 + + :param id: The id of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def uid(self): + """Gets the uid of this PartnerApplication. # noqa: E501 + + User ID # noqa: E501 + + :return: The uid of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this PartnerApplication. + + User ID # noqa: E501 + + :param uid: The uid of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._uid = uid + + @property + def language(self): + """Gets the language of this PartnerApplication. # noqa: E501 + + Language code # noqa: E501 + + :return: The language of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this PartnerApplication. + + Language code # noqa: E501 + + :param language: The language of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def country_id(self): + """Gets the country_id of this PartnerApplication. # noqa: E501 + + Country ID # noqa: E501 + + :return: The country_id of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._country_id + + @country_id.setter + def country_id(self, country_id): + """Sets the country_id of this PartnerApplication. + + Country ID # noqa: E501 + + :param country_id: The country_id of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._country_id = country_id + + @property + def firstname(self): + """Gets the firstname of this PartnerApplication. # noqa: E501 + + First name # noqa: E501 + + :return: The firstname of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this PartnerApplication. + + First name # noqa: E501 + + :param firstname: The firstname of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._firstname = firstname + + @property + def lastname(self): + """Gets the lastname of this PartnerApplication. # noqa: E501 + + Last name # noqa: E501 + + :return: The lastname of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this PartnerApplication. + + Last name # noqa: E501 + + :param lastname: The lastname of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._lastname = lastname + + @property + def email(self): + """Gets the email of this PartnerApplication. # noqa: E501 + + Email address # noqa: E501 + + :return: The email of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this PartnerApplication. + + Email address # noqa: E501 + + :param email: The email of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def join_uid(self): + """Gets the join_uid of this PartnerApplication. # noqa: E501 + + Joined user ID # noqa: E501 + + :return: The join_uid of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._join_uid + + @join_uid.setter + def join_uid(self, join_uid): + """Sets the join_uid of this PartnerApplication. + + Joined user ID # noqa: E501 + + :param join_uid: The join_uid of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._join_uid = join_uid + + @property + def join_country_id(self): + """Gets the join_country_id of this PartnerApplication. # noqa: E501 + + Joined country ID # noqa: E501 + + :return: The join_country_id of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._join_country_id + + @join_country_id.setter + def join_country_id(self, join_country_id): + """Sets the join_country_id of this PartnerApplication. + + Joined country ID # noqa: E501 + + :param join_country_id: The join_country_id of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._join_country_id = join_country_id + + @property + def identity_comment(self): + """Gets the identity_comment of this PartnerApplication. # noqa: E501 + + Identity description # noqa: E501 + + :return: The identity_comment of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._identity_comment + + @identity_comment.setter + def identity_comment(self, identity_comment): + """Sets the identity_comment of this PartnerApplication. + + Identity description # noqa: E501 + + :param identity_comment: The identity_comment of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._identity_comment = identity_comment + + @property + def promotion_channels(self): + """Gets the promotion_channels of this PartnerApplication. # noqa: E501 + + Promotion channels, separated by | # noqa: E501 + + :return: The promotion_channels of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._promotion_channels + + @promotion_channels.setter + def promotion_channels(self, promotion_channels): + """Sets the promotion_channels of this PartnerApplication. + + Promotion channels, separated by | # noqa: E501 + + :param promotion_channels: The promotion_channels of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._promotion_channels = promotion_channels + + @property + def contact_details(self): + """Gets the contact_details of this PartnerApplication. # noqa: E501 + + Contact details (JSON string) # noqa: E501 + + :return: The contact_details of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._contact_details + + @contact_details.setter + def contact_details(self, contact_details): + """Sets the contact_details of this PartnerApplication. + + Contact details (JSON string) # noqa: E501 + + :param contact_details: The contact_details of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._contact_details = contact_details + + @property + def know_details(self): + """Gets the know_details of this PartnerApplication. # noqa: E501 + + Learn more # noqa: E501 + + :return: The know_details of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._know_details + + @know_details.setter + def know_details(self, know_details): + """Sets the know_details of this PartnerApplication. + + Learn more # noqa: E501 + + :param know_details: The know_details of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._know_details = know_details + + @property + def question_lang(self): + """Gets the question_lang of this PartnerApplication. # noqa: E501 + + Question language # noqa: E501 + + :return: The question_lang of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._question_lang + + @question_lang.setter + def question_lang(self, question_lang): + """Sets the question_lang of this PartnerApplication. + + Question language # noqa: E501 + + :param question_lang: The question_lang of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._question_lang = question_lang + + @property + def create_timest(self): + """Gets the create_timest of this PartnerApplication. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_timest of this PartnerApplication. # noqa: E501 + :rtype: datetime + """ + return self._create_timest + + @create_timest.setter + def create_timest(self, create_timest): + """Sets the create_timest of this PartnerApplication. + + Created time # noqa: E501 + + :param create_timest: The create_timest of this PartnerApplication. # noqa: E501 + :type: datetime + """ + + self._create_timest = create_timest + + @property + def update_timest(self): + """Gets the update_timest of this PartnerApplication. # noqa: E501 + + Update time # noqa: E501 + + :return: The update_timest of this PartnerApplication. # noqa: E501 + :rtype: datetime + """ + return self._update_timest + + @update_timest.setter + def update_timest(self, update_timest): + """Sets the update_timest of this PartnerApplication. + + Update time # noqa: E501 + + :param update_timest: The update_timest of this PartnerApplication. # noqa: E501 + :type: datetime + """ + + self._update_timest = update_timest + + @property + def apply_type(self): + """Gets the apply_type of this PartnerApplication. # noqa: E501 + + Application type # noqa: E501 + + :return: The apply_type of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._apply_type + + @apply_type.setter + def apply_type(self, apply_type): + """Sets the apply_type of this PartnerApplication. + + Application type # noqa: E501 + + :param apply_type: The apply_type of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._apply_type = apply_type + + @property + def audit_status(self): + """Gets the audit_status of this PartnerApplication. # noqa: E501 + + Review status (0 - pending, 1 - approved, 2 - rejected) # noqa: E501 + + :return: The audit_status of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._audit_status + + @audit_status.setter + def audit_status(self, audit_status): + """Sets the audit_status of this PartnerApplication. + + Review status (0 - pending, 1 - approved, 2 - rejected) # noqa: E501 + + :param audit_status: The audit_status of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._audit_status = audit_status + + @property + def edit_counts(self): + """Gets the edit_counts of this PartnerApplication. # noqa: E501 + + Edit count # noqa: E501 + + :return: The edit_counts of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._edit_counts + + @edit_counts.setter + def edit_counts(self, edit_counts): + """Sets the edit_counts of this PartnerApplication. + + Edit count # noqa: E501 + + :param edit_counts: The edit_counts of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._edit_counts = edit_counts + + @property + def proof_images(self): + """Gets the proof_images of this PartnerApplication. # noqa: E501 + + Proof image path # noqa: E501 + + :return: The proof_images of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._proof_images + + @proof_images.setter + def proof_images(self, proof_images): + """Sets the proof_images of this PartnerApplication. + + Proof image path # noqa: E501 + + :param proof_images: The proof_images of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._proof_images = proof_images + + @property + def proof_videos(self): + """Gets the proof_videos of this PartnerApplication. # noqa: E501 + + Proof video path # noqa: E501 + + :return: The proof_videos of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._proof_videos + + @proof_videos.setter + def proof_videos(self, proof_videos): + """Sets the proof_videos of this PartnerApplication. + + Proof video path # noqa: E501 + + :param proof_videos: The proof_videos of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._proof_videos = proof_videos + + @property + def proof_url(self): + """Gets the proof_url of this PartnerApplication. # noqa: E501 + + Proof link # noqa: E501 + + :return: The proof_url of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._proof_url + + @proof_url.setter + def proof_url(self, proof_url): + """Sets the proof_url of this PartnerApplication. + + Proof link # noqa: E501 + + :param proof_url: The proof_url of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._proof_url = proof_url + + @property + def audit_reason(self): + """Gets the audit_reason of this PartnerApplication. # noqa: E501 + + Review reason code # noqa: E501 + + :return: The audit_reason of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._audit_reason + + @audit_reason.setter + def audit_reason(self, audit_reason): + """Sets the audit_reason of this PartnerApplication. + + Review reason code # noqa: E501 + + :param audit_reason: The audit_reason of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._audit_reason = audit_reason + + @property + def channel_type(self): + """Gets the channel_type of this PartnerApplication. # noqa: E501 + + Channel type # noqa: E501 + + :return: The channel_type of this PartnerApplication. # noqa: E501 + :rtype: int + """ + return self._channel_type + + @channel_type.setter + def channel_type(self, channel_type): + """Sets the channel_type of this PartnerApplication. + + Channel type # noqa: E501 + + :param channel_type: The channel_type of this PartnerApplication. # noqa: E501 + :type: int + """ + + self._channel_type = channel_type + + @property + def region(self): + """Gets the region of this PartnerApplication. # noqa: E501 + + Region # noqa: E501 + + :return: The region of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """Sets the region of this PartnerApplication. + + Region # noqa: E501 + + :param region: The region of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._region = region + + @property + def phone(self): + """Gets the phone of this PartnerApplication. # noqa: E501 + + Phone number # noqa: E501 + + :return: The phone of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """Sets the phone of this PartnerApplication. + + Phone number # noqa: E501 + + :param phone: The phone of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._phone = phone + + @property + def telegram(self): + """Gets the telegram of this PartnerApplication. # noqa: E501 + + Telegram account # noqa: E501 + + :return: The telegram of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._telegram + + @telegram.setter + def telegram(self, telegram): + """Sets the telegram of this PartnerApplication. + + Telegram account # noqa: E501 + + :param telegram: The telegram of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._telegram = telegram + + @property + def other_contact(self): + """Gets the other_contact of this PartnerApplication. # noqa: E501 + + + :return: The other_contact of this PartnerApplication. # noqa: E501 + :rtype: OtherContact + """ + return self._other_contact + + @other_contact.setter + def other_contact(self, other_contact): + """Sets the other_contact of this PartnerApplication. + + + :param other_contact: The other_contact of this PartnerApplication. # noqa: E501 + :type: OtherContact + """ + + self._other_contact = other_contact + + @property + def proof_images_url_list(self): + """Gets the proof_images_url_list of this PartnerApplication. # noqa: E501 + + List of proof image URLs # noqa: E501 + + :return: The proof_images_url_list of this PartnerApplication. # noqa: E501 + :rtype: list[str] + """ + return self._proof_images_url_list + + @proof_images_url_list.setter + def proof_images_url_list(self, proof_images_url_list): + """Sets the proof_images_url_list of this PartnerApplication. + + List of proof image URLs # noqa: E501 + + :param proof_images_url_list: The proof_images_url_list of this PartnerApplication. # noqa: E501 + :type: list[str] + """ + + self._proof_images_url_list = proof_images_url_list + + @property + def proof_videos_url_list(self): + """Gets the proof_videos_url_list of this PartnerApplication. # noqa: E501 + + List of proof video URLs # noqa: E501 + + :return: The proof_videos_url_list of this PartnerApplication. # noqa: E501 + :rtype: list[str] + """ + return self._proof_videos_url_list + + @proof_videos_url_list.setter + def proof_videos_url_list(self, proof_videos_url_list): + """Sets the proof_videos_url_list of this PartnerApplication. + + List of proof video URLs # noqa: E501 + + :param proof_videos_url_list: The proof_videos_url_list of this PartnerApplication. # noqa: E501 + :type: list[str] + """ + + self._proof_videos_url_list = proof_videos_url_list + + @property + def apply_msg(self): + """Gets the apply_msg of this PartnerApplication. # noqa: E501 + + Application message # noqa: E501 + + :return: The apply_msg of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._apply_msg + + @apply_msg.setter + def apply_msg(self, apply_msg): + """Sets the apply_msg of this PartnerApplication. + + Application message # noqa: E501 + + :param apply_msg: The apply_msg of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._apply_msg = apply_msg + + @property + def jump_url(self): + """Gets the jump_url of this PartnerApplication. # noqa: E501 + + Redirect URL # noqa: E501 + + :return: The jump_url of this PartnerApplication. # noqa: E501 + :rtype: str + """ + return self._jump_url + + @jump_url.setter + def jump_url(self, jump_url): + """Sets the jump_url of this PartnerApplication. + + Redirect URL # noqa: E501 + + :param jump_url: The jump_url of this PartnerApplication. # noqa: E501 + :type: str + """ + + self._jump_url = jump_url + + 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, PartnerApplication): + 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, PartnerApplication): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_application_response.py b/gate_api/models/partner_application_response.py new file mode 100644 index 00000000..8460d362 --- /dev/null +++ b/gate_api/models/partner_application_response.py @@ -0,0 +1,209 @@ +# 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 PartnerApplicationResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'PartnerApplication', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, PartnerApplication, int, Configuration) -> None + """PartnerApplicationResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this PartnerApplicationResponse. # noqa: E501 + + Error Code, 0 Indicates Success # noqa: E501 + + :return: The code of this PartnerApplicationResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this PartnerApplicationResponse. + + Error Code, 0 Indicates Success # noqa: E501 + + :param code: The code of this PartnerApplicationResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this PartnerApplicationResponse. # noqa: E501 + + Error message description # noqa: E501 + + :return: The message of this PartnerApplicationResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this PartnerApplicationResponse. + + Error message description # noqa: E501 + + :param message: The message of this PartnerApplicationResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this PartnerApplicationResponse. # noqa: E501 + + + :return: The data of this PartnerApplicationResponse. # noqa: E501 + :rtype: PartnerApplication + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PartnerApplicationResponse. + + + :param data: The data of this PartnerApplicationResponse. # noqa: E501 + :type: PartnerApplication + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this PartnerApplicationResponse. # noqa: E501 + + Unix timestamp # noqa: E501 + + :return: The timestamp of this PartnerApplicationResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this PartnerApplicationResponse. + + Unix timestamp # noqa: E501 + + :param timestamp: The timestamp of this PartnerApplicationResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, PartnerApplicationResponse): + 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, PartnerApplicationResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_application_response_all_of.py b/gate_api/models/partner_application_response_all_of.py new file mode 100644 index 00000000..7d923549 --- /dev/null +++ b/gate_api/models/partner_application_response_all_of.py @@ -0,0 +1,121 @@ +# 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 PartnerApplicationResponseAllOf(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 = { + 'data': 'PartnerApplication' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + # type: (PartnerApplication, Configuration) -> None + """PartnerApplicationResponseAllOf - 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._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this PartnerApplicationResponseAllOf. # noqa: E501 + + + :return: The data of this PartnerApplicationResponseAllOf. # noqa: E501 + :rtype: PartnerApplication + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PartnerApplicationResponseAllOf. + + + :param data: The data of this PartnerApplicationResponseAllOf. # noqa: E501 + :type: PartnerApplication + """ + + self._data = data + + 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, PartnerApplicationResponseAllOf): + 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, PartnerApplicationResponseAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_data_aggregated.py b/gate_api/models/partner_data_aggregated.py new file mode 100644 index 00000000..945f1408 --- /dev/null +++ b/gate_api/models/partner_data_aggregated.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 PartnerDataAggregated(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 = { + 'rebate_amount': 'str', + 'trade_volume': 'str', + 'net_fee': 'str', + 'customer_count': 'int', + 'trading_user_count': 'str', + 'time_range_desc': 'str', + 'business_type': 'int', + 'business_type_desc': 'str' + } + + attribute_map = { + 'rebate_amount': 'rebate_amount', + 'trade_volume': 'trade_volume', + 'net_fee': 'net_fee', + 'customer_count': 'customer_count', + 'trading_user_count': 'trading_user_count', + 'time_range_desc': 'time_range_desc', + 'business_type': 'business_type', + 'business_type_desc': 'business_type_desc' + } + + def __init__(self, rebate_amount=None, trade_volume=None, net_fee=None, customer_count=None, trading_user_count=None, time_range_desc=None, business_type=None, business_type_desc=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, str, str, int, str, Configuration) -> None + """PartnerDataAggregated - 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._rebate_amount = None + self._trade_volume = None + self._net_fee = None + self._customer_count = None + self._trading_user_count = None + self._time_range_desc = None + self._business_type = None + self._business_type_desc = None + self.discriminator = None + + self.rebate_amount = rebate_amount + self.trade_volume = trade_volume + self.net_fee = net_fee + self.customer_count = customer_count + self.trading_user_count = trading_user_count + self.time_range_desc = time_range_desc + self.business_type = business_type + self.business_type_desc = business_type_desc + + @property + def rebate_amount(self): + """Gets the rebate_amount of this PartnerDataAggregated. # noqa: E501 + + Rebate amount as a string for precision. Up to 6 decimal places; trailing zeros removed. # noqa: E501 + + :return: The rebate_amount of this PartnerDataAggregated. # noqa: E501 + :rtype: str + """ + return self._rebate_amount + + @rebate_amount.setter + def rebate_amount(self, rebate_amount): + """Sets the rebate_amount of this PartnerDataAggregated. + + Rebate amount as a string for precision. Up to 6 decimal places; trailing zeros removed. # noqa: E501 + + :param rebate_amount: The rebate_amount of this PartnerDataAggregated. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and rebate_amount is None: # noqa: E501 + raise ValueError("Invalid value for `rebate_amount`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + rebate_amount is not None and not re.search(r'^\d+(\.\d{1,6})?$', rebate_amount)): # noqa: E501 + raise ValueError(r"Invalid value for `rebate_amount`, must be a follow pattern or equal to `/^\d+(\.\d{1,6})?$/`") # noqa: E501 + + self._rebate_amount = rebate_amount + + @property + def trade_volume(self): + """Gets the trade_volume of this PartnerDataAggregated. # noqa: E501 + + Trading volume as a string for precision. Up to 6 decimal places; trailing zeros removed. # noqa: E501 + + :return: The trade_volume of this PartnerDataAggregated. # noqa: E501 + :rtype: str + """ + return self._trade_volume + + @trade_volume.setter + def trade_volume(self, trade_volume): + """Sets the trade_volume of this PartnerDataAggregated. + + Trading volume as a string for precision. Up to 6 decimal places; trailing zeros removed. # noqa: E501 + + :param trade_volume: The trade_volume of this PartnerDataAggregated. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and trade_volume is None: # noqa: E501 + raise ValueError("Invalid value for `trade_volume`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + trade_volume is not None and not re.search(r'^\d+(\.\d{1,6})?$', trade_volume)): # noqa: E501 + raise ValueError(r"Invalid value for `trade_volume`, must be a follow pattern or equal to `/^\d+(\.\d{1,6})?$/`") # noqa: E501 + + self._trade_volume = trade_volume + + @property + def net_fee(self): + """Gets the net_fee of this PartnerDataAggregated. # noqa: E501 + + Net fee as a string for precision. Up to 6 decimal places; trailing zeros removed. # noqa: E501 + + :return: The net_fee of this PartnerDataAggregated. # noqa: E501 + :rtype: str + """ + return self._net_fee + + @net_fee.setter + def net_fee(self, net_fee): + """Sets the net_fee of this PartnerDataAggregated. + + Net fee as a string for precision. Up to 6 decimal places; trailing zeros removed. # noqa: E501 + + :param net_fee: The net_fee of this PartnerDataAggregated. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and net_fee is None: # noqa: E501 + raise ValueError("Invalid value for `net_fee`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + net_fee is not None and not re.search(r'^\d+(\.\d{1,6})?$', net_fee)): # noqa: E501 + raise ValueError(r"Invalid value for `net_fee`, must be a follow pattern or equal to `/^\d+(\.\d{1,6})?$/`") # noqa: E501 + + self._net_fee = net_fee + + @property + def customer_count(self): + """Gets the customer_count of this PartnerDataAggregated. # noqa: E501 + + Customer count (invited users) # noqa: E501 + + :return: The customer_count of this PartnerDataAggregated. # noqa: E501 + :rtype: int + """ + return self._customer_count + + @customer_count.setter + def customer_count(self, customer_count): + """Sets the customer_count of this PartnerDataAggregated. + + Customer count (invited users) # noqa: E501 + + :param customer_count: The customer_count of this PartnerDataAggregated. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and customer_count is None: # noqa: E501 + raise ValueError("Invalid value for `customer_count`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + customer_count is not None and customer_count < 0): # noqa: E501 + raise ValueError("Invalid value for `customer_count`, must be a value greater than or equal to `0`") # noqa: E501 + + self._customer_count = customer_count + + @property + def trading_user_count(self): + """Gets the trading_user_count of this PartnerDataAggregated. # noqa: E501 + + Transaction participant count​ (string format, consistent with online JSON serialization) only returns a specific value when business_type=0(all), and returns nullfor other business types. # noqa: E501 + + :return: The trading_user_count of this PartnerDataAggregated. # noqa: E501 + :rtype: str + """ + return self._trading_user_count + + @trading_user_count.setter + def trading_user_count(self, trading_user_count): + """Sets the trading_user_count of this PartnerDataAggregated. + + Transaction participant count​ (string format, consistent with online JSON serialization) only returns a specific value when business_type=0(all), and returns nullfor other business types. # noqa: E501 + + :param trading_user_count: The trading_user_count of this PartnerDataAggregated. # noqa: E501 + :type: str + """ + if (self.local_vars_configuration.client_side_validation and + trading_user_count is not None and not re.search(r'^\d+$', trading_user_count)): # noqa: E501 + raise ValueError(r"Invalid value for `trading_user_count`, must be a follow pattern or equal to `/^\d+$/`") # noqa: E501 + + self._trading_user_count = trading_user_count + + @property + def time_range_desc(self): + """Gets the time_range_desc of this PartnerDataAggregated. # noqa: E501 + + Time range description # noqa: E501 + + :return: The time_range_desc of this PartnerDataAggregated. # noqa: E501 + :rtype: str + """ + return self._time_range_desc + + @time_range_desc.setter + def time_range_desc(self, time_range_desc): + """Sets the time_range_desc of this PartnerDataAggregated. + + Time range description # noqa: E501 + + :param time_range_desc: The time_range_desc of this PartnerDataAggregated. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and time_range_desc is None: # noqa: E501 + raise ValueError("Invalid value for `time_range_desc`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + time_range_desc is not None and not re.search(r'^\d{4}-\d{2}-\d{2} ~ \d{4}-\d{2}-\d{2}$', time_range_desc)): # noqa: E501 + raise ValueError(r"Invalid value for `time_range_desc`, must be a follow pattern or equal to `/^\d{4}-\d{2}-\d{2} ~ \d{4}-\d{2}-\d{2}$/`") # noqa: E501 + + self._time_range_desc = time_range_desc + + @property + def business_type(self): + """Gets the business_type of this PartnerDataAggregated. # noqa: E501 + + Business Type # noqa: E501 + + :return: The business_type of this PartnerDataAggregated. # noqa: E501 + :rtype: int + """ + return self._business_type + + @business_type.setter + def business_type(self, business_type): + """Sets the business_type of this PartnerDataAggregated. + + Business Type # noqa: E501 + + :param business_type: The business_type of this PartnerDataAggregated. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and business_type is None: # noqa: E501 + raise ValueError("Invalid value for `business_type`, must not be `None`") # noqa: E501 + allowed_values = [0, 1, 2, 3, 4, 5, 6, 7, 8] # noqa: E501 + if self.local_vars_configuration.client_side_validation and business_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `business_type` ({0}), must be one of {1}" # noqa: E501 + .format(business_type, allowed_values) + ) + + self._business_type = business_type + + @property + def business_type_desc(self): + """Gets the business_type_desc of this PartnerDataAggregated. # noqa: E501 + + Business type description; allowed values: All, Spot, Futures, Alpha, Web3, Perps (DEX), Exchange All, Web3 All, TradFi # noqa: E501 + + :return: The business_type_desc of this PartnerDataAggregated. # noqa: E501 + :rtype: str + """ + return self._business_type_desc + + @business_type_desc.setter + def business_type_desc(self, business_type_desc): + """Sets the business_type_desc of this PartnerDataAggregated. + + Business type description; allowed values: All, Spot, Futures, Alpha, Web3, Perps (DEX), Exchange All, Web3 All, TradFi # noqa: E501 + + :param business_type_desc: The business_type_desc of this PartnerDataAggregated. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and business_type_desc is None: # noqa: E501 + raise ValueError("Invalid value for `business_type_desc`, must not be `None`") # noqa: E501 + + self._business_type_desc = business_type_desc + + 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, PartnerDataAggregated): + 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, PartnerDataAggregated): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_data_aggregated_response.py b/gate_api/models/partner_data_aggregated_response.py new file mode 100644 index 00000000..5b9e7684 --- /dev/null +++ b/gate_api/models/partner_data_aggregated_response.py @@ -0,0 +1,209 @@ +# 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 PartnerDataAggregatedResponse(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 = { + 'code': 'int', + 'message': 'str', + 'data': 'PartnerDataAggregated', + 'timestamp': 'int' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, PartnerDataAggregated, int, Configuration) -> None + """PartnerDataAggregatedResponse - 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._code = None + self._message = None + self._data = None + self._timestamp = None + self.discriminator = None + + self.code = code + self.message = message + self.data = data + self.timestamp = timestamp + + @property + def code(self): + """Gets the code of this PartnerDataAggregatedResponse. # noqa: E501 + + Error Code, 0 Indicates Success # noqa: E501 + + :return: The code of this PartnerDataAggregatedResponse. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this PartnerDataAggregatedResponse. + + Error Code, 0 Indicates Success # noqa: E501 + + :param code: The code of this PartnerDataAggregatedResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self): + """Gets the message of this PartnerDataAggregatedResponse. # noqa: E501 + + Error message description # noqa: E501 + + :return: The message of this PartnerDataAggregatedResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this PartnerDataAggregatedResponse. + + Error message description # noqa: E501 + + :param message: The message of this PartnerDataAggregatedResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def data(self): + """Gets the data of this PartnerDataAggregatedResponse. # noqa: E501 + + + :return: The data of this PartnerDataAggregatedResponse. # noqa: E501 + :rtype: PartnerDataAggregated + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PartnerDataAggregatedResponse. + + + :param data: The data of this PartnerDataAggregatedResponse. # noqa: E501 + :type: PartnerDataAggregated + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this PartnerDataAggregatedResponse. # noqa: E501 + + Unix timestamp # noqa: E501 + + :return: The timestamp of this PartnerDataAggregatedResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this PartnerDataAggregatedResponse. + + Unix timestamp # noqa: E501 + + :param timestamp: The timestamp of this PartnerDataAggregatedResponse. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + + 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, PartnerDataAggregatedResponse): + 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, PartnerDataAggregatedResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_data_aggregated_response_all_of.py b/gate_api/models/partner_data_aggregated_response_all_of.py new file mode 100644 index 00000000..e5464bbc --- /dev/null +++ b/gate_api/models/partner_data_aggregated_response_all_of.py @@ -0,0 +1,121 @@ +# 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 PartnerDataAggregatedResponseAllOf(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 = { + 'data': 'PartnerDataAggregated' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + # type: (PartnerDataAggregated, Configuration) -> None + """PartnerDataAggregatedResponseAllOf - 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._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this PartnerDataAggregatedResponseAllOf. # noqa: E501 + + + :return: The data of this PartnerDataAggregatedResponseAllOf. # noqa: E501 + :rtype: PartnerDataAggregated + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PartnerDataAggregatedResponseAllOf. + + + :param data: The data of this PartnerDataAggregatedResponseAllOf. # noqa: E501 + :type: PartnerDataAggregated + """ + + self._data = data + + 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, PartnerDataAggregatedResponseAllOf): + 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, PartnerDataAggregatedResponseAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/place_biz_push_order.py b/gate_api/models/place_biz_push_order.py index 019c12ac..ddd462f1 100644 --- a/gate_api/models/place_biz_push_order.py +++ b/gate_api/models/place_biz_push_order.py @@ -48,7 +48,6 @@ class PlaceBizPushOrder(object): 'verified_limit': 'str', 'reg_time_limit': 'str', 'advertisers_limit': 'str', - 'hide_payment': 'str', 'expire_min': 'str', 'trade_tips': 'str', 'auto_reply': 'str', @@ -59,7 +58,8 @@ class PlaceBizPushOrder(object): 'user_order_limit': 'str', 'rate_reference_id': 'str', 'rate_offset': 'str', - 'float_trend': 'str' + 'float_trend': 'str', + 'team_payment_uid': 'str' } attribute_map = { @@ -78,7 +78,6 @@ class PlaceBizPushOrder(object): 'verified_limit': 'verifiedLimit', 'reg_time_limit': 'regTimeLimit', 'advertisers_limit': 'advertisersLimit', - 'hide_payment': 'hide_payment', 'expire_min': 'expire_min', 'trade_tips': 'trade_tips', 'auto_reply': 'auto_reply', @@ -89,10 +88,11 @@ class PlaceBizPushOrder(object): 'user_order_limit': 'user_order_limit', 'rate_reference_id': 'rateReferenceId', 'rate_offset': 'rateOffset', - 'float_trend': 'float_trend' + 'float_trend': 'float_trend', + 'team_payment_uid': 'team_payment_uid' } - def __init__(self, currency_type=None, exchange_type=None, type=None, unit_price=None, number=None, pay_type=None, pay_type_json=None, rate_fixed=None, oid=None, min_amount=None, max_amount=None, tier_limit=None, verified_limit=None, reg_time_limit=None, advertisers_limit=None, hide_payment=None, expire_min=None, trade_tips=None, auto_reply=None, min_completed_limit=None, max_completed_limit=None, completed_rate_limit=None, user_country_limit=None, user_order_limit=None, rate_reference_id=None, rate_offset=None, float_trend=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, currency_type=None, exchange_type=None, type=None, unit_price=None, number=None, pay_type=None, pay_type_json=None, rate_fixed=None, oid=None, min_amount=None, max_amount=None, tier_limit=None, verified_limit=None, reg_time_limit=None, advertisers_limit=None, expire_min=None, trade_tips=None, auto_reply=None, min_completed_limit=None, max_completed_limit=None, completed_rate_limit=None, user_country_limit=None, user_order_limit=None, rate_reference_id=None, rate_offset=None, float_trend=None, team_payment_uid=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, str, Configuration) -> None """PlaceBizPushOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: @@ -114,7 +114,6 @@ def __init__(self, currency_type=None, exchange_type=None, type=None, unit_price self._verified_limit = None self._reg_time_limit = None self._advertisers_limit = None - self._hide_payment = None self._expire_min = None self._trade_tips = None self._auto_reply = None @@ -126,6 +125,7 @@ def __init__(self, currency_type=None, exchange_type=None, type=None, unit_price self._rate_reference_id = None self._rate_offset = None self._float_trend = None + self._team_payment_uid = None self.discriminator = None self.currency_type = currency_type @@ -150,8 +150,6 @@ def __init__(self, currency_type=None, exchange_type=None, type=None, unit_price self.reg_time_limit = reg_time_limit if advertisers_limit is not None: self.advertisers_limit = advertisers_limit - if hide_payment is not None: - self.hide_payment = hide_payment if expire_min is not None: self.expire_min = expire_min if trade_tips is not None: @@ -174,12 +172,14 @@ def __init__(self, currency_type=None, exchange_type=None, type=None, unit_price self.rate_offset = rate_offset if float_trend is not None: self.float_trend = float_trend + if team_payment_uid is not None: + self.team_payment_uid = team_payment_uid @property def currency_type(self): """Gets the currency_type of this PlaceBizPushOrder. # noqa: E501 - Cryptocurrency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 :return: The currency_type of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def currency_type(self): def currency_type(self, currency_type): """Sets the currency_type of this PlaceBizPushOrder. - Cryptocurrency # noqa: E501 + Cryptocurrency symbol. # noqa: E501 :param currency_type: The currency_type of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -229,7 +229,7 @@ def exchange_type(self, exchange_type): def type(self): """Gets the type of this PlaceBizPushOrder. # noqa: E501 - Ad type: 0=Sell, 1=Buy, 2=Edit sell, 3=Edit buy # noqa: E501 + Ad operation type. `0`: publish sell ad; `1`: publish buy ad; `2`: edit sell ad; `3`: edit buy ad. # noqa: E501 :return: The type of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -240,13 +240,19 @@ def type(self): def type(self, type): """Sets the type of this PlaceBizPushOrder. - Ad type: 0=Sell, 1=Buy, 2=Edit sell, 3=Edit buy # noqa: E501 + Ad operation type. `0`: publish sell ad; `1`: publish buy ad; `2`: edit sell ad; `3`: edit buy ad. # noqa: E501 :param type: The type of this PlaceBizPushOrder. # 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 + allowed_values = ["0", "1", "2", "3"] # 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 @@ -254,7 +260,7 @@ def type(self, type): def unit_price(self): """Gets the unit_price of this PlaceBizPushOrder. # noqa: E501 - Unit price # noqa: E501 + Per-unit price in fixed-price mode. # noqa: E501 :return: The unit_price of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -265,7 +271,7 @@ def unit_price(self): def unit_price(self, unit_price): """Sets the unit_price of this PlaceBizPushOrder. - Unit price # noqa: E501 + Per-unit price in fixed-price mode. # noqa: E501 :param unit_price: The unit_price of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -279,7 +285,7 @@ def unit_price(self, unit_price): def number(self): """Gets the number of this PlaceBizPushOrder. # noqa: E501 - Size # noqa: E501 + Ad amount priced in `currencyType`. # noqa: E501 :return: The number of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -290,7 +296,7 @@ def number(self): def number(self, number): """Sets the number of this PlaceBizPushOrder. - Size # noqa: E501 + Ad amount priced in `currencyType`. # noqa: E501 :param number: The number of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -304,7 +310,7 @@ def number(self, number): def pay_type(self): """Gets the pay_type of this PlaceBizPushOrder. # noqa: E501 - Payment method # noqa: E501 + Payment types, comma-separated; from pay type list `pay_type`, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 :return: The pay_type of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -315,7 +321,7 @@ def pay_type(self): def pay_type(self, pay_type): """Sets the pay_type of this PlaceBizPushOrder. - Payment method # noqa: E501 + Payment types, comma-separated; from pay type list `pay_type`, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 :param pay_type: The pay_type of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -329,7 +335,7 @@ def pay_type(self, pay_type): def pay_type_json(self): """Gets the pay_type_json of this PlaceBizPushOrder. # noqa: E501 - Payment method JSON string # noqa: E501 + JSON map of payment type -> user's payment method ID. # noqa: E501 :return: The pay_type_json of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -340,7 +346,7 @@ def pay_type_json(self): def pay_type_json(self, pay_type_json): """Sets the pay_type_json of this PlaceBizPushOrder. - Payment method JSON string # noqa: E501 + JSON map of payment type -> user's payment method ID. # noqa: E501 :param pay_type_json: The pay_type_json of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -352,7 +358,7 @@ def pay_type_json(self, pay_type_json): def rate_fixed(self): """Gets the rate_fixed of this PlaceBizPushOrder. # noqa: E501 - Price type: 0-Floating price, 1-Fixed price # noqa: E501 + Price type: `0` floating; `1` fixed. # noqa: E501 :return: The rate_fixed of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -363,7 +369,7 @@ def rate_fixed(self): def rate_fixed(self, rate_fixed): """Sets the rate_fixed of this PlaceBizPushOrder. - Price type: 0-Floating price, 1-Fixed price # noqa: E501 + Price type: `0` floating; `1` fixed. # noqa: E501 :param rate_fixed: The rate_fixed of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -375,7 +381,7 @@ def rate_fixed(self, rate_fixed): def oid(self): """Gets the oid of this PlaceBizPushOrder. # noqa: E501 - Ad ID when editing # noqa: E501 + Pass ad ID when editing; omit or empty when publishing a new ad. # noqa: E501 :return: The oid of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -386,7 +392,7 @@ def oid(self): def oid(self, oid): """Sets the oid of this PlaceBizPushOrder. - Ad ID when editing # noqa: E501 + Pass ad ID when editing; omit or empty when publishing a new ad. # noqa: E501 :param oid: The oid of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -398,7 +404,7 @@ def oid(self, oid): def min_amount(self): """Gets the min_amount of this PlaceBizPushOrder. # noqa: E501 - Minimum transaction amount per order # noqa: E501 + Minimum trade amount in `exchangeType`. # noqa: E501 :return: The min_amount of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -409,7 +415,7 @@ def min_amount(self): def min_amount(self, min_amount): """Sets the min_amount of this PlaceBizPushOrder. - Minimum transaction amount per order # noqa: E501 + Minimum trade amount in `exchangeType`. # noqa: E501 :param min_amount: The min_amount of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -423,7 +429,7 @@ def min_amount(self, min_amount): def max_amount(self): """Gets the max_amount of this PlaceBizPushOrder. # noqa: E501 - Maximum transaction amount per order # noqa: E501 + Maximum amount per trade in `exchangeType` fiat units. # noqa: E501 :return: The max_amount of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -434,7 +440,7 @@ def max_amount(self): def max_amount(self, max_amount): """Sets the max_amount of this PlaceBizPushOrder. - Maximum transaction amount per order # noqa: E501 + Maximum amount per trade in `exchangeType` fiat units. # noqa: E501 :param max_amount: The max_amount of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -448,7 +454,7 @@ def max_amount(self, max_amount): def tier_limit(self): """Gets the tier_limit of this PlaceBizPushOrder. # noqa: E501 - Order tier limit # noqa: E501 + Minimum counterparty VIP level; `0` means no requirement. # noqa: E501 :return: The tier_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -459,7 +465,7 @@ def tier_limit(self): def tier_limit(self, tier_limit): """Sets the tier_limit of this PlaceBizPushOrder. - Order tier limit # noqa: E501 + Minimum counterparty VIP level; `0` means no requirement. # noqa: E501 :param tier_limit: The tier_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -471,7 +477,7 @@ def tier_limit(self, tier_limit): def verified_limit(self): """Gets the verified_limit of this PlaceBizPushOrder. # noqa: E501 - Verification level limit # noqa: E501 + Minimum counterparty verification level; `0` means no limit. # noqa: E501 :return: The verified_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -482,7 +488,7 @@ def verified_limit(self): def verified_limit(self, verified_limit): """Sets the verified_limit of this PlaceBizPushOrder. - Verification level limit # noqa: E501 + Minimum counterparty verification level; `0` means no limit. # noqa: E501 :param verified_limit: The verified_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -494,7 +500,7 @@ def verified_limit(self, verified_limit): def reg_time_limit(self): """Gets the reg_time_limit of this PlaceBizPushOrder. # noqa: E501 - Registration time limit # noqa: E501 + Minimum counterparty account age in days; `0` means no limit. # noqa: E501 :return: The reg_time_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -505,7 +511,7 @@ def reg_time_limit(self): def reg_time_limit(self, reg_time_limit): """Sets the reg_time_limit of this PlaceBizPushOrder. - Registration time limit # noqa: E501 + Minimum counterparty account age in days; `0` means no limit. # noqa: E501 :param reg_time_limit: The reg_time_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -517,7 +523,7 @@ def reg_time_limit(self, reg_time_limit): def advertisers_limit(self): """Gets the advertisers_limit of this PlaceBizPushOrder. # noqa: E501 - Advertiser restriction # noqa: E501 + Whether trading with the advertiser is restricted. `0`: no; `1`: yes. # noqa: E501 :return: The advertisers_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -528,7 +534,7 @@ def advertisers_limit(self): def advertisers_limit(self, advertisers_limit): """Sets the advertisers_limit of this PlaceBizPushOrder. - Advertiser restriction # noqa: E501 + Whether trading with the advertiser is restricted. `0`: no; `1`: yes. # noqa: E501 :param advertisers_limit: The advertisers_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -536,34 +542,11 @@ def advertisers_limit(self, advertisers_limit): self._advertisers_limit = advertisers_limit - @property - def hide_payment(self): - """Gets the hide_payment of this PlaceBizPushOrder. # noqa: E501 - - Whether to hide payment method: 1=Yes, 0=No # noqa: E501 - - :return: The hide_payment of this PlaceBizPushOrder. # noqa: E501 - :rtype: str - """ - return self._hide_payment - - @hide_payment.setter - def hide_payment(self, hide_payment): - """Sets the hide_payment of this PlaceBizPushOrder. - - Whether to hide payment method: 1=Yes, 0=No # noqa: E501 - - :param hide_payment: The hide_payment of this PlaceBizPushOrder. # noqa: E501 - :type: str - """ - - self._hide_payment = hide_payment - @property def expire_min(self): """Gets the expire_min of this PlaceBizPushOrder. # noqa: E501 - Ad expiration time (minutes) # noqa: E501 + Payment timeout in minutes. # noqa: E501 :return: The expire_min of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -574,7 +557,7 @@ def expire_min(self): def expire_min(self, expire_min): """Sets the expire_min of this PlaceBizPushOrder. - Ad expiration time (minutes) # noqa: E501 + Payment timeout in minutes. # noqa: E501 :param expire_min: The expire_min of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -586,7 +569,7 @@ def expire_min(self, expire_min): def trade_tips(self): """Gets the trade_tips of this PlaceBizPushOrder. # noqa: E501 - Trading terms # noqa: E501 + Advertisement trade terms displayed to ordering users; goes through off-platform traffic diversion risk control on submission, and when hit, the advertisement is not saved and code 70305102 is returned # noqa: E501 :return: The trade_tips of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -597,7 +580,7 @@ def trade_tips(self): def trade_tips(self, trade_tips): """Sets the trade_tips of this PlaceBizPushOrder. - Trading terms # noqa: E501 + Advertisement trade terms displayed to ordering users; goes through off-platform traffic diversion risk control on submission, and when hit, the advertisement is not saved and code 70305102 is returned # noqa: E501 :param trade_tips: The trade_tips of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -609,7 +592,7 @@ def trade_tips(self, trade_tips): def auto_reply(self): """Gets the auto_reply of this PlaceBizPushOrder. # noqa: E501 - Auto reply # noqa: E501 + Auto reply content after order creation; goes through off-platform traffic diversion risk control on submission, and when hit, the advertisement is not saved and code 70305102 is returned # noqa: E501 :return: The auto_reply of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -620,7 +603,7 @@ def auto_reply(self): def auto_reply(self, auto_reply): """Sets the auto_reply of this PlaceBizPushOrder. - Auto reply # noqa: E501 + Auto reply content after order creation; goes through off-platform traffic diversion risk control on submission, and when hit, the advertisement is not saved and code 70305102 is returned # noqa: E501 :param auto_reply: The auto_reply of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -632,7 +615,7 @@ def auto_reply(self, auto_reply): def min_completed_limit(self): """Gets the min_completed_limit of this PlaceBizPushOrder. # noqa: E501 - Minimum limit of completed orders # noqa: E501 + Minimum completed orders for counterparty; `-1` unlimited. # noqa: E501 :return: The min_completed_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -643,7 +626,7 @@ def min_completed_limit(self): def min_completed_limit(self, min_completed_limit): """Sets the min_completed_limit of this PlaceBizPushOrder. - Minimum limit of completed orders # noqa: E501 + Minimum completed orders for counterparty; `-1` unlimited. # noqa: E501 :param min_completed_limit: The min_completed_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -655,7 +638,7 @@ def min_completed_limit(self, min_completed_limit): def max_completed_limit(self): """Gets the max_completed_limit of this PlaceBizPushOrder. # noqa: E501 - Maximum limit of completed orders # noqa: E501 + Maximum completed orders for counterparty; `-1` unlimited. # noqa: E501 :return: The max_completed_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -666,7 +649,7 @@ def max_completed_limit(self): def max_completed_limit(self, max_completed_limit): """Sets the max_completed_limit of this PlaceBizPushOrder. - Maximum limit of completed orders # noqa: E501 + Maximum completed orders for counterparty; `-1` unlimited. # noqa: E501 :param max_completed_limit: The max_completed_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -678,7 +661,7 @@ def max_completed_limit(self, max_completed_limit): def completed_rate_limit(self): """Gets the completed_rate_limit of this PlaceBizPushOrder. # noqa: E501 - 30-day completion rate limit # noqa: E501 + Counterparty minimum 30-day completion rate; `-1` means no limit. # noqa: E501 :return: The completed_rate_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -689,7 +672,7 @@ def completed_rate_limit(self): def completed_rate_limit(self, completed_rate_limit): """Sets the completed_rate_limit of this PlaceBizPushOrder. - 30-day completion rate limit # noqa: E501 + Counterparty minimum 30-day completion rate; `-1` means no limit. # noqa: E501 :param completed_rate_limit: The completed_rate_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -701,7 +684,7 @@ def completed_rate_limit(self, completed_rate_limit): def user_country_limit(self): """Gets the user_country_limit of this PlaceBizPushOrder. # noqa: E501 - KYC nationality restriction # noqa: E501 + KYC nationality restriction; `-1` means no restriction. # noqa: E501 :return: The user_country_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -712,7 +695,7 @@ def user_country_limit(self): def user_country_limit(self, user_country_limit): """Sets the user_country_limit of this PlaceBizPushOrder. - KYC nationality restriction # noqa: E501 + KYC nationality restriction; `-1` means no restriction. # noqa: E501 :param user_country_limit: The user_country_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -724,7 +707,7 @@ def user_country_limit(self, user_country_limit): def user_order_limit(self): """Gets the user_order_limit of this PlaceBizPushOrder. # noqa: E501 - Order count limit # noqa: E501 + Maximum concurrent orders allowed for the counterparty. `-1`: unlimited. # noqa: E501 :return: The user_order_limit of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -735,7 +718,7 @@ def user_order_limit(self): def user_order_limit(self, user_order_limit): """Sets the user_order_limit of this PlaceBizPushOrder. - Order count limit # noqa: E501 + Maximum concurrent orders allowed for the counterparty. `-1`: unlimited. # noqa: E501 :param user_order_limit: The user_order_limit of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -747,7 +730,7 @@ def user_order_limit(self, user_order_limit): def rate_reference_id(self): """Gets the rate_reference_id of this PlaceBizPushOrder. # noqa: E501 - Reference exchange rate ID # noqa: E501 + Floating price reference. `1`: platform reference; `2`: Gate reference; `3`: spot reference. # noqa: E501 :return: The rate_reference_id of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -758,7 +741,7 @@ def rate_reference_id(self): def rate_reference_id(self, rate_reference_id): """Sets the rate_reference_id of this PlaceBizPushOrder. - Reference exchange rate ID # noqa: E501 + Floating price reference. `1`: platform reference; `2`: Gate reference; `3`: spot reference. # noqa: E501 :param rate_reference_id: The rate_reference_id of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -770,7 +753,7 @@ def rate_reference_id(self, rate_reference_id): def rate_offset(self): """Gets the rate_offset of this PlaceBizPushOrder. # noqa: E501 - Reference exchange rate offset # noqa: E501 + Absolute floating offset ratio, e.g. `0.5` means 0.5%. # noqa: E501 :return: The rate_offset of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -781,7 +764,7 @@ def rate_offset(self): def rate_offset(self, rate_offset): """Sets the rate_offset of this PlaceBizPushOrder. - Reference exchange rate offset # noqa: E501 + Absolute floating offset ratio, e.g. `0.5` means 0.5%. # noqa: E501 :param rate_offset: The rate_offset of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -793,7 +776,7 @@ def rate_offset(self, rate_offset): def float_trend(self): """Gets the float_trend of this PlaceBizPushOrder. # noqa: E501 - 444 # noqa: E501 + Floating direction: `0` markup; `1` markdown. # noqa: E501 :return: The float_trend of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -804,7 +787,7 @@ def float_trend(self): def float_trend(self, float_trend): """Sets the float_trend of this PlaceBizPushOrder. - 444 # noqa: E501 + Floating direction: `0` markup; `1` markdown. # noqa: E501 :param float_trend: The float_trend of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -812,6 +795,29 @@ def float_trend(self, float_trend): self._float_trend = float_trend + @property + def team_payment_uid(self): + """Gets the team_payment_uid of this PlaceBizPushOrder. # noqa: E501 + + Team payee UID; optional for non-team merchants. # noqa: E501 + + :return: The team_payment_uid of this PlaceBizPushOrder. # noqa: E501 + :rtype: str + """ + return self._team_payment_uid + + @team_payment_uid.setter + def team_payment_uid(self, team_payment_uid): + """Sets the team_payment_uid of this PlaceBizPushOrder. + + Team payee UID; optional for non-team merchants. # noqa: E501 + + :param team_payment_uid: The team_payment_uid of this PlaceBizPushOrder. # noqa: E501 + :type: str + """ + + self._team_payment_uid = team_payment_uid + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/place_dual_investment_order.py b/gate_api/models/place_dual_investment_order.py index f2d6d19a..2af61ce1 100644 --- a/gate_api/models/place_dual_investment_order.py +++ b/gate_api/models/place_dual_investment_order.py @@ -35,7 +35,6 @@ class PlaceDualInvestmentOrder(object): openapi_types = { 'id': 'int', 'plan_id': 'int', - 'copies': 'str', 'invest_amount': 'str', 'settlement_amount': 'str', 'create_time': 'int', @@ -55,7 +54,6 @@ class PlaceDualInvestmentOrder(object): attribute_map = { 'id': 'id', 'plan_id': 'plan_id', - 'copies': 'copies', 'invest_amount': 'invest_amount', 'settlement_amount': 'settlement_amount', 'create_time': 'create_time', @@ -72,8 +70,8 @@ class PlaceDualInvestmentOrder(object): '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 + def __init__(self, id=None, plan_id=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, int, int, str, str, str, str, str, str, str, str, int, str, Configuration) -> None """PlaceDualInvestmentOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -81,7 +79,6 @@ def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settl self._id = None self._plan_id = None - self._copies = None self._invest_amount = None self._settlement_amount = None self._create_time = None @@ -102,8 +99,6 @@ def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settl 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: @@ -179,29 +174,6 @@ def plan_id(self, plan_id): self._plan_id = plan_id - @property - def copies(self): - """Gets the copies of this PlaceDualInvestmentOrder. # noqa: E501 - - Units # noqa: E501 - - :return: The copies of this PlaceDualInvestmentOrder. # noqa: E501 - :rtype: str - """ - return self._copies - - @copies.setter - def copies(self, copies): - """Sets the copies of this PlaceDualInvestmentOrder. - - Units # noqa: E501 - - :param copies: The copies of this PlaceDualInvestmentOrder. # noqa: E501 - :type: str - """ - - self._copies = copies - @property def invest_amount(self): """Gets the invest_amount of this PlaceDualInvestmentOrder. # noqa: E501 diff --git a/gate_api/models/place_dual_investment_order_params.py b/gate_api/models/place_dual_investment_order_params.py index 70364f05..9ced828b 100644 --- a/gate_api/models/place_dual_investment_order_params.py +++ b/gate_api/models/place_dual_investment_order_params.py @@ -90,7 +90,7 @@ def plan_id(self, plan_id): def amount(self): """Gets the amount of this PlaceDualInvestmentOrderParams. # noqa: E501 - Subscription amount, mutually exclusive with copies field # noqa: E501 + Subscription amount # noqa: E501 :return: The amount of this PlaceDualInvestmentOrderParams. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this PlaceDualInvestmentOrderParams. - Subscription amount, mutually exclusive with copies field # noqa: E501 + Subscription amount # noqa: E501 :param amount: The amount of this PlaceDualInvestmentOrderParams. # noqa: E501 :type: str diff --git a/gate_api/models/position.py b/gate_api/models/position.py index e141f009..c1f3e29b 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -36,6 +36,9 @@ class Position(object): 'user': 'int', 'contract': 'str', 'size': 'str', + 'hedge_status': 'str', + 'hedged_size': 'str', + 'unhedged_size': 'str', 'leverage': 'str', 'risk_limit': 'str', 'leverage_max': 'str', @@ -75,6 +78,9 @@ class Position(object): 'user': 'user', 'contract': 'contract', 'size': 'size', + 'hedge_status': 'hedge_status', + 'hedged_size': 'hedged_size', + 'unhedged_size': 'unhedged_size', 'leverage': 'leverage', 'risk_limit': 'risk_limit', 'leverage_max': 'leverage_max', @@ -110,8 +116,8 @@ class Position(object): 'lever': 'lever' } - 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, pos_margin_mode=None, lever=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, 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, str, str, Configuration) -> None + def __init__(self, user=None, contract=None, size=None, hedge_status=None, hedged_size=None, unhedged_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, pos_margin_mode=None, lever=None, local_vars_configuration=None): # noqa: E501 + # type: (int, 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, int, int, PositionCloseOrder, str, str, int, int, int, str, str, int, str, str, Configuration) -> None """Position - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -120,6 +126,9 @@ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limi self._user = None self._contract = None self._size = None + self._hedge_status = None + self._hedged_size = None + self._unhedged_size = None self._leverage = None self._risk_limit = None self._leverage_max = None @@ -161,6 +170,12 @@ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limi self.contract = contract if size is not None: self.size = size + if hedge_status is not None: + self.hedge_status = hedge_status + if hedged_size is not None: + self.hedged_size = hedged_size + if unhedged_size is not None: + self.unhedged_size = unhedged_size if leverage is not None: self.leverage = leverage if risk_limit is not None: @@ -296,6 +311,81 @@ def size(self, size): self._size = size + @property + def hedge_status(self): + """Gets the hedge_status of this Position. # noqa: E501 + + The hedging status of the position under the Delta-neutral strategy. Including: - `partial_hedged`: partially hedged - `full_hedged`: fully hedged # noqa: E501 + + :return: The hedge_status of this Position. # noqa: E501 + :rtype: str + """ + return self._hedge_status + + @hedge_status.setter + def hedge_status(self, hedge_status): + """Sets the hedge_status of this Position. + + The hedging status of the position under the Delta-neutral strategy. Including: - `partial_hedged`: partially hedged - `full_hedged`: fully hedged # noqa: E501 + + :param hedge_status: The hedge_status of this Position. # noqa: E501 + :type: str + """ + allowed_values = ["partial_hedged", "full_hedged"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and hedge_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `hedge_status` ({0}), must be one of {1}" # noqa: E501 + .format(hedge_status, allowed_values) + ) + + self._hedge_status = hedge_status + + @property + def hedged_size(self): + """Gets the hedged_size of this Position. # noqa: E501 + + The hedged position size under the Delta-neutral strategy. # noqa: E501 + + :return: The hedged_size of this Position. # noqa: E501 + :rtype: str + """ + return self._hedged_size + + @hedged_size.setter + def hedged_size(self, hedged_size): + """Sets the hedged_size of this Position. + + The hedged position size under the Delta-neutral strategy. # noqa: E501 + + :param hedged_size: The hedged_size of this Position. # noqa: E501 + :type: str + """ + + self._hedged_size = hedged_size + + @property + def unhedged_size(self): + """Gets the unhedged_size of this Position. # noqa: E501 + + The unhedged position size under the Delta-neutral strategy, calculated as `max(abs(size) - abs(hedged_size), 0)`. # noqa: E501 + + :return: The unhedged_size of this Position. # noqa: E501 + :rtype: str + """ + return self._unhedged_size + + @unhedged_size.setter + def unhedged_size(self, unhedged_size): + """Sets the unhedged_size of this Position. + + The unhedged position size under the Delta-neutral strategy, calculated as `max(abs(size) - abs(hedged_size), 0)`. # noqa: E501 + + :param unhedged_size: The unhedged_size of this Position. # noqa: E501 + :type: str + """ + + self._unhedged_size = unhedged_size + @property def leverage(self): """Gets the leverage of this Position. # noqa: E501 diff --git a/gate_api/models/position_history_list_data.py b/gate_api/models/position_history_list_data.py index 9a1ab3c9..9807a2f8 100644 --- a/gate_api/models/position_history_list_data.py +++ b/gate_api/models/position_history_list_data.py @@ -33,26 +33,82 @@ class PositionHistoryListData(object): and the value is json key in definition. """ openapi_types = { + 'total': 'int', + 'total_page': 'int', 'list': 'list[PositionHistoryListDataList]' } attribute_map = { + 'total': 'total', + 'total_page': 'total_page', 'list': 'list' } - def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 - # type: (list[PositionHistoryListDataList], Configuration) -> None + def __init__(self, total=None, total_page=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, list[PositionHistoryListDataList], Configuration) -> None """PositionHistoryListData - 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._total_page = None self._list = None self.discriminator = None + if total is not None: + self.total = total + if total_page is not None: + self.total_page = total_page if list is not None: self.list = list + @property + def total(self): + """Gets the total of this PositionHistoryListData. # noqa: E501 + + Total amount # noqa: E501 + + :return: The total of this PositionHistoryListData. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PositionHistoryListData. + + Total amount # noqa: E501 + + :param total: The total of this PositionHistoryListData. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def total_page(self): + """Gets the total_page of this PositionHistoryListData. # noqa: E501 + + Total pages # noqa: E501 + + :return: The total_page of this PositionHistoryListData. # noqa: E501 + :rtype: int + """ + return self._total_page + + @total_page.setter + def total_page(self, total_page): + """Sets the total_page of this PositionHistoryListData. + + Total pages # noqa: E501 + + :param total_page: The total_page of this PositionHistoryListData. # noqa: E501 + :type: int + """ + + self._total_page = total_page + @property def list(self): """Gets the list of this PositionHistoryListData. # noqa: E501 diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/preview_from_param.py similarity index 69% rename from gate_api/models/eth2_swap.py rename to gate_api/models/preview_from_param.py index 368d2c4c..f20b70f8 100644 --- a/gate_api/models/eth2_swap.py +++ b/gate_api/models/preview_from_param.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class Eth2Swap(object): +class PreviewFromParam(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,72 +33,72 @@ class Eth2Swap(object): and the value is json key in definition. """ openapi_types = { - 'side': 'str', + 'asset': 'str', 'amount': 'str' } attribute_map = { - 'side': 'side', + 'asset': 'asset', 'amount': 'amount' } - def __init__(self, side=None, amount=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, asset=None, amount=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """Eth2Swap - a model defined in OpenAPI""" # noqa: E501 + """PreviewFromParam - 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._asset = None self._amount = None self.discriminator = None - self.side = side + self.asset = asset self.amount = amount @property - def side(self): - """Gets the side of this Eth2Swap. # noqa: E501 + def asset(self): + """Gets the asset of this PreviewFromParam. # noqa: E501 - 1-Forward Swap (ETH -> GTETH), 2-Reverse Swap (GTETH -> ETH) # noqa: E501 + The currency symbol to be swapped out. # noqa: E501 - :return: The side of this Eth2Swap. # noqa: E501 + :return: The asset of this PreviewFromParam. # noqa: E501 :rtype: str """ - return self._side + return self._asset - @side.setter - def side(self, side): - """Sets the side of this Eth2Swap. + @asset.setter + def asset(self, asset): + """Sets the asset of this PreviewFromParam. - 1-Forward Swap (ETH -> GTETH), 2-Reverse Swap (GTETH -> ETH) # noqa: E501 + The currency symbol to be swapped out. # noqa: E501 - :param side: The side of this Eth2Swap. # noqa: E501 + :param asset: The asset of this PreviewFromParam. # 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 + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 - self._side = side + self._asset = asset @property def amount(self): - """Gets the amount of this Eth2Swap. # noqa: E501 + """Gets the amount of this PreviewFromParam. # noqa: E501 - Swap Amount # noqa: E501 + The currency swap quantity, decimal string. # noqa: E501 - :return: The amount of this Eth2Swap. # noqa: E501 + :return: The amount of this PreviewFromParam. # noqa: E501 :rtype: str """ return self._amount @amount.setter def amount(self, amount): - """Sets the amount of this Eth2Swap. + """Sets the amount of this PreviewFromParam. - Swap Amount # noqa: E501 + The currency swap quantity, decimal string. # noqa: E501 - :param amount: The amount of this Eth2Swap. # noqa: E501 + :param amount: The amount of this PreviewFromParam. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 @@ -140,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, Eth2Swap): + if not isinstance(other, PreviewFromParam): 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): + if not isinstance(other, PreviewFromParam): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/preview_order.py b/gate_api/models/preview_order.py new file mode 100644 index 00000000..ac5d3f27 --- /dev/null +++ b/gate_api/models/preview_order.py @@ -0,0 +1,203 @@ +# 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 PreviewOrder(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 = { + '_from': 'list[PreviewOrderDetail]', + 'to': 'list[PreviewOrderDetail]', + 'usdt_evaluated_value': 'str', + 'usdt_evaluated_value_show': 'str' + } + + attribute_map = { + '_from': 'from', + 'to': 'to', + 'usdt_evaluated_value': 'usdt_evaluated_value', + 'usdt_evaluated_value_show': 'usdt_evaluated_value_show' + } + + def __init__(self, _from=None, to=None, usdt_evaluated_value=None, usdt_evaluated_value_show=None, local_vars_configuration=None): # noqa: E501 + # type: (list[PreviewOrderDetail], list[PreviewOrderDetail], str, str, Configuration) -> None + """PreviewOrder - 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.__from = None + self._to = None + self._usdt_evaluated_value = None + self._usdt_evaluated_value_show = None + self.discriminator = None + + self._from = _from + self.to = to + self.usdt_evaluated_value = usdt_evaluated_value + self.usdt_evaluated_value_show = usdt_evaluated_value_show + + @property + def _from(self): + """Gets the _from of this PreviewOrder. # noqa: E501 + + + :return: The _from of this PreviewOrder. # noqa: E501 + :rtype: list[PreviewOrderDetail] + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this PreviewOrder. + + + :param _from: The _from of this PreviewOrder. # noqa: E501 + :type: list[PreviewOrderDetail] + """ + 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 + + self.__from = _from + + @property + def to(self): + """Gets the to of this PreviewOrder. # noqa: E501 + + + :return: The to of this PreviewOrder. # noqa: E501 + :rtype: list[PreviewOrderDetail] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this PreviewOrder. + + + :param to: The to of this PreviewOrder. # noqa: E501 + :type: list[PreviewOrderDetail] + """ + 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 + + self._to = to + + @property + def usdt_evaluated_value(self): + """Gets the usdt_evaluated_value of this PreviewOrder. # noqa: E501 + + + :return: The usdt_evaluated_value of this PreviewOrder. # noqa: E501 + :rtype: str + """ + return self._usdt_evaluated_value + + @usdt_evaluated_value.setter + def usdt_evaluated_value(self, usdt_evaluated_value): + """Sets the usdt_evaluated_value of this PreviewOrder. + + + :param usdt_evaluated_value: The usdt_evaluated_value of this PreviewOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and usdt_evaluated_value is None: # noqa: E501 + raise ValueError("Invalid value for `usdt_evaluated_value`, must not be `None`") # noqa: E501 + + self._usdt_evaluated_value = usdt_evaluated_value + + @property + def usdt_evaluated_value_show(self): + """Gets the usdt_evaluated_value_show of this PreviewOrder. # noqa: E501 + + + :return: The usdt_evaluated_value_show of this PreviewOrder. # noqa: E501 + :rtype: str + """ + return self._usdt_evaluated_value_show + + @usdt_evaluated_value_show.setter + def usdt_evaluated_value_show(self, usdt_evaluated_value_show): + """Sets the usdt_evaluated_value_show of this PreviewOrder. + + + :param usdt_evaluated_value_show: The usdt_evaluated_value_show of this PreviewOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and usdt_evaluated_value_show is None: # noqa: E501 + raise ValueError("Invalid value for `usdt_evaluated_value_show`, must not be `None`") # noqa: E501 + + self._usdt_evaluated_value_show = usdt_evaluated_value_show + + 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, PreviewOrder): + 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, PreviewOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/preview_order_detail.py b/gate_api/models/preview_order_detail.py new file mode 100644 index 00000000..e35fd9df --- /dev/null +++ b/gate_api/models/preview_order_detail.py @@ -0,0 +1,176 @@ +# 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 PreviewOrderDetail(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 = { + 'asset': 'str', + 'amount': 'str', + 'amount_show': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'amount': 'amount', + 'amount_show': 'amount_show' + } + + def __init__(self, asset=None, amount=None, amount_show=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """PreviewOrderDetail - 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._asset = None + self._amount = None + self._amount_show = None + self.discriminator = None + + self.asset = asset + self.amount = amount + self.amount_show = amount_show + + @property + def asset(self): + """Gets the asset of this PreviewOrderDetail. # noqa: E501 + + + :return: The asset of this PreviewOrderDetail. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this PreviewOrderDetail. + + + :param asset: The asset of this PreviewOrderDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def amount(self): + """Gets the amount of this PreviewOrderDetail. # noqa: E501 + + + :return: The amount of this PreviewOrderDetail. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this PreviewOrderDetail. + + + :param amount: The amount of this PreviewOrderDetail. # 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 amount_show(self): + """Gets the amount_show of this PreviewOrderDetail. # noqa: E501 + + + :return: The amount_show of this PreviewOrderDetail. # noqa: E501 + :rtype: str + """ + return self._amount_show + + @amount_show.setter + def amount_show(self, amount_show): + """Sets the amount_show of this PreviewOrderDetail. + + + :param amount_show: The amount_show of this PreviewOrderDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount_show is None: # noqa: E501 + raise ValueError("Invalid value for `amount_show`, must not be `None`") # noqa: E501 + + self._amount_show = amount_show + + 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, PreviewOrderDetail): + 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, PreviewOrderDetail): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/preview_to_param.py b/gate_api/models/preview_to_param.py new file mode 100644 index 00000000..0be2ce7e --- /dev/null +++ b/gate_api/models/preview_to_param.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 PreviewToParam(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 = { + 'asset': 'str', + 'ratio': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'ratio': 'ratio' + } + + def __init__(self, asset=None, ratio=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """PreviewToParam - 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._asset = None + self._ratio = None + self.discriminator = None + + self.asset = asset + self.ratio = ratio + + @property + def asset(self): + """Gets the asset of this PreviewToParam. # noqa: E501 + + Target currency symbol; often corresponds to `recommend_v2.*[].schemes[].name` in config. # noqa: E501 + + :return: The asset of this PreviewToParam. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this PreviewToParam. + + Target currency symbol; often corresponds to `recommend_v2.*[].schemes[].name` in config. # noqa: E501 + + :param asset: The asset of this PreviewToParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 + raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 + + self._asset = asset + + @property + def ratio(self): + """Gets the ratio of this PreviewToParam. # noqa: E501 + + The weight ratio of the target currency in the portfolio, **decimal string** (such as `0.2`, `0.5`). Often consistent with the `schemes[].ratio` of a strategy under `recommend_v2` of `GET /asset-swap/config`. # noqa: E501 + + :return: The ratio of this PreviewToParam. # noqa: E501 + :rtype: str + """ + return self._ratio + + @ratio.setter + def ratio(self, ratio): + """Sets the ratio of this PreviewToParam. + + The weight ratio of the target currency in the portfolio, **decimal string** (such as `0.2`, `0.5`). Often consistent with the `schemes[].ratio` of a strategy under `recommend_v2` of `GET /asset-swap/config`. # noqa: E501 + + :param ratio: The ratio of this PreviewToParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and ratio is None: # noqa: E501 + raise ValueError("Invalid value for `ratio`, must not be `None`") # noqa: E501 + + self._ratio = ratio + + 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, PreviewToParam): + 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, PreviewToParam): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/quick_estimated_repayment.py b/gate_api/models/quick_estimated_repayment.py new file mode 100644 index 00000000..582e6801 --- /dev/null +++ b/gate_api/models/quick_estimated_repayment.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 QuickEstimatedRepayment(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 = { + 'debt_currencies': 'list[UnifiedQuickRepayDebtItem]', + 'available_currencies': 'list[UnifiedQuickRepayAvailableItem]' + } + + attribute_map = { + 'debt_currencies': 'debt_currencies', + 'available_currencies': 'available_currencies' + } + + def __init__(self, debt_currencies=None, available_currencies=None, local_vars_configuration=None): # noqa: E501 + # type: (list[UnifiedQuickRepayDebtItem], list[UnifiedQuickRepayAvailableItem], Configuration) -> None + """QuickEstimatedRepayment - 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._debt_currencies = None + self._available_currencies = None + self.discriminator = None + + if debt_currencies is not None: + self.debt_currencies = debt_currencies + if available_currencies is not None: + self.available_currencies = available_currencies + + @property + def debt_currencies(self): + """Gets the debt_currencies of this QuickEstimatedRepayment. # noqa: E501 + + Liability currencies # noqa: E501 + + :return: The debt_currencies of this QuickEstimatedRepayment. # noqa: E501 + :rtype: list[UnifiedQuickRepayDebtItem] + """ + return self._debt_currencies + + @debt_currencies.setter + def debt_currencies(self, debt_currencies): + """Sets the debt_currencies of this QuickEstimatedRepayment. + + Liability currencies # noqa: E501 + + :param debt_currencies: The debt_currencies of this QuickEstimatedRepayment. # noqa: E501 + :type: list[UnifiedQuickRepayDebtItem] + """ + + self._debt_currencies = debt_currencies + + @property + def available_currencies(self): + """Gets the available_currencies of this QuickEstimatedRepayment. # noqa: E501 + + Currencies available for repayment # noqa: E501 + + :return: The available_currencies of this QuickEstimatedRepayment. # noqa: E501 + :rtype: list[UnifiedQuickRepayAvailableItem] + """ + return self._available_currencies + + @available_currencies.setter + def available_currencies(self, available_currencies): + """Sets the available_currencies of this QuickEstimatedRepayment. + + Currencies available for repayment # noqa: E501 + + :param available_currencies: The available_currencies of this QuickEstimatedRepayment. # noqa: E501 + :type: list[UnifiedQuickRepayAvailableItem] + """ + + self._available_currencies = available_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, QuickEstimatedRepayment): + 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, QuickEstimatedRepayment): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/quick_repayment_request.py b/gate_api/models/quick_repayment_request.py new file mode 100644 index 00000000..6cf92f2e --- /dev/null +++ b/gate_api/models/quick_repayment_request.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 QuickRepaymentRequest(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 = { + 'debt_currencies': 'list[str]', + 'available_currencies': 'list[str]' + } + + attribute_map = { + 'debt_currencies': 'debt_currencies', + 'available_currencies': 'available_currencies' + } + + def __init__(self, debt_currencies=None, available_currencies=None, local_vars_configuration=None): # noqa: E501 + # type: (list[str], list[str], Configuration) -> None + """QuickRepaymentRequest - 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._debt_currencies = None + self._available_currencies = None + self.discriminator = None + + self.debt_currencies = debt_currencies + self.available_currencies = available_currencies + + @property + def debt_currencies(self): + """Gets the debt_currencies of this QuickRepaymentRequest. # noqa: E501 + + Liability currencies # noqa: E501 + + :return: The debt_currencies of this QuickRepaymentRequest. # noqa: E501 + :rtype: list[str] + """ + return self._debt_currencies + + @debt_currencies.setter + def debt_currencies(self, debt_currencies): + """Sets the debt_currencies of this QuickRepaymentRequest. + + Liability currencies # noqa: E501 + + :param debt_currencies: The debt_currencies of this QuickRepaymentRequest. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and debt_currencies is None: # noqa: E501 + raise ValueError("Invalid value for `debt_currencies`, must not be `None`") # noqa: E501 + + self._debt_currencies = debt_currencies + + @property + def available_currencies(self): + """Gets the available_currencies of this QuickRepaymentRequest. # noqa: E501 + + Currencies to repay with # noqa: E501 + + :return: The available_currencies of this QuickRepaymentRequest. # noqa: E501 + :rtype: list[str] + """ + return self._available_currencies + + @available_currencies.setter + def available_currencies(self, available_currencies): + """Sets the available_currencies of this QuickRepaymentRequest. + + Currencies to repay with # noqa: E501 + + :param available_currencies: The available_currencies of this QuickRepaymentRequest. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and available_currencies is None: # noqa: E501 + raise ValueError("Invalid value for `available_currencies`, must not be `None`") # noqa: E501 + + self._available_currencies = available_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, QuickRepaymentRequest): + 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, QuickRepaymentRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/quick_repayment_response.py b/gate_api/models/quick_repayment_response.py new file mode 100644 index 00000000..96e3d4f8 --- /dev/null +++ b/gate_api/models/quick_repayment_response.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 QuickRepaymentResponse(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', + 'repaid_infos': 'list[UnifiedQuickRepayRepaidInfo]', + 'used_infos': 'list[UnifiedQuickRepayUsedInfo]' + } + + attribute_map = { + 'order_id': 'order_id', + 'repaid_infos': 'repaid_infos', + 'used_infos': 'used_infos' + } + + def __init__(self, order_id=None, repaid_infos=None, used_infos=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[UnifiedQuickRepayRepaidInfo], list[UnifiedQuickRepayUsedInfo], Configuration) -> None + """QuickRepaymentResponse - 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_infos = None + self._used_infos = None + self.discriminator = None + + self.order_id = order_id + self.repaid_infos = repaid_infos + self.used_infos = used_infos + + @property + def order_id(self): + """Gets the order_id of this QuickRepaymentResponse. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this QuickRepaymentResponse. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this QuickRepaymentResponse. + + Order ID # noqa: E501 + + :param order_id: The order_id of this QuickRepaymentResponse. # 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 repaid_infos(self): + """Gets the repaid_infos of this QuickRepaymentResponse. # noqa: E501 + + Repaid currency details # noqa: E501 + + :return: The repaid_infos of this QuickRepaymentResponse. # noqa: E501 + :rtype: list[UnifiedQuickRepayRepaidInfo] + """ + return self._repaid_infos + + @repaid_infos.setter + def repaid_infos(self, repaid_infos): + """Sets the repaid_infos of this QuickRepaymentResponse. + + Repaid currency details # noqa: E501 + + :param repaid_infos: The repaid_infos of this QuickRepaymentResponse. # noqa: E501 + :type: list[UnifiedQuickRepayRepaidInfo] + """ + if self.local_vars_configuration.client_side_validation and repaid_infos is None: # noqa: E501 + raise ValueError("Invalid value for `repaid_infos`, must not be `None`") # noqa: E501 + + self._repaid_infos = repaid_infos + + @property + def used_infos(self): + """Gets the used_infos of this QuickRepaymentResponse. # noqa: E501 + + Currencies used for repayment # noqa: E501 + + :return: The used_infos of this QuickRepaymentResponse. # noqa: E501 + :rtype: list[UnifiedQuickRepayUsedInfo] + """ + return self._used_infos + + @used_infos.setter + def used_infos(self, used_infos): + """Sets the used_infos of this QuickRepaymentResponse. + + Currencies used for repayment # noqa: E501 + + :param used_infos: The used_infos of this QuickRepaymentResponse. # noqa: E501 + :type: list[UnifiedQuickRepayUsedInfo] + """ + if self.local_vars_configuration.client_side_validation and used_infos is None: # noqa: E501 + raise ValueError("Invalid value for `used_infos`, must not be `None`") # noqa: E501 + + self._used_infos = used_infos + + 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, QuickRepaymentResponse): + 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, QuickRepaymentResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/recommend.py b/gate_api/models/recommend.py new file mode 100644 index 00000000..82bf3e48 --- /dev/null +++ b/gate_api/models/recommend.py @@ -0,0 +1,211 @@ +# 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 Recommend(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 = { + 'balance': 'dict(str, str)', + 'btc_faith': 'dict(str, str)', + 'conservative': 'dict(str, str)', + 'gt_faith': 'dict(str, str)' + } + + attribute_map = { + 'balance': 'balance', + 'btc_faith': 'btc_faith', + 'conservative': 'conservative', + 'gt_faith': 'gt_faith' + } + + def __init__(self, balance=None, btc_faith=None, conservative=None, gt_faith=None, local_vars_configuration=None): # noqa: E501 + # type: (dict(str, str), dict(str, str), dict(str, str), dict(str, str), Configuration) -> None + """Recommend - 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._balance = None + self._btc_faith = None + self._conservative = None + self._gt_faith = None + self.discriminator = None + + self.balance = balance + self.btc_faith = btc_faith + self.conservative = conservative + self.gt_faith = gt_faith + + @property + def balance(self): + """Gets the balance of this Recommend. # noqa: E501 + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :return: The balance of this Recommend. # noqa: E501 + :rtype: dict(str, str) + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this Recommend. + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :param balance: The balance of this Recommend. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and balance is None: # noqa: E501 + raise ValueError("Invalid value for `balance`, must not be `None`") # noqa: E501 + + self._balance = balance + + @property + def btc_faith(self): + """Gets the btc_faith of this Recommend. # noqa: E501 + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :return: The btc_faith of this Recommend. # noqa: E501 + :rtype: dict(str, str) + """ + return self._btc_faith + + @btc_faith.setter + def btc_faith(self, btc_faith): + """Sets the btc_faith of this Recommend. + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :param btc_faith: The btc_faith of this Recommend. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and btc_faith is None: # noqa: E501 + raise ValueError("Invalid value for `btc_faith`, must not be `None`") # noqa: E501 + + self._btc_faith = btc_faith + + @property + def conservative(self): + """Gets the conservative of this Recommend. # noqa: E501 + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :return: The conservative of this Recommend. # noqa: E501 + :rtype: dict(str, str) + """ + return self._conservative + + @conservative.setter + def conservative(self, conservative): + """Sets the conservative of this Recommend. + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :param conservative: The conservative of this Recommend. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and conservative is None: # noqa: E501 + raise ValueError("Invalid value for `conservative`, must not be `None`") # noqa: E501 + + self._conservative = conservative + + @property + def gt_faith(self): + """Gets the gt_faith of this Recommend. # noqa: E501 + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :return: The gt_faith of this Recommend. # noqa: E501 + :rtype: dict(str, str) + """ + return self._gt_faith + + @gt_faith.setter + def gt_faith(self, gt_faith): + """Sets the gt_faith of this Recommend. + + Mapping of string keys to string values, corresponding to Go's map[string]string. # noqa: E501 + + :param gt_faith: The gt_faith of this Recommend. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and gt_faith is None: # noqa: E501 + raise ValueError("Invalid value for `gt_faith`, must not be `None`") # noqa: E501 + + self._gt_faith = gt_faith + + 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, Recommend): + 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, Recommend): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/recommend_v2_scheme.py b/gate_api/models/recommend_v2_scheme.py new file mode 100644 index 00000000..134ca061 --- /dev/null +++ b/gate_api/models/recommend_v2_scheme.py @@ -0,0 +1,176 @@ +# 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 RecommendV2Scheme(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', + 'priority': 'int', + 'ratio': 'str' + } + + attribute_map = { + 'name': 'name', + 'priority': 'priority', + 'ratio': 'ratio' + } + + def __init__(self, name=None, priority=None, ratio=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, Configuration) -> None + """RecommendV2Scheme - 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._priority = None + self._ratio = None + self.discriminator = None + + self.name = name + self.priority = priority + self.ratio = ratio + + @property + def name(self): + """Gets the name of this RecommendV2Scheme. # noqa: E501 + + + :return: The name of this RecommendV2Scheme. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this RecommendV2Scheme. + + + :param name: The name of this RecommendV2Scheme. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def priority(self): + """Gets the priority of this RecommendV2Scheme. # noqa: E501 + + + :return: The priority of this RecommendV2Scheme. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this RecommendV2Scheme. + + + :param priority: The priority of this RecommendV2Scheme. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and priority is None: # noqa: E501 + raise ValueError("Invalid value for `priority`, must not be `None`") # noqa: E501 + + self._priority = priority + + @property + def ratio(self): + """Gets the ratio of this RecommendV2Scheme. # noqa: E501 + + + :return: The ratio of this RecommendV2Scheme. # noqa: E501 + :rtype: str + """ + return self._ratio + + @ratio.setter + def ratio(self, ratio): + """Sets the ratio of this RecommendV2Scheme. + + + :param ratio: The ratio of this RecommendV2Scheme. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and ratio is None: # noqa: E501 + raise ValueError("Invalid value for `ratio`, must not be `None`") # noqa: E501 + + self._ratio = ratio + + 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, RecommendV2Scheme): + 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, RecommendV2Scheme): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/recommend_v2_strategy.py b/gate_api/models/recommend_v2_strategy.py new file mode 100644 index 00000000..1c9616a1 --- /dev/null +++ b/gate_api/models/recommend_v2_strategy.py @@ -0,0 +1,176 @@ +# 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 RecommendV2Strategy(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', + 'priority': 'int', + 'schemes': 'list[RecommendV2Scheme]' + } + + attribute_map = { + 'name': 'name', + 'priority': 'priority', + 'schemes': 'schemes' + } + + def __init__(self, name=None, priority=None, schemes=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, list[RecommendV2Scheme], Configuration) -> None + """RecommendV2Strategy - 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._priority = None + self._schemes = None + self.discriminator = None + + self.name = name + self.priority = priority + self.schemes = schemes + + @property + def name(self): + """Gets the name of this RecommendV2Strategy. # noqa: E501 + + + :return: The name of this RecommendV2Strategy. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this RecommendV2Strategy. + + + :param name: The name of this RecommendV2Strategy. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def priority(self): + """Gets the priority of this RecommendV2Strategy. # noqa: E501 + + + :return: The priority of this RecommendV2Strategy. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this RecommendV2Strategy. + + + :param priority: The priority of this RecommendV2Strategy. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and priority is None: # noqa: E501 + raise ValueError("Invalid value for `priority`, must not be `None`") # noqa: E501 + + self._priority = priority + + @property + def schemes(self): + """Gets the schemes of this RecommendV2Strategy. # noqa: E501 + + + :return: The schemes of this RecommendV2Strategy. # noqa: E501 + :rtype: list[RecommendV2Scheme] + """ + return self._schemes + + @schemes.setter + def schemes(self, schemes): + """Sets the schemes of this RecommendV2Strategy. + + + :param schemes: The schemes of this RecommendV2Strategy. # noqa: E501 + :type: list[RecommendV2Scheme] + """ + if self.local_vars_configuration.client_side_validation and schemes is None: # noqa: E501 + raise ValueError("Invalid value for `schemes`, must not be `None`") # noqa: E501 + + self._schemes = schemes + + 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, RecommendV2Strategy): + 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, RecommendV2Strategy): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/redeem_launch_pool_response.py b/gate_api/models/redeem_launch_pool_response.py new file mode 100644 index 00000000..e13e062d --- /dev/null +++ b/gate_api/models/redeem_launch_pool_response.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 RedeemLaunchPoolResponse(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 = { + 'success': 'bool' + } + + attribute_map = { + 'success': 'success' + } + + def __init__(self, success=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, Configuration) -> None + """RedeemLaunchPoolResponse - 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._success = None + self.discriminator = None + + if success is not None: + self.success = success + + @property + def success(self): + """Gets the success of this RedeemLaunchPoolResponse. # noqa: E501 + + Whether redemption was successful # noqa: E501 + + :return: The success of this RedeemLaunchPoolResponse. # noqa: E501 + :rtype: bool + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this RedeemLaunchPoolResponse. + + Whether redemption was successful # noqa: E501 + + :param success: The success of this RedeemLaunchPoolResponse. # noqa: E501 + :type: bool + """ + + self._success = 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, RedeemLaunchPoolResponse): + 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, RedeemLaunchPoolResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/redeem_v4.py b/gate_api/models/redeem_v4.py new file mode 100644 index 00000000..166914e0 --- /dev/null +++ b/gate_api/models/redeem_v4.py @@ -0,0 +1,188 @@ +# 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 RedeemV4(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': 'int', + 'rid': 'int', + 'amount': 'str' + } + + attribute_map = { + 'pid': 'pid', + 'rid': 'rid', + 'amount': 'amount' + } + + def __init__(self, pid=None, rid=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, Configuration) -> None + """RedeemV4 - 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._rid = None + self._amount = None + self.discriminator = None + + self.pid = pid + self.rid = rid + self.amount = amount + + @property + def pid(self): + """Gets the pid of this RedeemV4. # noqa: E501 + + Product ID # noqa: E501 + + :return: The pid of this RedeemV4. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this RedeemV4. + + Product ID # noqa: E501 + + :param pid: The pid of this RedeemV4. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and pid is None: # noqa: E501 + raise ValueError("Invalid value for `pid`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + pid is not None and pid < 1): # noqa: E501 + raise ValueError("Invalid value for `pid`, must be a value greater than or equal to `1`") # noqa: E501 + + self._pid = pid + + @property + def rid(self): + """Gets the rid of this RedeemV4. # noqa: E501 + + Reward pool ID # noqa: E501 + + :return: The rid of this RedeemV4. # noqa: E501 + :rtype: int + """ + return self._rid + + @rid.setter + def rid(self, rid): + """Sets the rid of this RedeemV4. + + Reward pool ID # noqa: E501 + + :param rid: The rid of this RedeemV4. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and rid is None: # noqa: E501 + raise ValueError("Invalid value for `rid`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + rid is not None and rid < 1): # noqa: E501 + raise ValueError("Invalid value for `rid`, must be a value greater than or equal to `1`") # noqa: E501 + + self._rid = rid + + @property + def amount(self): + """Gets the amount of this RedeemV4. # noqa: E501 + + Redemption amount (string format to preserve precision) # noqa: E501 + + :return: The amount of this RedeemV4. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this RedeemV4. + + Redemption amount (string format to preserve precision) # noqa: E501 + + :param amount: The amount of this RedeemV4. # 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, RedeemV4): + 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, RedeemV4): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/send_chat_message_request.py b/gate_api/models/send_chat_message_request.py index 237dad24..3a58ccc1 100644 --- a/gate_api/models/send_chat_message_request.py +++ b/gate_api/models/send_chat_message_request.py @@ -90,7 +90,7 @@ def txid(self, txid): def type(self): """Gets the type of this SendChatMessageRequest. # noqa: E501 - 0=Text, 1=File (video or image), default is 0 if not provided # noqa: E501 + Message type: `0` text; `1` file (image or video); defaults to `0`. # noqa: E501 :return: The type of this SendChatMessageRequest. # noqa: E501 :rtype: int @@ -101,11 +101,17 @@ def type(self): def type(self, type): """Sets the type of this SendChatMessageRequest. - 0=Text, 1=File (video or image), default is 0 if not provided # noqa: E501 + Message type: `0` text; `1` file (image or video); defaults to `0`. # noqa: E501 :param type: The type of this SendChatMessageRequest. # noqa: E501 :type: int """ + allowed_values = [0, 1] # 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 @@ -113,7 +119,7 @@ def type(self, type): def message(self): """Gets the message of this SendChatMessageRequest. # noqa: E501 - Message content # noqa: E501 + Message content. When type=0, pass text up to 500 characters, which goes through off-platform traffic diversion risk control; when hit, the response contains risk_type=1 and toast_msg. When type=1, pass the file_key returned by upload_chat_file # noqa: E501 :return: The message of this SendChatMessageRequest. # noqa: E501 :rtype: str @@ -124,7 +130,7 @@ def message(self): def message(self, message): """Sets the message of this SendChatMessageRequest. - Message content # noqa: E501 + Message content. When type=0, pass text up to 500 characters, which goes through off-platform traffic diversion risk control; when hit, the response contains risk_type=1 and toast_msg. When type=1, pass the file_key returned by upload_chat_file # noqa: E501 :param message: The message of this SendChatMessageRequest. # noqa: E501 :type: str diff --git a/gate_api/models/set_merchant_work_hours_request.py b/gate_api/models/set_merchant_work_hours_request.py new file mode 100644 index 00000000..87683735 --- /dev/null +++ b/gate_api/models/set_merchant_work_hours_request.py @@ -0,0 +1,276 @@ +# 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 SetMerchantWorkHoursRequest(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 = { + 'work_status': 'int', + 'cycle_type': 'str', + 'day_of_week': 'str', + 'time_zone': 'str', + 'start_time': 'str', + 'end_time': 'str' + } + + attribute_map = { + 'work_status': 'work_status', + 'cycle_type': 'cycle_type', + 'day_of_week': 'day_of_week', + 'time_zone': 'time_zone', + 'start_time': 'start_time', + 'end_time': 'end_time' + } + + def __init__(self, work_status=None, cycle_type=None, day_of_week=None, time_zone=None, start_time=None, end_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, Configuration) -> None + """SetMerchantWorkHoursRequest - 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._work_status = None + self._cycle_type = None + self._day_of_week = None + self._time_zone = None + self._start_time = None + self._end_time = None + self.discriminator = None + + self.work_status = work_status + if cycle_type is not None: + self.cycle_type = cycle_type + if day_of_week is not None: + self.day_of_week = day_of_week + if time_zone is not None: + self.time_zone = time_zone + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + + @property + def work_status(self): + """Gets the work_status of this SetMerchantWorkHoursRequest. # noqa: E501 + + Working status. 0: resting, 1: working, 2: using custom working hours # noqa: E501 + + :return: The work_status of this SetMerchantWorkHoursRequest. # noqa: E501 + :rtype: int + """ + return self._work_status + + @work_status.setter + def work_status(self, work_status): + """Sets the work_status of this SetMerchantWorkHoursRequest. + + Working status. 0: resting, 1: working, 2: using custom working hours # noqa: E501 + + :param work_status: The work_status of this SetMerchantWorkHoursRequest. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and work_status is None: # noqa: E501 + raise ValueError("Invalid value for `work_status`, must not be `None`") # noqa: E501 + allowed_values = [0, 1, 2] # noqa: E501 + if self.local_vars_configuration.client_side_validation and work_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `work_status` ({0}), must be one of {1}" # noqa: E501 + .format(work_status, allowed_values) + ) + + self._work_status = work_status + + @property + def cycle_type(self): + """Gets the cycle_type of this SetMerchantWorkHoursRequest. # noqa: E501 + + Custom working cycle; required when work_status is 2 # noqa: E501 + + :return: The cycle_type of this SetMerchantWorkHoursRequest. # noqa: E501 + :rtype: str + """ + return self._cycle_type + + @cycle_type.setter + def cycle_type(self, cycle_type): + """Sets the cycle_type of this SetMerchantWorkHoursRequest. + + Custom working cycle; required when work_status is 2 # noqa: E501 + + :param cycle_type: The cycle_type of this SetMerchantWorkHoursRequest. # noqa: E501 + :type: str + """ + allowed_values = ["Weekly", "Daily"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and cycle_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `cycle_type` ({0}), must be one of {1}" # noqa: E501 + .format(cycle_type, allowed_values) + ) + + self._cycle_type = cycle_type + + @property + def day_of_week(self): + """Gets the day_of_week of this SetMerchantWorkHoursRequest. # noqa: E501 + + Weekly working days, comma-separated values 1-7 for Monday to Sunday; required when work_status is 2 and cycle_type is Weekly # noqa: E501 + + :return: The day_of_week of this SetMerchantWorkHoursRequest. # noqa: E501 + :rtype: str + """ + return self._day_of_week + + @day_of_week.setter + def day_of_week(self, day_of_week): + """Sets the day_of_week of this SetMerchantWorkHoursRequest. + + Weekly working days, comma-separated values 1-7 for Monday to Sunday; required when work_status is 2 and cycle_type is Weekly # noqa: E501 + + :param day_of_week: The day_of_week of this SetMerchantWorkHoursRequest. # noqa: E501 + :type: str + """ + + self._day_of_week = day_of_week + + @property + def time_zone(self): + """Gets the time_zone of this SetMerchantWorkHoursRequest. # noqa: E501 + + UTC timezone offset, ranging from -12 to +14; required when work_status is 2 # noqa: E501 + + :return: The time_zone of this SetMerchantWorkHoursRequest. # noqa: E501 + :rtype: str + """ + return self._time_zone + + @time_zone.setter + def time_zone(self, time_zone): + """Sets the time_zone of this SetMerchantWorkHoursRequest. + + UTC timezone offset, ranging from -12 to +14; required when work_status is 2 # noqa: E501 + + :param time_zone: The time_zone of this SetMerchantWorkHoursRequest. # noqa: E501 + :type: str + """ + + self._time_zone = time_zone + + @property + def start_time(self): + """Gets the start_time of this SetMerchantWorkHoursRequest. # noqa: E501 + + Custom working start time in HH:mm format; required when work_status is 2 and must not be later than end_time # noqa: E501 + + :return: The start_time of this SetMerchantWorkHoursRequest. # noqa: E501 + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this SetMerchantWorkHoursRequest. + + Custom working start time in HH:mm format; required when work_status is 2 and must not be later than end_time # noqa: E501 + + :param start_time: The start_time of this SetMerchantWorkHoursRequest. # noqa: E501 + :type: str + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this SetMerchantWorkHoursRequest. # noqa: E501 + + Custom working end time in HH:mm format; required when work_status is 2 and must not be earlier than start_time # noqa: E501 + + :return: The end_time of this SetMerchantWorkHoursRequest. # noqa: E501 + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this SetMerchantWorkHoursRequest. + + Custom working end time in HH:mm format; required when work_status is 2 and must not be earlier than start_time # noqa: E501 + + :param end_time: The end_time of this SetMerchantWorkHoursRequest. # noqa: E501 + :type: str + """ + + self._end_time = end_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, SetMerchantWorkHoursRequest): + 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, SetMerchantWorkHoursRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_account_book.py b/gate_api/models/spot_account_book.py index 081b2813..1c7edcba 100644 --- a/gate_api/models/spot_account_book.py +++ b/gate_api/models/spot_account_book.py @@ -207,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 change type; deprecated (see `code` for account change type encoding) # noqa: E501 :return: The type of this SpotAccountBook. # noqa: E501 :rtype: str @@ -218,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 change type; deprecated (see `code` for account change type encoding) # noqa: E501 :param type: The type of this SpotAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/spot_grid_create_params.py b/gate_api/models/spot_grid_create_params.py new file mode 100644 index 00000000..bcc66b7e --- /dev/null +++ b/gate_api/models/spot_grid_create_params.py @@ -0,0 +1,377 @@ +# 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 SpotGridCreateParams(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 = { + 'money': 'str', + 'low_price': 'str', + 'high_price': 'str', + 'grid_num': 'int', + 'price_type': 'int', + 'trigger_price': 'str', + 'stop_profit': 'str', + 'stop_loss': 'str', + 'profit_sharing_ratio': 'str', + 'is_use_base': 'bool' + } + + attribute_map = { + 'money': 'money', + 'low_price': 'low_price', + 'high_price': 'high_price', + 'grid_num': 'grid_num', + 'price_type': 'price_type', + 'trigger_price': 'trigger_price', + 'stop_profit': 'stop_profit', + 'stop_loss': 'stop_loss', + 'profit_sharing_ratio': 'profit_sharing_ratio', + 'is_use_base': 'is_use_base' + } + + def __init__(self, money=None, low_price=None, high_price=None, grid_num=None, price_type=None, trigger_price=None, stop_profit=None, stop_loss=None, profit_sharing_ratio=None, is_use_base=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, int, str, str, str, str, bool, Configuration) -> None + """SpotGridCreateParams - 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._money = None + self._low_price = None + self._high_price = None + self._grid_num = None + self._price_type = None + self._trigger_price = None + self._stop_profit = None + self._stop_loss = None + self._profit_sharing_ratio = None + self._is_use_base = None + self.discriminator = None + + self.money = money + self.low_price = low_price + self.high_price = high_price + self.grid_num = grid_num + self.price_type = price_type + if trigger_price is not None: + self.trigger_price = trigger_price + if stop_profit is not None: + self.stop_profit = stop_profit + if stop_loss is not None: + self.stop_loss = stop_loss + if profit_sharing_ratio is not None: + self.profit_sharing_ratio = profit_sharing_ratio + if is_use_base is not None: + self.is_use_base = is_use_base + + @property + def money(self): + """Gets the money of this SpotGridCreateParams. # noqa: E501 + + Amount of investment # noqa: E501 + + :return: The money of this SpotGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this SpotGridCreateParams. + + Amount of investment # noqa: E501 + + :param money: The money of this SpotGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and money is None: # noqa: E501 + raise ValueError("Invalid value for `money`, must not be `None`") # noqa: E501 + + self._money = money + + @property + def low_price(self): + """Gets the low_price of this SpotGridCreateParams. # noqa: E501 + + Range lower limit # noqa: E501 + + :return: The low_price of this SpotGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._low_price + + @low_price.setter + def low_price(self, low_price): + """Sets the low_price of this SpotGridCreateParams. + + Range lower limit # noqa: E501 + + :param low_price: The low_price of this SpotGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and low_price is None: # noqa: E501 + raise ValueError("Invalid value for `low_price`, must not be `None`") # noqa: E501 + + self._low_price = low_price + + @property + def high_price(self): + """Gets the high_price of this SpotGridCreateParams. # noqa: E501 + + Range upper limit # noqa: E501 + + :return: The high_price of this SpotGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._high_price + + @high_price.setter + def high_price(self, high_price): + """Sets the high_price of this SpotGridCreateParams. + + Range upper limit # noqa: E501 + + :param high_price: The high_price of this SpotGridCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and high_price is None: # noqa: E501 + raise ValueError("Invalid value for `high_price`, must not be `None`") # noqa: E501 + + self._high_price = high_price + + @property + def grid_num(self): + """Gets the grid_num of this SpotGridCreateParams. # noqa: E501 + + Number of grids # noqa: E501 + + :return: The grid_num of this SpotGridCreateParams. # noqa: E501 + :rtype: int + """ + return self._grid_num + + @grid_num.setter + def grid_num(self, grid_num): + """Sets the grid_num of this SpotGridCreateParams. + + Number of grids # noqa: E501 + + :param grid_num: The grid_num of this SpotGridCreateParams. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and grid_num is None: # noqa: E501 + raise ValueError("Invalid value for `grid_num`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + grid_num is not None and grid_num < 1): # noqa: E501 + raise ValueError("Invalid value for `grid_num`, must be a value greater than or equal to `1`") # noqa: E501 + + self._grid_num = grid_num + + @property + def price_type(self): + """Gets the price_type of this SpotGridCreateParams. # noqa: E501 + + + :return: The price_type of this SpotGridCreateParams. # noqa: E501 + :rtype: int + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this SpotGridCreateParams. + + + :param price_type: The price_type of this SpotGridCreateParams. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and price_type is None: # noqa: E501 + raise ValueError("Invalid value for `price_type`, must not be `None`") # noqa: E501 + allowed_values = [0, 1] # 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}" # noqa: E501 + .format(price_type, allowed_values) + ) + + self._price_type = price_type + + @property + def trigger_price(self): + """Gets the trigger_price of this SpotGridCreateParams. # noqa: E501 + + + :return: The trigger_price of this SpotGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this SpotGridCreateParams. + + + :param trigger_price: The trigger_price of this SpotGridCreateParams. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def stop_profit(self): + """Gets the stop_profit of this SpotGridCreateParams. # noqa: E501 + + + :return: The stop_profit of this SpotGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_profit + + @stop_profit.setter + def stop_profit(self, stop_profit): + """Sets the stop_profit of this SpotGridCreateParams. + + + :param stop_profit: The stop_profit of this SpotGridCreateParams. # noqa: E501 + :type: str + """ + + self._stop_profit = stop_profit + + @property + def stop_loss(self): + """Gets the stop_loss of this SpotGridCreateParams. # noqa: E501 + + + :return: The stop_loss of this SpotGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_loss + + @stop_loss.setter + def stop_loss(self, stop_loss): + """Sets the stop_loss of this SpotGridCreateParams. + + + :param stop_loss: The stop_loss of this SpotGridCreateParams. # noqa: E501 + :type: str + """ + + self._stop_loss = stop_loss + + @property + def profit_sharing_ratio(self): + """Gets the profit_sharing_ratio of this SpotGridCreateParams. # noqa: E501 + + + :return: The profit_sharing_ratio of this SpotGridCreateParams. # noqa: E501 + :rtype: str + """ + return self._profit_sharing_ratio + + @profit_sharing_ratio.setter + def profit_sharing_ratio(self, profit_sharing_ratio): + """Sets the profit_sharing_ratio of this SpotGridCreateParams. + + + :param profit_sharing_ratio: The profit_sharing_ratio of this SpotGridCreateParams. # noqa: E501 + :type: str + """ + + self._profit_sharing_ratio = profit_sharing_ratio + + @property + def is_use_base(self): + """Gets the is_use_base of this SpotGridCreateParams. # noqa: E501 + + + :return: The is_use_base of this SpotGridCreateParams. # noqa: E501 + :rtype: bool + """ + return self._is_use_base + + @is_use_base.setter + def is_use_base(self, is_use_base): + """Sets the is_use_base of this SpotGridCreateParams. + + + :param is_use_base: The is_use_base of this SpotGridCreateParams. # noqa: E501 + :type: bool + """ + + self._is_use_base = is_use_base + + 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, SpotGridCreateParams): + 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, SpotGridCreateParams): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_grid_create_request.py b/gate_api/models/spot_grid_create_request.py new file mode 100644 index 00000000..9896e745 --- /dev/null +++ b/gate_api/models/spot_grid_create_request.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 SpotGridCreateRequest(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 = { + 'strategy_type': 'str', + 'market': 'str', + 'create_params': 'SpotGridCreateParams' + } + + attribute_map = { + 'strategy_type': 'strategy_type', + 'market': 'market', + 'create_params': 'create_params' + } + + def __init__(self, strategy_type=None, market=None, create_params=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, SpotGridCreateParams, Configuration) -> None + """SpotGridCreateRequest - 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._strategy_type = None + self._market = None + self._create_params = None + self.discriminator = None + + self.strategy_type = strategy_type + self.market = market + self.create_params = create_params + + @property + def strategy_type(self): + """Gets the strategy_type of this SpotGridCreateRequest. # noqa: E501 + + + :return: The strategy_type of this SpotGridCreateRequest. # noqa: E501 + :rtype: str + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this SpotGridCreateRequest. + + + :param strategy_type: The strategy_type of this SpotGridCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + allowed_values = ["spot_grid"] # 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}" # noqa: E501 + .format(strategy_type, allowed_values) + ) + + self._strategy_type = strategy_type + + @property + def market(self): + """Gets the market of this SpotGridCreateRequest. # noqa: E501 + + + :return: The market of this SpotGridCreateRequest. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this SpotGridCreateRequest. + + + :param market: The market of this SpotGridCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def create_params(self): + """Gets the create_params of this SpotGridCreateRequest. # noqa: E501 + + + :return: The create_params of this SpotGridCreateRequest. # noqa: E501 + :rtype: SpotGridCreateParams + """ + return self._create_params + + @create_params.setter + def create_params(self, create_params): + """Sets the create_params of this SpotGridCreateRequest. + + + :param create_params: The create_params of this SpotGridCreateRequest. # noqa: E501 + :type: SpotGridCreateParams + """ + if self.local_vars_configuration.client_side_validation and create_params is None: # noqa: E501 + raise ValueError("Invalid value for `create_params`, must not be `None`") # noqa: E501 + + self._create_params = create_params + + 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, SpotGridCreateRequest): + 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, SpotGridCreateRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_martingale_create_params.py b/gate_api/models/spot_martingale_create_params.py new file mode 100644 index 00000000..f6ab30ae --- /dev/null +++ b/gate_api/models/spot_martingale_create_params.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 SpotMartingaleCreateParams(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 = { + 'invest_amount': 'str', + 'price_deviation': 'str', + 'max_orders': 'int', + 'take_profit_ratio': 'str', + 'stop_loss_per_cycle': 'str', + 'trigger_price': 'str', + 'profit_sharing_ratio': 'str' + } + + attribute_map = { + 'invest_amount': 'invest_amount', + 'price_deviation': 'price_deviation', + 'max_orders': 'max_orders', + 'take_profit_ratio': 'take_profit_ratio', + 'stop_loss_per_cycle': 'stop_loss_per_cycle', + 'trigger_price': 'trigger_price', + 'profit_sharing_ratio': 'profit_sharing_ratio' + } + + def __init__(self, invest_amount=None, price_deviation=None, max_orders=None, take_profit_ratio=None, stop_loss_per_cycle=None, trigger_price=None, profit_sharing_ratio=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, str, str, str, str, Configuration) -> None + """SpotMartingaleCreateParams - 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._invest_amount = None + self._price_deviation = None + self._max_orders = None + self._take_profit_ratio = None + self._stop_loss_per_cycle = None + self._trigger_price = None + self._profit_sharing_ratio = None + self.discriminator = None + + self.invest_amount = invest_amount + self.price_deviation = price_deviation + self.max_orders = max_orders + self.take_profit_ratio = take_profit_ratio + if stop_loss_per_cycle is not None: + self.stop_loss_per_cycle = stop_loss_per_cycle + if trigger_price is not None: + self.trigger_price = trigger_price + if profit_sharing_ratio is not None: + self.profit_sharing_ratio = profit_sharing_ratio + + @property + def invest_amount(self): + """Gets the invest_amount of this SpotMartingaleCreateParams. # noqa: E501 + + + :return: The invest_amount of this SpotMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._invest_amount + + @invest_amount.setter + def invest_amount(self, invest_amount): + """Sets the invest_amount of this SpotMartingaleCreateParams. + + + :param invest_amount: The invest_amount of this SpotMartingaleCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and invest_amount is None: # noqa: E501 + raise ValueError("Invalid value for `invest_amount`, must not be `None`") # noqa: E501 + + self._invest_amount = invest_amount + + @property + def price_deviation(self): + """Gets the price_deviation of this SpotMartingaleCreateParams. # noqa: E501 + + Add-position deviation ratio as a decimal string (e.g. a 2% drop is `0.02`). # noqa: E501 + + :return: The price_deviation of this SpotMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._price_deviation + + @price_deviation.setter + def price_deviation(self, price_deviation): + """Sets the price_deviation of this SpotMartingaleCreateParams. + + Add-position deviation ratio as a decimal string (e.g. a 2% drop is `0.02`). # noqa: E501 + + :param price_deviation: The price_deviation of this SpotMartingaleCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price_deviation is None: # noqa: E501 + raise ValueError("Invalid value for `price_deviation`, must not be `None`") # noqa: E501 + + self._price_deviation = price_deviation + + @property + def max_orders(self): + """Gets the max_orders of this SpotMartingaleCreateParams. # noqa: E501 + + + :return: The max_orders of this SpotMartingaleCreateParams. # noqa: E501 + :rtype: int + """ + return self._max_orders + + @max_orders.setter + def max_orders(self, max_orders): + """Sets the max_orders of this SpotMartingaleCreateParams. + + + :param max_orders: The max_orders of this SpotMartingaleCreateParams. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and max_orders is None: # noqa: E501 + raise ValueError("Invalid value for `max_orders`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + max_orders is not None and max_orders < 1): # noqa: E501 + raise ValueError("Invalid value for `max_orders`, must be a value greater than or equal to `1`") # noqa: E501 + + self._max_orders = max_orders + + @property + def take_profit_ratio(self): + """Gets the take_profit_ratio of this SpotMartingaleCreateParams. # noqa: E501 + + Take-profit ratio per round as a decimal string. # noqa: E501 + + :return: The take_profit_ratio of this SpotMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._take_profit_ratio + + @take_profit_ratio.setter + def take_profit_ratio(self, take_profit_ratio): + """Sets the take_profit_ratio of this SpotMartingaleCreateParams. + + Take-profit ratio per round as a decimal string. # noqa: E501 + + :param take_profit_ratio: The take_profit_ratio of this SpotMartingaleCreateParams. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and take_profit_ratio is None: # noqa: E501 + raise ValueError("Invalid value for `take_profit_ratio`, must not be `None`") # noqa: E501 + + self._take_profit_ratio = take_profit_ratio + + @property + def stop_loss_per_cycle(self): + """Gets the stop_loss_per_cycle of this SpotMartingaleCreateParams. # noqa: E501 + + Stop-loss ratio per round as a decimal string; optional; aligned with app `stop_loss_per_cycle`. # noqa: E501 + + :return: The stop_loss_per_cycle of this SpotMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._stop_loss_per_cycle + + @stop_loss_per_cycle.setter + def stop_loss_per_cycle(self, stop_loss_per_cycle): + """Sets the stop_loss_per_cycle of this SpotMartingaleCreateParams. + + Stop-loss ratio per round as a decimal string; optional; aligned with app `stop_loss_per_cycle`. # noqa: E501 + + :param stop_loss_per_cycle: The stop_loss_per_cycle of this SpotMartingaleCreateParams. # noqa: E501 + :type: str + """ + + self._stop_loss_per_cycle = stop_loss_per_cycle + + @property + def trigger_price(self): + """Gets the trigger_price of this SpotMartingaleCreateParams. # noqa: E501 + + Trigger price; optional. # noqa: E501 + + :return: The trigger_price of this SpotMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this SpotMartingaleCreateParams. + + Trigger price; optional. # noqa: E501 + + :param trigger_price: The trigger_price of this SpotMartingaleCreateParams. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def profit_sharing_ratio(self): + """Gets the profit_sharing_ratio of this SpotMartingaleCreateParams. # noqa: E501 + + + :return: The profit_sharing_ratio of this SpotMartingaleCreateParams. # noqa: E501 + :rtype: str + """ + return self._profit_sharing_ratio + + @profit_sharing_ratio.setter + def profit_sharing_ratio(self, profit_sharing_ratio): + """Sets the profit_sharing_ratio of this SpotMartingaleCreateParams. + + + :param profit_sharing_ratio: The profit_sharing_ratio of this SpotMartingaleCreateParams. # noqa: E501 + :type: str + """ + + self._profit_sharing_ratio = profit_sharing_ratio + + 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, SpotMartingaleCreateParams): + 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, SpotMartingaleCreateParams): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_martingale_create_request.py b/gate_api/models/spot_martingale_create_request.py new file mode 100644 index 00000000..d43b8210 --- /dev/null +++ b/gate_api/models/spot_martingale_create_request.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 SpotMartingaleCreateRequest(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 = { + 'strategy_type': 'str', + 'market': 'str', + 'create_params': 'SpotMartingaleCreateParams' + } + + attribute_map = { + 'strategy_type': 'strategy_type', + 'market': 'market', + 'create_params': 'create_params' + } + + def __init__(self, strategy_type=None, market=None, create_params=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, SpotMartingaleCreateParams, Configuration) -> None + """SpotMartingaleCreateRequest - 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._strategy_type = None + self._market = None + self._create_params = None + self.discriminator = None + + self.strategy_type = strategy_type + self.market = market + self.create_params = create_params + + @property + def strategy_type(self): + """Gets the strategy_type of this SpotMartingaleCreateRequest. # noqa: E501 + + + :return: The strategy_type of this SpotMartingaleCreateRequest. # noqa: E501 + :rtype: str + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this SpotMartingaleCreateRequest. + + + :param strategy_type: The strategy_type of this SpotMartingaleCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and strategy_type is None: # noqa: E501 + raise ValueError("Invalid value for `strategy_type`, must not be `None`") # noqa: E501 + allowed_values = ["spot_martingale"] # 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}" # noqa: E501 + .format(strategy_type, allowed_values) + ) + + self._strategy_type = strategy_type + + @property + def market(self): + """Gets the market of this SpotMartingaleCreateRequest. # noqa: E501 + + + :return: The market of this SpotMartingaleCreateRequest. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this SpotMartingaleCreateRequest. + + + :param market: The market of this SpotMartingaleCreateRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def create_params(self): + """Gets the create_params of this SpotMartingaleCreateRequest. # noqa: E501 + + + :return: The create_params of this SpotMartingaleCreateRequest. # noqa: E501 + :rtype: SpotMartingaleCreateParams + """ + return self._create_params + + @create_params.setter + def create_params(self, create_params): + """Sets the create_params of this SpotMartingaleCreateRequest. + + + :param create_params: The create_params of this SpotMartingaleCreateRequest. # noqa: E501 + :type: SpotMartingaleCreateParams + """ + if self.local_vars_configuration.client_side_validation and create_params is None: # noqa: E501 + raise ValueError("Invalid value for `create_params`, must not be `None`") # noqa: E501 + + self._create_params = create_params + + 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, SpotMartingaleCreateRequest): + 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, SpotMartingaleCreateRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_order_stop_loss.py b/gate_api/models/spot_order_stop_loss.py new file mode 100644 index 00000000..635b63a8 --- /dev/null +++ b/gate_api/models/spot_order_stop_loss.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 SpotOrderStopLoss(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 = { + 'trigger_price': 'str', + 'order_price': 'str' + } + + attribute_map = { + 'trigger_price': 'trigger_price', + 'order_price': 'order_price' + } + + def __init__(self, trigger_price=None, order_price=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """SpotOrderStopLoss - 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._trigger_price = None + self._order_price = None + self.discriminator = None + + if trigger_price is not None: + self.trigger_price = trigger_price + if order_price is not None: + self.order_price = order_price + + @property + def trigger_price(self): + """Gets the trigger_price of this SpotOrderStopLoss. # noqa: E501 + + Stop loss trigger price When `side == \"buy\"`, `trigger_price` must be less than `price` When `side == \"sell\"`, `trigger_price` must be greater than `price` # noqa: E501 + + :return: The trigger_price of this SpotOrderStopLoss. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this SpotOrderStopLoss. + + Stop loss trigger price When `side == \"buy\"`, `trigger_price` must be less than `price` When `side == \"sell\"`, `trigger_price` must be greater than `price` # noqa: E501 + + :param trigger_price: The trigger_price of this SpotOrderStopLoss. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def order_price(self): + """Gets the order_price of this SpotOrderStopLoss. # noqa: E501 + + Stop-loss order price # noqa: E501 + + :return: The order_price of this SpotOrderStopLoss. # noqa: E501 + :rtype: str + """ + return self._order_price + + @order_price.setter + def order_price(self, order_price): + """Sets the order_price of this SpotOrderStopLoss. + + Stop-loss order price # noqa: E501 + + :param order_price: The order_price of this SpotOrderStopLoss. # noqa: E501 + :type: str + """ + + self._order_price = order_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, SpotOrderStopLoss): + 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, SpotOrderStopLoss): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_order_stop_profit.py b/gate_api/models/spot_order_stop_profit.py new file mode 100644 index 00000000..cd45d3a6 --- /dev/null +++ b/gate_api/models/spot_order_stop_profit.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 SpotOrderStopProfit(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 = { + 'trigger_price': 'str', + 'order_price': 'str' + } + + attribute_map = { + 'trigger_price': 'trigger_price', + 'order_price': 'order_price' + } + + def __init__(self, trigger_price=None, order_price=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """SpotOrderStopProfit - 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._trigger_price = None + self._order_price = None + self.discriminator = None + + if trigger_price is not None: + self.trigger_price = trigger_price + if order_price is not None: + self.order_price = order_price + + @property + def trigger_price(self): + """Gets the trigger_price of this SpotOrderStopProfit. # noqa: E501 + + Take profit trigger price When `side == \"buy\"`, `trigger_price` must be greater than `price` When `side == \"sell\"`, `trigger_price` must be less than `price` # noqa: E501 + + :return: The trigger_price of this SpotOrderStopProfit. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this SpotOrderStopProfit. + + Take profit trigger price When `side == \"buy\"`, `trigger_price` must be greater than `price` When `side == \"sell\"`, `trigger_price` must be less than `price` # noqa: E501 + + :param trigger_price: The trigger_price of this SpotOrderStopProfit. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def order_price(self): + """Gets the order_price of this SpotOrderStopProfit. # noqa: E501 + + Take profit order price # noqa: E501 + + :return: The order_price of this SpotOrderStopProfit. # noqa: E501 + :rtype: str + """ + return self._order_price + + @order_price.setter + def order_price(self, order_price): + """Sets the order_price of this SpotOrderStopProfit. + + Take profit order price # noqa: E501 + + :param order_price: The order_price of this SpotOrderStopProfit. # noqa: E501 + :type: str + """ + + self._order_price = order_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, SpotOrderStopProfit): + 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, SpotOrderStopProfit): + 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 499044d0..0231e9b1 100644 --- a/gate_api/models/spot_price_put_order.py +++ b/gate_api/models/spot_price_put_order.py @@ -80,8 +80,7 @@ def __init__(self, type='limit', side=None, price=None, amount=None, account='no self.price = price self.amount = amount self.account = account - if time_in_force is not None: - self.time_in_force = time_in_force + self.time_in_force = time_in_force if auto_borrow is not None: self.auto_borrow = auto_borrow if auto_repay is not None: @@ -250,6 +249,8 @@ def time_in_force(self, time_in_force): :param time_in_force: The time_in_force of this SpotPricePutOrder. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and time_in_force is None: # noqa: E501 + raise ValueError("Invalid value for `time_in_force`, must not be `None`") # noqa: E501 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( diff --git a/gate_api/models/stop_all_chase_orders_req.py b/gate_api/models/stop_all_chase_orders_req.py new file mode 100644 index 00000000..3ba885bc --- /dev/null +++ b/gate_api/models/stop_all_chase_orders_req.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 StopAllChaseOrdersReq(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', + 'settle': 'str', + 'pos_margin_mode': 'str' + } + + attribute_map = { + 'contract': 'contract', + 'settle': 'settle', + 'pos_margin_mode': 'pos_margin_mode' + } + + def __init__(self, contract=None, settle=None, pos_margin_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """StopAllChaseOrdersReq - 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._settle = None + self._pos_margin_mode = None + self.discriminator = None + + if contract is not None: + self.contract = contract + if settle is not None: + self.settle = settle + if pos_margin_mode is not None: + self.pos_margin_mode = pos_margin_mode + + @property + def contract(self): + """Gets the contract of this StopAllChaseOrdersReq. # noqa: E501 + + Optional contract name # noqa: E501 + + :return: The contract of this StopAllChaseOrdersReq. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this StopAllChaseOrdersReq. + + Optional contract name # noqa: E501 + + :param contract: The contract of this StopAllChaseOrdersReq. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def settle(self): + """Gets the settle of this StopAllChaseOrdersReq. # noqa: E501 + + Overridden by the path parameter # noqa: E501 + + :return: The settle of this StopAllChaseOrdersReq. # noqa: E501 + :rtype: str + """ + return self._settle + + @settle.setter + def settle(self, settle): + """Sets the settle of this StopAllChaseOrdersReq. + + Overridden by the path parameter # noqa: E501 + + :param settle: The settle of this StopAllChaseOrdersReq. # noqa: E501 + :type: str + """ + + self._settle = settle + + @property + def pos_margin_mode(self): + """Gets the pos_margin_mode of this StopAllChaseOrdersReq. # noqa: E501 + + Optional margin mode # noqa: E501 + + :return: The pos_margin_mode of this StopAllChaseOrdersReq. # noqa: E501 + :rtype: str + """ + return self._pos_margin_mode + + @pos_margin_mode.setter + def pos_margin_mode(self, pos_margin_mode): + """Sets the pos_margin_mode of this StopAllChaseOrdersReq. + + Optional margin mode # noqa: E501 + + :param pos_margin_mode: The pos_margin_mode of this StopAllChaseOrdersReq. # noqa: E501 + :type: str + """ + + self._pos_margin_mode = pos_margin_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, StopAllChaseOrdersReq): + 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, StopAllChaseOrdersReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/stop_all_chase_orders_resp.py b/gate_api/models/stop_all_chase_orders_resp.py new file mode 100644 index 00000000..aed39f2a --- /dev/null +++ b/gate_api/models/stop_all_chase_orders_resp.py @@ -0,0 +1,121 @@ +# 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 StopAllChaseOrdersResp(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 = { + 'orders': 'list[ChaseOrder]' + } + + attribute_map = { + 'orders': 'orders' + } + + def __init__(self, orders=None, local_vars_configuration=None): # noqa: E501 + # type: (list[ChaseOrder], Configuration) -> None + """StopAllChaseOrdersResp - 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._orders = None + self.discriminator = None + + if orders is not None: + self.orders = orders + + @property + def orders(self): + """Gets the orders of this StopAllChaseOrdersResp. # noqa: E501 + + + :return: The orders of this StopAllChaseOrdersResp. # noqa: E501 + :rtype: list[ChaseOrder] + """ + return self._orders + + @orders.setter + def orders(self, orders): + """Sets the orders of this StopAllChaseOrdersResp. + + + :param orders: The orders of this StopAllChaseOrdersResp. # noqa: E501 + :type: list[ChaseOrder] + """ + + self._orders = orders + + 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, StopAllChaseOrdersResp): + 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, StopAllChaseOrdersResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/stop_chase_order_req.py b/gate_api/models/stop_chase_order_req.py new file mode 100644 index 00000000..af9f4a32 --- /dev/null +++ b/gate_api/models/stop_chase_order_req.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 StopChaseOrderReq(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', + 'text': 'str', + 'settle': 'str' + } + + attribute_map = { + 'id': 'id', + 'text': 'text', + 'settle': 'settle' + } + + def __init__(self, id=None, text=None, settle=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """StopChaseOrderReq - 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._text = None + self._settle = None + self.discriminator = None + + if id is not None: + self.id = id + if text is not None: + self.text = text + if settle is not None: + self.settle = settle + + @property + def id(self): + """Gets the id of this StopChaseOrderReq. # noqa: E501 + + Order ID. Either id or text must be provided # noqa: E501 + + :return: The id of this StopChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this StopChaseOrderReq. + + Order ID. Either id or text must be provided # noqa: E501 + + :param id: The id of this StopChaseOrderReq. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def text(self): + """Gets the text of this StopChaseOrderReq. # noqa: E501 + + Custom text. Required only when id is 0 or omitted # noqa: E501 + + :return: The text of this StopChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this StopChaseOrderReq. + + Custom text. Required only when id is 0 or omitted # noqa: E501 + + :param text: The text of this StopChaseOrderReq. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def settle(self): + """Gets the settle of this StopChaseOrderReq. # noqa: E501 + + Overridden by the path parameter # noqa: E501 + + :return: The settle of this StopChaseOrderReq. # noqa: E501 + :rtype: str + """ + return self._settle + + @settle.setter + def settle(self, settle): + """Sets the settle of this StopChaseOrderReq. + + Overridden by the path parameter # noqa: E501 + + :param settle: The settle of this StopChaseOrderReq. # noqa: E501 + :type: str + """ + + self._settle = settle + + 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, StopChaseOrderReq): + 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, StopChaseOrderReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/stop_chase_order_resp.py b/gate_api/models/stop_chase_order_resp.py new file mode 100644 index 00000000..50faa4e1 --- /dev/null +++ b/gate_api/models/stop_chase_order_resp.py @@ -0,0 +1,121 @@ +# 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 StopChaseOrderResp(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': 'ChaseOrder' + } + + attribute_map = { + 'order': 'order' + } + + def __init__(self, order=None, local_vars_configuration=None): # noqa: E501 + # type: (ChaseOrder, Configuration) -> None + """StopChaseOrderResp - 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 = None + self.discriminator = None + + if order is not None: + self.order = order + + @property + def order(self): + """Gets the order of this StopChaseOrderResp. # noqa: E501 + + + :return: The order of this StopChaseOrderResp. # noqa: E501 + :rtype: ChaseOrder + """ + return self._order + + @order.setter + def order(self, order): + """Sets the order of this StopChaseOrderResp. + + + :param order: The order of this StopChaseOrderResp. # noqa: E501 + :type: ChaseOrder + """ + + self._order = order + + 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, StopChaseOrderResp): + 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, StopChaseOrderResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/strategy_type.py b/gate_api/models/strategy_type.py new file mode 100644 index 00000000..b46f1e70 --- /dev/null +++ b/gate_api/models/strategy_type.py @@ -0,0 +1,105 @@ +# 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 StrategyType(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + SPOT_GRID = "spot_grid" + MARGIN_GRID = "margin_grid" + INFINITE_GRID = "infinite_grid" + FUTURES_GRID = "futures_grid" + SPOT_MARTINGALE = "spot_martingale" + CONTRACT_MARTINGALE = "contract_martingale" + + allowable_values = [SPOT_GRID, MARGIN_GRID, INFINITE_GRID, FUTURES_GRID, SPOT_MARTINGALE, CONTRACT_MARTINGALE] # noqa: E501 + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + # type: (Configuration) -> None + """StrategyType - 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.discriminator = None + + 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, StrategyType): + 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, StrategyType): + 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 deleted file mode 100644 index a60c6f80..00000000 --- a/gate_api/models/structured_get_project_list.py +++ /dev/null @@ -1,431 +0,0 @@ -# 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 deleted file mode 100644 index 4f752229..00000000 --- a/gate_api/models/structured_order_list.py +++ /dev/null @@ -1,291 +0,0 @@ -# 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_balance.py b/gate_api/models/sub_account_balance.py index 7af2fb8c..94b92509 100644 --- a/gate_api/models/sub_account_balance.py +++ b/gate_api/models/sub_account_balance.py @@ -34,16 +34,18 @@ class SubAccountBalance(object): """ openapi_types = { 'uid': 'str', - 'available': 'dict(str, str)' + 'available': 'dict(str, str)', + 'locking': 'dict(str, str)' } attribute_map = { 'uid': 'uid', - 'available': 'available' + 'available': 'available', + 'locking': 'locking' } - def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 - # type: (str, dict(str, str), Configuration) -> None + def __init__(self, uid=None, available=None, locking=None, local_vars_configuration=None): # noqa: E501 + # type: (str, dict(str, str), dict(str, str), Configuration) -> None """SubAccountBalance - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -51,12 +53,15 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # self._uid = None self._available = None + self._locking = None self.discriminator = None if uid is not None: self.uid = uid if available is not None: self.available = available + if locking is not None: + self.locking = locking @property def uid(self): @@ -104,6 +109,29 @@ def available(self, available): self._available = available + @property + def locking(self): + """Gets the locking of this SubAccountBalance. # noqa: E501 + + Locked amount by currency # noqa: E501 + + :return: The locking of this SubAccountBalance. # noqa: E501 + :rtype: dict(str, str) + """ + return self._locking + + @locking.setter + def locking(self, locking): + """Sets the locking of this SubAccountBalance. + + Locked amount by currency # noqa: E501 + + :param locking: The locking of this SubAccountBalance. # noqa: E501 + :type: dict(str, str) + """ + + self._locking = locking + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/symbol.py b/gate_api/models/symbol.py index df12ff8b..f05655eb 100644 --- a/gate_api/models/symbol.py +++ b/gate_api/models/symbol.py @@ -108,7 +108,7 @@ def __init__(self, symbol=None, exchange_type=None, business_type=None, state=No def symbol(self): """Gets the symbol of this Symbol. # noqa: E501 - ExchangeType_BusinessType_Base_Counter # noqa: E501 + Unique trading pair identifier in the form ExchangeType_BusinessType_Base_Counter. # noqa: E501 :return: The symbol of this Symbol. # noqa: E501 :rtype: str @@ -119,7 +119,7 @@ def symbol(self): def symbol(self, symbol): """Sets the symbol of this Symbol. - ExchangeType_BusinessType_Base_Counter # noqa: E501 + Unique trading pair identifier in the form ExchangeType_BusinessType_Base_Counter. # noqa: E501 :param symbol: The symbol of this Symbol. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def symbol(self, symbol): def exchange_type(self): """Gets the exchange_type of this Symbol. # noqa: E501 - BINANCE,OKX,GATE,BYBIT,CROSSEX # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 :return: The exchange_type of this Symbol. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def exchange_type(self): def exchange_type(self, exchange_type): """Sets the exchange_type of this Symbol. - BINANCE,OKX,GATE,BYBIT,CROSSEX # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 :param exchange_type: The exchange_type of this Symbol. # noqa: E501 :type: str @@ -158,7 +158,7 @@ def exchange_type(self, exchange_type): def business_type(self): """Gets the business_type of this Symbol. # noqa: E501 - SPOT, FUTURE, MARGIN # noqa: E501 + Business type (`SPOT` Spot / `FUTURE` Futures / `MARGIN` Margin). # noqa: E501 :return: The business_type of this Symbol. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def business_type(self): def business_type(self, business_type): """Sets the business_type of this Symbol. - SPOT, FUTURE, MARGIN # noqa: E501 + Business type (`SPOT` Spot / `FUTURE` Futures / `MARGIN` Margin). # noqa: E501 :param business_type: The business_type of this Symbol. # noqa: E501 :type: str @@ -183,7 +183,7 @@ def business_type(self, business_type): def state(self): """Gets the state of this Symbol. # noqa: E501 - live/suspend # noqa: E501 + Status (`live` running / `suspend` paused). # noqa: E501 :return: The state of this Symbol. # noqa: E501 :rtype: str @@ -194,7 +194,7 @@ def state(self): def state(self, state): """Sets the state of this Symbol. - live/suspend # noqa: E501 + Status (`live` running / `suspend` paused). # noqa: E501 :param state: The state of this Symbol. # noqa: E501 :type: str @@ -208,7 +208,7 @@ def state(self, state): def min_size(self): """Gets the min_size of this Symbol. # noqa: E501 - Minimum order quantity # noqa: E501 + Minimum order size allowed by the contract # noqa: E501 :return: The min_size of this Symbol. # noqa: E501 :rtype: str @@ -219,7 +219,7 @@ def min_size(self): def min_size(self, min_size): """Sets the min_size of this Symbol. - Minimum order quantity # noqa: E501 + Minimum order size allowed by the contract # noqa: E501 :param min_size: The min_size of this Symbol. # noqa: E501 :type: str @@ -233,7 +233,7 @@ def min_size(self, min_size): def min_notional(self): """Gets the min_notional of this Symbol. # noqa: E501 - Minimum order value # noqa: E501 + Minimum Order Value # noqa: E501 :return: The min_notional of this Symbol. # noqa: E501 :rtype: str @@ -244,7 +244,7 @@ def min_notional(self): def min_notional(self, min_notional): """Sets the min_notional of this Symbol. - Minimum order value # noqa: E501 + Minimum Order Value # noqa: E501 :param min_notional: The min_notional of this Symbol. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def min_notional(self, min_notional): def lot_size(self): """Gets the lot_size of this Symbol. # noqa: E501 - Quantity step size # noqa: E501 + Quantity Step # noqa: E501 :return: The lot_size of this Symbol. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def lot_size(self): def lot_size(self, lot_size): """Sets the lot_size of this Symbol. - Quantity step size # noqa: E501 + Quantity Step # noqa: E501 :param lot_size: The lot_size of this Symbol. # noqa: E501 :type: str @@ -283,7 +283,7 @@ def lot_size(self, lot_size): def tick_size(self): """Gets the tick_size of this Symbol. # noqa: E501 - Price step size # noqa: E501 + Price Step # noqa: E501 :return: The tick_size of this Symbol. # noqa: E501 :rtype: str @@ -294,7 +294,7 @@ def tick_size(self): def tick_size(self, tick_size): """Sets the tick_size of this Symbol. - Price step size # noqa: E501 + Price Step # noqa: E501 :param tick_size: The tick_size of this Symbol. # noqa: E501 :type: str @@ -308,7 +308,7 @@ def tick_size(self, tick_size): def max_num_orders(self): """Gets the max_num_orders of this Symbol. # noqa: E501 - Maximum number of pending orders # noqa: E501 + maximumopen orderamount # noqa: E501 :return: The max_num_orders of this Symbol. # noqa: E501 :rtype: str @@ -319,7 +319,7 @@ def max_num_orders(self): def max_num_orders(self, max_num_orders): """Sets the max_num_orders of this Symbol. - Maximum number of pending orders # noqa: E501 + maximumopen orderamount # noqa: E501 :param max_num_orders: The max_num_orders of this Symbol. # noqa: E501 :type: str @@ -333,7 +333,7 @@ def max_num_orders(self, max_num_orders): def max_market_size(self): """Gets the max_market_size of this Symbol. # noqa: E501 - Maximum order quantity at market price # noqa: E501 + Maximum Market Order Quantity # noqa: E501 :return: The max_market_size of this Symbol. # noqa: E501 :rtype: str @@ -344,7 +344,7 @@ def max_market_size(self): def max_market_size(self, max_market_size): """Sets the max_market_size of this Symbol. - Maximum order quantity at market price # noqa: E501 + Maximum Market Order Quantity # noqa: E501 :param max_market_size: The max_market_size of this Symbol. # noqa: E501 :type: str @@ -358,7 +358,7 @@ def max_market_size(self, max_market_size): def max_limit_size(self): """Gets the max_limit_size of this Symbol. # noqa: E501 - Maximum order quantity at limit price # noqa: E501 + Maximum order quantity for limit orders. # noqa: E501 :return: The max_limit_size of this Symbol. # noqa: E501 :rtype: str @@ -369,7 +369,7 @@ def max_limit_size(self): def max_limit_size(self, max_limit_size): """Sets the max_limit_size of this Symbol. - Maximum order quantity at limit price # noqa: E501 + Maximum order quantity for limit orders. # noqa: E501 :param max_limit_size: The max_limit_size of this Symbol. # noqa: E501 :type: str @@ -383,7 +383,7 @@ def max_limit_size(self, max_limit_size): def contract_size(self): """Gets the contract_size of this Symbol. # noqa: E501 - contract multiplier # noqa: E501 + Contract Multiplier # noqa: E501 :return: The contract_size of this Symbol. # noqa: E501 :rtype: str @@ -394,7 +394,7 @@ def contract_size(self): def contract_size(self, contract_size): """Sets the contract_size of this Symbol. - contract multiplier # noqa: E501 + Contract Multiplier # noqa: E501 :param contract_size: The contract_size of this Symbol. # noqa: E501 :type: str @@ -408,7 +408,7 @@ def contract_size(self, contract_size): def liquidation_fee(self): """Gets the liquidation_fee of this Symbol. # noqa: E501 - Liquidation rate # noqa: E501 + Liquidation Fee Rate # noqa: E501 :return: The liquidation_fee of this Symbol. # noqa: E501 :rtype: str @@ -419,7 +419,7 @@ def liquidation_fee(self): def liquidation_fee(self, liquidation_fee): """Sets the liquidation_fee of this Symbol. - Liquidation rate # noqa: E501 + Liquidation Fee Rate # noqa: E501 :param liquidation_fee: The liquidation_fee of this Symbol. # noqa: E501 :type: str @@ -433,7 +433,7 @@ def liquidation_fee(self, liquidation_fee): def delist_time(self): """Gets the delist_time of this Symbol. # noqa: E501 - Millisecond timestamp,0 is normal # noqa: E501 + Millisecond timestamp; `0` means not delisted. # noqa: E501 :return: The delist_time of this Symbol. # noqa: E501 :rtype: str @@ -444,7 +444,7 @@ def delist_time(self): def delist_time(self, delist_time): """Sets the delist_time of this Symbol. - Millisecond timestamp,0 is normal # noqa: E501 + Millisecond timestamp; `0` means not delisted. # noqa: E501 :param delist_time: The delist_time of this Symbol. # noqa: E501 :type: str diff --git a/gate_api/models/trad_fi_close_position_request.py b/gate_api/models/trad_fi_close_position_request.py index 082da25e..e3cc58f1 100644 --- a/gate_api/models/trad_fi_close_position_request.py +++ b/gate_api/models/trad_fi_close_position_request.py @@ -60,7 +60,7 @@ def __init__(self, close_type=None, close_volume=None, local_vars_configuration= def close_type(self): """Gets the close_type of this TradFiClosePositionRequest. # noqa: E501 - 平仓类型 说明: - 1:部分平仓(必须传 close_volume) - 2:全平(无需传 close_volume) # noqa: E501 + Close Type Description: - 1: Partial Close (close_volume is required) - 2: Full Close (close_volume is not required) # noqa: E501 :return: The close_type of this TradFiClosePositionRequest. # noqa: E501 :rtype: int @@ -71,7 +71,7 @@ def close_type(self): def close_type(self, close_type): """Sets the close_type of this TradFiClosePositionRequest. - 平仓类型 说明: - 1:部分平仓(必须传 close_volume) - 2:全平(无需传 close_volume) # noqa: E501 + Close Type Description: - 1: Partial Close (close_volume is required) - 2: Full Close (close_volume is not required) # noqa: E501 :param close_type: The close_type of this TradFiClosePositionRequest. # noqa: E501 :type: int @@ -91,7 +91,7 @@ def close_type(self, close_type): def close_volume(self): """Gets the close_volume of this TradFiClosePositionRequest. # noqa: E501 - 平仓数量 说明: - 当 close_type = 1 时必传 - 当 close_type = 2 时忽略该字段 # noqa: E501 + Close Volume Description: - Required when close_type = 1 - Ignored when close_type = 2 # noqa: E501 :return: The close_volume of this TradFiClosePositionRequest. # noqa: E501 :rtype: str @@ -102,7 +102,7 @@ def close_volume(self): def close_volume(self, close_volume): """Sets the close_volume of this TradFiClosePositionRequest. - 平仓数量 说明: - 当 close_type = 1 时必传 - 当 close_type = 2 时忽略该字段 # noqa: E501 + Close Volume Description: - Required when close_type = 1 - Ignored when close_type = 2 # noqa: E501 :param close_volume: The close_volume of this TradFiClosePositionRequest. # noqa: E501 :type: str diff --git a/gate_api/models/error.py b/gate_api/models/trad_fi_error.py similarity index 82% rename from gate_api/models/error.py rename to gate_api/models/trad_fi_error.py index c128f240..7a6cd503 100644 --- a/gate_api/models/error.py +++ b/gate_api/models/trad_fi_error.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class Error(object): +class TradFiError(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -46,7 +46,7 @@ class Error(object): def __init__(self, label=None, message=None, timestamp=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, int, Configuration) -> None - """Error - a model defined in OpenAPI""" # noqa: E501 + """TradFiError - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -65,22 +65,22 @@ def __init__(self, label=None, message=None, timestamp=None, local_vars_configur @property def label(self): - """Gets the label of this Error. # noqa: E501 + """Gets the label of this TradFiError. # noqa: E501 Business status code, non-empty indicates request exception, please refer to TradFi error enumeration in documentation # noqa: E501 - :return: The label of this Error. # noqa: E501 + :return: The label of this TradFiError. # noqa: E501 :rtype: str """ return self._label @label.setter def label(self, label): - """Sets the label of this Error. + """Sets the label of this TradFiError. Business status code, non-empty indicates request exception, please refer to TradFi error enumeration in documentation # noqa: E501 - :param label: The label of this Error. # noqa: E501 + :param label: The label of this TradFiError. # noqa: E501 :type: str """ @@ -88,22 +88,22 @@ def label(self, label): @property def message(self): - """Gets the message of this Error. # noqa: E501 + """Gets the message of this TradFiError. # noqa: E501 Return message, returned when request error occurs # noqa: E501 - :return: The message of this Error. # noqa: E501 + :return: The message of this TradFiError. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this Error. + """Sets the message of this TradFiError. Return message, returned when request error occurs # noqa: E501 - :param message: The message of this Error. # noqa: E501 + :param message: The message of this TradFiError. # noqa: E501 :type: str """ @@ -111,22 +111,22 @@ def message(self, message): @property def timestamp(self): - """Gets the timestamp of this Error. # noqa: E501 + """Gets the timestamp of this TradFiError. # noqa: E501 Server timestamp (milliseconds) # noqa: E501 - :return: The timestamp of this Error. # noqa: E501 + :return: The timestamp of this TradFiError. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this Error. + """Sets the timestamp of this TradFiError. Server timestamp (milliseconds) # noqa: E501 - :param timestamp: The timestamp of this Error. # noqa: E501 + :param timestamp: The timestamp of this TradFiError. # noqa: E501 :type: int """ @@ -166,14 +166,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, Error): + if not isinstance(other, TradFiError): 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, Error): + if not isinstance(other, TradFiError): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trad_fi_position_update_request.py b/gate_api/models/trad_fi_position_update_request.py index a58ef9b6..118627a5 100644 --- a/gate_api/models/trad_fi_position_update_request.py +++ b/gate_api/models/trad_fi_position_update_request.py @@ -60,7 +60,7 @@ def __init__(self, price_tp=None, price_sl=None, local_vars_configuration=None): def price_tp(self): """Gets the price_tp of this TradFiPositionUpdateRequest. # noqa: E501 - 止盈价格 说明: - 不传 或 传 \"0\":将清空原有止盈价 - 如不希望清空,请传接口返回的原止盈价 # noqa: E501 + Take Profit Price Description: - If not provided or set to \"0\": The original take profit price will be cleared - If you do not want to clear it, pass the original take profit price returned by the interface # noqa: E501 :return: The price_tp of this TradFiPositionUpdateRequest. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def price_tp(self): def price_tp(self, price_tp): """Sets the price_tp of this TradFiPositionUpdateRequest. - 止盈价格 说明: - 不传 或 传 \"0\":将清空原有止盈价 - 如不希望清空,请传接口返回的原止盈价 # noqa: E501 + Take Profit Price Description: - If not provided or set to \"0\": The original take profit price will be cleared - If you do not want to clear it, pass the original take profit price returned by the interface # noqa: E501 :param price_tp: The price_tp of this TradFiPositionUpdateRequest. # noqa: E501 :type: str @@ -83,7 +83,7 @@ def price_tp(self, price_tp): def price_sl(self): """Gets the price_sl of this TradFiPositionUpdateRequest. # noqa: E501 - 止损价格 说明: - 不传 或 传 \"0\":将清空原有止损价 - 如不希望清空,请传接口返回的原止损价 # noqa: E501 + Stop Loss Price Description: - If not provided or set to \"0\": The original stop loss price will be cleared - If you do not want to clear it, pass the original stop loss price returned by the interface # noqa: E501 :return: The price_sl of this TradFiPositionUpdateRequest. # noqa: E501 :rtype: str @@ -94,7 +94,7 @@ def price_sl(self): def price_sl(self, price_sl): """Sets the price_sl of this TradFiPositionUpdateRequest. - 止损价格 说明: - 不传 或 传 \"0\":将清空原有止损价 - 如不希望清空,请传接口返回的原止损价 # noqa: E501 + Stop Loss Price Description: - If not provided or set to \"0\": The original stop loss price will be cleared - If you do not want to clear it, pass the original stop loss price returned by the interface # noqa: E501 :param price_sl: The price_sl of this TradFiPositionUpdateRequest. # noqa: E501 :type: str diff --git a/gate_api/models/ticker2.py b/gate_api/models/trad_fi_ticker.py similarity index 77% rename from gate_api/models/ticker2.py rename to gate_api/models/trad_fi_ticker.py index 941e8535..28ccb248 100644 --- a/gate_api/models/ticker2.py +++ b/gate_api/models/trad_fi_ticker.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class Ticker2(object): +class TradFiTicker(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -36,7 +36,7 @@ class Ticker2(object): 'label': 'str', 'message': 'str', 'timestamp': 'int', - 'data': 'Ticker2Data' + 'data': 'TradFiTickerData' } attribute_map = { @@ -47,8 +47,8 @@ class Ticker2(object): } def __init__(self, label=None, message=None, timestamp=None, data=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, int, Ticker2Data, Configuration) -> None - """Ticker2 - a model defined in OpenAPI""" # noqa: E501 + # type: (str, str, int, TradFiTickerData, Configuration) -> None + """TradFiTicker - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -70,22 +70,22 @@ def __init__(self, label=None, message=None, timestamp=None, data=None, local_va @property def label(self): - """Gets the label of this Ticker2. # noqa: E501 + """Gets the label of this TradFiTicker. # noqa: E501 Business status code, non-empty indicates request exception, please refer to TradFi error enumeration in documentation # noqa: E501 - :return: The label of this Ticker2. # noqa: E501 + :return: The label of this TradFiTicker. # noqa: E501 :rtype: str """ return self._label @label.setter def label(self, label): - """Sets the label of this Ticker2. + """Sets the label of this TradFiTicker. Business status code, non-empty indicates request exception, please refer to TradFi error enumeration in documentation # noqa: E501 - :param label: The label of this Ticker2. # noqa: E501 + :param label: The label of this TradFiTicker. # noqa: E501 :type: str """ @@ -93,22 +93,22 @@ def label(self, label): @property def message(self): - """Gets the message of this Ticker2. # noqa: E501 + """Gets the message of this TradFiTicker. # noqa: E501 Return message, returned when request error occurs # noqa: E501 - :return: The message of this Ticker2. # noqa: E501 + :return: The message of this TradFiTicker. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this Ticker2. + """Sets the message of this TradFiTicker. Return message, returned when request error occurs # noqa: E501 - :param message: The message of this Ticker2. # noqa: E501 + :param message: The message of this TradFiTicker. # noqa: E501 :type: str """ @@ -116,22 +116,22 @@ def message(self, message): @property def timestamp(self): - """Gets the timestamp of this Ticker2. # noqa: E501 + """Gets the timestamp of this TradFiTicker. # noqa: E501 Server timestamp (milliseconds) # noqa: E501 - :return: The timestamp of this Ticker2. # noqa: E501 + :return: The timestamp of this TradFiTicker. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this Ticker2. + """Sets the timestamp of this TradFiTicker. Server timestamp (milliseconds) # noqa: E501 - :param timestamp: The timestamp of this Ticker2. # noqa: E501 + :param timestamp: The timestamp of this TradFiTicker. # noqa: E501 :type: int """ @@ -139,21 +139,21 @@ def timestamp(self, timestamp): @property def data(self): - """Gets the data of this Ticker2. # noqa: E501 + """Gets the data of this TradFiTicker. # noqa: E501 - :return: The data of this Ticker2. # noqa: E501 - :rtype: Ticker2Data + :return: The data of this TradFiTicker. # noqa: E501 + :rtype: TradFiTickerData """ return self._data @data.setter def data(self, data): - """Sets the data of this Ticker2. + """Sets the data of this TradFiTicker. - :param data: The data of this Ticker2. # noqa: E501 - :type: Ticker2Data + :param data: The data of this TradFiTicker. # noqa: E501 + :type: TradFiTickerData """ self._data = data @@ -192,14 +192,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, Ticker2): + if not isinstance(other, TradFiTicker): 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, Ticker2): + if not isinstance(other, TradFiTicker): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ticker2_data.py b/gate_api/models/trad_fi_ticker_data.py similarity index 72% rename from gate_api/models/ticker2_data.py rename to gate_api/models/trad_fi_ticker_data.py index 219865cd..2752547b 100644 --- a/gate_api/models/ticker2_data.py +++ b/gate_api/models/trad_fi_ticker_data.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class Ticker2Data(object): +class TradFiTickerData(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -72,7 +72,7 @@ class Ticker2Data(object): def __init__(self, highest_price=None, lowest_price=None, price_change=None, price_change_amount=None, today_open_price=None, last_today_close_price=None, last_price=None, bid_price=None, ask_price=None, favorite=None, status=None, close_time=None, open_time=None, next_open_time=None, trade_mode=None, category_name=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, str, str, str, str, str, str, bool, str, int, int, int, str, str, Configuration) -> None - """Ticker2Data - a model defined in OpenAPI""" # noqa: E501 + """TradFiTickerData - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -130,22 +130,22 @@ def __init__(self, highest_price=None, lowest_price=None, price_change=None, pri @property def highest_price(self): - """Gets the highest_price of this Ticker2Data. # noqa: E501 + """Gets the highest_price of this TradFiTickerData. # noqa: E501 Highest price # noqa: E501 - :return: The highest_price of this Ticker2Data. # noqa: E501 + :return: The highest_price of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._highest_price @highest_price.setter def highest_price(self, highest_price): - """Sets the highest_price of this Ticker2Data. + """Sets the highest_price of this TradFiTickerData. Highest price # noqa: E501 - :param highest_price: The highest_price of this Ticker2Data. # noqa: E501 + :param highest_price: The highest_price of this TradFiTickerData. # noqa: E501 :type: str """ @@ -153,22 +153,22 @@ def highest_price(self, highest_price): @property def lowest_price(self): - """Gets the lowest_price of this Ticker2Data. # noqa: E501 + """Gets the lowest_price of this TradFiTickerData. # noqa: E501 Lowest price # noqa: E501 - :return: The lowest_price of this Ticker2Data. # noqa: E501 + :return: The lowest_price of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._lowest_price @lowest_price.setter def lowest_price(self, lowest_price): - """Sets the lowest_price of this Ticker2Data. + """Sets the lowest_price of this TradFiTickerData. Lowest price # noqa: E501 - :param lowest_price: The lowest_price of this Ticker2Data. # noqa: E501 + :param lowest_price: The lowest_price of this TradFiTickerData. # noqa: E501 :type: str """ @@ -176,22 +176,22 @@ def lowest_price(self, lowest_price): @property def price_change(self): - """Gets the price_change of this Ticker2Data. # noqa: E501 + """Gets the price_change of this TradFiTickerData. # noqa: E501 Price change percentage (multiplied by 100) # noqa: E501 - :return: The price_change of this Ticker2Data. # noqa: E501 + :return: The price_change of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._price_change @price_change.setter def price_change(self, price_change): - """Sets the price_change of this Ticker2Data. + """Sets the price_change of this TradFiTickerData. Price change percentage (multiplied by 100) # noqa: E501 - :param price_change: The price_change of this Ticker2Data. # noqa: E501 + :param price_change: The price_change of this TradFiTickerData. # noqa: E501 :type: str """ @@ -199,22 +199,22 @@ def price_change(self, price_change): @property def price_change_amount(self): - """Gets the price_change_amount of this Ticker2Data. # noqa: E501 + """Gets the price_change_amount of this TradFiTickerData. # noqa: E501 Price change amount # noqa: E501 - :return: The price_change_amount of this Ticker2Data. # noqa: E501 + :return: The price_change_amount of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._price_change_amount @price_change_amount.setter def price_change_amount(self, price_change_amount): - """Sets the price_change_amount of this Ticker2Data. + """Sets the price_change_amount of this TradFiTickerData. Price change amount # noqa: E501 - :param price_change_amount: The price_change_amount of this Ticker2Data. # noqa: E501 + :param price_change_amount: The price_change_amount of this TradFiTickerData. # noqa: E501 :type: str """ @@ -222,22 +222,22 @@ def price_change_amount(self, price_change_amount): @property def today_open_price(self): - """Gets the today_open_price of this Ticker2Data. # noqa: E501 + """Gets the today_open_price of this TradFiTickerData. # noqa: E501 Today's open price # noqa: E501 - :return: The today_open_price of this Ticker2Data. # noqa: E501 + :return: The today_open_price of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._today_open_price @today_open_price.setter def today_open_price(self, today_open_price): - """Sets the today_open_price of this Ticker2Data. + """Sets the today_open_price of this TradFiTickerData. Today's open price # noqa: E501 - :param today_open_price: The today_open_price of this Ticker2Data. # noqa: E501 + :param today_open_price: The today_open_price of this TradFiTickerData. # noqa: E501 :type: str """ @@ -245,22 +245,22 @@ def today_open_price(self, today_open_price): @property def last_today_close_price(self): - """Gets the last_today_close_price of this Ticker2Data. # noqa: E501 + """Gets the last_today_close_price of this TradFiTickerData. # noqa: E501 Previous close price # noqa: E501 - :return: The last_today_close_price of this Ticker2Data. # noqa: E501 + :return: The last_today_close_price of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._last_today_close_price @last_today_close_price.setter def last_today_close_price(self, last_today_close_price): - """Sets the last_today_close_price of this Ticker2Data. + """Sets the last_today_close_price of this TradFiTickerData. Previous close price # noqa: E501 - :param last_today_close_price: The last_today_close_price of this Ticker2Data. # noqa: E501 + :param last_today_close_price: The last_today_close_price of this TradFiTickerData. # noqa: E501 :type: str """ @@ -268,22 +268,22 @@ def last_today_close_price(self, last_today_close_price): @property def last_price(self): - """Gets the last_price of this Ticker2Data. # noqa: E501 + """Gets the last_price of this TradFiTickerData. # noqa: E501 Last trading price # noqa: E501 - :return: The last_price of this Ticker2Data. # noqa: E501 + :return: The last_price of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._last_price @last_price.setter def last_price(self, last_price): - """Sets the last_price of this Ticker2Data. + """Sets the last_price of this TradFiTickerData. Last trading price # noqa: E501 - :param last_price: The last_price of this Ticker2Data. # noqa: E501 + :param last_price: The last_price of this TradFiTickerData. # noqa: E501 :type: str """ @@ -291,22 +291,22 @@ def last_price(self, last_price): @property def bid_price(self): - """Gets the bid_price of this Ticker2Data. # noqa: E501 + """Gets the bid_price of this TradFiTickerData. # noqa: E501 Bid price # noqa: E501 - :return: The bid_price of this Ticker2Data. # noqa: E501 + :return: The bid_price of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._bid_price @bid_price.setter def bid_price(self, bid_price): - """Sets the bid_price of this Ticker2Data. + """Sets the bid_price of this TradFiTickerData. Bid price # noqa: E501 - :param bid_price: The bid_price of this Ticker2Data. # noqa: E501 + :param bid_price: The bid_price of this TradFiTickerData. # noqa: E501 :type: str """ @@ -314,22 +314,22 @@ def bid_price(self, bid_price): @property def ask_price(self): - """Gets the ask_price of this Ticker2Data. # noqa: E501 + """Gets the ask_price of this TradFiTickerData. # noqa: E501 Ask price # noqa: E501 - :return: The ask_price of this Ticker2Data. # noqa: E501 + :return: The ask_price of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._ask_price @ask_price.setter def ask_price(self, ask_price): - """Sets the ask_price of this Ticker2Data. + """Sets the ask_price of this TradFiTickerData. Ask price # noqa: E501 - :param ask_price: The ask_price of this Ticker2Data. # noqa: E501 + :param ask_price: The ask_price of this TradFiTickerData. # noqa: E501 :type: str """ @@ -337,22 +337,22 @@ def ask_price(self, ask_price): @property def favorite(self): - """Gets the favorite of this Ticker2Data. # noqa: E501 + """Gets the favorite of this TradFiTickerData. # noqa: E501 Is favorited # noqa: E501 - :return: The favorite of this Ticker2Data. # noqa: E501 + :return: The favorite of this TradFiTickerData. # noqa: E501 :rtype: bool """ return self._favorite @favorite.setter def favorite(self, favorite): - """Sets the favorite of this Ticker2Data. + """Sets the favorite of this TradFiTickerData. Is favorited # noqa: E501 - :param favorite: The favorite of this Ticker2Data. # noqa: E501 + :param favorite: The favorite of this TradFiTickerData. # noqa: E501 :type: bool """ @@ -360,22 +360,22 @@ def favorite(self, favorite): @property def status(self): - """Gets the status of this Ticker2Data. # noqa: E501 + """Gets the status of this TradFiTickerData. # noqa: E501 Trading status (open=tradable, closed=non-tradable) # noqa: E501 - :return: The status of this Ticker2Data. # noqa: E501 + :return: The status of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): - """Sets the status of this Ticker2Data. + """Sets the status of this TradFiTickerData. Trading status (open=tradable, closed=non-tradable) # noqa: E501 - :param status: The status of this Ticker2Data. # noqa: E501 + :param status: The status of this TradFiTickerData. # noqa: E501 :type: str """ @@ -383,22 +383,22 @@ def status(self, status): @property def close_time(self): - """Gets the close_time of this Ticker2Data. # noqa: E501 + """Gets the close_time of this TradFiTickerData. # noqa: E501 Close time (Unix timestamp in seconds) # noqa: E501 - :return: The close_time of this Ticker2Data. # noqa: E501 + :return: The close_time of this TradFiTickerData. # noqa: E501 :rtype: int """ return self._close_time @close_time.setter def close_time(self, close_time): - """Sets the close_time of this Ticker2Data. + """Sets the close_time of this TradFiTickerData. Close time (Unix timestamp in seconds) # noqa: E501 - :param close_time: The close_time of this Ticker2Data. # noqa: E501 + :param close_time: The close_time of this TradFiTickerData. # noqa: E501 :type: int """ @@ -406,22 +406,22 @@ def close_time(self, close_time): @property def open_time(self): - """Gets the open_time of this Ticker2Data. # noqa: E501 + """Gets the open_time of this TradFiTickerData. # noqa: E501 Open time (Unix timestamp in seconds) # noqa: E501 - :return: The open_time of this Ticker2Data. # noqa: E501 + :return: The open_time of this TradFiTickerData. # noqa: E501 :rtype: int """ return self._open_time @open_time.setter def open_time(self, open_time): - """Sets the open_time of this Ticker2Data. + """Sets the open_time of this TradFiTickerData. Open time (Unix timestamp in seconds) # noqa: E501 - :param open_time: The open_time of this Ticker2Data. # noqa: E501 + :param open_time: The open_time of this TradFiTickerData. # noqa: E501 :type: int """ @@ -429,22 +429,22 @@ def open_time(self, open_time): @property def next_open_time(self): - """Gets the next_open_time of this Ticker2Data. # noqa: E501 + """Gets the next_open_time of this TradFiTickerData. # noqa: E501 Next open time (0 means none) # noqa: E501 - :return: The next_open_time of this Ticker2Data. # noqa: E501 + :return: The next_open_time of this TradFiTickerData. # noqa: E501 :rtype: int """ return self._next_open_time @next_open_time.setter def next_open_time(self, next_open_time): - """Sets the next_open_time of this Ticker2Data. + """Sets the next_open_time of this TradFiTickerData. Next open time (0 means none) # noqa: E501 - :param next_open_time: The next_open_time of this Ticker2Data. # noqa: E501 + :param next_open_time: The next_open_time of this TradFiTickerData. # noqa: E501 :type: int """ @@ -452,22 +452,22 @@ def next_open_time(self, next_open_time): @property def trade_mode(self): - """Gets the trade_mode of this Ticker2Data. # noqa: E501 + """Gets the trade_mode of this TradFiTickerData. # noqa: E501 Trading mode code # noqa: E501 - :return: The trade_mode of this Ticker2Data. # noqa: E501 + :return: The trade_mode of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._trade_mode @trade_mode.setter def trade_mode(self, trade_mode): - """Sets the trade_mode of this Ticker2Data. + """Sets the trade_mode of this TradFiTickerData. Trading mode code # noqa: E501 - :param trade_mode: The trade_mode of this Ticker2Data. # noqa: E501 + :param trade_mode: The trade_mode of this TradFiTickerData. # noqa: E501 :type: str """ @@ -475,22 +475,22 @@ def trade_mode(self, trade_mode): @property def category_name(self): - """Gets the category_name of this Ticker2Data. # noqa: E501 + """Gets the category_name of this TradFiTickerData. # noqa: E501 Category name # noqa: E501 - :return: The category_name of this Ticker2Data. # noqa: E501 + :return: The category_name of this TradFiTickerData. # noqa: E501 :rtype: str """ return self._category_name @category_name.setter def category_name(self, category_name): - """Sets the category_name of this Ticker2Data. + """Sets the category_name of this TradFiTickerData. Category name # noqa: E501 - :param category_name: The category_name of this Ticker2Data. # noqa: E501 + :param category_name: The category_name of this TradFiTickerData. # noqa: E501 :type: str """ @@ -530,14 +530,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, Ticker2Data): + if not isinstance(other, TradFiTickerData): 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, Ticker2Data): + if not isinstance(other, TradFiTickerData): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2003.py b/gate_api/models/trail_order_change_log_response.py similarity index 84% rename from gate_api/models/inline_response2003.py rename to gate_api/models/trail_order_change_log_response.py index 81eba1bd..82e06853 100644 --- a/gate_api/models/inline_response2003.py +++ b/gate_api/models/trail_order_change_log_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2003(object): +class TrailOrderChangeLogResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -42,7 +42,7 @@ class InlineResponse2003(object): def __init__(self, change_log=None, local_vars_configuration=None): # noqa: E501 # type: (list[TrailChangeLog], Configuration) -> None - """InlineResponse2003 - a model defined in OpenAPI""" # noqa: E501 + """TrailOrderChangeLogResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -55,20 +55,20 @@ def __init__(self, change_log=None, local_vars_configuration=None): # noqa: E50 @property def change_log(self): - """Gets the change_log of this InlineResponse2003. # noqa: E501 + """Gets the change_log of this TrailOrderChangeLogResponse. # noqa: E501 - :return: The change_log of this InlineResponse2003. # noqa: E501 + :return: The change_log of this TrailOrderChangeLogResponse. # noqa: E501 :rtype: list[TrailChangeLog] """ return self._change_log @change_log.setter def change_log(self, change_log): - """Sets the change_log of this InlineResponse2003. + """Sets the change_log of this TrailOrderChangeLogResponse. - :param change_log: The change_log of this InlineResponse2003. # noqa: E501 + :param change_log: The change_log of this TrailOrderChangeLogResponse. # noqa: E501 :type: list[TrailChangeLog] """ @@ -108,14 +108,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2003): + if not isinstance(other, TrailOrderChangeLogResponse): 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, InlineResponse2003): + if not isinstance(other, TrailOrderChangeLogResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2002.py b/gate_api/models/trail_order_detail_response.py similarity index 73% rename from gate_api/models/inline_response2002.py rename to gate_api/models/trail_order_detail_response.py index 542d844a..b632eb85 100644 --- a/gate_api/models/inline_response2002.py +++ b/gate_api/models/trail_order_detail_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2002(object): +class TrailOrderDetailResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class InlineResponse2002(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'InlineResponse200', + 'data': 'TrailOrderResponse', 'timestamp': 'int' } @@ -47,8 +47,8 @@ class InlineResponse2002(object): } def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, InlineResponse200, int, Configuration) -> None - """InlineResponse2002 - a model defined in OpenAPI""" # noqa: E501 + # type: (int, str, TrailOrderResponse, int, Configuration) -> None + """TrailOrderDetailResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -70,22 +70,22 @@ def __init__(self, code=None, message=None, data=None, timestamp=None, local_var @property def code(self): - """Gets the code of this InlineResponse2002. # noqa: E501 + """Gets the code of this TrailOrderDetailResponse. # noqa: E501 Status code, 0 means success # noqa: E501 - :return: The code of this InlineResponse2002. # noqa: E501 + :return: The code of this TrailOrderDetailResponse. # noqa: E501 :rtype: int """ return self._code @code.setter def code(self, code): - """Sets the code of this InlineResponse2002. + """Sets the code of this TrailOrderDetailResponse. Status code, 0 means success # noqa: E501 - :param code: The code of this InlineResponse2002. # noqa: E501 + :param code: The code of this TrailOrderDetailResponse. # noqa: E501 :type: int """ @@ -93,22 +93,22 @@ def code(self, code): @property def message(self): - """Gets the message of this InlineResponse2002. # noqa: E501 + """Gets the message of this TrailOrderDetailResponse. # noqa: E501 Response message # noqa: E501 - :return: The message of this InlineResponse2002. # noqa: E501 + :return: The message of this TrailOrderDetailResponse. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this InlineResponse2002. + """Sets the message of this TrailOrderDetailResponse. Response message # noqa: E501 - :param message: The message of this InlineResponse2002. # noqa: E501 + :param message: The message of this TrailOrderDetailResponse. # noqa: E501 :type: str """ @@ -116,43 +116,43 @@ def message(self, message): @property def data(self): - """Gets the data of this InlineResponse2002. # noqa: E501 + """Gets the data of this TrailOrderDetailResponse. # noqa: E501 - :return: The data of this InlineResponse2002. # noqa: E501 - :rtype: InlineResponse200 + :return: The data of this TrailOrderDetailResponse. # noqa: E501 + :rtype: TrailOrderResponse """ return self._data @data.setter def data(self, data): - """Sets the data of this InlineResponse2002. + """Sets the data of this TrailOrderDetailResponse. - :param data: The data of this InlineResponse2002. # noqa: E501 - :type: InlineResponse200 + :param data: The data of this TrailOrderDetailResponse. # noqa: E501 + :type: TrailOrderResponse """ self._data = data @property def timestamp(self): - """Gets the timestamp of this InlineResponse2002. # noqa: E501 + """Gets the timestamp of this TrailOrderDetailResponse. # noqa: E501 Response timestamp (milliseconds) # noqa: E501 - :return: The timestamp of this InlineResponse2002. # noqa: E501 + :return: The timestamp of this TrailOrderDetailResponse. # noqa: E501 :rtype: int """ return self._timestamp @timestamp.setter def timestamp(self, timestamp): - """Sets the timestamp of this InlineResponse2002. + """Sets the timestamp of this TrailOrderDetailResponse. Response timestamp (milliseconds) # noqa: E501 - :param timestamp: The timestamp of this InlineResponse2002. # noqa: E501 + :param timestamp: The timestamp of this TrailOrderDetailResponse. # noqa: E501 :type: int """ @@ -192,14 +192,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2002): + if not isinstance(other, TrailOrderDetailResponse): 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, InlineResponse2002): + if not isinstance(other, TrailOrderDetailResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/trail_order_list_response.py similarity index 85% rename from gate_api/models/inline_response2001.py rename to gate_api/models/trail_order_list_response.py index 79a8c281..d1be0af4 100644 --- a/gate_api/models/inline_response2001.py +++ b/gate_api/models/trail_order_list_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2001(object): +class TrailOrderListResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -42,7 +42,7 @@ class InlineResponse2001(object): def __init__(self, orders=None, local_vars_configuration=None): # noqa: E501 # type: (list[TrailOrder], Configuration) -> None - """InlineResponse2001 - a model defined in OpenAPI""" # noqa: E501 + """TrailOrderListResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -55,20 +55,20 @@ def __init__(self, orders=None, local_vars_configuration=None): # noqa: E501 @property def orders(self): - """Gets the orders of this InlineResponse2001. # noqa: E501 + """Gets the orders of this TrailOrderListResponse. # noqa: E501 - :return: The orders of this InlineResponse2001. # noqa: E501 + :return: The orders of this TrailOrderListResponse. # noqa: E501 :rtype: list[TrailOrder] """ return self._orders @orders.setter def orders(self, orders): - """Sets the orders of this InlineResponse2001. + """Sets the orders of this TrailOrderListResponse. - :param orders: The orders of this InlineResponse2001. # noqa: E501 + :param orders: The orders of this TrailOrderListResponse. # noqa: E501 :type: list[TrailOrder] """ @@ -108,14 +108,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2001): + if not isinstance(other, TrailOrderListResponse): 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): + if not isinstance(other, TrailOrderListResponse): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trail_order_response.py b/gate_api/models/trail_order_response.py new file mode 100644 index 00000000..f0907d1c --- /dev/null +++ b/gate_api/models/trail_order_response.py @@ -0,0 +1,121 @@ +# 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 TrailOrderResponse(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': 'TrailOrder' + } + + attribute_map = { + 'order': 'order' + } + + def __init__(self, order=None, local_vars_configuration=None): # noqa: E501 + # type: (TrailOrder, Configuration) -> None + """TrailOrderResponse - 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 = None + self.discriminator = None + + if order is not None: + self.order = order + + @property + def order(self): + """Gets the order of this TrailOrderResponse. # noqa: E501 + + + :return: The order of this TrailOrderResponse. # noqa: E501 + :rtype: TrailOrder + """ + return self._order + + @order.setter + def order(self, order): + """Sets the order of this TrailOrderResponse. + + + :param order: The order of this TrailOrderResponse. # noqa: E501 + :type: TrailOrder + """ + + self._order = order + + 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, TrailOrderResponse): + 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, TrailOrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transaction_config.py b/gate_api/models/transaction_config.py new file mode 100644 index 00000000..405392fb --- /dev/null +++ b/gate_api/models/transaction_config.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 TransactionConfig(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_amount': 'float', + 'mortgage_limit': 'float' + } + + attribute_map = { + 'transaction_amount': 'transaction_amount', + 'mortgage_limit': 'mortgage_limit' + } + + def __init__(self, transaction_amount=None, mortgage_limit=None, local_vars_configuration=None): # noqa: E501 + # type: (float, float, Configuration) -> None + """TransactionConfig - 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_amount = None + self._mortgage_limit = None + self.discriminator = None + + if transaction_amount is not None: + self.transaction_amount = transaction_amount + if mortgage_limit is not None: + self.mortgage_limit = mortgage_limit + + @property + def transaction_amount(self): + """Gets the transaction_amount of this TransactionConfig. # noqa: E501 + + Trading amount requirement # noqa: E501 + + :return: The transaction_amount of this TransactionConfig. # noqa: E501 + :rtype: float + """ + return self._transaction_amount + + @transaction_amount.setter + def transaction_amount(self, transaction_amount): + """Sets the transaction_amount of this TransactionConfig. + + Trading amount requirement # noqa: E501 + + :param transaction_amount: The transaction_amount of this TransactionConfig. # noqa: E501 + :type: float + """ + + self._transaction_amount = transaction_amount + + @property + def mortgage_limit(self): + """Gets the mortgage_limit of this TransactionConfig. # noqa: E501 + + Pledge limit # noqa: E501 + + :return: The mortgage_limit of this TransactionConfig. # noqa: E501 + :rtype: float + """ + return self._mortgage_limit + + @mortgage_limit.setter + def mortgage_limit(self, mortgage_limit): + """Sets the mortgage_limit of this TransactionConfig. + + Pledge limit # noqa: E501 + + :param mortgage_limit: The mortgage_limit of this TransactionConfig. # noqa: E501 + :type: float + """ + + self._mortgage_limit = mortgage_limit + + 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, TransactionConfig): + 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, TransactionConfig): + 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 2e0b5605..81447dc5 100644 --- a/gate_api/models/trigger_order_response.py +++ b/gate_api/models/trigger_order_response.py @@ -33,25 +33,30 @@ class TriggerOrderResponse(object): and the value is json key in definition. """ openapi_types = { - 'id': 'int' + 'id': 'int', + 'id_string': 'str' } attribute_map = { - 'id': 'id' + 'id': 'id', + 'id_string': 'id_string' } - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None + def __init__(self, id=None, id_string=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None """TriggerOrderResponse - 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._id_string = None self.discriminator = None if id is not None: self.id = id + if id_string is not None: + self.id_string = id_string @property def id(self): @@ -76,6 +81,29 @@ def id(self, id): self._id = id + @property + def id_string(self): + """Gets the id_string of this TriggerOrderResponse. # noqa: E501 + + String form of the auto order ID; the same order as numeric `id`, as the decimal string of `id` to avoid int64 precision loss in JavaScript and similar environments. Prefer this field to display the order ID or when a string unique identifier is needed; one-to-one with `id`. Same meaning as the field of the same name in futures price-trigger REST APIs and in `futures.orders` / `futures.autoorders` WebSocket pushes. # noqa: E501 + + :return: The id_string of this TriggerOrderResponse. # noqa: E501 + :rtype: str + """ + return self._id_string + + @id_string.setter + def id_string(self, id_string): + """Sets the id_string of this TriggerOrderResponse. + + String form of the auto order ID; the same order as numeric `id`, as the decimal string of `id` to avoid int64 precision loss in JavaScript and similar environments. Prefer this field to display the order ID or when a string unique identifier is needed; one-to-one with `id`. Same meaning as the field of the same name in futures price-trigger REST APIs and in `futures.orders` / `futures.autoorders` WebSocket pushes. # noqa: E501 + + :param id_string: The id_string of this TriggerOrderResponse. # noqa: E501 + :type: str + """ + + self._id_string = id_string + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py index 7afe6eb4..9263a3b6 100644 --- a/gate_api/models/uid_push_withdrawal_resp.py +++ b/gate_api/models/uid_push_withdrawal_resp.py @@ -33,7 +33,7 @@ class UidPushWithdrawalResp(object): and the value is json key in definition. """ openapi_types = { - 'id': 'int' + 'id': 'str' } attribute_map = { @@ -41,7 +41,7 @@ class UidPushWithdrawalResp(object): } def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None + # type: (str, Configuration) -> None """UidPushWithdrawalResp - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -60,7 +60,7 @@ def id(self): Order ID # noqa: E501 :return: The id of this UidPushWithdrawalResp. # noqa: E501 - :rtype: int + :rtype: str """ return self._id @@ -71,7 +71,7 @@ def id(self, id): Order ID # noqa: E501 :param id: The id of this UidPushWithdrawalResp. # noqa: E501 - :type: int + :type: str """ self._id = id diff --git a/gate_api/models/inline_response2004.py b/gate_api/models/uni_chart_point.py similarity index 81% rename from gate_api/models/inline_response2004.py rename to gate_api/models/uni_chart_point.py index ddc5b927..71f30272 100644 --- a/gate_api/models/inline_response2004.py +++ b/gate_api/models/uni_chart_point.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2004(object): +class UniChartPoint(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse2004(object): def __init__(self, time=None, value=None, local_vars_configuration=None): # noqa: E501 # type: (int, str, Configuration) -> None - """InlineResponse2004 - a model defined in OpenAPI""" # noqa: E501 + """UniChartPoint - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -60,20 +60,20 @@ def __init__(self, time=None, value=None, local_vars_configuration=None): # noq @property def time(self): - """Gets the time of this InlineResponse2004. # noqa: E501 + """Gets the time of this UniChartPoint. # noqa: E501 - :return: The time of this InlineResponse2004. # noqa: E501 + :return: The time of this UniChartPoint. # noqa: E501 :rtype: int """ return self._time @time.setter def time(self, time): - """Sets the time of this InlineResponse2004. + """Sets the time of this UniChartPoint. - :param time: The time of this InlineResponse2004. # noqa: E501 + :param time: The time of this UniChartPoint. # noqa: E501 :type: int """ @@ -81,20 +81,20 @@ def time(self, time): @property def value(self): - """Gets the value of this InlineResponse2004. # noqa: E501 + """Gets the value of this UniChartPoint. # noqa: E501 - :return: The value of this InlineResponse2004. # noqa: E501 + :return: The value of this UniChartPoint. # noqa: E501 :rtype: str """ return self._value @value.setter def value(self, value): - """Sets the value of this InlineResponse2004. + """Sets the value of this UniChartPoint. - :param value: The value of this InlineResponse2004. # noqa: E501 + :param value: The value of this UniChartPoint. # noqa: E501 :type: str """ @@ -134,14 +134,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2004): + if not isinstance(other, UniChartPoint): 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, InlineResponse2004): + if not isinstance(other, UniChartPoint): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2005.py b/gate_api/models/uni_estimated_rate.py similarity index 82% rename from gate_api/models/inline_response2005.py rename to gate_api/models/uni_estimated_rate.py index 2149c695..c0db2a01 100644 --- a/gate_api/models/inline_response2005.py +++ b/gate_api/models/uni_estimated_rate.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineResponse2005(object): +class UniEstimatedRate(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineResponse2005(object): def __init__(self, currency=None, est_rate=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """InlineResponse2005 - a model defined in OpenAPI""" # noqa: E501 + """UniEstimatedRate - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -60,20 +60,20 @@ def __init__(self, currency=None, est_rate=None, local_vars_configuration=None): @property def currency(self): - """Gets the currency of this InlineResponse2005. # noqa: E501 + """Gets the currency of this UniEstimatedRate. # noqa: E501 - :return: The currency of this InlineResponse2005. # noqa: E501 + :return: The currency of this UniEstimatedRate. # noqa: E501 :rtype: str """ return self._currency @currency.setter def currency(self, currency): - """Sets the currency of this InlineResponse2005. + """Sets the currency of this UniEstimatedRate. - :param currency: The currency of this InlineResponse2005. # noqa: E501 + :param currency: The currency of this UniEstimatedRate. # noqa: E501 :type: str """ @@ -81,22 +81,22 @@ def currency(self, currency): @property def est_rate(self): - """Gets the est_rate of this InlineResponse2005. # noqa: E501 + """Gets the est_rate of this UniEstimatedRate. # noqa: E501 Estimated Annualized Rate, e.g., `est_rate`: `0.8014` represents an annualized rate of 80.14% # noqa: E501 - :return: The est_rate of this InlineResponse2005. # noqa: E501 + :return: The est_rate of this UniEstimatedRate. # noqa: E501 :rtype: str """ return self._est_rate @est_rate.setter def est_rate(self, est_rate): - """Sets the est_rate of this InlineResponse2005. + """Sets the est_rate of this UniEstimatedRate. Estimated Annualized Rate, e.g., `est_rate`: `0.8014` represents an annualized rate of 80.14% # noqa: E501 - :param est_rate: The est_rate of this InlineResponse2005. # noqa: E501 + :param est_rate: The est_rate of this UniEstimatedRate. # noqa: E501 :type: str """ @@ -136,14 +136,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2005): + if not isinstance(other, UniEstimatedRate): 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, InlineResponse2005): + if not isinstance(other, UniEstimatedRate): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py index 6f4e6b97..a7294d67 100644 --- a/gate_api/models/unified_account.py +++ b/gate_api/models/unified_account.py @@ -33,6 +33,7 @@ class UnifiedAccount(object): and the value is json key in definition. """ openapi_types = { + 'mode': 'str', 'user_id': 'int', 'refresh_time': 'int', 'locked': 'bool', @@ -57,6 +58,7 @@ class UnifiedAccount(object): } attribute_map = { + 'mode': 'mode', 'user_id': 'user_id', 'refresh_time': 'refresh_time', 'locked': 'locked', @@ -80,13 +82,14 @@ class UnifiedAccount(object): '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, options_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, str, bool, bool, bool, Configuration) -> None + def __init__(self, mode=None, 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, options_order_loss=None, spot_hedge=None, use_funding=None, is_all_collateral=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, int, bool, dict(str, UnifiedBalance), str, 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._mode = None self._user_id = None self._refresh_time = None self._locked = None @@ -110,6 +113,8 @@ def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, self._is_all_collateral = None self.discriminator = None + if mode is not None: + self.mode = mode if user_id is not None: self.user_id = user_id if refresh_time is not None: @@ -153,6 +158,29 @@ def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, if is_all_collateral is not None: self.is_all_collateral = is_all_collateral + @property + def mode(self): + """Gets the mode of this UnifiedAccount. # noqa: E501 + + Unified account mode: - classic: Classic account mode - multi_currency: Multi-currency margin mode - portfolio: Portfolio margin mode - single_currency: Single-currency margin mode # noqa: E501 + + :return: The mode of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this UnifiedAccount. + + Unified account mode: - classic: Classic account mode - multi_currency: Multi-currency margin mode - portfolio: Portfolio margin mode - single_currency: Single-currency margin mode # noqa: E501 + + :param mode: The mode of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._mode = mode + @property def user_id(self): """Gets the user_id of this UnifiedAccount. # noqa: E501 @@ -293,7 +321,7 @@ def borrowed(self, borrowed): 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 + Total initial margin (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :return: The total_initial_margin of this UnifiedAccount. # noqa: E501 :rtype: str @@ -304,7 +332,7 @@ def total_initial_margin(self): 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 + Total initial margin (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :param total_initial_margin: The total_initial_margin of this UnifiedAccount. # noqa: E501 :type: str @@ -316,7 +344,7 @@ def total_initial_margin(self, total_initial_margin): 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 + Total margin balance (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :return: The total_margin_balance of this UnifiedAccount. # noqa: E501 :rtype: str @@ -327,7 +355,7 @@ def total_margin_balance(self): 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 + Total margin balance (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :param total_margin_balance: The total_margin_balance of this UnifiedAccount. # noqa: E501 :type: str @@ -339,7 +367,7 @@ def total_margin_balance(self, total_margin_balance): 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 + Total maintenance margin (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :return: The total_maintenance_margin of this UnifiedAccount. # noqa: E501 :rtype: str @@ -350,7 +378,7 @@ def total_maintenance_margin(self): 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 + Total maintenance margin (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :param total_maintenance_margin: The total_maintenance_margin of this UnifiedAccount. # noqa: E501 :type: str @@ -362,7 +390,7 @@ def total_maintenance_margin(self, total_maintenance_margin): 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 + Total initial margin rate (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :return: The total_initial_margin_rate of this UnifiedAccount. # noqa: E501 :rtype: str @@ -373,7 +401,7 @@ def total_initial_margin_rate(self): 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 + Total initial margin rate (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :param total_initial_margin_rate: The total_initial_margin_rate of this UnifiedAccount. # noqa: E501 :type: str @@ -385,7 +413,7 @@ def total_initial_margin_rate(self, total_initial_margin_rate): 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 + Total maintenance margin rate (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :return: The total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501 :rtype: str @@ -396,7 +424,7 @@ def total_maintenance_margin_rate(self): 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 + Total maintenance margin rate (cross), effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501 :type: str @@ -431,7 +459,7 @@ def total_available_margin(self, total_available_margin): 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 + Total unified account assets, includes both cross and isolated total assets in single-currency/multi-currency mode, only cross total assets in portfolio margin mode # noqa: E501 :return: The unified_account_total of this UnifiedAccount. # noqa: E501 :rtype: str @@ -442,7 +470,7 @@ def unified_account_total(self): 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 + Total unified account assets, includes both cross and isolated total assets in single-currency/multi-currency mode, only cross total assets in portfolio margin mode # noqa: E501 :param unified_account_total: The unified_account_total of this UnifiedAccount. # noqa: E501 :type: str @@ -454,7 +482,7 @@ def unified_account_total(self, unified_account_total): 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 + Total unified account borrowed, i.e. total cross borrowed, effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :return: The unified_account_total_liab of this UnifiedAccount. # noqa: E501 :rtype: str @@ -465,7 +493,7 @@ def unified_account_total_liab(self): 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 + Total unified account borrowed, i.e. total cross borrowed, effective in multi-currency margin/portfolio margin mode, 0 in single-currency margin mode # noqa: E501 :param unified_account_total_liab: The unified_account_total_liab of this UnifiedAccount. # noqa: E501 :type: str @@ -477,7 +505,7 @@ def unified_account_total_liab(self, unified_account_total_liab): 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 + Total unified account equity, includes both cross and isolated total equity in single-currency/multi-currency mode, only cross total equity in portfolio margin mode # noqa: E501 :return: The unified_account_total_equity of this UnifiedAccount. # noqa: E501 :rtype: str @@ -488,7 +516,7 @@ def unified_account_total_equity(self): 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 + Total unified account equity, includes both cross and isolated total equity in single-currency/multi-currency mode, only cross total equity in portfolio margin mode # noqa: E501 :param unified_account_total_equity: The unified_account_total_equity of this UnifiedAccount. # noqa: E501 :type: str @@ -500,7 +528,7 @@ def unified_account_total_equity(self, unified_account_total_equity): def leverage(self): """Gets the leverage of this UnifiedAccount. # noqa: E501 - Actual leverage ratio, valid in cross-currency margin/combined margin mode # noqa: E501 + Account leverage multiplier, effective in multi-currency/portfolio margin mode (deprecated). Currency leverage query API: GET /unified/leverage/user_currency_setting # noqa: E501 :return: The leverage of this UnifiedAccount. # noqa: E501 :rtype: str @@ -511,7 +539,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this UnifiedAccount. - Actual leverage ratio, valid in cross-currency margin/combined margin mode # noqa: E501 + Account leverage multiplier, effective in multi-currency/portfolio margin mode (deprecated). Currency leverage query API: GET /unified/leverage/user_currency_setting # noqa: E501 :param leverage: The leverage of this UnifiedAccount. # noqa: E501 :type: str diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py index 03d2cab9..12e2aff3 100644 --- a/gate_api/models/unified_balance.py +++ b/gate_api/models/unified_balance.py @@ -52,7 +52,8 @@ class UnifiedBalance(object): 'mmr': 'str', 'margin_balance': 'str', 'available_margin': 'str', - 'enabled_collateral': 'bool' + 'enabled_collateral': 'bool', + 'balance_version': 'float' } attribute_map = { @@ -75,11 +76,12 @@ class UnifiedBalance(object): 'mmr': 'mmr', 'margin_balance': 'margin_balance', 'available_margin': 'available_margin', - 'enabled_collateral': 'enabled_collateral' + 'enabled_collateral': 'enabled_collateral', + 'balance_version': 'balance_version' } - 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 + 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, balance_version=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, float, Configuration) -> None """UnifiedBalance - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -105,6 +107,7 @@ def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=Non self._margin_balance = None self._available_margin = None self._enabled_collateral = None + self._balance_version = None self.discriminator = None if available is not None: @@ -147,12 +150,14 @@ def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=Non self.available_margin = available_margin if enabled_collateral is not None: self.enabled_collateral = enabled_collateral + if balance_version is not None: + self.balance_version = balance_version @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 + Cross available balance, deducted futures isolated margin occupation and frozen amount (futures isolated occupation, i.e. futures isolated balance), effective in single-currency/multi-currency/portfolio margin mode. # noqa: E501 :return: The available of this UnifiedBalance. # noqa: E501 :rtype: str @@ -163,7 +168,7 @@ def available(self): 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 + Cross available balance, deducted futures isolated margin occupation and frozen amount (futures isolated occupation, i.e. futures isolated balance), effective in single-currency/multi-currency/portfolio margin mode. # noqa: E501 :param available: The available of this UnifiedBalance. # noqa: E501 :type: str @@ -175,7 +180,7 @@ def available(self, available): 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 + Frozen amount, effective in single-currency/multi-currency/portfolio margin mode # noqa: E501 :return: The freeze of this UnifiedBalance. # noqa: E501 :rtype: str @@ -186,7 +191,7 @@ def freeze(self): 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 + Frozen amount, effective in single-currency/multi-currency/portfolio margin mode # noqa: E501 :param freeze: The freeze of this UnifiedBalance. # noqa: E501 :type: str @@ -267,7 +272,7 @@ def futures_pos_liab(self, futures_pos_liab): 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 + Currency equity amount (cross), effective in single-currency/multi-currency/portfolio margin mode # noqa: E501 :return: The equity of this UnifiedBalance. # noqa: E501 :rtype: str @@ -278,7 +283,7 @@ def equity(self): def equity(self, equity): """Sets the equity of this UnifiedBalance. - Equity, valid in single currency margin/cross currency margin/combined margin mode # noqa: E501 + Currency equity amount (cross), effective in single-currency/multi-currency/portfolio margin mode # noqa: E501 :param equity: The equity of this UnifiedBalance. # noqa: E501 :type: str @@ -428,7 +433,7 @@ def cross_balance(self, cross_balance): def iso_balance(self): """Gets the iso_balance of this UnifiedBalance. # noqa: E501 - Isolated Margin Balance applies to Single-Currency Margin Mode and Cross-Currency Margin Mode, and is 0 in other modes such as Portfolio Margin Mode. # noqa: E501 + Futures isolated balance, effective in single-currency and multi-currency margin mode, 0 in portfolio margin mode # noqa: E501 :return: The iso_balance of this UnifiedBalance. # noqa: E501 :rtype: str @@ -439,7 +444,7 @@ def iso_balance(self): def iso_balance(self, iso_balance): """Sets the iso_balance of this UnifiedBalance. - Isolated Margin Balance applies to Single-Currency Margin Mode and Cross-Currency Margin Mode, and is 0 in other modes such as Portfolio Margin Mode. # noqa: E501 + Futures isolated balance, effective in single-currency and multi-currency margin mode, 0 in portfolio margin mode # noqa: E501 :param iso_balance: The iso_balance of this UnifiedBalance. # noqa: E501 :type: str @@ -451,7 +456,7 @@ def iso_balance(self, iso_balance): 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 + Cross initial margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :return: The im of this UnifiedBalance. # noqa: E501 :rtype: str @@ -462,7 +467,7 @@ def im(self): 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 + Cross initial margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :param im: The im of this UnifiedBalance. # noqa: E501 :type: str @@ -474,7 +479,7 @@ def im(self, im): 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 + Cross maintenance margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :return: The mm of this UnifiedBalance. # noqa: E501 :rtype: str @@ -485,7 +490,7 @@ def mm(self): 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 + Cross maintenance margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :param mm: The mm of this UnifiedBalance. # noqa: E501 :type: str @@ -497,7 +502,7 @@ def mm(self, mm): 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 + Cross initial margin rate, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :return: The imr of this UnifiedBalance. # noqa: E501 :rtype: str @@ -508,7 +513,7 @@ def imr(self): 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 + Cross initial margin rate, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :param imr: The imr of this UnifiedBalance. # noqa: E501 :type: str @@ -520,7 +525,7 @@ def imr(self, imr): 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 + Cross maintenance margin rate, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :return: The mmr of this UnifiedBalance. # noqa: E501 :rtype: str @@ -531,7 +536,7 @@ def mmr(self): 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 + Cross maintenance margin rate, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :param mmr: The mmr of this UnifiedBalance. # noqa: E501 :type: str @@ -543,7 +548,7 @@ def mmr(self, mmr): 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 + Cross margin balance, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :return: The margin_balance of this UnifiedBalance. # noqa: E501 :rtype: str @@ -554,7 +559,7 @@ def margin_balance(self): 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 + Cross margin balance, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :param margin_balance: The margin_balance of this UnifiedBalance. # noqa: E501 :type: str @@ -566,7 +571,7 @@ def margin_balance(self, margin_balance): 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 + Cross available margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :return: The available_margin of this UnifiedBalance. # noqa: E501 :rtype: str @@ -577,7 +582,7 @@ def available_margin(self): 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 + Cross available margin, only effective for USDT in single-currency margin mode, 0 in multi-currency/portfolio margin mode # noqa: E501 :param available_margin: The available_margin of this UnifiedBalance. # noqa: E501 :type: str @@ -608,6 +613,29 @@ def enabled_collateral(self, enabled_collateral): self._enabled_collateral = enabled_collateral + @property + def balance_version(self): + """Gets the balance_version of this UnifiedBalance. # noqa: E501 + + Balance version number # noqa: E501 + + :return: The balance_version of this UnifiedBalance. # noqa: E501 + :rtype: float + """ + return self._balance_version + + @balance_version.setter + def balance_version(self, balance_version): + """Sets the balance_version of this UnifiedBalance. + + Balance version number # noqa: E501 + + :param balance_version: The balance_version of this UnifiedBalance. # noqa: E501 + :type: float + """ + + self._balance_version = balance_version + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/unified_quick_repay_available_item.py b/gate_api/models/unified_quick_repay_available_item.py new file mode 100644 index 00000000..652cc2cf --- /dev/null +++ b/gate_api/models/unified_quick_repay_available_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 UnifiedQuickRepayAvailableItem(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': 'str', + 'estimated_usd': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'available': 'available', + 'estimated_usd': 'estimated_usd' + } + + def __init__(self, currency=None, available=None, estimated_usd=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """UnifiedQuickRepayAvailableItem - 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 = None + self._estimated_usd = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if available is not None: + self.available = available + if estimated_usd is not None: + self.estimated_usd = estimated_usd + + @property + def currency(self): + """Gets the currency of this UnifiedQuickRepayAvailableItem. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UnifiedQuickRepayAvailableItem. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedQuickRepayAvailableItem. + + Currency name # noqa: E501 + + :param currency: The currency of this UnifiedQuickRepayAvailableItem. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def available(self): + """Gets the available of this UnifiedQuickRepayAvailableItem. # noqa: E501 + + Available Balance # noqa: E501 + + :return: The available of this UnifiedQuickRepayAvailableItem. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this UnifiedQuickRepayAvailableItem. + + Available Balance # noqa: E501 + + :param available: The available of this UnifiedQuickRepayAvailableItem. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def estimated_usd(self): + """Gets the estimated_usd of this UnifiedQuickRepayAvailableItem. # noqa: E501 + + Estimated USD value # noqa: E501 + + :return: The estimated_usd of this UnifiedQuickRepayAvailableItem. # noqa: E501 + :rtype: str + """ + return self._estimated_usd + + @estimated_usd.setter + def estimated_usd(self, estimated_usd): + """Sets the estimated_usd of this UnifiedQuickRepayAvailableItem. + + Estimated USD value # noqa: E501 + + :param estimated_usd: The estimated_usd of this UnifiedQuickRepayAvailableItem. # noqa: E501 + :type: str + """ + + self._estimated_usd = estimated_usd + + 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, UnifiedQuickRepayAvailableItem): + 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, UnifiedQuickRepayAvailableItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_quick_repay_debt_item.py b/gate_api/models/unified_quick_repay_debt_item.py new file mode 100644 index 00000000..bb942086 --- /dev/null +++ b/gate_api/models/unified_quick_repay_debt_item.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 UnifiedQuickRepayDebtItem(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', + 'debt_amount': 'str', + 'estimated_usd': 'str', + 'borrowed': 'str', + 'neg_balance': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'debt_amount': 'debt_amount', + 'estimated_usd': 'estimated_usd', + 'borrowed': 'borrowed', + 'neg_balance': 'neg_balance' + } + + def __init__(self, currency=None, debt_amount=None, estimated_usd=None, borrowed=None, neg_balance=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """UnifiedQuickRepayDebtItem - 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._debt_amount = None + self._estimated_usd = None + self._borrowed = None + self._neg_balance = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if debt_amount is not None: + self.debt_amount = debt_amount + if estimated_usd is not None: + self.estimated_usd = estimated_usd + if borrowed is not None: + self.borrowed = borrowed + if neg_balance is not None: + self.neg_balance = neg_balance + + @property + def currency(self): + """Gets the currency of this UnifiedQuickRepayDebtItem. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UnifiedQuickRepayDebtItem. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedQuickRepayDebtItem. + + Currency name # noqa: E501 + + :param currency: The currency of this UnifiedQuickRepayDebtItem. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def debt_amount(self): + """Gets the debt_amount of this UnifiedQuickRepayDebtItem. # noqa: E501 + + Debt Quantity # noqa: E501 + + :return: The debt_amount of this UnifiedQuickRepayDebtItem. # noqa: E501 + :rtype: str + """ + return self._debt_amount + + @debt_amount.setter + def debt_amount(self, debt_amount): + """Sets the debt_amount of this UnifiedQuickRepayDebtItem. + + Debt Quantity # noqa: E501 + + :param debt_amount: The debt_amount of this UnifiedQuickRepayDebtItem. # noqa: E501 + :type: str + """ + + self._debt_amount = debt_amount + + @property + def estimated_usd(self): + """Gets the estimated_usd of this UnifiedQuickRepayDebtItem. # noqa: E501 + + Estimated USD value # noqa: E501 + + :return: The estimated_usd of this UnifiedQuickRepayDebtItem. # noqa: E501 + :rtype: str + """ + return self._estimated_usd + + @estimated_usd.setter + def estimated_usd(self, estimated_usd): + """Sets the estimated_usd of this UnifiedQuickRepayDebtItem. + + Estimated USD value # noqa: E501 + + :param estimated_usd: The estimated_usd of this UnifiedQuickRepayDebtItem. # noqa: E501 + :type: str + """ + + self._estimated_usd = estimated_usd + + @property + def borrowed(self): + """Gets the borrowed of this UnifiedQuickRepayDebtItem. # noqa: E501 + + Borrowed amount # noqa: E501 + + :return: The borrowed of this UnifiedQuickRepayDebtItem. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this UnifiedQuickRepayDebtItem. + + Borrowed amount # noqa: E501 + + :param borrowed: The borrowed of this UnifiedQuickRepayDebtItem. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + @property + def neg_balance(self): + """Gets the neg_balance of this UnifiedQuickRepayDebtItem. # noqa: E501 + + Negative balance # noqa: E501 + + :return: The neg_balance of this UnifiedQuickRepayDebtItem. # noqa: E501 + :rtype: str + """ + return self._neg_balance + + @neg_balance.setter + def neg_balance(self, neg_balance): + """Sets the neg_balance of this UnifiedQuickRepayDebtItem. + + Negative balance # noqa: E501 + + :param neg_balance: The neg_balance of this UnifiedQuickRepayDebtItem. # noqa: E501 + :type: str + """ + + self._neg_balance = neg_balance + + 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, UnifiedQuickRepayDebtItem): + 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, UnifiedQuickRepayDebtItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_quick_repay_repaid_info.py b/gate_api/models/unified_quick_repay_repaid_info.py new file mode 100644 index 00000000..cd2a2880 --- /dev/null +++ b/gate_api/models/unified_quick_repay_repaid_info.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 UnifiedQuickRepayRepaidInfo(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', + 'repaid': 'str', + 'left': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'repaid': 'repaid', + 'left': 'left' + } + + def __init__(self, currency=None, repaid=None, left=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """UnifiedQuickRepayRepaidInfo - 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._repaid = None + self._left = None + self.discriminator = None + + self.currency = currency + self.repaid = repaid + self.left = left + + @property + def currency(self): + """Gets the currency of this UnifiedQuickRepayRepaidInfo. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UnifiedQuickRepayRepaidInfo. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedQuickRepayRepaidInfo. + + Currency name # noqa: E501 + + :param currency: The currency of this UnifiedQuickRepayRepaidInfo. # 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 repaid(self): + """Gets the repaid of this UnifiedQuickRepayRepaidInfo. # noqa: E501 + + Repaid amount # noqa: E501 + + :return: The repaid of this UnifiedQuickRepayRepaidInfo. # noqa: E501 + :rtype: str + """ + return self._repaid + + @repaid.setter + def repaid(self, repaid): + """Sets the repaid of this UnifiedQuickRepayRepaidInfo. + + Repaid amount # noqa: E501 + + :param repaid: The repaid of this UnifiedQuickRepayRepaidInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and repaid is None: # noqa: E501 + raise ValueError("Invalid value for `repaid`, must not be `None`") # noqa: E501 + + self._repaid = repaid + + @property + def left(self): + """Gets the left of this UnifiedQuickRepayRepaidInfo. # noqa: E501 + + Remaining liability amount # noqa: E501 + + :return: The left of this UnifiedQuickRepayRepaidInfo. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this UnifiedQuickRepayRepaidInfo. + + Remaining liability amount # noqa: E501 + + :param left: The left of this UnifiedQuickRepayRepaidInfo. # 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, UnifiedQuickRepayRepaidInfo): + 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, UnifiedQuickRepayRepaidInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_quick_repay_used_info.py b/gate_api/models/unified_quick_repay_used_info.py new file mode 100644 index 00000000..b6f54b04 --- /dev/null +++ b/gate_api/models/unified_quick_repay_used_info.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 UnifiedQuickRepayUsedInfo(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', + 'used': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'used': 'used' + } + + def __init__(self, currency=None, used=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """UnifiedQuickRepayUsedInfo - 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._used = None + self.discriminator = None + + self.currency = currency + self.used = used + + @property + def currency(self): + """Gets the currency of this UnifiedQuickRepayUsedInfo. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UnifiedQuickRepayUsedInfo. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedQuickRepayUsedInfo. + + Currency name # noqa: E501 + + :param currency: The currency of this UnifiedQuickRepayUsedInfo. # 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 used(self): + """Gets the used of this UnifiedQuickRepayUsedInfo. # noqa: E501 + + Amount converted # noqa: E501 + + :return: The used of this UnifiedQuickRepayUsedInfo. # noqa: E501 + :rtype: str + """ + return self._used + + @used.setter + def used(self, used): + """Sets the used of this UnifiedQuickRepayUsedInfo. + + Amount converted # noqa: E501 + + :param used: The used of this UnifiedQuickRepayUsedInfo. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and used is None: # noqa: E501 + raise ValueError("Invalid value for `used`, must not be `None`") # noqa: E501 + + self._used = used + + 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, UnifiedQuickRepayUsedInfo): + 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, UnifiedQuickRepayUsedInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_object.py b/gate_api/models/update_dual_comp_position_cross_mode_request.py similarity index 79% rename from gate_api/models/inline_object.py rename to gate_api/models/update_dual_comp_position_cross_mode_request.py index 8c1ba1bd..270ff3c0 100644 --- a/gate_api/models/inline_object.py +++ b/gate_api/models/update_dual_comp_position_cross_mode_request.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineObject(object): +class UpdateDualCompPositionCrossModeRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineObject(object): 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 + """UpdateDualCompPositionCrossModeRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,22 +58,22 @@ def __init__(self, mode=None, contract=None, local_vars_configuration=None): # @property def mode(self): - """Gets the mode of this InlineObject. # noqa: E501 + """Gets the mode of this UpdateDualCompPositionCrossModeRequest. # noqa: E501 Cross/isolated margin mode. ISOLATED - isolated margin, CROSS - cross margin # noqa: E501 - :return: The mode of this InlineObject. # noqa: E501 + :return: The mode of this UpdateDualCompPositionCrossModeRequest. # noqa: E501 :rtype: str """ return self._mode @mode.setter def mode(self, mode): - """Sets the mode of this InlineObject. + """Sets the mode of this UpdateDualCompPositionCrossModeRequest. Cross/isolated margin mode. ISOLATED - isolated margin, CROSS - cross margin # noqa: E501 - :param mode: The mode of this InlineObject. # noqa: E501 + :param mode: The mode of this UpdateDualCompPositionCrossModeRequest. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501 @@ -83,22 +83,22 @@ def mode(self, mode): @property def contract(self): - """Gets the contract of this InlineObject. # noqa: E501 + """Gets the contract of this UpdateDualCompPositionCrossModeRequest. # noqa: E501 Futures market # noqa: E501 - :return: The contract of this InlineObject. # noqa: E501 + :return: The contract of this UpdateDualCompPositionCrossModeRequest. # noqa: E501 :rtype: str """ return self._contract @contract.setter def contract(self, contract): - """Sets the contract of this InlineObject. + """Sets the contract of this UpdateDualCompPositionCrossModeRequest. Futures market # noqa: E501 - :param contract: The contract of this InlineObject. # noqa: E501 + :param contract: The contract of this UpdateDualCompPositionCrossModeRequest. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 @@ -140,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineObject): + if not isinstance(other, UpdateDualCompPositionCrossModeRequest): 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): + if not isinstance(other, UpdateDualCompPositionCrossModeRequest): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/upload_chat_file.py b/gate_api/models/upload_chat_file.py index f177df63..827b4567 100644 --- a/gate_api/models/upload_chat_file.py +++ b/gate_api/models/upload_chat_file.py @@ -60,7 +60,7 @@ def __init__(self, image_content_type=None, base64_img=None, local_vars_configur def image_content_type(self): """Gets the image_content_type of this UploadChatFile. # noqa: E501 - File type, currently only images and videos are supported # noqa: E501 + File MIME type: supports `image/jpeg`, `image/jpg`, `image/png`, `video/mp4`. # noqa: E501 :return: The image_content_type of this UploadChatFile. # noqa: E501 :rtype: str @@ -71,13 +71,19 @@ def image_content_type(self): def image_content_type(self, image_content_type): """Sets the image_content_type of this UploadChatFile. - File type, currently only images and videos are supported # noqa: E501 + File MIME type: supports `image/jpeg`, `image/jpg`, `image/png`, `video/mp4`. # noqa: E501 :param image_content_type: The image_content_type of this UploadChatFile. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and image_content_type is None: # noqa: E501 raise ValueError("Invalid value for `image_content_type`, must not be `None`") # noqa: E501 + allowed_values = ["image/jpeg", "image/jpg", "image/png", "video/mp4"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and image_content_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `image_content_type` ({0}), must be one of {1}" # noqa: E501 + .format(image_content_type, allowed_values) + ) self._image_content_type = image_content_type @@ -85,7 +91,7 @@ def image_content_type(self, image_content_type): def base64_img(self): """Gets the base64_img of this UploadChatFile. # noqa: E501 - File content (base64 encoded) # noqa: E501 + Base64 file content; max 20 MB. # noqa: E501 :return: The base64_img of this UploadChatFile. # noqa: E501 :rtype: str @@ -96,7 +102,7 @@ def base64_img(self): def base64_img(self, base64_img): """Sets the base64_img of this UploadChatFile. - File content (base64 encoded) # noqa: E501 + Base64 file content; max 20 MB. # noqa: E501 :param base64_img: The base64_img of this UploadChatFile. # noqa: E501 :type: str diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py index c671b40c..54c00bb5 100644 --- a/gate_api/models/withdrawal_record.py +++ b/gate_api/models/withdrawal_record.py @@ -381,7 +381,7 @@ def fail_reason(self, fail_reason): 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 + Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE, it is the withdrawal success time # noqa: E501 :return: The timestamp2 of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -392,7 +392,7 @@ def timestamp2(self): 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 + Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE, it is the withdrawal success time # noqa: E501 :param timestamp2: The timestamp2 of this WithdrawalRecord. # noqa: E501 :type: str @@ -427,7 +427,7 @@ def memo(self, memo): def status(self): """Gets the status of this WithdrawalRecord. # noqa: E501 - Transaction Status - BCODE: Deposit Code Operation - CANCEL: Cancelled - CANCELPEND: Withdrawal Cancellation Pending - DONE: Completed (Only considered truly on-chain when block_number > 0) - EXTPEND: Sent and Waiting for Confirmation - FAIL: On-Chain Failure Pending Confirmation - FVERIFY: Facial Verification in Progress - LOCKED: Wallet-Side Order Locked - MANUAL: Pending Manual Review - REJECT: Rejected - REQUEST: Request in Progress - REVIEW: Under Review # noqa: E501 + Transaction Status - BCODE: Deposit Code Operation - CANCEL: Cancelled - CANCELPEND: Withdrawal Cancellation Pending - DONE: Completed - EXTPEND: Sent and Waiting for Confirmation - FAIL: On-Chain Failure Pending Confirmation - FVERIFY: Facial Verification in Progress - LOCKED: Wallet-Side Order Locked - MANUAL: Pending Manual Review - REJECT: Rejected - REQUEST: Request in Progress - REVIEW: Under Review # noqa: E501 :return: The status of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -438,7 +438,7 @@ def status(self): def status(self, status): """Sets the status of this WithdrawalRecord. - Transaction Status - BCODE: Deposit Code Operation - CANCEL: Cancelled - CANCELPEND: Withdrawal Cancellation Pending - DONE: Completed (Only considered truly on-chain when block_number > 0) - EXTPEND: Sent and Waiting for Confirmation - FAIL: On-Chain Failure Pending Confirmation - FVERIFY: Facial Verification in Progress - LOCKED: Wallet-Side Order Locked - MANUAL: Pending Manual Review - REJECT: Rejected - REQUEST: Request in Progress - REVIEW: Under Review # noqa: E501 + Transaction Status - BCODE: Deposit Code Operation - CANCEL: Cancelled - CANCELPEND: Withdrawal Cancellation Pending - DONE: Completed - EXTPEND: Sent and Waiting for Confirmation - FAIL: On-Chain Failure Pending Confirmation - FVERIFY: Facial Verification in Progress - LOCKED: Wallet-Side Order Locked - MANUAL: Pending Manual Review - REJECT: Rejected - REQUEST: Request in Progress - REVIEW: Under Review # noqa: E501 :param status: The status of this WithdrawalRecord. # noqa: E501 :type: str diff --git a/setup.py b/setup.py index b762216c..a85d28d3 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "7.2.39" +VERSION = "7.2.100" # To install the library, run the following # # python setup.py install