From 2cc45514af28a18aece67a481f6bb31a0ed2e91e Mon Sep 17 00:00:00 2001 From: gate Date: Thu, 25 Jun 2026 14:16:19 +0000 Subject: [PATCH 1/3] update to v7.2.99 --- README.md | 76 +- docs/AssetswapApi.md | 4 +- docs/AwardListStructList.md | 2 +- docs/BatchAmendItem.md | 2 + docs/BatchAmendOrderReq.md | 1 + docs/BatchOrder.md | 4 +- docs/BotApi.md | 4 +- docs/ChaseOrder.md | 45 + docs/Contract.md | 1 + docs/ContractStat.md | 10 + docs/CouponApi.md | 4 +- docs/CreateChaseOrderReq.md | 23 + docs/CreateChaseOrderResp.md | 10 + docs/CrossExApi.md | 82 +- docs/CrossexAccount.md | 2 +- docs/CrossexAccountBookRecord.md | 2 +- docs/CrossexAccountUpdateRequest.md | 2 +- docs/CrossexAccountUpdateResponse.md | 2 +- docs/CrossexOrder.md | 6 +- docs/CrossexOrderRequest.md | 2 +- docs/CrossexTransferRecord.md | 4 +- docs/CrossexTransferRequest.md | 4 +- docs/Currency.md | 2 +- docs/DeltaNeutralEnabled.md | 10 + docs/DepositRecord.md | 1 + docs/DualGetOrders.md | 1 - docs/DualGetPlans.md | 6 +- docs/FuturesApi.md | 451 ++++++- docs/FuturesBatchAmendOrderRequest.md | 1 + docs/FuturesOrder.md | 5 + docs/FuturesOrderAmendment.md | 1 + docs/FuturesOrderTimerange.md | 2 + docs/FuturesPriceTriggeredOrder.md | 1 + docs/GateErrorResponse.md | 12 + docs/GetChaseOrderDetailResp.md | 10 + docs/GetChaseOrdersResp.md | 10 + docs/InfiniteGridCreateParams.md | 2 +- docs/OTCApi.md | 438 ++++++- docs/Order.md | 4 +- docs/OrderListStructList.md | 2 +- docs/OrderLog.md | 11 + docs/OrderLogData.md | 18 + docs/OrderPatch.md | 2 + docs/OtcBankCreateMultipartRequest.md | 20 + docs/OtcBankCreateResponse.md | 14 + docs/OtcBankCreateResponseData.md | 11 + ...ankEnterpriseSupplementMultipartRequest.md | 18 + docs/OtcBankIdRequest.md | 10 + ...cBankPersonalSupplementMultipartRequest.md | 14 + docs/OtcBankSupplementChecklistItem.md | 13 + ... => OtcBankSupplementChecklistResponse.md} | 6 +- .../OtcBankSupplementChecklistResponseData.md | 11 + docs/OtcMarkOrderPaidRequest.md | 5 +- docs/OtcOrderDetail.md | 3 +- docs/OtcOrderListItem.md | 3 +- docs/OtcOrderRequest.md | 2 +- docs/OtcUserDefaultBank.md | 16 - docs/P2pApi.md | 72 ++ docs/P2pChatMessage.md | 2 + ...pMerchantBooksPlaceBizPushOrderResponse.md | 4 +- ...chantBooksPlaceBizPushOrderResponseData.md | 12 + ...sPlaceBizPushOrderResponseDataRiskEvent.md | 17 + ...BizPushOrderResponseDataRiskEventAction.md | 13 + docs/P2pMerchantWorkHours.md | 10 + docs/P2pMerchantWorkHoursResponse.md | 15 + docs/P2pSendChatMessageResult.md | 5 + docs/PartnerDataAggregated.md | 8 +- docs/PlaceBizPushOrder.md | 4 +- docs/PlaceDualInvestmentOrder.md | 1 - docs/PlaceDualInvestmentOrderParams.md | 2 +- docs/Position.md | 3 + docs/PositionHistoryListData.md | 2 + docs/QuickEstimatedRepayment.md | 11 + docs/QuickRepaymentRequest.md | 11 + docs/QuickRepaymentResponse.md | 13 + docs/RebateApi.md | 14 +- docs/SendChatMessageRequest.md | 2 +- docs/SetMerchantWorkHoursRequest.md | 16 + docs/SpotMartingaleCreateParams.md | 2 +- docs/SpotOrderStopLoss.md | 12 + docs/SpotOrderStopProfit.md | 12 + docs/StopAllChaseOrdersReq.md | 13 + docs/StopAllChaseOrdersResp.md | 10 + docs/StopChaseOrderReq.md | 13 + docs/StopChaseOrderResp.md | 10 + docs/Symbol.md | 2 +- docs/TradFiApi.md | 77 +- docs/TradFiClosePositionRequest.md | 4 +- docs/TradFiPositionUpdateRequest.md | 4 +- docs/UnifiedApi.md | 281 +++++ docs/UnifiedQuickRepayAvailableItem.md | 12 + docs/UnifiedQuickRepayDebtItem.md | 14 + docs/UnifiedQuickRepayRepaidInfo.md | 13 + docs/UnifiedQuickRepayUsedInfo.md | 12 + docs/WalletApi.md | 16 +- docs/WelfareApi.md | 6 +- example/p2p_merchant_api.py | 22 +- gate_api/__init__.py | 41 +- gate_api/api/assetswap_api.py | 8 +- gate_api/api/bot_api.py | 8 +- gate_api/api/coupon_api.py | 8 +- gate_api/api/cross_ex_api.py | 75 +- gate_api/api/futures_api.py | 1067 ++++++++++++++--- gate_api/api/otc_api.py | 810 ++++++++++++- gate_api/api/p2p_api.py | 120 ++ gate_api/api/rebate_api.py | 20 +- gate_api/api/trad_fi_api.py | 122 ++ gate_api/api/unified_api.py | 444 +++++++ gate_api/api/wallet_api.py | 27 +- gate_api/api/welfare_api.py | 12 +- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 +- gate_api/models/__init__.py | 39 +- gate_api/models/award_list_struct_list.py | 4 +- gate_api/models/batch_amend_item.py | 60 +- gate_api/models/batch_amend_order_req.py | 36 +- gate_api/models/batch_order.py | 64 +- gate_api/models/chase_order.py | 1015 ++++++++++++++++ gate_api/models/contract.py | 36 +- gate_api/models/contract_stat.py | 288 ++++- gate_api/models/create_chase_order_req.py | 462 +++++++ gate_api/models/create_chase_order_resp.py | 123 ++ gate_api/models/crossex_account.py | 4 +- .../models/crossex_account_book_record.py | 4 +- .../models/crossex_account_update_request.py | 4 +- .../models/crossex_account_update_response.py | 4 +- gate_api/models/crossex_order.py | 12 +- gate_api/models/crossex_order_request.py | 4 +- gate_api/models/crossex_transfer_record.py | 6 +- gate_api/models/crossex_transfer_request.py | 8 +- gate_api/models/currency.py | 4 +- gate_api/models/delta_neutral_enabled.py | 124 ++ gate_api/models/deposit_record.py | 32 +- gate_api/models/dual_get_orders.py | 32 +- gate_api/models/dual_get_plans.py | 118 +- .../futures_batch_amend_order_request.py | 36 +- gate_api/models/futures_order.py | 148 ++- gate_api/models/futures_order_amendment.py | 36 +- gate_api/models/futures_order_timerange.py | 64 +- .../models/futures_price_triggered_order.py | 42 +- gate_api/models/gate_error_response.py | 151 +++ .../models/get_chase_order_detail_resp.py | 121 ++ gate_api/models/get_chase_orders_resp.py | 121 ++ gate_api/models/order.py | 64 +- gate_api/models/order_list_struct_list.py | 4 +- gate_api/models/order_log.py | 149 +++ gate_api/models/order_log_data.py | 331 +++++ gate_api/models/order_patch.py | 60 +- .../otc_bank_create_multipart_request.py | 364 ++++++ ...esponse.py => otc_bank_create_response.py} | 53 +- .../models/otc_bank_create_response_data.py | 153 +++ ...enterprise_supplement_multipart_request.py | 320 +++++ gate_api/models/otc_bank_id_request.py | 124 ++ ...k_personal_supplement_multipart_request.py | 209 ++++ .../otc_bank_supplement_checklist_item.py | 205 ++++ .../otc_bank_supplement_checklist_response.py | 202 ++++ ...bank_supplement_checklist_response_data.py | 157 +++ .../models/otc_mark_order_paid_request.py | 93 +- gate_api/models/otc_order_detail.py | 36 +- gate_api/models/otc_order_list_item.py | 36 +- gate_api/models/otc_order_request.py | 4 +- gate_api/models/otc_user_default_bank.py | 286 ----- gate_api/models/p2p_chat_message.py | 70 +- ...ant_books_place_biz_push_order_response.py | 14 +- ...ooks_place_biz_push_order_response_data.py | 149 +++ ...biz_push_order_response_data_risk_event.py | 303 +++++ ...h_order_response_data_risk_event_action.py | 219 ++++ gate_api/models/p2p_merchant_work_hours.py | 129 ++ .../p2p_merchant_work_hours_response.py | 261 ++++ .../models/p2p_send_chat_message_result.py | 160 ++- gate_api/models/partner_data_aggregated.py | 16 +- gate_api/models/place_biz_push_order.py | 8 +- .../models/place_dual_investment_order.py | 32 +- .../place_dual_investment_order_params.py | 4 +- gate_api/models/position.py | 94 +- gate_api/models/position_history_list_data.py | 60 +- gate_api/models/quick_estimated_repayment.py | 151 +++ gate_api/models/quick_repayment_request.py | 153 +++ gate_api/models/quick_repayment_response.py | 182 +++ gate_api/models/send_chat_message_request.py | 4 +- .../models/set_merchant_work_hours_request.py | 276 +++++ gate_api/models/spot_order_stop_loss.py | 151 +++ gate_api/models/spot_order_stop_profit.py | 151 +++ gate_api/models/stop_all_chase_orders_req.py | 179 +++ gate_api/models/stop_all_chase_orders_resp.py | 121 ++ gate_api/models/stop_chase_order_req.py | 179 +++ gate_api/models/stop_chase_order_resp.py | 121 ++ gate_api/models/symbol.py | 4 +- .../models/trad_fi_close_position_request.py | 8 +- .../models/trad_fi_position_update_request.py | 8 +- .../unified_quick_repay_available_item.py | 179 +++ .../models/unified_quick_repay_debt_item.py | 235 ++++ .../models/unified_quick_repay_repaid_info.py | 182 +++ .../models/unified_quick_repay_used_info.py | 153 +++ setup.py | 2 +- 195 files changed, 13948 insertions(+), 1030 deletions(-) create mode 100644 docs/ChaseOrder.md create mode 100644 docs/CreateChaseOrderReq.md create mode 100644 docs/CreateChaseOrderResp.md create mode 100644 docs/DeltaNeutralEnabled.md create mode 100644 docs/GateErrorResponse.md create mode 100644 docs/GetChaseOrderDetailResp.md create mode 100644 docs/GetChaseOrdersResp.md create mode 100644 docs/OrderLog.md create mode 100644 docs/OrderLogData.md create mode 100644 docs/OtcBankCreateMultipartRequest.md create mode 100644 docs/OtcBankCreateResponse.md create mode 100644 docs/OtcBankCreateResponseData.md create mode 100644 docs/OtcBankEnterpriseSupplementMultipartRequest.md create mode 100644 docs/OtcBankIdRequest.md create mode 100644 docs/OtcBankPersonalSupplementMultipartRequest.md create mode 100644 docs/OtcBankSupplementChecklistItem.md rename docs/{OtcUserDefaultBankResponse.md => OtcBankSupplementChecklistResponse.md} (64%) create mode 100644 docs/OtcBankSupplementChecklistResponseData.md delete mode 100644 docs/OtcUserDefaultBank.md create mode 100644 docs/P2pMerchantBooksPlaceBizPushOrderResponseData.md create mode 100644 docs/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent.md create mode 100644 docs/P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEventAction.md create mode 100644 docs/P2pMerchantWorkHours.md create mode 100644 docs/P2pMerchantWorkHoursResponse.md create mode 100644 docs/QuickEstimatedRepayment.md create mode 100644 docs/QuickRepaymentRequest.md create mode 100644 docs/QuickRepaymentResponse.md create mode 100644 docs/SetMerchantWorkHoursRequest.md create mode 100644 docs/SpotOrderStopLoss.md create mode 100644 docs/SpotOrderStopProfit.md create mode 100644 docs/StopAllChaseOrdersReq.md create mode 100644 docs/StopAllChaseOrdersResp.md create mode 100644 docs/StopChaseOrderReq.md create mode 100644 docs/StopChaseOrderResp.md create mode 100644 docs/UnifiedQuickRepayAvailableItem.md create mode 100644 docs/UnifiedQuickRepayDebtItem.md create mode 100644 docs/UnifiedQuickRepayRepaidInfo.md create mode 100644 docs/UnifiedQuickRepayUsedInfo.md create mode 100644 gate_api/models/chase_order.py create mode 100644 gate_api/models/create_chase_order_req.py create mode 100644 gate_api/models/create_chase_order_resp.py create mode 100644 gate_api/models/delta_neutral_enabled.py create mode 100644 gate_api/models/gate_error_response.py create mode 100644 gate_api/models/get_chase_order_detail_resp.py create mode 100644 gate_api/models/get_chase_orders_resp.py create mode 100644 gate_api/models/order_log.py create mode 100644 gate_api/models/order_log_data.py create mode 100644 gate_api/models/otc_bank_create_multipart_request.py rename gate_api/models/{otc_user_default_bank_response.py => otc_bank_create_response.py} (71%) create mode 100644 gate_api/models/otc_bank_create_response_data.py create mode 100644 gate_api/models/otc_bank_enterprise_supplement_multipart_request.py create mode 100644 gate_api/models/otc_bank_id_request.py create mode 100644 gate_api/models/otc_bank_personal_supplement_multipart_request.py create mode 100644 gate_api/models/otc_bank_supplement_checklist_item.py create mode 100644 gate_api/models/otc_bank_supplement_checklist_response.py create mode 100644 gate_api/models/otc_bank_supplement_checklist_response_data.py delete mode 100644 gate_api/models/otc_user_default_bank.py create mode 100644 gate_api/models/p2p_merchant_books_place_biz_push_order_response_data.py create mode 100644 gate_api/models/p2p_merchant_books_place_biz_push_order_response_data_risk_event.py create mode 100644 gate_api/models/p2p_merchant_books_place_biz_push_order_response_data_risk_event_action.py create mode 100644 gate_api/models/p2p_merchant_work_hours.py create mode 100644 gate_api/models/p2p_merchant_work_hours_response.py create mode 100644 gate_api/models/quick_estimated_repayment.py create mode 100644 gate_api/models/quick_repayment_request.py create mode 100644 gate_api/models/quick_repayment_response.py create mode 100644 gate_api/models/set_merchant_work_hours_request.py create mode 100644 gate_api/models/spot_order_stop_loss.py create mode 100644 gate_api/models/spot_order_stop_profit.py create mode 100644 gate_api/models/stop_all_chase_orders_req.py create mode 100644 gate_api/models/stop_all_chase_orders_resp.py create mode 100644 gate_api/models/stop_chase_order_req.py create mode 100644 gate_api/models/stop_chase_order_resp.py create mode 100644 gate_api/models/unified_quick_repay_available_item.py create mode 100644 gate_api/models/unified_quick_repay_debt_item.py create mode 100644 gate_api/models/unified_quick_repay_repaid_info.py create mode 100644 gate_api/models/unified_quick_repay_used_info.py diff --git a/README.md b/README.md index 6f3aaf1d..062c416e 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.78 -- Package version: 7.2.78 +- API version: v4.106.99 +- Package version: 7.2.99 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) @@ -116,9 +116,9 @@ Class | Method | HTTP request | Description *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 | 查询币对信息 -*CrossExApi* | [**list_crossex_rule_risk_limits**](docs/CrossExApi.md#list_crossex_rule_risk_limits) | **GET** /crossex/rule/risk_limits | 查询风险限额信息 -*CrossExApi* | [**list_crossex_transfer_coins**](docs/CrossExApi.md#list_crossex_transfer_coins) | **GET** /crossex/transfers/coin | 查询划转币种支持 +*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 @@ -169,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 @@ -202,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 @@ -228,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 @@ -337,6 +347,7 @@ Class | Method | HTTP request | Description *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 @@ -394,12 +405,17 @@ 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 @@ -471,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 @@ -545,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 @@ -664,6 +681,7 @@ Class | Method | HTTP request | Description - [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) @@ -689,6 +707,8 @@ Class | Method | HTTP request | Description - [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) @@ -764,6 +784,7 @@ Class | Method | HTTP request | Description - [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) @@ -852,7 +873,10 @@ 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) @@ -984,15 +1008,26 @@ Class | Method | HTTP request | Description - [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) @@ -1010,8 +1045,6 @@ Class | Method | HTTP request | Description - [OtcStableCoinOrderListResponse](docs/OtcStableCoinOrderListResponse.md) - [OtcStableCoinOrderListResult](docs/OtcStableCoinOrderListResult.md) - [OtcStableCoinOrderRequest](docs/OtcStableCoinOrderRequest.md) - - [OtcUserDefaultBank](docs/OtcUserDefaultBank.md) - - [OtcUserDefaultBankResponse](docs/OtcUserDefaultBankResponse.md) - [OtherContact](docs/OtherContact.md) - [P2pAdDetail](docs/P2pAdDetail.md) - [P2pAdDetailResponse](docs/P2pAdDetailResponse.md) @@ -1026,9 +1059,14 @@ Class | Method | HTTP request | Description - [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) @@ -1082,6 +1120,9 @@ Class | Method | HTTP request | Description - [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) @@ -1099,6 +1140,7 @@ 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) @@ -1110,10 +1152,16 @@ Class | Method | HTTP request | Description - [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) @@ -1200,6 +1248,10 @@ 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) diff --git a/docs/AssetswapApi.md b/docs/AssetswapApi.md index 9e334bae..95924979 100644 --- a/docs/AssetswapApi.md +++ b/docs/AssetswapApi.md @@ -221,7 +221,7 @@ Name | Type | Description | Notes Portfolio optimization — place order -将账户内若干源币种按指定数量换入目标币种侧配置,**正式下单前强烈建议先调用** `POST /asset-swap/order/preview` **且 `code=0` 后再用一致的语义提交本接口**。 **请求体不含 `ratio`** - 本接口 `OrderCreateV1Req` 仅含 `from` / `to`,且数组元素均为 `CreateParam`(**仅** `asset` + `amount`)。**请勿**在下单 JSON 中传入 `ratio`;比例字段 `ratio` 只存在于预览接口 `OrderPreviewV1Req.to`(`PreviewToParam`)。 **与预览接口的关键差异(易错点)** - 本接口 `to` 数组元素为 `CreateParam`:**`asset` + `amount`(目标侧数量,十进制字符串)**。 - 预览接口 `to` 为 **`asset` + `ratio`(比例字符串)**,**二者不可混用**:不要把预览里的 `ratio` 原样填到下单的 `amount`,也不要把下单的 `amount` 当成预览的 `ratio`。 **推荐调用顺序** 1. `GET /asset-swap/asset/list`:确认币种支持。 2. `GET /asset-swap/config`:读取 `recommend` / `recommend_v2`(如 `recommend_v2.market` 下某策略的 `schemes`,将 `scheme.name` 作为目标 `asset`、`scheme.ratio` 仅用于 **preview** 的 `to[].ratio`)。 3. `GET /asset-swap/evaluate`(可选):参考可卖数量。 4. `POST /asset-swap/order/preview`:`from` 与 `to`(比例)构造询价。 5. 预览成功后,按产品/服务端约定将预览结果映射为下单的 `from`/`to`(**均为 amount**)再调用本接口。 **字段约定** - `from`:卖出侧,每项为 `asset` + `amount`(字符串,十进制,表示该币种卖出数量)。 - `to`:买入/目标侧,每项为 `asset` + **`amount`**(字符串,十进制,表示该目标币种侧数量;语义与预览的 `ratio` 不同)。 - 本接口仅校验上述 `amount` 的精度与范围;不满足时返回非 0 `code` 及 `message`。预览侧 `to[].ratio` 的校验规则见 `POST /asset-swap/order/preview` 文档。 +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 @@ -371,7 +371,7 @@ Name | Type | Description | Notes Portfolio optimization — preview -根据卖出币种数量与**目标分配比例**估算成交与费用,**不写入订单**。`code=0` 时 `data` 含预估 `order` 与 `transaction_fee`。 **与下单接口的关键差异(易错点)** - 本接口 `to` 数组元素为 `PreviewToParam`:**`asset` + `ratio`(比例,十进制字符串)**,表示目标币种在组合中的权重/占比。 - 下单接口 `POST /asset-swap/order/create` 的 `to` 为 **`asset` + `amount`(绝对数量)**,**不是** `ratio`。调用方切勿把两套字段混用。 **如何构造 `to`(ratio)** - 优先从 `GET /asset-swap/config` 的 `data.recommend_v2` 取值:按分组键(如 `market`、`faith`、`conservative`)找到策略列表中的某条 `RecommendV2Strategy`(如 `name` 为 `top2`),将其 `schemes` 映射为预览请求: - `to[].asset` ← `scheme.name`(目标币种符号) - `to[].ratio` ← `scheme.ratio`(与配置一致的比例字符串) - 亦可使用 `recommend` 下扁平 map(币种 → 比例字符串)自行展开为多元素 `to`(每项一个 `asset` + `ratio`)。 - 多目标时各 `ratio` 建议与前端/运营配置一致;是否需加总为 1 以服务端校验为准。 **`from`(卖出侧)** - 每项为 `asset` + `amount`(字符串,十进制),表示本次参与换出的该币种数量。币种应在 `GET /asset-swap/asset/list` 支持范围内;数量级过小或市场深度不足时可能返回非 0 `code`(如无法询价)。 **与下单的衔接** - 预览成功后,将业务允许的预览结果转换为下单所需的 **`from`/`to` 全为 amount** 的请求体再调用 create(具体映射规则以产品文档或服务端约定为准)。 +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 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/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 810f0a2b..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 设置为 ioc - poc: 未满足挂单策略,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - 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 index 2a121543..0516efbf 100644 --- a/docs/BotApi.md +++ b/docs/BotApi.md @@ -21,7 +21,7 @@ Method | HTTP request | Description Get AIHub strategy recommendations -discover 域唯一正式接口。 支持场景: - `top1` - `bundle` - `filter` - `refresh` 约束: - 主动推荐池仅包含 `spot_grid`、`futures_grid`、`spot_martingale` - 可返回但不主动推荐 `infinite_grid`、`margin_grid` - 不得返回 `contract_martingale`、`smart-position`、`spot-future-arbitrage` - `scene=filter` 时只允许按 `market`、`backtest_apr_gte`、`max_drawdown_lte` 过滤 - `scene=refresh` 通过 `refresh_recommendation_id` 承接刷新上下文;正式最小格式只要求 `strategy_type|market` - 若上游直接透传上一条推荐的 `recommendation_id`,其中第三段 `backtest_id` 当前会被忽略 +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 @@ -422,7 +422,7 @@ Name | Type | Description | Notes Create Spot Martin -根据传入参数创建现货马丁策略。 止损口径与 App / `MartingaleBot` 一致: - 使用 **`create_params.stop_loss_per_cycle`**(每轮止损比例,小数字符串),**不要**使用 `stop_loss_price` 表达创建侧止损。 - 详情页展示的「止损价」由引擎按轮次计算;创建侧可选 **`create_params.trigger_price`**(触发价)。 +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 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/Contract.md b/docs/Contract.md index 5e7dbc58..a61975b8 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -51,6 +51,7 @@ Name | Type | Description | Notes **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/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/CouponApi.md b/docs/CouponApi.md index 8f8bf3b9..0ad95f98 100644 --- a/docs/CouponApi.md +++ b/docs/CouponApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description Coupon Center list -## 接口说明 卡券中心通用列表接口,返回当前登录用户的所有卡券(支持分页、筛选类型、有效/失效切换)。 --- ## 入参(Query Parameters) | 参数名 | 类型 | 必填 | 默认值 | 约束 | 说明 | |--------|------|------|--------|------|------| | `expired` | integer | 否 | `0` | `0` 或 `1` | `0` = 查询有效卡券;`1` = 查询已失效/已使用卡券 | | `limit` | integer | 否 | `10` | 1 ~ 20 | 每页返回的卡券数量 | | `last_id` | integer | 否 | `0` | 1 ~ 1000000000 | 游标分页:上一页最后一条记录的 `id`,首页不传 | | `expire_time` | integer | 否 | `0` | 1 ~ 2147483647 | 游标分页:与 `last_id` 联合使用的过期时间(Unix 时间戳) | | `order_by` | string | 否 | `latest` | `latest` / `expired` | 排序方式:`latest` = 按最新领取排序;`expired` = 按过期时间升序排序 | | `type` | string | 否 | 空(返回全部) | 见下方卡券类型表 | 只返回指定类型的卡券 | | `is_task_coupon` | integer | 否 | 不传(返回全部) | `0` 或 `1` | `0` = 只返回普通卡券;`1` = 只返回任务卡券;不传返回两者 | ### 支持的卡券类型(`type` 参数枚举值) 主站(gate.io 默认站)支持以下类型,不同子站(土耳其、美国、马耳他、澳大利亚)有各自的白名单限制。 | `type` 值 | 卡券名称 | 版本限制(低于此版本不返回/不可传) | |-----------|---------|-------------------------------| | `position_voucher` | 仓位体验券 | 无限制 | | `tradfi_position_voucher` | TradFi仓位体验券 | Android < 7320000 / iOS < 202507320000 不返回 | | `contract_bonus` | 合约体验金 | 无限制 | | `contract_bonus_new` | 合约体验券 | 无限制 | | `commission_rebate` | 手续费返现券 | 无限制 | | `hold_bonus` | 理财体验金 | 无限制 | | `point` | 点卡 | 无限制(仅主站/土耳其站) | | `financial_rate` | 加息券 | 无限制 | | `robot_bonus` | 机器人体验金 | 无限制 | | `loss_protection_copier` | 跟单无忧金 | 无限制 | | `vip_card` | VIP体验卡 | 无限制 | | `interest_voucher` | 杠杆减息券 | 无限制 | | `p2p` | P2P交易抵扣券 | 无限制 | | `cash` | 现金券 | 无限制 | | `crypto_loan_interest` | 抵押借币减息券 | Android < 7290000 / iOS < 202507290000 不返回 | | `copy_trading` | 跟单体验金 | Android < 7320000 / iOS < 202507320000 不返回 | | `alpha_voucher` | Alpha现金券 | Android < 7320000 / iOS < 202507320000 不返回 | | `etf_voucher` | ETF体验金 | Android < 7320000 / iOS < 202507320000 不返回 | --- ## 出参(Response) ### 外层结构 ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": true, \"list\": [ ...卡券对象数组... ] } } ``` | 字段 | 类型 | 说明 | |------|------|------| | `code` | integer | `0` = 成功 | | `message` | string | 响应消息 | | `data.next_page` | boolean | 是否还有下一页。`true` = 有更多数据,需将本页最后一条的 `id` 作为 `last_id` 传入下次请求 | | `data.list` | array | 卡券对象数组,详见下方 | --- ### 卡券对象公共字段(所有类型均包含) | 字段名 | 类型 | 说明 | |--------|------|------| | `id` | integer | 卡券发放记录 ID(`coupon_send_issuing_log.id`),用于分页游标 `last_id` | | `details_id` | integer | 用户卡券详情表的主键 ID(各类型独立表) | | `coupon_type` | string | 卡券类型,见上方枚举表 | | `name` | string | 卡券显示名称(已做 i18n 翻译) | | `amount` | string | 卡券面额(格式化后的字符串,含千分位符号)。不同类型含义不同,见下方说明 | | `currency` | string | 面额单位。不同类型值不同,见下方说明 | | `rule_new` | string | 使用规则文本(列表接口此字段固定返回空字符串 `\"\"`,详情接口才返回) | | `status` | string | 卡券状态,见下方状态枚举 | | `jump_url` | object | 跳转链接 | | `jump_url.web` | string | Web 端跳转链接 | | `jump_url.app` | string | App 端跳转链接 | | `jump_url.mini_app` | string | 小程序跳转链接(多数类型为空字符串) | | `help_url` | object | 帮助中心链接 | | `help_url.web` | string | Web 端帮助链接 | | `help_url.app` | string | App 端帮助链接 | | `expire_time` | integer | 到期时间(Unix 时间戳)。注意:部分类型已激活或已使用后会调整为实际到期时间 | | `expire_time_order_by` | integer | 排序用到期时间(取自发放记录的原始过期时间,不受激活影响) | | `expire_second` | integer | 距到期剩余秒数(已过期或点卡类型返回 `0`) | | `has_usage_history` | boolean | 是否有使用记录(点卡类型固定为 `true`,其余根据类型判断) | | `has_progress` | boolean | 是否展示进度条(仅 `commission_rebate`、`interest_voucher` 及满足条件的任务卡券为 `true`) | | `progress_config` | object | 进度条配置,`has_progress` 为 `false` 时各字段为空字符串 | | `progress_config.total_balance` | string | 需要完成的总量 | | `progress_config.current_used` | string | 已使用量 | | `progress_config.current_achived` | string | 已达成量 | | `progress_config.currency` | string | 进度单位 | | `activation_info` | object | 各类型专属的激活信息,见下方各类型说明(无专属信息的类型返回空对象 `{}`) | | `is_task_coupon` | integer | `0` = 普通卡券;`1` = 任务卡券 | | `upgrade_toast` | boolean | 是否需要提示用户升级 App(版本过旧无法支持该卡券时为 `true`) | | `task_title` | string | 任务标题(仅任务卡券有值,普通卡券为 `\"\"`) | | `task_desc` | string | 任务描述(仅任务卡券有值,普通卡券为 `\"\"`) | | `task_start_at` | integer | 任务开始时间戳(仅 `TASK_EXPIRED` 状态任务卡券有值,其余为 `0`) | | `task_expire_at` | integer | 任务过期时间戳(当前固定为 `0`,保留字段) | | `task_completed_at` | integer | 任务完成时间戳(当前固定为 `0`,保留字段) | | `extra` | array | 扩展字段,固定返回空数组 `[]` | --- ### `status` 状态枚举 | 值 | 适用对象 | 说明 | |----|---------|------| | `NOT_ACTIVE` | 普通卡券 | 待激活(尚未激活) | | `ACTIVATED` | 普通卡券 | 已激活(激活中或激活后) | | `TO_BE_USED` | 普通卡券 | 待使用(有效未用) | | `EXPIRED` | 普通卡券 | 已过期(未使用而过期) | | `RECYCLED` | 普通卡券 | 已回收(如合约充值体验券被回收) | | `INVALID` | 普通卡券 | 已失效 | | `USED` | 普通卡券 | 已使用/已消耗 | | `UNKNOWN` | 普通卡券 | 未知状态 | | `LOCKED` | 普通卡券(`p2p`) | 锁定中(P2P 交易进行中,等待核销) | | `TASK_START` | 任务卡券 | 任务未开始(卡券已发放,任务待开启) | | `TASK_WAIT` | 任务卡券 | 任务进行中(待完成) | | `TASK_DONE` | 任务卡券 | 任务已完成(领取处理中) | | `TASK_EXPIRED` | 任务卡券 | 任务未完成已过期 | | `TASK_NOT_STARTED_EXPIRED` | 任务卡券 | 任务未开始已过期 | | `TASK_RECEIVE_SUCCESS` | 任务卡券 | 任务奖励领取成功 | | `TASK_RECEIVE_FAIL` | 任务卡券 | 任务奖励领取失败 | --- ### `amount` / `currency` 各类型说明 | `coupon_type` | `amount` 说明 | `currency` 值 | |---------------|--------------|---------------| | `point` | 点卡余额(含千分位) | `\"POINT\"` | | `position_voucher` | `券面金额 × 杠杆倍数`(含千分位) | 如 `\"USDT\"` | | `tradfi_position_voucher` | `券面金额 × 杠杆倍数`(含千分位) | `\"USDx\"` | | `financial_rate` | 加息利率数值 + `%`,如 `\"5%\"` | `\"APR\"` | | `vip_card` | VIP 等级数字,如 `\"4\"` | `\"VIP\"` | | `interest_voucher` | 利率折扣百分比 + `%` | 折扣标识(中文站为 `\"折扣\"`,其他站为空) | | `crypto_loan_interest` | 利率折扣百分比 + `%` | `\"\"` | | `alpha_voucher` | 券面金额(含千分位) | Alpha 基础货币(如 `\"USDT\"` 或 `\"ETH\"`) | | 其余类型 | 券面金额(含千分位) | 大写货币符号,如 `\"USDT\"` / `\"GT\"` / `\"BTC\"` | > **注意**:`point` 类型额外返回 `origin_amount` 字段(去掉末尾零的原始余额字符串),其他类型无此字段。 --- ### `activation_info` 各类型专属字段 #### `interest_voucher`(杠杆减息券) ```json { \"supported_pairs\": \"BTC/USDT\", \"transaction_type\": \"borrow\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `supported_pairs` | string | 适用交易对,`/` 分隔,如 `\"BTC/USDT\"` | | `transaction_type` | string | 交易类型(如 `borrow`) | #### `contract_bonus_new`(合约体验券) ```json { \"received_expired_hour\": 48 } ``` | 字段 | 类型 | 说明 | |------|------|------| | `received_expired_hour` | integer | 激活后有效小时数(超时自动回收) | #### `contract_bonus`(合约体验金) ```json { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false } ``` | 字段 | 类型 | 说明 | |------|------|------| | `check_unified_account_mode` | boolean | 是否需要检查统一账户模式(固定 `true`) | | `received_expired_days` | integer | 激活后有效天数 | | `abtest` | boolean | AB 测试标记(当前固定 `false`) | #### `commission_rebate`(手续费返现券) ```json { \"market\": \"futures\", \"market_name\": \"Futures\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `market` | string | 适用市场,枚举值:`spot` / `margin` / `futures` / `alpha` / `etf` / `tradfi` | | `market_name` | string | 市场显示名称(已 i18n 翻译) | #### `robot_bonus`(机器人体验金) ```json { \"designated_bots\": \"DISABLED\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `designated_bots` | string | `\"ENABLED\"` = 仅限指定策略使用;`\"DISABLED\"` = 不限制策略 | #### `position_voucher`(仓位体验券) ```json { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"100\", \"position_bonus\": \"500\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `symbols` | string | 适用交易对(如 `\"BTC_USDT\"`),空表示不限 | | `leverage` | string | 杠杆倍数 | | `need_user_funds` | integer | `0` = 不需要用户自有资金;`1` = 需要配资 | | `user_funds_amount` | string | 需要用户配资的金额(`need_user_funds=1` 时有意义) | | `position_bonus` | string | 券面原始金额(去掉末尾零) | #### `tradfi_position_voucher`(TradFi 仓位体验券) ```json { \"symbols\": \"AAPL\", \"leverage\": \"5\", \"position_bonus\": \"200\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `symbols` | string | 适用 TradFi 品种(如 `\"AAPL\"`),空表示不限 | | `leverage` | string | 杠杆倍数 | | `position_bonus` | string | 券面原始金额(去掉末尾零) | #### `etf_voucher`(ETF 体验金) ```json { \"currency_markets\": \"BTC3L_USDT,ETH3L_USDT\", \"amount\": \"50\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `currency_markets` | string | 适用的 ETF 市场列表(逗号分隔) | | `amount` | string | 券面原始金额(去掉末尾零) | #### 其余类型 `point`(点卡)、`hold_bonus`(理财体验金)、`loss_protection_copier`(跟单无忧金)、`vip_card`(VIP体验卡)、`p2p`(P2P交易抵扣券)、`cash`(现金券)、`crypto_loan_interest`(抵押借币减息券)、`copy_trading`(跟单体验金)、`alpha_voucher`(Alpha现金券)、`financial_rate`(加息券)等类型返回空对象: ```json {} ``` --- ## 完整响应示例 ### 普通卡券(合约体验金) ```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\": [] } ] } } ``` ### 任务卡券(手续费返现券) ```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) ```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\": [] } ] } } ``` +## 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 @@ -94,7 +94,7 @@ Name | Type | Description | Notes Coupon Center details -## 接口说明 卡券中心通用详情接口,返回单张卡券的完整详细信息,相比列表接口额外包含:使用规则文本、分区块的卡券详细属性(`extra`)、来源完成任务信息(`from_task`)。 ## 入参(Query Parameters) | 参数名 | 类型 | 必填 | 约束 | 说明 | | ---------------- | ------- | --- | --------------------- | ------------------------------------------------- | | `coupon_type` | string | 是 | 见卡券类型枚举 | 卡券类型,取值与 `coupon-list` 接口一致 | | `detail_id` | integer | 是 | min:1, max:2147483647 | 普通卡券传 `details_id`;任务卡券传发放记录的 `id`(即列表中的 `id` 字段) | | `is_task_coupon` | integer | 否 | `0` 或 `1`,默认 `0` | `0` = 普通卡券;`1` = 任务卡券 | > **注意**:普通卡券与任务卡券的 `detail_id` 语义不同。 > > - 普通卡券:`detail_id` = 各类型用户卡券表的主键(列表中的 `details_id`) > - 任务卡券:`detail_id` = 发放记录表主键(列表中的 `id`) --- ## 出参(Response) ### 外层结构 ```json { \"code\": 0, \"message\": \"\", \"data\": { ...卡券详情对象... } } ``` ### 详情对象字段 详情接口返回与列表接口相同的基础字段,并在以下字段上有差异:rule_new | 字段名 | 类型 | 与列表的差异 | 说明 | | ------------------- | ------- | ----------------- | -------------------------------------------- | | `rule_new` | string | **有值**(列表返回空字符串) | 卡券使用规则文本(已 i18n 翻译) | | `extra` | array | **有值**(列表返回 `[]`) | 分区块的卡券详细属性,见下方说明 | | `from_task` | boolean | **新增字段** | 是否由完成任务兑换而来的普通卡券(任务完成后自动发放的子卡券) | | `task_start_at` | integer | **可能有值** | 任务卡券:任务开始时间戳;普通卡券(`from_task=true`):源任务的开始时间 | | `task_expire_at` | integer | **可能有值** | 任务卡券:领取有效期截止时间戳(`0` 表示不限);普通卡券固定 `0` | | `task_completed_at` | integer | **可能有值** | 任务卡券:任务完成时间戳;普通卡券(`from_task=true`):源任务的完成时间 | 其余基础字段(`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`)与列表接口(`listUserCoupons`)完全一致。 --- ## `extra` 字段说明 `extra` 是一个**二维数组**,由若干个「区块」组成,前端按区块分隔展示。 ``` extra = [ [block1_item1, block1_item2, ...], // 区块1:卡券名称 / 来源 / 状态 [block2_item1, block2_item2, ...], // 区块2:卡券核心属性 [block3_item1, block3_item2, ...], // 区块3:时间信息 ] ``` ### `extra` 内每个 item 的结构 | 字段 | 类型 | 说明 | | ------- | ---------------- | --------------- | | `type` | string | 展示类型,枚举值见下表 | | `key` | string | 标签文本(已 i18n 翻译) | | `value` | string / integer | 值,类型随 `type` 变化 | ### `type` 枚举 | `type` 值 | `value` 类型 | 说明 | | ----------- | ---------- | ------------------------ | | `string` | string | 普通文本展示 | | `timestamp` | integer | Unix 时间戳,前端负责格式化为日期时间 | | `day` | integer | 天数(整数) | | `hour` | integer | 小时数(整数) | | `status` | string | 状态枚举值(与 `status` 字段含义相同) | | `btn` | string | 带跳转按钮,`value` 为按钮文案 | --- ## 区块1(固定):卡券名称 / 来源 / 状态 所有类型(除 `point` 外)均包含此区块,固定字段如下: | 序号 | `type` | `key`(翻译 key) | `value` | 备注 | | --- | -------- | ----------------------------- | ------- | --------- | | 1 | `string` | `COUPON_VOUCHER_NAME`(卡券名称) | 卡券名称文本 | 必填 | | 2 | `string` | `COUPON_VOUCHER_SOURCE`(卡券来源) | 来源活动名称 | 有来源时才返回此项 | | 3 | `status` | `COUPON_STATUS`(卡券状态) | 状态枚举值 | 必填 | > `point`(点卡)类型的 `extra` 固定为空数组 `[]`。 --- ## 区块2 + 区块3:各类型专属字段 ### `contract_bonus`(合约体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ----- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `day` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效天数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 仅已激活时 | --- ### `contract_bonus_new`(合约体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ------------------ | ------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_MAXIMUM_LEVERAGE`(最大杠杆倍数) | `NX` 或 `Unlimited` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对列表 | 有限定交易对时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ---- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `hour` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效小时数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 已激活时 | --- ### `commission_rebate`(手续费返现券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | -------------------------------- | -------------- | --- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_REBATE_PERCENTAGE`(返现比例) | `N%` | 必填 | | `string` | `COUPON_BALANCE`(剩余额度) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_USED_AMOUNT`(已用额度) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | 市场名称 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | --------------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 需激活的券才显示 | | `day` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效天数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 状态为已激活/已使用/已失效时 | --- ### `hold_bonus`(理财体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `financial_rate`(加息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------------ | ----------------------- | --- | | `string` | `COUPON_RATE_UP_CAP`(加息上限) | `金额 + 货币` 或 `Unlimited` | 必填 | | `string` | `COUPON_RATE_UP_APR`(加息比例) | `N%APR` | 必填 | | `string` | `COUPON_RATE_UP_TERM_DAYS`(加息天数) | `N天` 或 `Unlimited` | 必填 | | `string` | `COUPON_AVAILABLE_INVESTMENT_TYPE`(可用理财类型) | 如 `Lend & Earn` | 必填 | | `string` | `COUPON_AVAILABLE_PRODUCTS`(可用产品) | 产品名列表(逗号分隔) | 必填 | | `string` | `COUPON_MINIMUM_INVESTMENT_UP`(起购金额) | `≥ 金额 货币` 或区间 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `robot_bonus`(机器人体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_BOTS`(适用机器人) | 如 `Future Grids` | 非限定机器人时 | | `string` | `COUPON_MAXIMUM_LEVERAGE`(最大杠杆倍数) | 倍数 | 非限定且有杠杆限制时 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对或 `All` | 非限定机器人时 | | `string` | `COUPON_STOP_LOSS_AMOUNT`(止损金额) | `金额 + 货币` | 有止损金额时 | | `btn` | `COUPON_DESIGNATED_BOTS`(限定机器人) | `ViewMyaccountLeft` 按钮文案 | 限定机器人时 | | `day` | `COUPON_RUNTIME_DURATION`(运行时长) | 天数 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `loss_protection_copier`(跟单无忧金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ----------------------------------- | ------------------- | ------------ | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | `Contract` 或 `Spot` | 必填 | | `string` | `COUPON_MINIMUM_INVESTMENT`(最小跟单金额) | `金额 + 货币` | 有最小金额限制时 | | `string` | `COUPON_AVAILABLE_TRADERS`(可用交易员) | 昵称列表 | 部分可用时(指定交易员) | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有使用时间时 | --- ### `position_voucher`(仓位体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ----------------- | ------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额×杠杆 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | `USDT永续合约` | 必填 | | `hour` | `COUPON_POSITION_DURATION`(仓位时长) | 小时数 | 必填 | | `string` | `COUPON_LEVERAGE`(杠杆倍数) | `NX` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对,空表示不限 | 必填 | | `string` | `COUPON_USER_INVESTMENT_QUOTA`(配资额度) | `金额 + 货币` | 需要用户配资时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `tradfi_position_voucher`(TradFi仓位体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------------ | ----------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额×杠杆 + 空格 + 货币` | | `string` | `COUPON_POSITION_DURATION`(仓位时长) | `N个交易日` | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | TradFi 品种 | | `string` | `COUPON_LEVERAGE`(杠杆倍数) | `Nx` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `vip_card`(VIP体验卡) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------- | ---------- | | `string` | `COUPON_VIP_TIER`(VIP等级) | `VIPN` | | `day` | `COUPON_BENEFIT_DURATION`(权益时长) | 天数 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ----------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 创建时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 状态为已使用或已失效时 | | `timestamp` | `COUPON_EXPIRY_TIME`(失效时间) | 到期时间戳 | 状态为已使用或已失效时 | --- ### `p2p`(P2P交易抵扣券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------- | -------------- | | `string` | `COUPON_DEDUCTION_LIMIT`(抵扣上限) | `金额 + 货币` | | `string` | `COUPON_DEDUCTION_RATIO`(折扣比例) | `N%` | | `string` | `COUPON_USAGE_CONDITIONS`(使用条件) | `每笔交易不低于 N 货币` | | `string` | `COUPON_SUPPORTED_FIAT`(适用法币) | 法币列表或 `全部` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `interest_voucher`(杠杆减息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | --------------------------------------- | ----------------- | -------- | | `string` | `max_discount_amount`(最大减免金额) | `金额 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_TRADES`(适用交易) | `Isolated Margin` | 必填 | | `string` | `COUPON_INTEREST_DISCOUNT`(减免比例) | `N%` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对,空表示不限 | 必填 | | `string` | `COUPON_BALANCE`(剩余额度) | `金额 + 货币` | 必填 | | `string` | `COUPON_BORROWING_AMOUNT_LIMIT`(借款金额限制) | 借款金额范围 | 有借款金额限制时 | | `hour` | `COUPON_VALIDITY_PERIOD`(减免时长) | 小时数 | 有设置时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | ------------------------------------- | ---------- | -------------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 状态为待使用或已过期时 | | `timestamp` | `COUPON_EFFECTIVE_TIME`(减免开始时间) | 开始使用时间戳 | 状态为失效/使用中/已使用时 | | `timestamp` | `COUPON_DISCOUNT_EXPIRY_TIME`(减免失效时间) | 减免到期时间戳 | 状态为失效/使用中/已使用时 | --- ### `cash`(现金券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有兑换时间时 | --- ### `crypto_loan_interest`(抵押借币减息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ---------------------------------------------- | ---------- | -------- | | `string` | `coupon_center_discount_max_amount`(最大减免金额) | `金额 + 货币` | 必填 | | `string` | `COUPON_INTEREST_DISCOUNT`(减免比例) | `N%` | 必填 | | `string` | `coupon_center_loan_min_amount`(最小借款金额) | `金额 + 货币` | 有最小金额要求时 | | `hour` | `coupon_center_interest_discount_period`(减息时长) | 小时数 | 必填 | | `string` | `coupon_center_trade_applicable`(适用交易) | `活期` | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `copy_trading`(跟单体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ---------------------------------- | ------------------- | ---- | | `string` | `COUPON_VOUCHER_AMOUNT`(面值) | `金额 + 货币` | 必填 | | `string` | `coupon_applicable_traders`(适用交易员) | `全部` 或 `指定交易员` | 必填 | | `string` | `coupon_trade_category`(适用交易类型) | `Spot` 或 `Contract` | 必填 | | `day` | `coupon_usage_days`(体验有效天数) | 天数 | 必填 | | `string` | `COUPON_STOP_LOSS_AMOUNT`(止损金额) | `金额 + 货币` | 必填 | | `string` | `coupon_ineligible_mkts`(不可体验市场) | 市场列表 | 有限制时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `alpha_voucher`(Alpha现金券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有领取时间时 | --- ### `etf_voucher`(ETF体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | | `hour` | `coupon_trial_duration`(体验时长) | 小时数 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | ETF 市场列表 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有使用时间时 | --- ### `point`(点卡) `extra` 固定返回 `[]`,无任何区块。 --- ## 完整响应示例 ### 普通卡券(手续费返现券) ```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\": \"卡券名称\", \"value\": \"10% Futures Commission Rebate\" }, { \"type\": \"string\", \"key\": \"卡券来源\", \"value\": \"新用户注册活动\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"卡券金额\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"返现比例\", \"value\": \"10%\" }, { \"type\": \"string\", \"key\": \"剩余额度\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"已用额度\", \"value\": \"0 USDT\" }, { \"type\": \"string\", \"key\": \"适用市场\", \"value\": \"Futures\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 }, { \"type\": \"day\", \"key\": \"使用时长\", \"value\": 30 } ] ] } } ``` ### 任务卡券(仓位体验券) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"position_voucher\", \"name\": \"仓位体验券\", \"amount\": \"5,000\", \"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\": \"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\": \"完成10000 USDT合约交易量,获得仓位体验券\", \"task_desc\": \"在永续合约中完成指定交易量任务\", \"task_start_at\": 1757000000, \"task_expire_at\": 1760000000, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"卡券名称\", \"value\": \"仓位体验券\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TASK_WAIT\" } ], [ { \"type\": \"string\", \"key\": \"卡券金额\", \"value\": \"5,000 USDT\" }, { \"type\": \"string\", \"key\": \"适用市场\", \"value\": \"USDT永续合约\" }, { \"type\": \"hour\", \"key\": \"仓位时长\", \"value\": 24 }, { \"type\": \"string\", \"key\": \"杠杆倍数\", \"value\": \"10X\" }, { \"type\": \"string\", \"key\": \"限定交易对\", \"value\": \"BTCUSDT\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 } ] ] } } ``` ### P2P 交易抵扣券(p2p) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 5678901, \"details_id\": 234, \"coupon_type\": \"p2p\", \"name\": \"5.5% P2P交易抵扣券\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"每笔P2P交易可抵扣最高100 USDT手续费,折扣比例5.5%,每笔交易不低于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\": \"卡券名称\", \"value\": \"5.5% P2P交易抵扣券\" }, { \"type\": \"string\", \"key\": \"卡券来源\", \"value\": \"新用户注册活动\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"抵扣上限\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"折扣比例\", \"value\": \"5.5%\" }, { \"type\": \"string\", \"key\": \"使用条件\", \"value\": \"每笔交易不低于 200 USDT\" }, { \"type\": \"string\", \"key\": \"适用法币\", \"value\": \"CNY、USD\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 }, { \"type\": \"timestamp\", \"key\": \"过期时间\", \"value\": 1760000000 } ] ] } } ``` --- ## 错误码 | `code` | 说明 | | -------------------------------------------- | ------------------------- | | `0` | 成功 | | `10001`(`COUPON_SEND_ISSUING_LOG_NOT_FOUND`) | 卡券记录不存在或不属于当前用户 | | `10000`(`PARAMS_INVALID`) | 参数无效(如任务卡券缺少 coupon_info) | | `50105`(`INVALID_PARAMETERS`) | 入参校验失败(如 coupon_type 非法) | +## 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 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/CrossExApi.md b/docs/CrossExApi.md index 38de38c9..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 | 查询币对信息 -[**list_crossex_rule_risk_limits**](CrossExApi.md#list_crossex_rule_risk_limits) | **GET** /crossex/rule/risk_limits | 查询风险限额信息 -[**list_crossex_transfer_coins**](CrossExApi.md#list_crossex_transfer_coins) | **GET** /crossex/transfers/coin | 查询划转币种支持 +[**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 @@ -40,7 +40,7 @@ Method | HTTP request | Description # **list_crossex_rule_symbols** > list[Symbol] list_crossex_rule_symbols(symbols=symbols) -查询币对信息 +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: - # 查询币对信息 + # 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 @@ -100,7 +100,7 @@ No authorization required # **list_crossex_rule_risk_limits** > list[CrossexRiskLimit] list_crossex_rule_risk_limits(symbols) -查询风险限额信息 +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: - # 查询风险限额信息 + # Query risk limit information api_response = api_instance.list_crossex_rule_risk_limits(symbols) print(api_response) except GateApiException as ex: @@ -160,7 +160,7 @@ No authorization required # **list_crossex_transfer_coins** > list[CrossexTransferCoin] list_crossex_transfer_coins(coin=coin) -查询划转币种支持 +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: - # 查询划转币种支持 + # Query supported transfer currencies api_response = api_instance.list_crossex_transfer_coins(coin=coin) print(api_response) except GateApiException as ex: @@ -195,7 +195,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **coin** | **str**| Currency | [optional] + **coin** | **str**| Query by specified currency name | [optional] ### Return type @@ -301,7 +301,7 @@ Name | Type | Description | Notes 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 @@ -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,7 +828,7 @@ 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 @@ -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,7 +1312,7 @@ 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 @@ -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 @@ -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[CrossexOrder] 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,9 +1738,10 @@ 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 @@ -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,7 +1816,7 @@ 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] @@ -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,7 +1893,7 @@ 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] @@ -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] @@ -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,7 +2049,7 @@ 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] @@ -2104,8 +2106,8 @@ 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) -statement_type = 'statement_type_example' # str | Bill entry type. (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) @@ -2125,8 +2127,8 @@ 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] - **statement_type** | **str**| Bill entry type. | [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] @@ -2181,8 +2183,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 | 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 @@ -2198,8 +2200,8 @@ 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 diff --git a/docs/CrossexAccount.md b/docs/CrossexAccount.md index 49de6bea..8ca4618a 100644 --- a/docs/CrossexAccount.md +++ b/docs/CrossexAccount.md @@ -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[CrossexAccountAsset]**](CrossexAccountAsset.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/CrossexAccountBookRecord.md b/docs/CrossexAccountBookRecord.md index 6dcbac88..6af13000 100644 --- a/docs/CrossexAccountBookRecord.md +++ b/docs/CrossexAccountBookRecord.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **id** | **str** | Account Change Record ID | **user_id** | **str** | User ID | **business_id** | **str** | Business ID | -**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 | +**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/CrossexAccountUpdateResponse.md b/docs/CrossexAccountUpdateResponse.md index 2a307871..c74a87b3 100644 --- a/docs/CrossexAccountUpdateResponse.md +++ b/docs/CrossexAccountUpdateResponse.md @@ -5,7 +5,7 @@ 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/CrossexOrder.md b/docs/CrossexOrder.md index 97062b4b..73c77deb 100644 --- a/docs/CrossexOrder.md +++ b/docs/CrossexOrder.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes **user_id** | **str** | User ID | **order_id** | **str** | Order ID | **text** | **str** | Client-defined order ID. | -**state** | **str** | 订单状态: NEW:订单已通过校验,等待发送到交易所 OPEN:订单已挂在交易所订单簿上 PARTIALLY_FILLED:订单已部分成交 FILLED:订单已完全成交 FAIL:CrossEx 内部校验未通过,请查看 reason 字段了解失败原因 REJECT:订单被交易所拒绝,请查看 reason 字段了解失败原因 | +**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). | -**exchange_type** | **str** | Exchange type (`BINANCE` / `OKX` / `GATE` / `BYBIT`). | +**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. | 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/CrossexTransferRecord.md b/docs/CrossexTransferRecord.md index 7ebb8986..ec9c4be9 100644 --- a/docs/CrossexTransferRecord.md +++ b/docs/CrossexTransferRecord.md @@ -5,8 +5,8 @@ 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/Currency.md b/docs/Currency.md index a110a616..2a1d26fe 100644 --- a/docs/Currency.md +++ b/docs/Currency.md @@ -15,7 +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]** | 币种分类 - stocks: 股票 - metals: 金属 - indices: 指数 - forex: 外汇 - commodities: 大宗商品 | [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/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/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 48b10f13..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 share count | [optional] -**max_copies** | **int** | Maximum share count | [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/FuturesApi.md b/docs/FuturesApi.md index c6e48158..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) @@ -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] @@ -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 @@ -2849,10 +2919,11 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency 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)) @@ -2867,6 +2938,7 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **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 @@ -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/FuturesOrder.md b/docs/FuturesOrder.md index 9a57f043..9c610dfd 100644 --- a/docs/FuturesOrder.md +++ b/docs/FuturesOrder.md @@ -34,6 +34,11 @@ Name | Type | Description | Notes **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] +**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 index 52de6e95..565294ce 100644 --- a/docs/FuturesOrderTimerange.md +++ b/docs/FuturesOrderTimerange.md @@ -34,6 +34,8 @@ Name | Type | Description | Notes **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 5a3704c9..be14fe88 100644 --- a/docs/FuturesPriceTriggeredOrder.md +++ b/docs/FuturesPriceTriggeredOrder.md @@ -17,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/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/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/InfiniteGridCreateParams.md b/docs/InfiniteGridCreateParams.md index 2421743c..a1471fc9 100644 --- a/docs/InfiniteGridCreateParams.md +++ b/docs/InfiniteGridCreateParams.md @@ -1,6 +1,6 @@ # InfiniteGridCreateParams -无限网格策略的创建参数。 与 App 口径对齐:**仅** `money`、`price_floor`、`profit_per_grid` 为必填; `grid_num`、`price_type` 可选(不传时由服务端按默认处理)。 +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 ------------ | ------------- | ------------- | ------------- diff --git a/docs/OTCApi.md b/docs/OTCApi.md index f74b757c..986a3054 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 @@ -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** -> OtcUserDefaultBankResponse 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 -[**OtcUserDefaultBankResponse**](OtcUserDefaultBankResponse.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** -> OtcBankListResponse 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 = '/path/to/file' # file | Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). +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** | **file**| Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). | + **remittance_line_number** | **str**| | [optional] + **agent_bank_name** | **str**| | [optional] + **agent_bank_swift** | **str**| | [optional] ### Return type -[**OtcBankListResponse**](OtcBankListResponse.md) +[**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 + +[**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** > 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: diff --git a/docs/Order.md b/docs/Order.md index bda5ef0a..14871869 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -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 设置为 ioc - poc: 未满足挂单策略,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - 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/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/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/OtcBankCreateMultipartRequest.md b/docs/OtcBankCreateMultipartRequest.md new file mode 100644 index 00000000..ebb7e2f4 --- /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** | **file** | Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). | + +[[Back to Model list]](../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/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/OtcUserDefaultBankResponse.md b/docs/OtcBankSupplementChecklistResponse.md similarity index 64% rename from docs/OtcUserDefaultBankResponse.md rename to docs/OtcBankSupplementChecklistResponse.md index df5f8580..05721732 100644 --- a/docs/OtcUserDefaultBankResponse.md +++ b/docs/OtcBankSupplementChecklistResponse.md @@ -1,12 +1,12 @@ -# OtcUserDefaultBankResponse +# OtcBankSupplementChecklistResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | | **message** | **str** | | -**data** | [**OtcUserDefaultBank**](OtcUserDefaultBank.md) | | -**timestamp** | **int** | | +**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/OtcOrderDetail.md b/docs/OtcOrderDetail.md index 5938cbb3..660b9c71 100644 --- a/docs/OtcOrderDetail.md +++ b/docs/OtcOrderDetail.md @@ -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/OtcOrderListItem.md b/docs/OtcOrderListItem.md index 723b57ae..47abc3f7 100644 --- a/docs/OtcOrderListItem.md +++ b/docs/OtcOrderListItem.md @@ -17,7 +17,8 @@ Name | Type | Description | Notes **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/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/OtcUserDefaultBank.md b/docs/OtcUserDefaultBank.md deleted file mode 100644 index 2ce8903c..00000000 --- a/docs/OtcUserDefaultBank.md +++ /dev/null @@ -1,16 +0,0 @@ -# OtcUserDefaultBank - -## 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/P2pApi.md b/docs/P2pApi.md index d5bade06..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 @@ -220,6 +221,73 @@ 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_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 + +[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_transaction_get_pending_transaction_list** > P2pTransactionListResponse p2p_merchant_transaction_get_pending_transaction_list(get_pending_transaction_list_request) @@ -627,6 +695,8 @@ Name | Type | Description | Notes 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): @@ -1031,6 +1101,8 @@ Name | Type | Description | Notes 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): diff --git a/docs/P2pChatMessage.md b/docs/P2pChatMessage.md index 450b6392..0493cf76 100644 --- a/docs/P2pChatMessage.md +++ b/docs/P2pChatMessage.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **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/P2pMerchantBooksPlaceBizPushOrderResponse.md b/docs/P2pMerchantBooksPlaceBizPushOrderResponse.md index e7f53e39..2dfa61b9 100644 --- a/docs/P2pMerchantBooksPlaceBizPushOrderResponse.md +++ b/docs/P2pMerchantBooksPlaceBizPushOrderResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timestamp** | **float** | Response timestamp. | [optional] **method** | **str** | Placeholder for request method. | [optional] -**code** | **int** | Response code, 0 means success | [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** | [**object**](.md) | Empty object on successful publish or edit. | [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/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/P2pSendChatMessageResult.md b/docs/P2pSendChatMessageResult.md index 3c374be7..9858f29d 100644 --- a/docs/P2pSendChatMessageResult.md +++ b/docs/P2pSendChatMessageResult.md @@ -4,6 +4,11 @@ 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/PartnerDataAggregated.md b/docs/PartnerDataAggregated.md index f8792730..4a4963ec 100644 --- a/docs/PartnerDataAggregated.md +++ b/docs/PartnerDataAggregated.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**rebate_amount** | **str** | 返佣金额,字符串格式保证精度 最多保留 6 位小数,去除尾零 | -**trade_volume** | **str** | 交易量,字符串格式保证精度 最多保留 6 位小数,去除尾零 | -**net_fee** | **str** | 净手续费,字符串格式保证精度 最多保留 6 位小数,去除尾零 | +**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** | 交易人数,字符串形式(与线上 JSON 序列化一致) 仅在 business_type=0(全部)时返回具体数值,其他业务类型返回 null | +**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 | diff --git a/docs/PlaceBizPushOrder.md b/docs/PlaceBizPushOrder.md index 508ac871..f8870e39 100644 --- a/docs/PlaceBizPushOrder.md +++ b/docs/PlaceBizPushOrder.md @@ -20,8 +20,8 @@ Name | Type | Description | Notes **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** | Ad trading terms shown to the taker. | [optional] -**auto_reply** | **str** | Auto-reply message after order creation. | [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] 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/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 5e327460..42f30a59 100644 --- a/docs/RebateApi.md +++ b/docs/RebateApi.md @@ -700,7 +700,7 @@ Name | Type | Description | Notes Get recent partner application records -获取当前用户最近的合伙人申请记录。 此接口返回用户最近 30 天内的申请记录,包括申请状态、审核信息、申请材料等详细信息。 +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 @@ -765,7 +765,7 @@ This endpoint does not need any parameter. Check partner application eligibility -检查当前用户是否有资格申请成为合伙人。 此接口会检查多个条件: - 账户状态(是否被封禁) - 是否为子账号 - 是否已经是合伙人 - KYC 认证状态 - 是否在其他代理商的邀请链下 - 是否在黑名单中 - 其他业务规则限制 +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 @@ -830,7 +830,7 @@ This endpoint does not need any parameter. Aggregated partner agent statistics -查询指定时间范围内合伙人代理的数据聚合统计,包括返佣金额、交易量、净手续费、客户数和交易人数。 **注意事项:** - 交易人数 `trading_user_count` 仅在 `business_type=0`(全部)时返回 - 时间参数使用 UTC+8 时区 - 如不传时间参数,默认查询近 7 天数据 - 仅限合伙人代理访问,子账号无权限 +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 @@ -856,8 +856,8 @@ configuration = gate_api.Configuration( 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 | 查询开始时间,格式:yyyy-mm-dd hh:ii:ss(UTC+8) 不传时默认为近 7 日开始时间 (optional) -end_date = '2024-01-07 23:59:59' # str | 查询结束时间,格式:yyyy-mm-dd hh:ii:ss(UTC+8) 不传时默认为近 7 日结束时间 (optional) +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: @@ -874,8 +874,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **start_date** | **str**| 查询开始时间,格式:yyyy-mm-dd hh:ii:ss(UTC+8) 不传时默认为近 7 日开始时间 | [optional] - **end_date** | **str**| 查询结束时间,格式:yyyy-mm-dd hh:ii:ss(UTC+8) 不传时默认为近 7 日结束时间 | [optional] + **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 diff --git a/docs/SendChatMessageRequest.md b/docs/SendChatMessageRequest.md index a21d00ae..3109c3fb 100644 --- a/docs/SendChatMessageRequest.md +++ b/docs/SendChatMessageRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **txid** | **int** | Order ID | **type** | **int** | Message type: `0` text; `1` file (image or video); defaults to `0`. | [optional] -**message** | **str** | Message body. For `type=0`, plain text up to 500 characters; for `type=1`, pass the `file_key` returned by `upload_chat_file`. | +**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/SpotMartingaleCreateParams.md b/docs/SpotMartingaleCreateParams.md index 230f7b5a..7e444b18 100644 --- a/docs/SpotMartingaleCreateParams.md +++ b/docs/SpotMartingaleCreateParams.md @@ -1,6 +1,6 @@ # SpotMartingaleCreateParams -现货马丁策略的创建参数(对应 `MartingaleBot` 序列化字段)。 - **止损**:使用 `stop_loss_per_cycle`(每轮止损比例),与 App 一致;**不使用** `stop_loss_price`。 - 可选 **`trigger_price`**:触发价。 - `stop_loss_per_cycle` 若传入且大于 0,服务端校验区间约为 `0.001`~`0.9999`(与 `check_martingale` 一致)。 +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 ------------ | ------------- | ------------- | ------------- 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/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/Symbol.md b/docs/Symbol.md index 1899d05b..9041524c 100644 --- a/docs/Symbol.md +++ b/docs/Symbol.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **symbol** | **str** | Unique trading pair identifier in the form ExchangeType_BusinessType_Base_Counter. | -**exchange_type** | **str** | Exchange type (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `CROSSEX`). | +**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 | diff --git a/docs/TradFiApi.md b/docs/TradFiApi.md index f4764eec..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 @@ -1011,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() @@ -1216,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 @@ -1244,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) @@ -1251,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)) @@ -1263,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/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/UnifiedApi.md b/docs/UnifiedApi.md index 045ecd8a..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** @@ -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/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/WalletApi.md b/docs/WalletApi.md index 624643d7..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 @@ -1014,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 @@ -1042,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) 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)) @@ -1061,8 +1062,9 @@ 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] diff --git a/docs/WelfareApi.md b/docs/WelfareApi.md index 1e616503..d864c5b3 100644 --- a/docs/WelfareApi.md +++ b/docs/WelfareApi.md @@ -81,7 +81,7 @@ This endpoint does not need any parameter. Get beginner task list -获取当前用户的新客入门任务列表。 默认返回已经归属到当前用户的注册任务(type=10)和引导任务(type=11),注册任务排在前面,引导任务排在后面。 当用户尚未拥有下载任务、且系统判断用户未下载过 App 时,会动态补充一条“待领取下载任务”卡片。 其中: - 下载任务的 `task_type = 23` - 待领取下载任务的 `status = 0` 结果缓存 60 秒。任务列表数量有限(通常不超过 10 条),无需分页。 +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 @@ -147,7 +147,7 @@ This endpoint does not need any parameter. Get the task -领取单个福利任务。 当前主场景为新客下载任务领取,但接口本身支持新客注册、引导、进阶任务类型。 处理流程: 1. 读取登录用户 2. 做用户资格校验 3. 风控校验(事件码 `task_center`) 4. 校验任务配置与任务中心任务 5. 校验是否已存在进行中任务 6. 若为下载任务,校验是否已下载 App 7. 写入 `welfare_user_tasks_xx` 8. 上报任务中心 风控透传字段: - 老字段:`user_id`、`ip`、`const_id`、`is_async`、`action`、`task_id` - 新增字段:`req_method`、`traceid` - 其中: - `req_method` 来自 `X-Gate-Request-Source` - `ip` 来自 `X-Gate-Ip` - `traceid` 来自 `X-Gate-Trace-Id` - `const_id` 固定为空字符串 +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 @@ -217,7 +217,7 @@ Name | Type | Description | Notes Receive mission rewards -领取单个福利任务奖励。 处理流程: 1. 读取登录用户 2. 做用户资格校验 3. 查询 `welfare_user_tasks_xx`,要求任务状态为 `StatusDone(2)` 4. 风控校验(事件码 `index_page_check`) 5. 查询任务中心任务详情与奖励信息 6. 若奖励为 m 选 n 奖池,则返回 `has_m_n_task = true`,不实际发奖 7. 普通奖励则进入福利中心原领奖逻辑 风控透传字段: - 老字段:`user_id`、`ip`、`const_id`、`is_async` - 新增字段:`req_method`、`traceid` - 其中: - `req_method` 来自 `X-Gate-Request-Source` - `ip` 来自 `X-Gate-Ip` - `traceid` 来自 `X-Gate-Trace-Id` - `const_id` 固定为空字符串 +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 diff --git a/example/p2p_merchant_api.py b/example/p2p_merchant_api.py index ffb353cc..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) # ============================================================ @@ -74,7 +86,8 @@ def p2p_merchant_demo(run_config): # 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", @@ -204,7 +217,8 @@ 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=40000001, diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 2fa1e29e..098210df 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "7.2.78" +__version__ = "7.2.99" # import apis into sdk package from gate_api.api.activity_api import ActivityApi @@ -155,6 +155,7 @@ 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 @@ -180,6 +181,8 @@ 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 @@ -255,6 +258,7 @@ 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 @@ -343,7 +347,10 @@ 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 @@ -475,15 +482,26 @@ 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 @@ -501,8 +519,6 @@ 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.otc_user_default_bank import OtcUserDefaultBank -from gate_api.models.otc_user_default_bank_response import OtcUserDefaultBankResponse 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 @@ -517,9 +533,14 @@ 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 @@ -573,6 +594,9 @@ 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 @@ -590,6 +614,7 @@ 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 @@ -601,10 +626,16 @@ 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 @@ -691,6 +722,10 @@ 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 diff --git a/gate_api/api/assetswap_api.py b/gate_api/api/assetswap_api.py index 329c55da..0058cac6 100644 --- a/gate_api/api/assetswap_api.py +++ b/gate_api/api/assetswap_api.py @@ -369,7 +369,7 @@ def evaluate_asset_swap_with_http_info(self, **kwargs): # noqa: E501 def create_asset_swap_order_v1(self, order_create_v1_req, **kwargs): # noqa: E501 """Portfolio optimization — place order # noqa: E501 - 将账户内若干源币种按指定数量换入目标币种侧配置,**正式下单前强烈建议先调用** `POST /asset-swap/order/preview` **且 `code=0` 后再用一致的语义提交本接口**。 **请求体不含 `ratio`** - 本接口 `OrderCreateV1Req` 仅含 `from` / `to`,且数组元素均为 `CreateParam`(**仅** `asset` + `amount`)。**请勿**在下单 JSON 中传入 `ratio`;比例字段 `ratio` 只存在于预览接口 `OrderPreviewV1Req.to`(`PreviewToParam`)。 **与预览接口的关键差异(易错点)** - 本接口 `to` 数组元素为 `CreateParam`:**`asset` + `amount`(目标侧数量,十进制字符串)**。 - 预览接口 `to` 为 **`asset` + `ratio`(比例字符串)**,**二者不可混用**:不要把预览里的 `ratio` 原样填到下单的 `amount`,也不要把下单的 `amount` 当成预览的 `ratio`。 **推荐调用顺序** 1. `GET /asset-swap/asset/list`:确认币种支持。 2. `GET /asset-swap/config`:读取 `recommend` / `recommend_v2`(如 `recommend_v2.market` 下某策略的 `schemes`,将 `scheme.name` 作为目标 `asset`、`scheme.ratio` 仅用于 **preview** 的 `to[].ratio`)。 3. `GET /asset-swap/evaluate`(可选):参考可卖数量。 4. `POST /asset-swap/order/preview`:`from` 与 `to`(比例)构造询价。 5. 预览成功后,按产品/服务端约定将预览结果映射为下单的 `from`/`to`(**均为 amount**)再调用本接口。 **字段约定** - `from`:卖出侧,每项为 `asset` + `amount`(字符串,十进制,表示该币种卖出数量)。 - `to`:买入/目标侧,每项为 `asset` + **`amount`**(字符串,十进制,表示该目标币种侧数量;语义与预览的 `ratio` 不同)。 - 本接口仅校验上述 `amount` 的精度与范围;不满足时返回非 0 `code` 及 `message`。预览侧 `to[].ratio` 的校验规则见 `POST /asset-swap/order/preview` 文档。 # 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) @@ -394,7 +394,7 @@ def create_asset_swap_order_v1(self, order_create_v1_req, **kwargs): # noqa: E5 def create_asset_swap_order_v1_with_http_info(self, order_create_v1_req, **kwargs): # noqa: E501 """Portfolio optimization — place order # noqa: E501 - 将账户内若干源币种按指定数量换入目标币种侧配置,**正式下单前强烈建议先调用** `POST /asset-swap/order/preview` **且 `code=0` 后再用一致的语义提交本接口**。 **请求体不含 `ratio`** - 本接口 `OrderCreateV1Req` 仅含 `from` / `to`,且数组元素均为 `CreateParam`(**仅** `asset` + `amount`)。**请勿**在下单 JSON 中传入 `ratio`;比例字段 `ratio` 只存在于预览接口 `OrderPreviewV1Req.to`(`PreviewToParam`)。 **与预览接口的关键差异(易错点)** - 本接口 `to` 数组元素为 `CreateParam`:**`asset` + `amount`(目标侧数量,十进制字符串)**。 - 预览接口 `to` 为 **`asset` + `ratio`(比例字符串)**,**二者不可混用**:不要把预览里的 `ratio` 原样填到下单的 `amount`,也不要把下单的 `amount` 当成预览的 `ratio`。 **推荐调用顺序** 1. `GET /asset-swap/asset/list`:确认币种支持。 2. `GET /asset-swap/config`:读取 `recommend` / `recommend_v2`(如 `recommend_v2.market` 下某策略的 `schemes`,将 `scheme.name` 作为目标 `asset`、`scheme.ratio` 仅用于 **preview** 的 `to[].ratio`)。 3. `GET /asset-swap/evaluate`(可选):参考可卖数量。 4. `POST /asset-swap/order/preview`:`from` 与 `to`(比例)构造询价。 5. 预览成功后,按产品/服务端约定将预览结果映射为下单的 `from`/`to`(**均为 amount**)再调用本接口。 **字段约定** - `from`:卖出侧,每项为 `asset` + `amount`(字符串,十进制,表示该币种卖出数量)。 - `to`:买入/目标侧,每项为 `asset` + **`amount`**(字符串,十进制,表示该目标币种侧数量;语义与预览的 `ratio` 不同)。 - 本接口仅校验上述 `amount` 的精度与范围;不满足时返回非 0 `code` 及 `message`。预览侧 `to[].ratio` 的校验规则见 `POST /asset-swap/order/preview` 文档。 # 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) @@ -627,7 +627,7 @@ def list_asset_swap_orders_v1_with_http_info(self, **kwargs): # noqa: E501 def preview_asset_swap_order_v1(self, order_preview_v1_req, **kwargs): # noqa: E501 """Portfolio optimization — preview # noqa: E501 - 根据卖出币种数量与**目标分配比例**估算成交与费用,**不写入订单**。`code=0` 时 `data` 含预估 `order` 与 `transaction_fee`。 **与下单接口的关键差异(易错点)** - 本接口 `to` 数组元素为 `PreviewToParam`:**`asset` + `ratio`(比例,十进制字符串)**,表示目标币种在组合中的权重/占比。 - 下单接口 `POST /asset-swap/order/create` 的 `to` 为 **`asset` + `amount`(绝对数量)**,**不是** `ratio`。调用方切勿把两套字段混用。 **如何构造 `to`(ratio)** - 优先从 `GET /asset-swap/config` 的 `data.recommend_v2` 取值:按分组键(如 `market`、`faith`、`conservative`)找到策略列表中的某条 `RecommendV2Strategy`(如 `name` 为 `top2`),将其 `schemes` 映射为预览请求: - `to[].asset` ← `scheme.name`(目标币种符号) - `to[].ratio` ← `scheme.ratio`(与配置一致的比例字符串) - 亦可使用 `recommend` 下扁平 map(币种 → 比例字符串)自行展开为多元素 `to`(每项一个 `asset` + `ratio`)。 - 多目标时各 `ratio` 建议与前端/运营配置一致;是否需加总为 1 以服务端校验为准。 **`from`(卖出侧)** - 每项为 `asset` + `amount`(字符串,十进制),表示本次参与换出的该币种数量。币种应在 `GET /asset-swap/asset/list` 支持范围内;数量级过小或市场深度不足时可能返回非 0 `code`(如无法询价)。 **与下单的衔接** - 预览成功后,将业务允许的预览结果转换为下单所需的 **`from`/`to` 全为 amount** 的请求体再调用 create(具体映射规则以产品文档或服务端约定为准)。 # 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) @@ -652,7 +652,7 @@ def preview_asset_swap_order_v1(self, order_preview_v1_req, **kwargs): # noqa: def preview_asset_swap_order_v1_with_http_info(self, order_preview_v1_req, **kwargs): # noqa: E501 """Portfolio optimization — preview # noqa: E501 - 根据卖出币种数量与**目标分配比例**估算成交与费用,**不写入订单**。`code=0` 时 `data` 含预估 `order` 与 `transaction_fee`。 **与下单接口的关键差异(易错点)** - 本接口 `to` 数组元素为 `PreviewToParam`:**`asset` + `ratio`(比例,十进制字符串)**,表示目标币种在组合中的权重/占比。 - 下单接口 `POST /asset-swap/order/create` 的 `to` 为 **`asset` + `amount`(绝对数量)**,**不是** `ratio`。调用方切勿把两套字段混用。 **如何构造 `to`(ratio)** - 优先从 `GET /asset-swap/config` 的 `data.recommend_v2` 取值:按分组键(如 `market`、`faith`、`conservative`)找到策略列表中的某条 `RecommendV2Strategy`(如 `name` 为 `top2`),将其 `schemes` 映射为预览请求: - `to[].asset` ← `scheme.name`(目标币种符号) - `to[].ratio` ← `scheme.ratio`(与配置一致的比例字符串) - 亦可使用 `recommend` 下扁平 map(币种 → 比例字符串)自行展开为多元素 `to`(每项一个 `asset` + `ratio`)。 - 多目标时各 `ratio` 建议与前端/运营配置一致;是否需加总为 1 以服务端校验为准。 **`from`(卖出侧)** - 每项为 `asset` + `amount`(字符串,十进制),表示本次参与换出的该币种数量。币种应在 `GET /asset-swap/asset/list` 支持范围内;数量级过小或市场深度不足时可能返回非 0 `code`(如无法询价)。 **与下单的衔接** - 预览成功后,将业务允许的预览结果转换为下单所需的 **`from`/`to` 全为 amount** 的请求体再调用 create(具体映射规则以产品文档或服务端约定为准)。 # 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) diff --git a/gate_api/api/bot_api.py b/gate_api/api/bot_api.py index ef277638..da287ead 100644 --- a/gate_api/api/bot_api.py +++ b/gate_api/api/bot_api.py @@ -39,7 +39,7 @@ def __init__(self, api_client=None): def get_ai_hub_strategy_recommend(self, **kwargs): # noqa: E501 """Get AIHub strategy recommendations # noqa: E501 - discover 域唯一正式接口。 支持场景: - `top1` - `bundle` - `filter` - `refresh` 约束: - 主动推荐池仅包含 `spot_grid`、`futures_grid`、`spot_martingale` - 可返回但不主动推荐 `infinite_grid`、`margin_grid` - 不得返回 `contract_martingale`、`smart-position`、`spot-future-arbitrage` - `scene=filter` 时只允许按 `market`、`backtest_apr_gte`、`max_drawdown_lte` 过滤 - `scene=refresh` 通过 `refresh_recommendation_id` 承接刷新上下文;正式最小格式只要求 `strategy_type|market` - 若上游直接透传上一条推荐的 `recommendation_id`,其中第三段 `backtest_id` 当前会被忽略 # 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) @@ -76,7 +76,7 @@ def get_ai_hub_strategy_recommend(self, **kwargs): # noqa: E501 def get_ai_hub_strategy_recommend_with_http_info(self, **kwargs): # noqa: E501 """Get AIHub strategy recommendations # noqa: E501 - discover 域唯一正式接口。 支持场景: - `top1` - `bundle` - `filter` - `refresh` 约束: - 主动推荐池仅包含 `spot_grid`、`futures_grid`、`spot_martingale` - 可返回但不主动推荐 `infinite_grid`、`margin_grid` - 不得返回 `contract_martingale`、`smart-position`、`spot-future-arbitrage` - `scene=filter` 时只允许按 `market`、`backtest_apr_gte`、`max_drawdown_lte` 过滤 - `scene=refresh` 通过 `refresh_recommendation_id` 承接刷新上下文;正式最小格式只要求 `strategy_type|market` - 若上游直接透传上一条推荐的 `recommendation_id`,其中第三段 `backtest_id` 当前会被忽略 # 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) @@ -763,7 +763,7 @@ def post_ai_hub_futures_grid_create_with_http_info(self, futures_grid_create_req def post_ai_hub_spot_martingale_create(self, spot_martingale_create_request, **kwargs): # noqa: E501 """Create Spot Martin # noqa: E501 - 根据传入参数创建现货马丁策略。 止损口径与 App / `MartingaleBot` 一致: - 使用 **`create_params.stop_loss_per_cycle`**(每轮止损比例,小数字符串),**不要**使用 `stop_loss_price` 表达创建侧止损。 - 详情页展示的「止损价」由引擎按轮次计算;创建侧可选 **`create_params.trigger_price`**(触发价)。 # 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) @@ -792,7 +792,7 @@ def post_ai_hub_spot_martingale_create(self, spot_martingale_create_request, **k def post_ai_hub_spot_martingale_create_with_http_info(self, spot_martingale_create_request, **kwargs): # noqa: E501 """Create Spot Martin # noqa: E501 - 根据传入参数创建现货马丁策略。 止损口径与 App / `MartingaleBot` 一致: - 使用 **`create_params.stop_loss_per_cycle`**(每轮止损比例,小数字符串),**不要**使用 `stop_loss_price` 表达创建侧止损。 - 详情页展示的「止损价」由引擎按轮次计算;创建侧可选 **`create_params.trigger_price`**(触发价)。 # 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) diff --git a/gate_api/api/coupon_api.py b/gate_api/api/coupon_api.py index 9a041156..66e7f2a3 100644 --- a/gate_api/api/coupon_api.py +++ b/gate_api/api/coupon_api.py @@ -39,7 +39,7 @@ def __init__(self, api_client=None): def list_user_coupons(self, **kwargs): # noqa: E501 """Coupon Center list # noqa: E501 - ## 接口说明 卡券中心通用列表接口,返回当前登录用户的所有卡券(支持分页、筛选类型、有效/失效切换)。 --- ## 入参(Query Parameters) | 参数名 | 类型 | 必填 | 默认值 | 约束 | 说明 | |--------|------|------|--------|------|------| | `expired` | integer | 否 | `0` | `0` 或 `1` | `0` = 查询有效卡券;`1` = 查询已失效/已使用卡券 | | `limit` | integer | 否 | `10` | 1 ~ 20 | 每页返回的卡券数量 | | `last_id` | integer | 否 | `0` | 1 ~ 1000000000 | 游标分页:上一页最后一条记录的 `id`,首页不传 | | `expire_time` | integer | 否 | `0` | 1 ~ 2147483647 | 游标分页:与 `last_id` 联合使用的过期时间(Unix 时间戳) | | `order_by` | string | 否 | `latest` | `latest` / `expired` | 排序方式:`latest` = 按最新领取排序;`expired` = 按过期时间升序排序 | | `type` | string | 否 | 空(返回全部) | 见下方卡券类型表 | 只返回指定类型的卡券 | | `is_task_coupon` | integer | 否 | 不传(返回全部) | `0` 或 `1` | `0` = 只返回普通卡券;`1` = 只返回任务卡券;不传返回两者 | ### 支持的卡券类型(`type` 参数枚举值) 主站(gate.io 默认站)支持以下类型,不同子站(土耳其、美国、马耳他、澳大利亚)有各自的白名单限制。 | `type` 值 | 卡券名称 | 版本限制(低于此版本不返回/不可传) | |-----------|---------|-------------------------------| | `position_voucher` | 仓位体验券 | 无限制 | | `tradfi_position_voucher` | TradFi仓位体验券 | Android < 7320000 / iOS < 202507320000 不返回 | | `contract_bonus` | 合约体验金 | 无限制 | | `contract_bonus_new` | 合约体验券 | 无限制 | | `commission_rebate` | 手续费返现券 | 无限制 | | `hold_bonus` | 理财体验金 | 无限制 | | `point` | 点卡 | 无限制(仅主站/土耳其站) | | `financial_rate` | 加息券 | 无限制 | | `robot_bonus` | 机器人体验金 | 无限制 | | `loss_protection_copier` | 跟单无忧金 | 无限制 | | `vip_card` | VIP体验卡 | 无限制 | | `interest_voucher` | 杠杆减息券 | 无限制 | | `p2p` | P2P交易抵扣券 | 无限制 | | `cash` | 现金券 | 无限制 | | `crypto_loan_interest` | 抵押借币减息券 | Android < 7290000 / iOS < 202507290000 不返回 | | `copy_trading` | 跟单体验金 | Android < 7320000 / iOS < 202507320000 不返回 | | `alpha_voucher` | Alpha现金券 | Android < 7320000 / iOS < 202507320000 不返回 | | `etf_voucher` | ETF体验金 | Android < 7320000 / iOS < 202507320000 不返回 | --- ## 出参(Response) ### 外层结构 ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": true, \"list\": [ ...卡券对象数组... ] } } ``` | 字段 | 类型 | 说明 | |------|------|------| | `code` | integer | `0` = 成功 | | `message` | string | 响应消息 | | `data.next_page` | boolean | 是否还有下一页。`true` = 有更多数据,需将本页最后一条的 `id` 作为 `last_id` 传入下次请求 | | `data.list` | array | 卡券对象数组,详见下方 | --- ### 卡券对象公共字段(所有类型均包含) | 字段名 | 类型 | 说明 | |--------|------|------| | `id` | integer | 卡券发放记录 ID(`coupon_send_issuing_log.id`),用于分页游标 `last_id` | | `details_id` | integer | 用户卡券详情表的主键 ID(各类型独立表) | | `coupon_type` | string | 卡券类型,见上方枚举表 | | `name` | string | 卡券显示名称(已做 i18n 翻译) | | `amount` | string | 卡券面额(格式化后的字符串,含千分位符号)。不同类型含义不同,见下方说明 | | `currency` | string | 面额单位。不同类型值不同,见下方说明 | | `rule_new` | string | 使用规则文本(列表接口此字段固定返回空字符串 `\"\"`,详情接口才返回) | | `status` | string | 卡券状态,见下方状态枚举 | | `jump_url` | object | 跳转链接 | | `jump_url.web` | string | Web 端跳转链接 | | `jump_url.app` | string | App 端跳转链接 | | `jump_url.mini_app` | string | 小程序跳转链接(多数类型为空字符串) | | `help_url` | object | 帮助中心链接 | | `help_url.web` | string | Web 端帮助链接 | | `help_url.app` | string | App 端帮助链接 | | `expire_time` | integer | 到期时间(Unix 时间戳)。注意:部分类型已激活或已使用后会调整为实际到期时间 | | `expire_time_order_by` | integer | 排序用到期时间(取自发放记录的原始过期时间,不受激活影响) | | `expire_second` | integer | 距到期剩余秒数(已过期或点卡类型返回 `0`) | | `has_usage_history` | boolean | 是否有使用记录(点卡类型固定为 `true`,其余根据类型判断) | | `has_progress` | boolean | 是否展示进度条(仅 `commission_rebate`、`interest_voucher` 及满足条件的任务卡券为 `true`) | | `progress_config` | object | 进度条配置,`has_progress` 为 `false` 时各字段为空字符串 | | `progress_config.total_balance` | string | 需要完成的总量 | | `progress_config.current_used` | string | 已使用量 | | `progress_config.current_achived` | string | 已达成量 | | `progress_config.currency` | string | 进度单位 | | `activation_info` | object | 各类型专属的激活信息,见下方各类型说明(无专属信息的类型返回空对象 `{}`) | | `is_task_coupon` | integer | `0` = 普通卡券;`1` = 任务卡券 | | `upgrade_toast` | boolean | 是否需要提示用户升级 App(版本过旧无法支持该卡券时为 `true`) | | `task_title` | string | 任务标题(仅任务卡券有值,普通卡券为 `\"\"`) | | `task_desc` | string | 任务描述(仅任务卡券有值,普通卡券为 `\"\"`) | | `task_start_at` | integer | 任务开始时间戳(仅 `TASK_EXPIRED` 状态任务卡券有值,其余为 `0`) | | `task_expire_at` | integer | 任务过期时间戳(当前固定为 `0`,保留字段) | | `task_completed_at` | integer | 任务完成时间戳(当前固定为 `0`,保留字段) | | `extra` | array | 扩展字段,固定返回空数组 `[]` | --- ### `status` 状态枚举 | 值 | 适用对象 | 说明 | |----|---------|------| | `NOT_ACTIVE` | 普通卡券 | 待激活(尚未激活) | | `ACTIVATED` | 普通卡券 | 已激活(激活中或激活后) | | `TO_BE_USED` | 普通卡券 | 待使用(有效未用) | | `EXPIRED` | 普通卡券 | 已过期(未使用而过期) | | `RECYCLED` | 普通卡券 | 已回收(如合约充值体验券被回收) | | `INVALID` | 普通卡券 | 已失效 | | `USED` | 普通卡券 | 已使用/已消耗 | | `UNKNOWN` | 普通卡券 | 未知状态 | | `LOCKED` | 普通卡券(`p2p`) | 锁定中(P2P 交易进行中,等待核销) | | `TASK_START` | 任务卡券 | 任务未开始(卡券已发放,任务待开启) | | `TASK_WAIT` | 任务卡券 | 任务进行中(待完成) | | `TASK_DONE` | 任务卡券 | 任务已完成(领取处理中) | | `TASK_EXPIRED` | 任务卡券 | 任务未完成已过期 | | `TASK_NOT_STARTED_EXPIRED` | 任务卡券 | 任务未开始已过期 | | `TASK_RECEIVE_SUCCESS` | 任务卡券 | 任务奖励领取成功 | | `TASK_RECEIVE_FAIL` | 任务卡券 | 任务奖励领取失败 | --- ### `amount` / `currency` 各类型说明 | `coupon_type` | `amount` 说明 | `currency` 值 | |---------------|--------------|---------------| | `point` | 点卡余额(含千分位) | `\"POINT\"` | | `position_voucher` | `券面金额 × 杠杆倍数`(含千分位) | 如 `\"USDT\"` | | `tradfi_position_voucher` | `券面金额 × 杠杆倍数`(含千分位) | `\"USDx\"` | | `financial_rate` | 加息利率数值 + `%`,如 `\"5%\"` | `\"APR\"` | | `vip_card` | VIP 等级数字,如 `\"4\"` | `\"VIP\"` | | `interest_voucher` | 利率折扣百分比 + `%` | 折扣标识(中文站为 `\"折扣\"`,其他站为空) | | `crypto_loan_interest` | 利率折扣百分比 + `%` | `\"\"` | | `alpha_voucher` | 券面金额(含千分位) | Alpha 基础货币(如 `\"USDT\"` 或 `\"ETH\"`) | | 其余类型 | 券面金额(含千分位) | 大写货币符号,如 `\"USDT\"` / `\"GT\"` / `\"BTC\"` | > **注意**:`point` 类型额外返回 `origin_amount` 字段(去掉末尾零的原始余额字符串),其他类型无此字段。 --- ### `activation_info` 各类型专属字段 #### `interest_voucher`(杠杆减息券) ```json { \"supported_pairs\": \"BTC/USDT\", \"transaction_type\": \"borrow\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `supported_pairs` | string | 适用交易对,`/` 分隔,如 `\"BTC/USDT\"` | | `transaction_type` | string | 交易类型(如 `borrow`) | #### `contract_bonus_new`(合约体验券) ```json { \"received_expired_hour\": 48 } ``` | 字段 | 类型 | 说明 | |------|------|------| | `received_expired_hour` | integer | 激活后有效小时数(超时自动回收) | #### `contract_bonus`(合约体验金) ```json { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false } ``` | 字段 | 类型 | 说明 | |------|------|------| | `check_unified_account_mode` | boolean | 是否需要检查统一账户模式(固定 `true`) | | `received_expired_days` | integer | 激活后有效天数 | | `abtest` | boolean | AB 测试标记(当前固定 `false`) | #### `commission_rebate`(手续费返现券) ```json { \"market\": \"futures\", \"market_name\": \"Futures\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `market` | string | 适用市场,枚举值:`spot` / `margin` / `futures` / `alpha` / `etf` / `tradfi` | | `market_name` | string | 市场显示名称(已 i18n 翻译) | #### `robot_bonus`(机器人体验金) ```json { \"designated_bots\": \"DISABLED\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `designated_bots` | string | `\"ENABLED\"` = 仅限指定策略使用;`\"DISABLED\"` = 不限制策略 | #### `position_voucher`(仓位体验券) ```json { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"100\", \"position_bonus\": \"500\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `symbols` | string | 适用交易对(如 `\"BTC_USDT\"`),空表示不限 | | `leverage` | string | 杠杆倍数 | | `need_user_funds` | integer | `0` = 不需要用户自有资金;`1` = 需要配资 | | `user_funds_amount` | string | 需要用户配资的金额(`need_user_funds=1` 时有意义) | | `position_bonus` | string | 券面原始金额(去掉末尾零) | #### `tradfi_position_voucher`(TradFi 仓位体验券) ```json { \"symbols\": \"AAPL\", \"leverage\": \"5\", \"position_bonus\": \"200\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `symbols` | string | 适用 TradFi 品种(如 `\"AAPL\"`),空表示不限 | | `leverage` | string | 杠杆倍数 | | `position_bonus` | string | 券面原始金额(去掉末尾零) | #### `etf_voucher`(ETF 体验金) ```json { \"currency_markets\": \"BTC3L_USDT,ETH3L_USDT\", \"amount\": \"50\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `currency_markets` | string | 适用的 ETF 市场列表(逗号分隔) | | `amount` | string | 券面原始金额(去掉末尾零) | #### 其余类型 `point`(点卡)、`hold_bonus`(理财体验金)、`loss_protection_copier`(跟单无忧金)、`vip_card`(VIP体验卡)、`p2p`(P2P交易抵扣券)、`cash`(现金券)、`crypto_loan_interest`(抵押借币减息券)、`copy_trading`(跟单体验金)、`alpha_voucher`(Alpha现金券)、`financial_rate`(加息券)等类型返回空对象: ```json {} ``` --- ## 完整响应示例 ### 普通卡券(合约体验金) ```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\": [] } ] } } ``` ### 任务卡券(手续费返现券) ```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) ```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 + ## 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) @@ -70,7 +70,7 @@ def list_user_coupons(self, **kwargs): # noqa: E501 def list_user_coupons_with_http_info(self, **kwargs): # noqa: E501 """Coupon Center list # noqa: E501 - ## 接口说明 卡券中心通用列表接口,返回当前登录用户的所有卡券(支持分页、筛选类型、有效/失效切换)。 --- ## 入参(Query Parameters) | 参数名 | 类型 | 必填 | 默认值 | 约束 | 说明 | |--------|------|------|--------|------|------| | `expired` | integer | 否 | `0` | `0` 或 `1` | `0` = 查询有效卡券;`1` = 查询已失效/已使用卡券 | | `limit` | integer | 否 | `10` | 1 ~ 20 | 每页返回的卡券数量 | | `last_id` | integer | 否 | `0` | 1 ~ 1000000000 | 游标分页:上一页最后一条记录的 `id`,首页不传 | | `expire_time` | integer | 否 | `0` | 1 ~ 2147483647 | 游标分页:与 `last_id` 联合使用的过期时间(Unix 时间戳) | | `order_by` | string | 否 | `latest` | `latest` / `expired` | 排序方式:`latest` = 按最新领取排序;`expired` = 按过期时间升序排序 | | `type` | string | 否 | 空(返回全部) | 见下方卡券类型表 | 只返回指定类型的卡券 | | `is_task_coupon` | integer | 否 | 不传(返回全部) | `0` 或 `1` | `0` = 只返回普通卡券;`1` = 只返回任务卡券;不传返回两者 | ### 支持的卡券类型(`type` 参数枚举值) 主站(gate.io 默认站)支持以下类型,不同子站(土耳其、美国、马耳他、澳大利亚)有各自的白名单限制。 | `type` 值 | 卡券名称 | 版本限制(低于此版本不返回/不可传) | |-----------|---------|-------------------------------| | `position_voucher` | 仓位体验券 | 无限制 | | `tradfi_position_voucher` | TradFi仓位体验券 | Android < 7320000 / iOS < 202507320000 不返回 | | `contract_bonus` | 合约体验金 | 无限制 | | `contract_bonus_new` | 合约体验券 | 无限制 | | `commission_rebate` | 手续费返现券 | 无限制 | | `hold_bonus` | 理财体验金 | 无限制 | | `point` | 点卡 | 无限制(仅主站/土耳其站) | | `financial_rate` | 加息券 | 无限制 | | `robot_bonus` | 机器人体验金 | 无限制 | | `loss_protection_copier` | 跟单无忧金 | 无限制 | | `vip_card` | VIP体验卡 | 无限制 | | `interest_voucher` | 杠杆减息券 | 无限制 | | `p2p` | P2P交易抵扣券 | 无限制 | | `cash` | 现金券 | 无限制 | | `crypto_loan_interest` | 抵押借币减息券 | Android < 7290000 / iOS < 202507290000 不返回 | | `copy_trading` | 跟单体验金 | Android < 7320000 / iOS < 202507320000 不返回 | | `alpha_voucher` | Alpha现金券 | Android < 7320000 / iOS < 202507320000 不返回 | | `etf_voucher` | ETF体验金 | Android < 7320000 / iOS < 202507320000 不返回 | --- ## 出参(Response) ### 外层结构 ```json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": true, \"list\": [ ...卡券对象数组... ] } } ``` | 字段 | 类型 | 说明 | |------|------|------| | `code` | integer | `0` = 成功 | | `message` | string | 响应消息 | | `data.next_page` | boolean | 是否还有下一页。`true` = 有更多数据,需将本页最后一条的 `id` 作为 `last_id` 传入下次请求 | | `data.list` | array | 卡券对象数组,详见下方 | --- ### 卡券对象公共字段(所有类型均包含) | 字段名 | 类型 | 说明 | |--------|------|------| | `id` | integer | 卡券发放记录 ID(`coupon_send_issuing_log.id`),用于分页游标 `last_id` | | `details_id` | integer | 用户卡券详情表的主键 ID(各类型独立表) | | `coupon_type` | string | 卡券类型,见上方枚举表 | | `name` | string | 卡券显示名称(已做 i18n 翻译) | | `amount` | string | 卡券面额(格式化后的字符串,含千分位符号)。不同类型含义不同,见下方说明 | | `currency` | string | 面额单位。不同类型值不同,见下方说明 | | `rule_new` | string | 使用规则文本(列表接口此字段固定返回空字符串 `\"\"`,详情接口才返回) | | `status` | string | 卡券状态,见下方状态枚举 | | `jump_url` | object | 跳转链接 | | `jump_url.web` | string | Web 端跳转链接 | | `jump_url.app` | string | App 端跳转链接 | | `jump_url.mini_app` | string | 小程序跳转链接(多数类型为空字符串) | | `help_url` | object | 帮助中心链接 | | `help_url.web` | string | Web 端帮助链接 | | `help_url.app` | string | App 端帮助链接 | | `expire_time` | integer | 到期时间(Unix 时间戳)。注意:部分类型已激活或已使用后会调整为实际到期时间 | | `expire_time_order_by` | integer | 排序用到期时间(取自发放记录的原始过期时间,不受激活影响) | | `expire_second` | integer | 距到期剩余秒数(已过期或点卡类型返回 `0`) | | `has_usage_history` | boolean | 是否有使用记录(点卡类型固定为 `true`,其余根据类型判断) | | `has_progress` | boolean | 是否展示进度条(仅 `commission_rebate`、`interest_voucher` 及满足条件的任务卡券为 `true`) | | `progress_config` | object | 进度条配置,`has_progress` 为 `false` 时各字段为空字符串 | | `progress_config.total_balance` | string | 需要完成的总量 | | `progress_config.current_used` | string | 已使用量 | | `progress_config.current_achived` | string | 已达成量 | | `progress_config.currency` | string | 进度单位 | | `activation_info` | object | 各类型专属的激活信息,见下方各类型说明(无专属信息的类型返回空对象 `{}`) | | `is_task_coupon` | integer | `0` = 普通卡券;`1` = 任务卡券 | | `upgrade_toast` | boolean | 是否需要提示用户升级 App(版本过旧无法支持该卡券时为 `true`) | | `task_title` | string | 任务标题(仅任务卡券有值,普通卡券为 `\"\"`) | | `task_desc` | string | 任务描述(仅任务卡券有值,普通卡券为 `\"\"`) | | `task_start_at` | integer | 任务开始时间戳(仅 `TASK_EXPIRED` 状态任务卡券有值,其余为 `0`) | | `task_expire_at` | integer | 任务过期时间戳(当前固定为 `0`,保留字段) | | `task_completed_at` | integer | 任务完成时间戳(当前固定为 `0`,保留字段) | | `extra` | array | 扩展字段,固定返回空数组 `[]` | --- ### `status` 状态枚举 | 值 | 适用对象 | 说明 | |----|---------|------| | `NOT_ACTIVE` | 普通卡券 | 待激活(尚未激活) | | `ACTIVATED` | 普通卡券 | 已激活(激活中或激活后) | | `TO_BE_USED` | 普通卡券 | 待使用(有效未用) | | `EXPIRED` | 普通卡券 | 已过期(未使用而过期) | | `RECYCLED` | 普通卡券 | 已回收(如合约充值体验券被回收) | | `INVALID` | 普通卡券 | 已失效 | | `USED` | 普通卡券 | 已使用/已消耗 | | `UNKNOWN` | 普通卡券 | 未知状态 | | `LOCKED` | 普通卡券(`p2p`) | 锁定中(P2P 交易进行中,等待核销) | | `TASK_START` | 任务卡券 | 任务未开始(卡券已发放,任务待开启) | | `TASK_WAIT` | 任务卡券 | 任务进行中(待完成) | | `TASK_DONE` | 任务卡券 | 任务已完成(领取处理中) | | `TASK_EXPIRED` | 任务卡券 | 任务未完成已过期 | | `TASK_NOT_STARTED_EXPIRED` | 任务卡券 | 任务未开始已过期 | | `TASK_RECEIVE_SUCCESS` | 任务卡券 | 任务奖励领取成功 | | `TASK_RECEIVE_FAIL` | 任务卡券 | 任务奖励领取失败 | --- ### `amount` / `currency` 各类型说明 | `coupon_type` | `amount` 说明 | `currency` 值 | |---------------|--------------|---------------| | `point` | 点卡余额(含千分位) | `\"POINT\"` | | `position_voucher` | `券面金额 × 杠杆倍数`(含千分位) | 如 `\"USDT\"` | | `tradfi_position_voucher` | `券面金额 × 杠杆倍数`(含千分位) | `\"USDx\"` | | `financial_rate` | 加息利率数值 + `%`,如 `\"5%\"` | `\"APR\"` | | `vip_card` | VIP 等级数字,如 `\"4\"` | `\"VIP\"` | | `interest_voucher` | 利率折扣百分比 + `%` | 折扣标识(中文站为 `\"折扣\"`,其他站为空) | | `crypto_loan_interest` | 利率折扣百分比 + `%` | `\"\"` | | `alpha_voucher` | 券面金额(含千分位) | Alpha 基础货币(如 `\"USDT\"` 或 `\"ETH\"`) | | 其余类型 | 券面金额(含千分位) | 大写货币符号,如 `\"USDT\"` / `\"GT\"` / `\"BTC\"` | > **注意**:`point` 类型额外返回 `origin_amount` 字段(去掉末尾零的原始余额字符串),其他类型无此字段。 --- ### `activation_info` 各类型专属字段 #### `interest_voucher`(杠杆减息券) ```json { \"supported_pairs\": \"BTC/USDT\", \"transaction_type\": \"borrow\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `supported_pairs` | string | 适用交易对,`/` 分隔,如 `\"BTC/USDT\"` | | `transaction_type` | string | 交易类型(如 `borrow`) | #### `contract_bonus_new`(合约体验券) ```json { \"received_expired_hour\": 48 } ``` | 字段 | 类型 | 说明 | |------|------|------| | `received_expired_hour` | integer | 激活后有效小时数(超时自动回收) | #### `contract_bonus`(合约体验金) ```json { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false } ``` | 字段 | 类型 | 说明 | |------|------|------| | `check_unified_account_mode` | boolean | 是否需要检查统一账户模式(固定 `true`) | | `received_expired_days` | integer | 激活后有效天数 | | `abtest` | boolean | AB 测试标记(当前固定 `false`) | #### `commission_rebate`(手续费返现券) ```json { \"market\": \"futures\", \"market_name\": \"Futures\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `market` | string | 适用市场,枚举值:`spot` / `margin` / `futures` / `alpha` / `etf` / `tradfi` | | `market_name` | string | 市场显示名称(已 i18n 翻译) | #### `robot_bonus`(机器人体验金) ```json { \"designated_bots\": \"DISABLED\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `designated_bots` | string | `\"ENABLED\"` = 仅限指定策略使用;`\"DISABLED\"` = 不限制策略 | #### `position_voucher`(仓位体验券) ```json { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"100\", \"position_bonus\": \"500\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `symbols` | string | 适用交易对(如 `\"BTC_USDT\"`),空表示不限 | | `leverage` | string | 杠杆倍数 | | `need_user_funds` | integer | `0` = 不需要用户自有资金;`1` = 需要配资 | | `user_funds_amount` | string | 需要用户配资的金额(`need_user_funds=1` 时有意义) | | `position_bonus` | string | 券面原始金额(去掉末尾零) | #### `tradfi_position_voucher`(TradFi 仓位体验券) ```json { \"symbols\": \"AAPL\", \"leverage\": \"5\", \"position_bonus\": \"200\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `symbols` | string | 适用 TradFi 品种(如 `\"AAPL\"`),空表示不限 | | `leverage` | string | 杠杆倍数 | | `position_bonus` | string | 券面原始金额(去掉末尾零) | #### `etf_voucher`(ETF 体验金) ```json { \"currency_markets\": \"BTC3L_USDT,ETH3L_USDT\", \"amount\": \"50\" } ``` | 字段 | 类型 | 说明 | |------|------|------| | `currency_markets` | string | 适用的 ETF 市场列表(逗号分隔) | | `amount` | string | 券面原始金额(去掉末尾零) | #### 其余类型 `point`(点卡)、`hold_bonus`(理财体验金)、`loss_protection_copier`(跟单无忧金)、`vip_card`(VIP体验卡)、`p2p`(P2P交易抵扣券)、`cash`(现金券)、`crypto_loan_interest`(抵押借币减息券)、`copy_trading`(跟单体验金)、`alpha_voucher`(Alpha现金券)、`financial_rate`(加息券)等类型返回空对象: ```json {} ``` --- ## 完整响应示例 ### 普通卡券(合约体验金) ```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\": [] } ] } } ``` ### 任务卡券(手续费返现券) ```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) ```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 + ## 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) @@ -191,7 +191,7 @@ def list_user_coupons_with_http_info(self, **kwargs): # noqa: E501 def get_user_coupon_detail(self, coupon_type, detail_id, **kwargs): # noqa: E501 """Coupon Center details # noqa: E501 - ## 接口说明 卡券中心通用详情接口,返回单张卡券的完整详细信息,相比列表接口额外包含:使用规则文本、分区块的卡券详细属性(`extra`)、来源完成任务信息(`from_task`)。 ## 入参(Query Parameters) | 参数名 | 类型 | 必填 | 约束 | 说明 | | ---------------- | ------- | --- | --------------------- | ------------------------------------------------- | | `coupon_type` | string | 是 | 见卡券类型枚举 | 卡券类型,取值与 `coupon-list` 接口一致 | | `detail_id` | integer | 是 | min:1, max:2147483647 | 普通卡券传 `details_id`;任务卡券传发放记录的 `id`(即列表中的 `id` 字段) | | `is_task_coupon` | integer | 否 | `0` 或 `1`,默认 `0` | `0` = 普通卡券;`1` = 任务卡券 | > **注意**:普通卡券与任务卡券的 `detail_id` 语义不同。 > > - 普通卡券:`detail_id` = 各类型用户卡券表的主键(列表中的 `details_id`) > - 任务卡券:`detail_id` = 发放记录表主键(列表中的 `id`) --- ## 出参(Response) ### 外层结构 ```json { \"code\": 0, \"message\": \"\", \"data\": { ...卡券详情对象... } } ``` ### 详情对象字段 详情接口返回与列表接口相同的基础字段,并在以下字段上有差异:rule_new | 字段名 | 类型 | 与列表的差异 | 说明 | | ------------------- | ------- | ----------------- | -------------------------------------------- | | `rule_new` | string | **有值**(列表返回空字符串) | 卡券使用规则文本(已 i18n 翻译) | | `extra` | array | **有值**(列表返回 `[]`) | 分区块的卡券详细属性,见下方说明 | | `from_task` | boolean | **新增字段** | 是否由完成任务兑换而来的普通卡券(任务完成后自动发放的子卡券) | | `task_start_at` | integer | **可能有值** | 任务卡券:任务开始时间戳;普通卡券(`from_task=true`):源任务的开始时间 | | `task_expire_at` | integer | **可能有值** | 任务卡券:领取有效期截止时间戳(`0` 表示不限);普通卡券固定 `0` | | `task_completed_at` | integer | **可能有值** | 任务卡券:任务完成时间戳;普通卡券(`from_task=true`):源任务的完成时间 | 其余基础字段(`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`)与列表接口(`listUserCoupons`)完全一致。 --- ## `extra` 字段说明 `extra` 是一个**二维数组**,由若干个「区块」组成,前端按区块分隔展示。 ``` extra = [ [block1_item1, block1_item2, ...], // 区块1:卡券名称 / 来源 / 状态 [block2_item1, block2_item2, ...], // 区块2:卡券核心属性 [block3_item1, block3_item2, ...], // 区块3:时间信息 ] ``` ### `extra` 内每个 item 的结构 | 字段 | 类型 | 说明 | | ------- | ---------------- | --------------- | | `type` | string | 展示类型,枚举值见下表 | | `key` | string | 标签文本(已 i18n 翻译) | | `value` | string / integer | 值,类型随 `type` 变化 | ### `type` 枚举 | `type` 值 | `value` 类型 | 说明 | | ----------- | ---------- | ------------------------ | | `string` | string | 普通文本展示 | | `timestamp` | integer | Unix 时间戳,前端负责格式化为日期时间 | | `day` | integer | 天数(整数) | | `hour` | integer | 小时数(整数) | | `status` | string | 状态枚举值(与 `status` 字段含义相同) | | `btn` | string | 带跳转按钮,`value` 为按钮文案 | --- ## 区块1(固定):卡券名称 / 来源 / 状态 所有类型(除 `point` 外)均包含此区块,固定字段如下: | 序号 | `type` | `key`(翻译 key) | `value` | 备注 | | --- | -------- | ----------------------------- | ------- | --------- | | 1 | `string` | `COUPON_VOUCHER_NAME`(卡券名称) | 卡券名称文本 | 必填 | | 2 | `string` | `COUPON_VOUCHER_SOURCE`(卡券来源) | 来源活动名称 | 有来源时才返回此项 | | 3 | `status` | `COUPON_STATUS`(卡券状态) | 状态枚举值 | 必填 | > `point`(点卡)类型的 `extra` 固定为空数组 `[]`。 --- ## 区块2 + 区块3:各类型专属字段 ### `contract_bonus`(合约体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ----- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `day` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效天数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 仅已激活时 | --- ### `contract_bonus_new`(合约体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ------------------ | ------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_MAXIMUM_LEVERAGE`(最大杠杆倍数) | `NX` 或 `Unlimited` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对列表 | 有限定交易对时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ---- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `hour` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效小时数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 已激活时 | --- ### `commission_rebate`(手续费返现券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | -------------------------------- | -------------- | --- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_REBATE_PERCENTAGE`(返现比例) | `N%` | 必填 | | `string` | `COUPON_BALANCE`(剩余额度) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_USED_AMOUNT`(已用额度) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | 市场名称 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | --------------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 需激活的券才显示 | | `day` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效天数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 状态为已激活/已使用/已失效时 | --- ### `hold_bonus`(理财体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `financial_rate`(加息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------------ | ----------------------- | --- | | `string` | `COUPON_RATE_UP_CAP`(加息上限) | `金额 + 货币` 或 `Unlimited` | 必填 | | `string` | `COUPON_RATE_UP_APR`(加息比例) | `N%APR` | 必填 | | `string` | `COUPON_RATE_UP_TERM_DAYS`(加息天数) | `N天` 或 `Unlimited` | 必填 | | `string` | `COUPON_AVAILABLE_INVESTMENT_TYPE`(可用理财类型) | 如 `Lend & Earn` | 必填 | | `string` | `COUPON_AVAILABLE_PRODUCTS`(可用产品) | 产品名列表(逗号分隔) | 必填 | | `string` | `COUPON_MINIMUM_INVESTMENT_UP`(起购金额) | `≥ 金额 货币` 或区间 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `robot_bonus`(机器人体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_BOTS`(适用机器人) | 如 `Future Grids` | 非限定机器人时 | | `string` | `COUPON_MAXIMUM_LEVERAGE`(最大杠杆倍数) | 倍数 | 非限定且有杠杆限制时 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对或 `All` | 非限定机器人时 | | `string` | `COUPON_STOP_LOSS_AMOUNT`(止损金额) | `金额 + 货币` | 有止损金额时 | | `btn` | `COUPON_DESIGNATED_BOTS`(限定机器人) | `ViewMyaccountLeft` 按钮文案 | 限定机器人时 | | `day` | `COUPON_RUNTIME_DURATION`(运行时长) | 天数 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `loss_protection_copier`(跟单无忧金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ----------------------------------- | ------------------- | ------------ | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | `Contract` 或 `Spot` | 必填 | | `string` | `COUPON_MINIMUM_INVESTMENT`(最小跟单金额) | `金额 + 货币` | 有最小金额限制时 | | `string` | `COUPON_AVAILABLE_TRADERS`(可用交易员) | 昵称列表 | 部分可用时(指定交易员) | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有使用时间时 | --- ### `position_voucher`(仓位体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ----------------- | ------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额×杠杆 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | `USDT永续合约` | 必填 | | `hour` | `COUPON_POSITION_DURATION`(仓位时长) | 小时数 | 必填 | | `string` | `COUPON_LEVERAGE`(杠杆倍数) | `NX` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对,空表示不限 | 必填 | | `string` | `COUPON_USER_INVESTMENT_QUOTA`(配资额度) | `金额 + 货币` | 需要用户配资时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `tradfi_position_voucher`(TradFi仓位体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------------ | ----------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额×杠杆 + 空格 + 货币` | | `string` | `COUPON_POSITION_DURATION`(仓位时长) | `N个交易日` | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | TradFi 品种 | | `string` | `COUPON_LEVERAGE`(杠杆倍数) | `Nx` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `vip_card`(VIP体验卡) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------- | ---------- | | `string` | `COUPON_VIP_TIER`(VIP等级) | `VIPN` | | `day` | `COUPON_BENEFIT_DURATION`(权益时长) | 天数 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ----------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 创建时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 状态为已使用或已失效时 | | `timestamp` | `COUPON_EXPIRY_TIME`(失效时间) | 到期时间戳 | 状态为已使用或已失效时 | --- ### `p2p`(P2P交易抵扣券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------- | -------------- | | `string` | `COUPON_DEDUCTION_LIMIT`(抵扣上限) | `金额 + 货币` | | `string` | `COUPON_DEDUCTION_RATIO`(折扣比例) | `N%` | | `string` | `COUPON_USAGE_CONDITIONS`(使用条件) | `每笔交易不低于 N 货币` | | `string` | `COUPON_SUPPORTED_FIAT`(适用法币) | 法币列表或 `全部` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `interest_voucher`(杠杆减息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | --------------------------------------- | ----------------- | -------- | | `string` | `max_discount_amount`(最大减免金额) | `金额 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_TRADES`(适用交易) | `Isolated Margin` | 必填 | | `string` | `COUPON_INTEREST_DISCOUNT`(减免比例) | `N%` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对,空表示不限 | 必填 | | `string` | `COUPON_BALANCE`(剩余额度) | `金额 + 货币` | 必填 | | `string` | `COUPON_BORROWING_AMOUNT_LIMIT`(借款金额限制) | 借款金额范围 | 有借款金额限制时 | | `hour` | `COUPON_VALIDITY_PERIOD`(减免时长) | 小时数 | 有设置时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | ------------------------------------- | ---------- | -------------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 状态为待使用或已过期时 | | `timestamp` | `COUPON_EFFECTIVE_TIME`(减免开始时间) | 开始使用时间戳 | 状态为失效/使用中/已使用时 | | `timestamp` | `COUPON_DISCOUNT_EXPIRY_TIME`(减免失效时间) | 减免到期时间戳 | 状态为失效/使用中/已使用时 | --- ### `cash`(现金券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有兑换时间时 | --- ### `crypto_loan_interest`(抵押借币减息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ---------------------------------------------- | ---------- | -------- | | `string` | `coupon_center_discount_max_amount`(最大减免金额) | `金额 + 货币` | 必填 | | `string` | `COUPON_INTEREST_DISCOUNT`(减免比例) | `N%` | 必填 | | `string` | `coupon_center_loan_min_amount`(最小借款金额) | `金额 + 货币` | 有最小金额要求时 | | `hour` | `coupon_center_interest_discount_period`(减息时长) | 小时数 | 必填 | | `string` | `coupon_center_trade_applicable`(适用交易) | `活期` | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `copy_trading`(跟单体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ---------------------------------- | ------------------- | ---- | | `string` | `COUPON_VOUCHER_AMOUNT`(面值) | `金额 + 货币` | 必填 | | `string` | `coupon_applicable_traders`(适用交易员) | `全部` 或 `指定交易员` | 必填 | | `string` | `coupon_trade_category`(适用交易类型) | `Spot` 或 `Contract` | 必填 | | `day` | `coupon_usage_days`(体验有效天数) | 天数 | 必填 | | `string` | `COUPON_STOP_LOSS_AMOUNT`(止损金额) | `金额 + 货币` | 必填 | | `string` | `coupon_ineligible_mkts`(不可体验市场) | 市场列表 | 有限制时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `alpha_voucher`(Alpha现金券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有领取时间时 | --- ### `etf_voucher`(ETF体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | | `hour` | `coupon_trial_duration`(体验时长) | 小时数 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | ETF 市场列表 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有使用时间时 | --- ### `point`(点卡) `extra` 固定返回 `[]`,无任何区块。 --- ## 完整响应示例 ### 普通卡券(手续费返现券) ```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\": \"卡券名称\", \"value\": \"10% Futures Commission Rebate\" }, { \"type\": \"string\", \"key\": \"卡券来源\", \"value\": \"新用户注册活动\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"卡券金额\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"返现比例\", \"value\": \"10%\" }, { \"type\": \"string\", \"key\": \"剩余额度\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"已用额度\", \"value\": \"0 USDT\" }, { \"type\": \"string\", \"key\": \"适用市场\", \"value\": \"Futures\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 }, { \"type\": \"day\", \"key\": \"使用时长\", \"value\": 30 } ] ] } } ``` ### 任务卡券(仓位体验券) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"position_voucher\", \"name\": \"仓位体验券\", \"amount\": \"5,000\", \"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\": \"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\": \"完成10000 USDT合约交易量,获得仓位体验券\", \"task_desc\": \"在永续合约中完成指定交易量任务\", \"task_start_at\": 1757000000, \"task_expire_at\": 1760000000, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"卡券名称\", \"value\": \"仓位体验券\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TASK_WAIT\" } ], [ { \"type\": \"string\", \"key\": \"卡券金额\", \"value\": \"5,000 USDT\" }, { \"type\": \"string\", \"key\": \"适用市场\", \"value\": \"USDT永续合约\" }, { \"type\": \"hour\", \"key\": \"仓位时长\", \"value\": 24 }, { \"type\": \"string\", \"key\": \"杠杆倍数\", \"value\": \"10X\" }, { \"type\": \"string\", \"key\": \"限定交易对\", \"value\": \"BTCUSDT\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 } ] ] } } ``` ### P2P 交易抵扣券(p2p) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 5678901, \"details_id\": 234, \"coupon_type\": \"p2p\", \"name\": \"5.5% P2P交易抵扣券\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"每笔P2P交易可抵扣最高100 USDT手续费,折扣比例5.5%,每笔交易不低于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\": \"卡券名称\", \"value\": \"5.5% P2P交易抵扣券\" }, { \"type\": \"string\", \"key\": \"卡券来源\", \"value\": \"新用户注册活动\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"抵扣上限\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"折扣比例\", \"value\": \"5.5%\" }, { \"type\": \"string\", \"key\": \"使用条件\", \"value\": \"每笔交易不低于 200 USDT\" }, { \"type\": \"string\", \"key\": \"适用法币\", \"value\": \"CNY、USD\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 }, { \"type\": \"timestamp\", \"key\": \"过期时间\", \"value\": 1760000000 } ] ] } } ``` --- ## 错误码 | `code` | 说明 | | -------------------------------------------- | ------------------------- | | `0` | 成功 | | `10001`(`COUPON_SEND_ISSUING_LOG_NOT_FOUND`) | 卡券记录不存在或不属于当前用户 | | `10000`(`PARAMS_INVALID`) | 参数无效(如任务卡券缺少 coupon_info) | | `50105`(`INVALID_PARAMETERS`) | 入参校验失败(如 coupon_type 非法) | # 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) @@ -218,7 +218,7 @@ def get_user_coupon_detail(self, coupon_type, detail_id, **kwargs): # noqa: E50 def get_user_coupon_detail_with_http_info(self, coupon_type, detail_id, **kwargs): # noqa: E501 """Coupon Center details # noqa: E501 - ## 接口说明 卡券中心通用详情接口,返回单张卡券的完整详细信息,相比列表接口额外包含:使用规则文本、分区块的卡券详细属性(`extra`)、来源完成任务信息(`from_task`)。 ## 入参(Query Parameters) | 参数名 | 类型 | 必填 | 约束 | 说明 | | ---------------- | ------- | --- | --------------------- | ------------------------------------------------- | | `coupon_type` | string | 是 | 见卡券类型枚举 | 卡券类型,取值与 `coupon-list` 接口一致 | | `detail_id` | integer | 是 | min:1, max:2147483647 | 普通卡券传 `details_id`;任务卡券传发放记录的 `id`(即列表中的 `id` 字段) | | `is_task_coupon` | integer | 否 | `0` 或 `1`,默认 `0` | `0` = 普通卡券;`1` = 任务卡券 | > **注意**:普通卡券与任务卡券的 `detail_id` 语义不同。 > > - 普通卡券:`detail_id` = 各类型用户卡券表的主键(列表中的 `details_id`) > - 任务卡券:`detail_id` = 发放记录表主键(列表中的 `id`) --- ## 出参(Response) ### 外层结构 ```json { \"code\": 0, \"message\": \"\", \"data\": { ...卡券详情对象... } } ``` ### 详情对象字段 详情接口返回与列表接口相同的基础字段,并在以下字段上有差异:rule_new | 字段名 | 类型 | 与列表的差异 | 说明 | | ------------------- | ------- | ----------------- | -------------------------------------------- | | `rule_new` | string | **有值**(列表返回空字符串) | 卡券使用规则文本(已 i18n 翻译) | | `extra` | array | **有值**(列表返回 `[]`) | 分区块的卡券详细属性,见下方说明 | | `from_task` | boolean | **新增字段** | 是否由完成任务兑换而来的普通卡券(任务完成后自动发放的子卡券) | | `task_start_at` | integer | **可能有值** | 任务卡券:任务开始时间戳;普通卡券(`from_task=true`):源任务的开始时间 | | `task_expire_at` | integer | **可能有值** | 任务卡券:领取有效期截止时间戳(`0` 表示不限);普通卡券固定 `0` | | `task_completed_at` | integer | **可能有值** | 任务卡券:任务完成时间戳;普通卡券(`from_task=true`):源任务的完成时间 | 其余基础字段(`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`)与列表接口(`listUserCoupons`)完全一致。 --- ## `extra` 字段说明 `extra` 是一个**二维数组**,由若干个「区块」组成,前端按区块分隔展示。 ``` extra = [ [block1_item1, block1_item2, ...], // 区块1:卡券名称 / 来源 / 状态 [block2_item1, block2_item2, ...], // 区块2:卡券核心属性 [block3_item1, block3_item2, ...], // 区块3:时间信息 ] ``` ### `extra` 内每个 item 的结构 | 字段 | 类型 | 说明 | | ------- | ---------------- | --------------- | | `type` | string | 展示类型,枚举值见下表 | | `key` | string | 标签文本(已 i18n 翻译) | | `value` | string / integer | 值,类型随 `type` 变化 | ### `type` 枚举 | `type` 值 | `value` 类型 | 说明 | | ----------- | ---------- | ------------------------ | | `string` | string | 普通文本展示 | | `timestamp` | integer | Unix 时间戳,前端负责格式化为日期时间 | | `day` | integer | 天数(整数) | | `hour` | integer | 小时数(整数) | | `status` | string | 状态枚举值(与 `status` 字段含义相同) | | `btn` | string | 带跳转按钮,`value` 为按钮文案 | --- ## 区块1(固定):卡券名称 / 来源 / 状态 所有类型(除 `point` 外)均包含此区块,固定字段如下: | 序号 | `type` | `key`(翻译 key) | `value` | 备注 | | --- | -------- | ----------------------------- | ------- | --------- | | 1 | `string` | `COUPON_VOUCHER_NAME`(卡券名称) | 卡券名称文本 | 必填 | | 2 | `string` | `COUPON_VOUCHER_SOURCE`(卡券来源) | 来源活动名称 | 有来源时才返回此项 | | 3 | `status` | `COUPON_STATUS`(卡券状态) | 状态枚举值 | 必填 | > `point`(点卡)类型的 `extra` 固定为空数组 `[]`。 --- ## 区块2 + 区块3:各类型专属字段 ### `contract_bonus`(合约体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ----- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `day` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效天数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 仅已激活时 | --- ### `contract_bonus_new`(合约体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ------------------ | ------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_MAXIMUM_LEVERAGE`(最大杠杆倍数) | `NX` 或 `Unlimited` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对列表 | 有限定交易对时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ---- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `hour` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效小时数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 已激活时 | --- ### `commission_rebate`(手续费返现券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | -------------------------------- | -------------- | --- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_REBATE_PERCENTAGE`(返现比例) | `N%` | 必填 | | `string` | `COUPON_BALANCE`(剩余额度) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_USED_AMOUNT`(已用额度) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | 市场名称 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | --------------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 需激活的券才显示 | | `day` | `COUPON_USAGE_DURATION`(使用时长) | 激活后有效天数 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 状态为已激活/已使用/已失效时 | --- ### `hold_bonus`(理财体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | -------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `financial_rate`(加息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------------ | ----------------------- | --- | | `string` | `COUPON_RATE_UP_CAP`(加息上限) | `金额 + 货币` 或 `Unlimited` | 必填 | | `string` | `COUPON_RATE_UP_APR`(加息比例) | `N%APR` | 必填 | | `string` | `COUPON_RATE_UP_TERM_DAYS`(加息天数) | `N天` 或 `Unlimited` | 必填 | | `string` | `COUPON_AVAILABLE_INVESTMENT_TYPE`(可用理财类型) | 如 `Lend & Earn` | 必填 | | `string` | `COUPON_AVAILABLE_PRODUCTS`(可用产品) | 产品名列表(逗号分隔) | 必填 | | `string` | `COUPON_MINIMUM_INVESTMENT_UP`(起购金额) | `≥ 金额 货币` 或区间 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `robot_bonus`(机器人体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_BOTS`(适用机器人) | 如 `Future Grids` | 非限定机器人时 | | `string` | `COUPON_MAXIMUM_LEVERAGE`(最大杠杆倍数) | 倍数 | 非限定且有杠杆限制时 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对或 `All` | 非限定机器人时 | | `string` | `COUPON_STOP_LOSS_AMOUNT`(止损金额) | `金额 + 货币` | 有止损金额时 | | `btn` | `COUPON_DESIGNATED_BOTS`(限定机器人) | `ViewMyaccountLeft` 按钮文案 | 限定机器人时 | | `day` | `COUPON_RUNTIME_DURATION`(运行时长) | 天数 | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `loss_protection_copier`(跟单无忧金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ----------------------------------- | ------------------- | ------------ | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | `Contract` 或 `Spot` | 必填 | | `string` | `COUPON_MINIMUM_INVESTMENT`(最小跟单金额) | `金额 + 货币` | 有最小金额限制时 | | `string` | `COUPON_AVAILABLE_TRADERS`(可用交易员) | 昵称列表 | 部分可用时(指定交易员) | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有使用时间时 | --- ### `position_voucher`(仓位体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ------------------------------------ | ----------------- | ------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额×杠杆 + 空格 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_MARKET`(适用市场) | `USDT永续合约` | 必填 | | `hour` | `COUPON_POSITION_DURATION`(仓位时长) | 小时数 | 必填 | | `string` | `COUPON_LEVERAGE`(杠杆倍数) | `NX` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对,空表示不限 | 必填 | | `string` | `COUPON_USER_INVESTMENT_QUOTA`(配资额度) | `金额 + 货币` | 需要用户配资时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `tradfi_position_voucher`(TradFi仓位体验券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------------ | ----------------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额×杠杆 + 空格 + 货币` | | `string` | `COUPON_POSITION_DURATION`(仓位时长) | `N个交易日` | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | TradFi 品种 | | `string` | `COUPON_LEVERAGE`(杠杆倍数) | `Nx` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `vip_card`(VIP体验卡) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------- | ---------- | | `string` | `COUPON_VIP_TIER`(VIP等级) | `VIPN` | | `day` | `COUPON_BENEFIT_DURATION`(权益时长) | 天数 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | --------------------------------- | ---------- | ----------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 创建时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_PERIOD`(激活有效期) | 激活截止时间戳 | 必填 | | `timestamp` | `COUPON_ACTIVATION_TIME`(激活时间) | 激活时间戳 | 状态为已使用或已失效时 | | `timestamp` | `COUPON_EXPIRY_TIME`(失效时间) | 到期时间戳 | 状态为已使用或已失效时 | --- ### `p2p`(P2P交易抵扣券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------- | -------------- | | `string` | `COUPON_DEDUCTION_LIMIT`(抵扣上限) | `金额 + 货币` | | `string` | `COUPON_DEDUCTION_RATIO`(折扣比例) | `N%` | | `string` | `COUPON_USAGE_CONDITIONS`(使用条件) | `每笔交易不低于 N 货币` | | `string` | `COUPON_SUPPORTED_FIAT`(适用法币) | 法币列表或 `全部` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `interest_voucher`(杠杆减息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | --------------------------------------- | ----------------- | -------- | | `string` | `max_discount_amount`(最大减免金额) | `金额 + 货币` | 必填 | | `string` | `COUPON_APPLICABLE_TRADES`(适用交易) | `Isolated Margin` | 必填 | | `string` | `COUPON_INTEREST_DISCOUNT`(减免比例) | `N%` | 必填 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | 交易对,空表示不限 | 必填 | | `string` | `COUPON_BALANCE`(剩余额度) | `金额 + 货币` | 必填 | | `string` | `COUPON_BORROWING_AMOUNT_LIMIT`(借款金额限制) | 借款金额范围 | 有借款金额限制时 | | `hour` | `COUPON_VALIDITY_PERIOD`(减免时长) | 小时数 | 有设置时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | ------------------------------------- | ---------- | -------------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 状态为待使用或已过期时 | | `timestamp` | `COUPON_EFFECTIVE_TIME`(减免开始时间) | 开始使用时间戳 | 状态为失效/使用中/已使用时 | | `timestamp` | `COUPON_DISCOUNT_EXPIRY_TIME`(减免失效时间) | 减免到期时间戳 | 状态为失效/使用中/已使用时 | --- ### `cash`(现金券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有兑换时间时 | --- ### `crypto_loan_interest`(抵押借币减息券) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ---------------------------------------------- | ---------- | -------- | | `string` | `coupon_center_discount_max_amount`(最大减免金额) | `金额 + 货币` | 必填 | | `string` | `COUPON_INTEREST_DISCOUNT`(减免比例) | `N%` | 必填 | | `string` | `coupon_center_loan_min_amount`(最小借款金额) | `金额 + 货币` | 有最小金额要求时 | | `hour` | `coupon_center_interest_discount_period`(减息时长) | 小时数 | 必填 | | `string` | `coupon_center_trade_applicable`(适用交易) | `活期` | 必填 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `copy_trading`(跟单体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | 条件 | | -------- | ---------------------------------- | ------------------- | ---- | | `string` | `COUPON_VOUCHER_AMOUNT`(面值) | `金额 + 货币` | 必填 | | `string` | `coupon_applicable_traders`(适用交易员) | `全部` 或 `指定交易员` | 必填 | | `string` | `coupon_trade_category`(适用交易类型) | `Spot` 或 `Contract` | 必填 | | `day` | `coupon_usage_days`(体验有效天数) | 天数 | 必填 | | `string` | `COUPON_STOP_LOSS_AMOUNT`(止损金额) | `金额 + 货币` | 必填 | | `string` | `coupon_ineligible_mkts`(不可体验市场) | 市场列表 | 有限制时 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------- | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 状态为已使用时 | --- ### `alpha_voucher`(Alpha现金券) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ----------------------------- | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有领取时间时 | --- ### `etf_voucher`(ETF体验金) **区块2:核心属性** | `type` | `key` | `value` 说明 | | -------- | ------------------------------------ | ---------- | | `string` | `COUPON_VOUCHER_AMOUNT`(卡券金额) | `金额 + 货币` | | `hour` | `coupon_trial_duration`(体验时长) | 小时数 | | `string` | `COUPON_LIMITED_TRADING_PAIR`(限定交易对) | ETF 市场列表 | **区块3:时间信息** | `type` | `key` | `value` 说明 | 条件 | | ----------- | -------------------------- | ---------- | ------ | | `timestamp` | `COUPON_OBTAINED_AT`(获取时间) | 领取时间戳 | 必填 | | `timestamp` | `COUPON_VALID_UNTIL`(过期时间) | 到期时间戳 | 必填 | | `timestamp` | `COUPON_USED_AT`(使用时间) | 使用时间戳 | 有使用时间时 | --- ### `point`(点卡) `extra` 固定返回 `[]`,无任何区块。 --- ## 完整响应示例 ### 普通卡券(手续费返现券) ```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\": \"卡券名称\", \"value\": \"10% Futures Commission Rebate\" }, { \"type\": \"string\", \"key\": \"卡券来源\", \"value\": \"新用户注册活动\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"卡券金额\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"返现比例\", \"value\": \"10%\" }, { \"type\": \"string\", \"key\": \"剩余额度\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"已用额度\", \"value\": \"0 USDT\" }, { \"type\": \"string\", \"key\": \"适用市场\", \"value\": \"Futures\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 }, { \"type\": \"day\", \"key\": \"使用时长\", \"value\": 30 } ] ] } } ``` ### 任务卡券(仓位体验券) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"position_voucher\", \"name\": \"仓位体验券\", \"amount\": \"5,000\", \"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\": \"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\": \"完成10000 USDT合约交易量,获得仓位体验券\", \"task_desc\": \"在永续合约中完成指定交易量任务\", \"task_start_at\": 1757000000, \"task_expire_at\": 1760000000, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"卡券名称\", \"value\": \"仓位体验券\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TASK_WAIT\" } ], [ { \"type\": \"string\", \"key\": \"卡券金额\", \"value\": \"5,000 USDT\" }, { \"type\": \"string\", \"key\": \"适用市场\", \"value\": \"USDT永续合约\" }, { \"type\": \"hour\", \"key\": \"仓位时长\", \"value\": 24 }, { \"type\": \"string\", \"key\": \"杠杆倍数\", \"value\": \"10X\" }, { \"type\": \"string\", \"key\": \"限定交易对\", \"value\": \"BTCUSDT\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 } ] ] } } ``` ### P2P 交易抵扣券(p2p) ```json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 5678901, \"details_id\": 234, \"coupon_type\": \"p2p\", \"name\": \"5.5% P2P交易抵扣券\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"每笔P2P交易可抵扣最高100 USDT手续费,折扣比例5.5%,每笔交易不低于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\": \"卡券名称\", \"value\": \"5.5% P2P交易抵扣券\" }, { \"type\": \"string\", \"key\": \"卡券来源\", \"value\": \"新用户注册活动\" }, { \"type\": \"status\", \"key\": \"卡券状态\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"抵扣上限\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"折扣比例\", \"value\": \"5.5%\" }, { \"type\": \"string\", \"key\": \"使用条件\", \"value\": \"每笔交易不低于 200 USDT\" }, { \"type\": \"string\", \"key\": \"适用法币\", \"value\": \"CNY、USD\" } ], [ { \"type\": \"timestamp\", \"key\": \"获取时间\", \"value\": 1757000000 }, { \"type\": \"timestamp\", \"key\": \"过期时间\", \"value\": 1760000000 } ] ] } } ``` --- ## 错误码 | `code` | 说明 | | -------------------------------------------- | ------------------------- | | `0` | 成功 | | `10001`(`COUPON_SEND_ISSUING_LOG_NOT_FOUND`) | 卡券记录不存在或不属于当前用户 | | `10000`(`PARAMS_INVALID`) | 参数无效(如任务卡券缺少 coupon_info) | | `50105`(`INVALID_PARAMETERS`) | 入参校验失败(如 coupon_type 非法) | # 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) diff --git a/gate_api/api/cross_ex_api.py b/gate_api/api/cross_ex_api.py index e02389f2..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 - """查询币对信息 # 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 - """查询币对信息 # 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 - """查询风险限额信息 # 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 @@ -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 - """查询风险限额信息 # 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 @@ -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 - """查询划转币种支持 # 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. @@ -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 - """查询划转币种支持 # 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 @@ -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) @@ -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) @@ -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. @@ -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 @@ -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 @@ -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 @@ -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. @@ -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 @@ -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 = {} @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -3449,8 +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 statement_type: Bill entry type. + :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 @@ -3479,8 +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 statement_type: Bill entry type. + :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 @@ -3582,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. @@ -3608,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 diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index 873804b1..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 @@ -4588,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 @@ -4618,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 @@ -4641,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' @@ -4676,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 @@ -5263,6 +5396,7 @@ def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501 :param str settle: Settle currency (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. @@ -5289,6 +5423,7 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no :param str settle: Settle currency (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 @@ -5308,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( [ @@ -5345,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: @@ -7806,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. @@ -7827,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 @@ -7857,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. """ @@ -7866,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( [ @@ -7884,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 = {} @@ -7910,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 = {} @@ -7925,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 @@ -7948,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. @@ -7966,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 @@ -7993,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. """ @@ -8002,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( [ @@ -8017,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 = {} @@ -8044,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 @@ -8058,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 @@ -8073,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. @@ -8091,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 @@ -8118,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. """ @@ -8127,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( [ @@ -8142,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 = {} @@ -8158,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 = {} @@ -8167,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 @@ -8190,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. @@ -8208,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 @@ -8235,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. """ @@ -8244,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( [ @@ -8259,43 +8415,693 @@ 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 - # 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( + 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 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( '/futures/{settle}/price_orders/{order_id}', 'GET', path_params, query_params, @@ -8432,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 @@ -8456,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 @@ -8488,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( @@ -8512,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 @@ -8526,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 = [] @@ -8551,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/otc_api.py b/gate_api/api/otc_api.py index c12ba876..5f9f2cf6 100644 --- a/gate_api/api/otc_api.py +++ b/gate_api/api/otc_api.py @@ -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.OtcUserDefaultBankResponse + :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.OtcUserDefaultBankResponse, 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='OtcUserDefaultBankResponse', # 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 file documentation_file: Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). (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,33 @@ 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.OtcBankListResponse + :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 - 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_with_http_info(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 file documentation_file: Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). (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 @@ -538,7 +558,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.OtcBankListResponse, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OtcBankCreateResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -546,6 +566,16 @@ def get_bank_list_with_http_info(self, **kwargs): # noqa: E501 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( [ @@ -560,10 +590,38 @@ 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 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 = {} @@ -575,24 +633,712 @@ def get_bank_list_with_http_info(self, **kwargs): # noqa: E501 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: + local_var_files['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_list', 'GET', + '/otc/bank/create', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='OtcBankListResponse', # noqa: E501 + 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 = [] + + 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.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 + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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', + 'id_document_front', + 'id_document_back', + 'address_proof' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_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 = {} + + path_params = {} + + query_params = [] + + header_params = {} + + 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/enterprise/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 @@ -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) @@ -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) diff --git a/gate_api/api/p2p_api.py b/gate_api/api/p2p_api.py index 1ce7d4af..f3eab2c0 100644 --- a/gate_api/api/p2p_api.py +++ b/gate_api/api/p2p_api.py @@ -367,6 +367,122 @@ def p2p_merchant_account_get_myself_payment_with_http_info(self, **kwargs): # n _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 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def p2p_merchant_transaction_get_pending_transaction_list(self, get_pending_transaction_list_request, **kwargs): # noqa: E501 """Get pending orders # 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) @@ -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) @@ -1760,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) @@ -1784,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) diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index 42f18a86..fdc202f8 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -1223,7 +1223,7 @@ def user_sub_relation_with_http_info(self, user_id_list, **kwargs): # noqa: E50 def get_partner_application_recent(self, **kwargs): # noqa: E501 """Get recent partner application records # noqa: E501 - 获取当前用户最近的合伙人申请记录。 此接口返回用户最近 30 天内的申请记录,包括申请状态、审核信息、申请材料等详细信息。 # 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) @@ -1247,7 +1247,7 @@ def get_partner_application_recent(self, **kwargs): # noqa: E501 def get_partner_application_recent_with_http_info(self, **kwargs): # noqa: E501 """Get recent partner application records # noqa: E501 - 获取当前用户最近的合伙人申请记录。 此接口返回用户最近 30 天内的申请记录,包括申请状态、审核信息、申请材料等详细信息。 # 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) @@ -1328,7 +1328,7 @@ def get_partner_application_recent_with_http_info(self, **kwargs): # noqa: E501 def get_partner_eligibility(self, **kwargs): # noqa: E501 """Check partner application eligibility # noqa: E501 - 检查当前用户是否有资格申请成为合伙人。 此接口会检查多个条件: - 账户状态(是否被封禁) - 是否为子账号 - 是否已经是合伙人 - KYC 认证状态 - 是否在其他代理商的邀请链下 - 是否在黑名单中 - 其他业务规则限制 # 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) @@ -1352,7 +1352,7 @@ def get_partner_eligibility(self, **kwargs): # noqa: E501 def get_partner_eligibility_with_http_info(self, **kwargs): # noqa: E501 """Check partner application eligibility # noqa: E501 - 检查当前用户是否有资格申请成为合伙人。 此接口会检查多个条件: - 账户状态(是否被封禁) - 是否为子账号 - 是否已经是合伙人 - KYC 认证状态 - 是否在其他代理商的邀请链下 - 是否在黑名单中 - 其他业务规则限制 # 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) @@ -1433,15 +1433,15 @@ def get_partner_eligibility_with_http_info(self, **kwargs): # noqa: E501 def get_partner_agent_data_aggregated(self, **kwargs): # noqa: E501 """Aggregated partner agent statistics # noqa: E501 - 查询指定时间范围内合伙人代理的数据聚合统计,包括返佣金额、交易量、净手续费、客户数和交易人数。 **注意事项:** - 交易人数 `trading_user_count` 仅在 `business_type=0`(全部)时返回 - 时间参数使用 UTC+8 时区 - 如不传时间参数,默认查询近 7 天数据 - 仅限合伙人代理访问,子账号无权限 # 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: 查询开始时间,格式:yyyy-mm-dd hh:ii:ss(UTC+8) 不传时默认为近 7 日开始时间 - :param str end_date: 查询结束时间,格式:yyyy-mm-dd hh:ii:ss(UTC+8) 不传时默认为近 7 日结束时间 + :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 @@ -1460,15 +1460,15 @@ def get_partner_agent_data_aggregated(self, **kwargs): # noqa: E501 def get_partner_agent_data_aggregated_with_http_info(self, **kwargs): # noqa: E501 """Aggregated partner agent statistics # noqa: E501 - 查询指定时间范围内合伙人代理的数据聚合统计,包括返佣金额、交易量、净手续费、客户数和交易人数。 **注意事项:** - 交易人数 `trading_user_count` 仅在 `business_type=0`(全部)时返回 - 时间参数使用 UTC+8 时区 - 如不传时间参数,默认查询近 7 天数据 - 仅限合伙人代理访问,子账号无权限 # 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: 查询开始时间,格式:yyyy-mm-dd hh:ii:ss(UTC+8) 不传时默认为近 7 日开始时间 - :param str end_date: 查询结束时间,格式:yyyy-mm-dd hh:ii:ss(UTC+8) 不传时默认为近 7 日结束时间 + :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 diff --git a/gate_api/api/trad_fi_api.py b/gate_api/api/trad_fi_api.py index a43593d5..5c3922db 100644 --- a/gate_api/api/trad_fi_api.py +++ b/gate_api/api/trad_fi_api.py @@ -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 6434e384..ac0ec7f2 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -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 428184d0..ff4f564f 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -1717,17 +1717,18 @@ 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 _preload_content: if False, the urllib3.HTTPResponse object will @@ -1742,19 +1743,20 @@ 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 _return_http_data_only: response data without head status code @@ -1776,6 +1778,7 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 all_params = [ 'currency', 'chain', + 'verified', 'limit', 'page' ] @@ -1796,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 @@ -1812,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 index 0a7f1084..fcfaa782 100644 --- a/gate_api/api/welfare_api.py +++ b/gate_api/api/welfare_api.py @@ -144,7 +144,7 @@ def get_user_identity_with_http_info(self, **kwargs): # noqa: E501 def get_beginner_task_list(self, **kwargs): # noqa: E501 """Get beginner task list # noqa: E501 - 获取当前用户的新客入门任务列表。 默认返回已经归属到当前用户的注册任务(type=10)和引导任务(type=11),注册任务排在前面,引导任务排在后面。 当用户尚未拥有下载任务、且系统判断用户未下载过 App 时,会动态补充一条“待领取下载任务”卡片。 其中: - 下载任务的 `task_type = 23` - 待领取下载任务的 `status = 0` 结果缓存 60 秒。任务列表数量有限(通常不超过 10 条),无需分页。 # 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) @@ -168,7 +168,7 @@ def get_beginner_task_list(self, **kwargs): # noqa: E501 def get_beginner_task_list_with_http_info(self, **kwargs): # noqa: E501 """Get beginner task list # noqa: E501 - 获取当前用户的新客入门任务列表。 默认返回已经归属到当前用户的注册任务(type=10)和引导任务(type=11),注册任务排在前面,引导任务排在后面。 当用户尚未拥有下载任务、且系统判断用户未下载过 App 时,会动态补充一条“待领取下载任务”卡片。 其中: - 下载任务的 `task_type = 23` - 待领取下载任务的 `status = 0` 结果缓存 60 秒。任务列表数量有限(通常不超过 10 条),无需分页。 # 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) @@ -249,7 +249,7 @@ def get_beginner_task_list_with_http_info(self, **kwargs): # noqa: E501 def claim_task(self, ex_skill_claim_task_req, **kwargs): # noqa: E501 """Get the task # noqa: E501 - 领取单个福利任务。 当前主场景为新客下载任务领取,但接口本身支持新客注册、引导、进阶任务类型。 处理流程: 1. 读取登录用户 2. 做用户资格校验 3. 风控校验(事件码 `task_center`) 4. 校验任务配置与任务中心任务 5. 校验是否已存在进行中任务 6. 若为下载任务,校验是否已下载 App 7. 写入 `welfare_user_tasks_xx` 8. 上报任务中心 风控透传字段: - 老字段:`user_id`、`ip`、`const_id`、`is_async`、`action`、`task_id` - 新增字段:`req_method`、`traceid` - 其中: - `req_method` 来自 `X-Gate-Request-Source` - `ip` 来自 `X-Gate-Ip` - `traceid` 来自 `X-Gate-Trace-Id` - `const_id` 固定为空字符串 # 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) @@ -274,7 +274,7 @@ def claim_task(self, 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 - 领取单个福利任务。 当前主场景为新客下载任务领取,但接口本身支持新客注册、引导、进阶任务类型。 处理流程: 1. 读取登录用户 2. 做用户资格校验 3. 风控校验(事件码 `task_center`) 4. 校验任务配置与任务中心任务 5. 校验是否已存在进行中任务 6. 若为下载任务,校验是否已下载 App 7. 写入 `welfare_user_tasks_xx` 8. 上报任务中心 风控透传字段: - 老字段:`user_id`、`ip`、`const_id`、`is_async`、`action`、`task_id` - 新增字段:`req_method`、`traceid` - 其中: - `req_method` 来自 `X-Gate-Request-Source` - `ip` 来自 `X-Gate-Ip` - `traceid` 来自 `X-Gate-Trace-Id` - `const_id` 固定为空字符串 # 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) @@ -367,7 +367,7 @@ def claim_task_with_http_info(self, ex_skill_claim_task_req, **kwargs): # noqa: def claim_reward(self, ex_skill_claim_reward_req, **kwargs): # noqa: E501 """Receive mission rewards # noqa: E501 - 领取单个福利任务奖励。 处理流程: 1. 读取登录用户 2. 做用户资格校验 3. 查询 `welfare_user_tasks_xx`,要求任务状态为 `StatusDone(2)` 4. 风控校验(事件码 `index_page_check`) 5. 查询任务中心任务详情与奖励信息 6. 若奖励为 m 选 n 奖池,则返回 `has_m_n_task = true`,不实际发奖 7. 普通奖励则进入福利中心原领奖逻辑 风控透传字段: - 老字段:`user_id`、`ip`、`const_id`、`is_async` - 新增字段:`req_method`、`traceid` - 其中: - `req_method` 来自 `X-Gate-Request-Source` - `ip` 来自 `X-Gate-Ip` - `traceid` 来自 `X-Gate-Trace-Id` - `const_id` 固定为空字符串 # 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) @@ -392,7 +392,7 @@ def claim_reward(self, 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 - 领取单个福利任务奖励。 处理流程: 1. 读取登录用户 2. 做用户资格校验 3. 查询 `welfare_user_tasks_xx`,要求任务状态为 `StatusDone(2)` 4. 风控校验(事件码 `index_page_check`) 5. 查询任务中心任务详情与奖励信息 6. 若奖励为 m 选 n 奖池,则返回 `has_m_n_task = true`,不实际发奖 7. 普通奖励则进入福利中心原领奖逻辑 风控透传字段: - 老字段:`user_id`、`ip`、`const_id`、`is_async` - 新增字段:`req_method`、`traceid` - 其中: - `req_method` 来自 `X-Gate-Request-Source` - `ip` 来自 `X-Gate-Ip` - `traceid` 来自 `X-Gate-Trace-Id` - `const_id` 固定为空字符串 # 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) diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 4e9b5b1f..84276836 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.78/python' + self.user_agent = 'OpenAPI-Generator/7.2.99/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 86ee7f0c..5c54c8bd 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.78\n"\ - "SDK Package Version: 7.2.78".\ + "Version of the API: v4.106.99\n"\ + "SDK Package Version: 7.2.99".\ 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 40970307..ef30069f 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -114,6 +114,7 @@ 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 @@ -139,6 +140,8 @@ 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 @@ -214,6 +217,7 @@ 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 @@ -302,7 +306,10 @@ 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 @@ -434,15 +441,26 @@ 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 @@ -460,8 +478,6 @@ 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.otc_user_default_bank import OtcUserDefaultBank -from gate_api.models.otc_user_default_bank_response import OtcUserDefaultBankResponse 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 @@ -476,9 +492,14 @@ 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 @@ -532,6 +553,9 @@ 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 @@ -549,6 +573,7 @@ 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 @@ -560,10 +585,16 @@ 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 @@ -650,6 +681,10 @@ 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 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/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 bede56f7..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 设置为 ioc - poc: 未满足挂单策略,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - 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 设置为 ioc - poc: 未满足挂单策略,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - 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/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/contract.py b/gate_api/models/contract.py index 67434f52..c770abd6 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -79,7 +79,8 @@ class Contract(object): 'market_order_size_max': 'str', 'funding_rate_limit': 'str', 'contract_type': 'str', - 'funding_impact_value': 'str' + 'funding_impact_value': 'str', + 'enable_circuit_breaker': 'bool' } attribute_map = { @@ -129,11 +130,12 @@ class Contract(object): 'market_order_size_max': 'market_order_size_max', 'funding_rate_limit': 'funding_rate_limit', 'contract_type': 'contract_type', - 'funding_impact_value': 'funding_impact_value' + '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, 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, 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, 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() @@ -186,6 +188,7 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No 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: @@ -282,6 +285,8 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No 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): @@ -1376,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_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/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/create_chase_order_resp.py b/gate_api/models/create_chase_order_resp.py new file mode 100644 index 00000000..c3079a2b --- /dev/null +++ b/gate_api/models/create_chase_order_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CreateChaseOrderResp(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, Configuration) -> None + """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._id = None + self.discriminator = None + + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this CreateChaseOrderResp. # noqa: E501 + + ID of the newly created order # noqa: E501 + + :return: The id of this CreateChaseOrderResp. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreateChaseOrderResp. + + ID of the newly created order # noqa: E501 + + :param id: The id of this CreateChaseOrderResp. # noqa: E501 + :type: str + """ + + 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, 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, CreateChaseOrderResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_account.py b/gate_api/models/crossex_account.py index 89540e5f..54f208df 100644 --- a/gate_api/models/crossex_account.py +++ b/gate_api/models/crossex_account.py @@ -430,7 +430,7 @@ def exchange_type(self, exchange_type): def assets(self): """Gets the assets of this CrossexAccount. # noqa: E501 - 资产列表,按交易所与币种维度返回各账户余额、保证金及盈亏明细 # noqa: E501 + Asset list: grouped by exchange and currency, returning per-account balances, margin, and PnL details # noqa: E501 :return: The assets of this CrossexAccount. # noqa: E501 :rtype: list[CrossexAccountAsset] @@ -441,7 +441,7 @@ def assets(self): def assets(self, assets): """Sets the assets of this CrossexAccount. - 资产列表,按交易所与币种维度返回各账户余额、保证金及盈亏明细 # noqa: E501 + Asset list: grouped by exchange and currency, returning per-account balances, margin, and PnL details # noqa: E501 :param assets: The assets of this CrossexAccount. # noqa: E501 :type: list[CrossexAccountAsset] diff --git a/gate_api/models/crossex_account_book_record.py b/gate_api/models/crossex_account_book_record.py index 32a7150b..d8f0e001 100644 --- a/gate_api/models/crossex_account_book_record.py +++ b/gate_api/models/crossex_account_book_record.py @@ -163,7 +163,7 @@ def business_id(self, business_id): def statement_type(self): """Gets the statement_type of this CrossexAccountBookRecord. # 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 # 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 statement_type of this CrossexAccountBookRecord. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def statement_type(self): def statement_type(self, statement_type): """Sets the statement_type of this CrossexAccountBookRecord. - 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 # 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 statement_type: The statement_type of this CrossexAccountBookRecord. # noqa: E501 :type: str 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/crossex_account_update_response.py b/gate_api/models/crossex_account_update_response.py index 4160ff55..fe63d592 100644 --- a/gate_api/models/crossex_account_update_response.py +++ b/gate_api/models/crossex_account_update_response.py @@ -113,7 +113,7 @@ def account_mode(self, account_mode): def exchange_type(self): """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 CrossexAccountUpdateResponse. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def exchange_type(self): def exchange_type(self, exchange_type): """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 CrossexAccountUpdateResponse. # noqa: E501 :type: str diff --git a/gate_api/models/crossex_order.py b/gate_api/models/crossex_order.py index d276e109..63198722 100644 --- a/gate_api/models/crossex_order.py +++ b/gate_api/models/crossex_order.py @@ -239,7 +239,7 @@ def text(self, text): def state(self): """Gets the state of this CrossexOrder. # noqa: E501 - 订单状态: NEW:订单已通过校验,等待发送到交易所 OPEN:订单已挂在交易所订单簿上 PARTIALLY_FILLED:订单已部分成交 FILLED:订单已完全成交 FAIL:CrossEx 内部校验未通过,请查看 reason 字段了解失败原因 REJECT:订单被交易所拒绝,请查看 reason 字段了解失败原因 # 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 CrossexOrder. # noqa: E501 :rtype: str @@ -250,7 +250,7 @@ def state(self): def state(self, state): """Sets the state of this CrossexOrder. - 订单状态: NEW:订单已通过校验,等待发送到交易所 OPEN:订单已挂在交易所订单簿上 PARTIALLY_FILLED:订单已部分成交 FILLED:订单已完全成交 FAIL:CrossEx 内部校验未通过,请查看 reason 字段了解失败原因 REJECT:订单被交易所拒绝,请查看 reason 字段了解失败原因 # 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 CrossexOrder. # noqa: E501 :type: str @@ -339,7 +339,7 @@ def type(self, type): def attribute(self): """Gets the attribute of this CrossexOrder. # noqa: E501 - Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage). # 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 CrossexOrder. # noqa: E501 :rtype: str @@ -350,7 +350,7 @@ def attribute(self): def attribute(self, attribute): """Sets the attribute of this CrossexOrder. - Order attributes (`COMMON` normal / `LIQ` liquidation takeover / `REDUCE` liquidation reduction / `ADL` auto-deleverage). # 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 CrossexOrder. # noqa: E501 :type: str @@ -364,7 +364,7 @@ def attribute(self, attribute): def exchange_type(self): """Gets the exchange_type of this CrossexOrder. # noqa: E501 - Exchange type (`BINANCE` / `OKX` / `GATE` / `BYBIT`). # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 :return: The exchange_type of this CrossexOrder. # noqa: E501 :rtype: str @@ -375,7 +375,7 @@ def exchange_type(self): def exchange_type(self, exchange_type): """Sets the exchange_type of this CrossexOrder. - Exchange type (`BINANCE` / `OKX` / `GATE` / `BYBIT`). # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 :param exchange_type: The exchange_type of this CrossexOrder. # noqa: E501 :type: str 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/crossex_transfer_record.py b/gate_api/models/crossex_transfer_record.py index 1eeede03..e068bbca 100644 --- a/gate_api/models/crossex_transfer_record.py +++ b/gate_api/models/crossex_transfer_record.py @@ -148,7 +148,7 @@ def text(self, text): def from_account_type(self): """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 CrossexTransferRecord. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def from_account_type(self): def from_account_type(self, from_account_type): """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 CrossexTransferRecord. # noqa: E501 :type: str @@ -173,6 +173,7 @@ def from_account_type(self, from_account_type): def to_account_type(self): """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 CrossexTransferRecord. # noqa: E501 :rtype: str @@ -183,6 +184,7 @@ def to_account_type(self): def to_account_type(self, to_account_type): """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 CrossexTransferRecord. # noqa: E501 :type: str 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/currency.py b/gate_api/models/currency.py index d44786f4..0634b91c 100644 --- a/gate_api/models/currency.py +++ b/gate_api/models/currency.py @@ -393,7 +393,7 @@ def market_cap(self, market_cap): def category(self): """Gets the category of this Currency. # noqa: E501 - 币种分类 - stocks: 股票 - metals: 金属 - indices: 指数 - forex: 外汇 - commodities: 大宗商品 # 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] @@ -404,7 +404,7 @@ def category(self): def category(self, category): """Sets the category of this Currency. - 币种分类 - stocks: 股票 - metals: 金属 - indices: 指数 - forex: 外汇 - commodities: 大宗商品 # noqa: E501 + 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] 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/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 4b27521b..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 share count # 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 share count # 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 share count # 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 share count # 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/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_order.py b/gate_api/models/futures_order.py index 3d543640..99ad5d73 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -62,7 +62,12 @@ class FuturesOrder(object): 'amend_text': 'str', 'pid': 'int', '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 = { @@ -95,11 +100,16 @@ class FuturesOrder(object): 'amend_text': 'amend_text', 'pid': 'pid', '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, 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, 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() @@ -135,6 +145,11 @@ def __init__(self, id=None, user=None, create_time=None, update_time=None, finis self._pid = 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: @@ -194,6 +209,16 @@ def __init__(self, id=None, user=None, create_time=None, update_time=None, finis 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): @@ -921,6 +946,121 @@ def pos_margin_mode(self, pos_margin_mode): self._pos_margin_mode = pos_margin_mode + @property + def action_mode(self): + """Gets the action_mode of this FuturesOrder. # 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 FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this FuturesOrder. + + 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 FuturesOrder. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + + @property + def tpsl_tp_trigger_price(self): + """Gets the tpsl_tp_trigger_price of this FuturesOrder. # noqa: E501 + + Take profit price # noqa: E501 + + :return: The tpsl_tp_trigger_price of this FuturesOrder. # 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 FuturesOrder. + + Take profit price # noqa: E501 + + :param tpsl_tp_trigger_price: The tpsl_tp_trigger_price of this FuturesOrder. # 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 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""" result = {} 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 index fef76c7b..eee7da69 100644 --- a/gate_api/models/futures_order_timerange.py +++ b/gate_api/models/futures_order_timerange.py @@ -62,7 +62,9 @@ class FuturesOrderTimerange(object): 'amend_text': 'str', 'pid': 'int', 'market_order_slip_ratio': 'str', - 'pos_margin_mode': 'str' + 'pos_margin_mode': 'str', + 'tpsl_tp_trigger_price': 'str', + 'tpsl_sl_trigger_price': 'str' } attribute_map = { @@ -95,11 +97,13 @@ class FuturesOrderTimerange(object): 'amend_text': 'amend_text', 'pid': 'pid', 'market_order_slip_ratio': 'market_order_slip_ratio', - 'pos_margin_mode': 'pos_margin_mode' + '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, 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, 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, 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() @@ -135,6 +139,8 @@ def __init__(self, id=None, user=None, create_time=None, update_time=None, finis 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: @@ -194,6 +200,10 @@ def __init__(self, id=None, user=None, create_time=None, update_time=None, finis 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): @@ -921,6 +931,52 @@ def pos_margin_mode(self, pos_margin_mode): 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 = {} diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py index 8d797757..625fbf97 100644 --- a/gate_api/models/futures_price_triggered_order.py +++ b/gate_api/models/futures_price_triggered_order.py @@ -45,7 +45,8 @@ 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 = { @@ -61,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, 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, local_vars_configuration=None): # noqa: E501 - # type: (FuturesInitialOrder, FuturesPriceTrigger, int, str, 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() @@ -84,6 +86,7 @@ def __init__(self, initial=None, trigger=None, id=None, id_string=None, user=Non self._reason = None self._order_type = None self._me_order_id = None + self._pos_margin_mode = None self.discriminator = None self.initial = initial @@ -110,6 +113,8 @@ def __init__(self, initial=None, trigger=None, id=None, id_string=None, user=Non 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): @@ -422,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/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_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/order.py b/gate_api/models/order.py index 4270635f..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): @@ -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 设置为 ioc - poc: 未满足挂单策略,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - 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 设置为 ioc - poc: 未满足挂单策略,因为 tif 设置为 poc/rvt/rat/rpi表示只想成为maker, 经检查会成为taker被拒绝 - 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_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_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/otc_bank_create_multipart_request.py b/gate_api/models/otc_bank_create_multipart_request.py new file mode 100644 index 00000000..a7205715 --- /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': 'file' + } + + 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, file, 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 + + Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). # noqa: E501 + + :return: The documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 + :rtype: file + """ + return self._documentation_file + + @documentation_file.setter + def documentation_file(self, documentation_file): + """Sets the documentation_file of this OtcBankCreateMultipartRequest. + + Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). # noqa: E501 + + :param documentation_file: The documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 + :type: file + """ + 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_user_default_bank_response.py b/gate_api/models/otc_bank_create_response.py similarity index 71% rename from gate_api/models/otc_user_default_bank_response.py rename to gate_api/models/otc_bank_create_response.py index 3cbbe36f..16482959 100644 --- a/gate_api/models/otc_user_default_bank_response.py +++ b/gate_api/models/otc_bank_create_response.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class OtcUserDefaultBankResponse(object): +class OtcBankCreateResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +35,7 @@ class OtcUserDefaultBankResponse(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'OtcUserDefaultBank', + 'data': 'OtcBankCreateResponseData', 'timestamp': 'int' } @@ -47,8 +47,8 @@ class OtcUserDefaultBankResponse(object): } def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, OtcUserDefaultBank, int, Configuration) -> None - """OtcUserDefaultBankResponse - a model defined in OpenAPI""" # 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 @@ -62,24 +62,25 @@ def __init__(self, code=None, message=None, data=None, timestamp=None, local_var self.code = code self.message = message self.data = data - self.timestamp = timestamp + if timestamp is not None: + self.timestamp = timestamp @property def code(self): - """Gets the code of this OtcUserDefaultBankResponse. # noqa: E501 + """Gets the code of this OtcBankCreateResponse. # noqa: E501 - :return: The code of this OtcUserDefaultBankResponse. # 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 OtcUserDefaultBankResponse. + """Sets the code of this OtcBankCreateResponse. - :param code: The code of this OtcUserDefaultBankResponse. # noqa: E501 + :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 @@ -89,20 +90,20 @@ def code(self, code): @property def message(self): - """Gets the message of this OtcUserDefaultBankResponse. # noqa: E501 + """Gets the message of this OtcBankCreateResponse. # noqa: E501 - :return: The message of this OtcUserDefaultBankResponse. # 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 OtcUserDefaultBankResponse. + """Sets the message of this OtcBankCreateResponse. - :param message: The message of this OtcUserDefaultBankResponse. # noqa: E501 + :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 @@ -112,21 +113,21 @@ def message(self, message): @property def data(self): - """Gets the data of this OtcUserDefaultBankResponse. # noqa: E501 + """Gets the data of this OtcBankCreateResponse. # noqa: E501 - :return: The data of this OtcUserDefaultBankResponse. # noqa: E501 - :rtype: OtcUserDefaultBank + :return: The data of this OtcBankCreateResponse. # noqa: E501 + :rtype: OtcBankCreateResponseData """ return self._data @data.setter def data(self, data): - """Sets the data of this OtcUserDefaultBankResponse. + """Sets the data of this OtcBankCreateResponse. - :param data: The data of this OtcUserDefaultBankResponse. # noqa: E501 - :type: OtcUserDefaultBank + :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 @@ -135,24 +136,22 @@ def data(self, data): @property def timestamp(self): - """Gets the timestamp of this OtcUserDefaultBankResponse. # noqa: E501 + """Gets the timestamp of this OtcBankCreateResponse. # noqa: E501 - :return: The timestamp of this OtcUserDefaultBankResponse. # 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 OtcUserDefaultBankResponse. + """Sets the timestamp of this OtcBankCreateResponse. - :param timestamp: The timestamp of this OtcUserDefaultBankResponse. # noqa: E501 + :param timestamp: The timestamp of this OtcBankCreateResponse. # 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 @@ -190,14 +189,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, OtcUserDefaultBankResponse): + 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, OtcUserDefaultBankResponse): + 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/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/otc_order_detail.py b/gate_api/models/otc_order_detail.py index 20d3872b..dc57248c 100644 --- a/gate_api/models/otc_order_detail.py +++ b/gate_api/models/otc_order_detail.py @@ -42,6 +42,7 @@ class OtcOrderDetail(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 OtcOrderDetail(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,8 +72,8 @@ class OtcOrderDetail(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 + 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() @@ -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 @@ -316,7 +321,7 @@ def rate(self, rate): def transfer_remark(self): """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 OtcOrderDetail. # noqa: E501 :rtype: str @@ -327,7 +332,7 @@ def transfer_remark(self): def transfer_remark(self, transfer_remark): """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 OtcOrderDetail. # noqa: E501 :type: str @@ -337,6 +342,29 @@ 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 OtcOrderDetail. # noqa: E501 diff --git a/gate_api/models/otc_order_list_item.py b/gate_api/models/otc_order_list_item.py index 1948b032..d8e0b4b7 100644 --- a/gate_api/models/otc_order_list_item.py +++ b/gate_api/models/otc_order_list_item.py @@ -48,6 +48,7 @@ class OtcOrderListItem(object): 'crypto_amount': 'str', 'rate': 'str', 'transfer_remark': 'str', + 'reference_code': 'str', 'gate_bank_account_iban': 'str', 'promotion_code': 'str' } @@ -68,12 +69,13 @@ class OtcOrderListItem(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, OtcOrderListFiatCurrencyInfo, str, str, OtcOrderListCryptoCurrencyInfo, str, str, str, str, str, Configuration) -> None + 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() @@ -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: @@ -453,7 +458,7 @@ def rate(self, rate): def transfer_remark(self): """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 OtcOrderListItem. # noqa: E501 :rtype: str @@ -464,7 +469,7 @@ def transfer_remark(self): def transfer_remark(self, transfer_remark): """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 OtcOrderListItem. # noqa: E501 :type: str @@ -472,6 +477,29 @@ def transfer_remark(self, transfer_remark): 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 OtcOrderListItem. # noqa: E501 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/otc_user_default_bank.py b/gate_api/models/otc_user_default_bank.py deleted file mode 100644 index 3fd52c5b..00000000 --- a/gate_api/models/otc_user_default_bank.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 OtcUserDefaultBank(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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 - """OtcUserDefaultBank - a 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 OtcUserDefaultBank. # noqa: E501 - - Bank ID (required for order placement) # noqa: E501 - - :return: The id of this OtcUserDefaultBank. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OtcUserDefaultBank. - - Bank ID (required for order placement) # noqa: E501 - - :param id: The id of this OtcUserDefaultBank. # 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 OtcUserDefaultBank. # noqa: E501 - - - :return: The bank_account_name of this OtcUserDefaultBank. # 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 OtcUserDefaultBank. - - - :param bank_account_name: The bank_account_name of this OtcUserDefaultBank. # 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 OtcUserDefaultBank. # noqa: E501 - - - :return: The bank_name of this OtcUserDefaultBank. # noqa: E501 - :rtype: str - """ - return self._bank_name - - @bank_name.setter - def bank_name(self, bank_name): - """Sets the bank_name of this OtcUserDefaultBank. - - - :param bank_name: The bank_name of this OtcUserDefaultBank. # 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 OtcUserDefaultBank. # noqa: E501 - - - :return: The bank_country of this OtcUserDefaultBank. # noqa: E501 - :rtype: str - """ - return self._bank_country - - @bank_country.setter - def bank_country(self, bank_country): - """Sets the bank_country of this OtcUserDefaultBank. - - - :param bank_country: The bank_country of this OtcUserDefaultBank. # 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 OtcUserDefaultBank. # noqa: E501 - - - :return: The bank_address of this OtcUserDefaultBank. # noqa: E501 - :rtype: str - """ - return self._bank_address - - @bank_address.setter - def bank_address(self, bank_address): - """Sets the bank_address of this OtcUserDefaultBank. - - - :param bank_address: The bank_address of this OtcUserDefaultBank. # 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 OtcUserDefaultBank. # noqa: E501 - - - :return: The bank_code of this OtcUserDefaultBank. # noqa: E501 - :rtype: str - """ - return self._bank_code - - @bank_code.setter - def bank_code(self, bank_code): - """Sets the bank_code of this OtcUserDefaultBank. - - - :param bank_code: The bank_code of this OtcUserDefaultBank. # 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 OtcUserDefaultBank. # noqa: E501 - - - :return: The branch_code of this OtcUserDefaultBank. # noqa: E501 - :rtype: str - """ - return self._branch_code - - @branch_code.setter - def branch_code(self, branch_code): - """Sets the branch_code of this OtcUserDefaultBank. - - - :param branch_code: The branch_code of this OtcUserDefaultBank. # 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, OtcUserDefaultBank): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OtcUserDefaultBank): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/p2p_chat_message.py b/gate_api/models/p2p_chat_message.py index 681302fa..9d854878 100644 --- a/gate_api/models/p2p_chat_message.py +++ b/gate_api/models/p2p_chat_message.py @@ -43,7 +43,9 @@ class P2pChatMessage(object): 'type': 'int', 'pic': 'str', 'file_key': 'str', - 'file_type': 'str' + 'file_type': 'str', + 'risk_type': 'int', + 'toast_msg': 'str' } attribute_map = { @@ -57,11 +59,13 @@ class P2pChatMessage(object): 'type': 'type', 'pic': 'pic', 'file_key': 'file_key', - 'file_type': 'file_type' + 'file_type': 'file_type', + '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, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, int, P2pChatMessagePayload, str, int, str, str, str, Configuration) -> None + 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() @@ -78,6 +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._risk_type = None + self._toast_msg = None self.discriminator = None if is_sell is not None: @@ -102,6 +108,10 @@ 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 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): @@ -354,6 +364,58 @@ def file_type(self, file_type): self._file_type = file_type + @property + def risk_type(self): + """Gets the risk_type of this P2pChatMessage. # noqa: E501 + + Risk control display type. 1: off-platform traffic diversion risk; returned when a text message hits risk control # noqa: E501 + + :return: The risk_type of this P2pChatMessage. # noqa: E501 + :rtype: int + """ + return self._risk_type + + @risk_type.setter + def risk_type(self, risk_type): + """Sets the risk_type of this P2pChatMessage. + + Risk control display type. 1: off-platform traffic diversion risk; returned when a text message hits risk control # noqa: E501 + + :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._risk_type = risk_type + + @property + def toast_msg(self): + """Gets the toast_msg of this P2pChatMessage. # noqa: E501 + + Risk control prompt message; returned only when risk_type=1 # noqa: E501 + + :return: The toast_msg of this P2pChatMessage. # noqa: E501 + :rtype: str + """ + return self._toast_msg + + @toast_msg.setter + def toast_msg(self, toast_msg): + """Sets the toast_msg of this P2pChatMessage. + + Risk control prompt message; returned only when risk_type=1 # noqa: E501 + + :param toast_msg: The toast_msg of this P2pChatMessage. # noqa: E501 + :type: str + """ + + self._toast_msg = toast_msg + def to_dict(self): """Returns the model properties as a dict""" result = {} 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 index 4e2fc224..ef4e3aa4 100644 --- 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 @@ -37,7 +37,7 @@ class P2pMerchantBooksPlaceBizPushOrderResponse(object): 'method': 'str', 'code': 'int', 'message': 'str', - 'data': 'object', + 'data': 'P2pMerchantBooksPlaceBizPushOrderResponseData', 'version': 'str' } @@ -51,7 +51,7 @@ class P2pMerchantBooksPlaceBizPushOrderResponse(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, object, str, Configuration) -> None + # 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() @@ -128,7 +128,7 @@ def method(self, method): def code(self): """Gets the code of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 - Response code, 0 means success # 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 @@ -139,7 +139,7 @@ def code(self): def code(self, code): """Sets the code of this P2pMerchantBooksPlaceBizPushOrderResponse. - Response code, 0 means success # 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 :param code: The code of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 :type: int @@ -174,10 +174,9 @@ def message(self, message): def data(self): """Gets the data of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 - Empty object on successful publish or edit. # noqa: E501 :return: The data of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 - :rtype: object + :rtype: P2pMerchantBooksPlaceBizPushOrderResponseData """ return self._data @@ -185,10 +184,9 @@ def data(self): def data(self, data): """Sets the data of this P2pMerchantBooksPlaceBizPushOrderResponse. - Empty object on successful publish or edit. # noqa: E501 :param data: The data of this P2pMerchantBooksPlaceBizPushOrderResponse. # noqa: E501 - :type: object + :type: P2pMerchantBooksPlaceBizPushOrderResponseData """ self._data = data diff --git a/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data.py b/gate_api/models/p2p_merchant_books_place_biz_push_order_response_data.py new file mode 100644 index 00000000..a0e64baf --- /dev/null +++ b/gate_api/models/p2p_merchant_books_place_biz_push_order_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 P2pMerchantBooksPlaceBizPushOrderResponseData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'risk_code': 'int', + 'risk_event': 'P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent' + } + + attribute_map = { + 'risk_code': 'risk_code', + 'risk_event': 'risk_event' + } + + 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._risk_code = None + self._risk_event = None + self.discriminator = None + + if risk_code is not None: + self.risk_code = risk_code + if risk_event is not None: + self.risk_event = risk_event + + @property + 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 risk_code of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 + :rtype: int + """ + return self._risk_code + + @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 risk_code: The risk_code of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 + :type: int + """ + + self._risk_code = risk_code + + @property + def risk_event(self): + """Gets the risk_event of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 + + + :return: The risk_event of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 + :rtype: P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent + """ + return self._risk_event + + @risk_event.setter + def risk_event(self, risk_event): + """Sets the risk_event of this P2pMerchantBooksPlaceBizPushOrderResponseData. + + + :param risk_event: The risk_event of this P2pMerchantBooksPlaceBizPushOrderResponseData. # noqa: E501 + :type: P2pMerchantBooksPlaceBizPushOrderResponseDataRiskEvent + """ + + self._risk_event = risk_event + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + 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, 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/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/p2p_send_chat_message_result.py b/gate_api/models/p2p_send_chat_message_result.py index 52965fc3..d67875f2 100644 --- a/gate_api/models/p2p_send_chat_message_result.py +++ b/gate_api/models/p2p_send_chat_message_result.py @@ -33,25 +33,50 @@ class P2pSendChatMessageResult(object): and the value is json key in definition. """ openapi_types = { - 'srvtm': 'int' + 'srvtm': 'int', + 'txid': 'int', + 'conversation_id': 'str', + 'msg_type': 'int', + 'risk_type': 'int', + 'toast_msg': 'str' } attribute_map = { - 'srvtm': 'SRVTM' + '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, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None + 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): @@ -76,6 +101,133 @@ def srvtm(self, srvtm): 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 = {} diff --git a/gate_api/models/partner_data_aggregated.py b/gate_api/models/partner_data_aggregated.py index efda86ad..945f1408 100644 --- a/gate_api/models/partner_data_aggregated.py +++ b/gate_api/models/partner_data_aggregated.py @@ -84,7 +84,7 @@ def __init__(self, rebate_amount=None, trade_volume=None, net_fee=None, customer def rebate_amount(self): """Gets the rebate_amount of this PartnerDataAggregated. # noqa: E501 - 返佣金额,字符串格式保证精度 最多保留 6 位小数,去除尾零 # 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 @@ -95,7 +95,7 @@ def rebate_amount(self): def rebate_amount(self, rebate_amount): """Sets the rebate_amount of this PartnerDataAggregated. - 返佣金额,字符串格式保证精度 最多保留 6 位小数,去除尾零 # noqa: E501 + 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 @@ -112,7 +112,7 @@ def rebate_amount(self, rebate_amount): def trade_volume(self): """Gets the trade_volume of this PartnerDataAggregated. # noqa: E501 - 交易量,字符串格式保证精度 最多保留 6 位小数,去除尾零 # 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 @@ -123,7 +123,7 @@ def trade_volume(self): def trade_volume(self, trade_volume): """Sets the trade_volume of this PartnerDataAggregated. - 交易量,字符串格式保证精度 最多保留 6 位小数,去除尾零 # noqa: E501 + 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 @@ -140,7 +140,7 @@ def trade_volume(self, trade_volume): def net_fee(self): """Gets the net_fee of this PartnerDataAggregated. # noqa: E501 - 净手续费,字符串格式保证精度 最多保留 6 位小数,去除尾零 # 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 @@ -151,7 +151,7 @@ def net_fee(self): def net_fee(self, net_fee): """Sets the net_fee of this PartnerDataAggregated. - 净手续费,字符串格式保证精度 最多保留 6 位小数,去除尾零 # noqa: E501 + 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 @@ -196,7 +196,7 @@ def customer_count(self, customer_count): def trading_user_count(self): """Gets the trading_user_count of this PartnerDataAggregated. # noqa: E501 - 交易人数,字符串形式(与线上 JSON 序列化一致) 仅在 business_type=0(全部)时返回具体数值,其他业务类型返回 null # 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 @@ -207,7 +207,7 @@ def trading_user_count(self): def trading_user_count(self, trading_user_count): """Sets the trading_user_count of this PartnerDataAggregated. - 交易人数,字符串形式(与线上 JSON 序列化一致) 仅在 business_type=0(全部)时返回具体数值,其他业务类型返回 null # 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 :param trading_user_count: The trading_user_count of this PartnerDataAggregated. # noqa: E501 :type: str diff --git a/gate_api/models/place_biz_push_order.py b/gate_api/models/place_biz_push_order.py index 9fe41253..ddd462f1 100644 --- a/gate_api/models/place_biz_push_order.py +++ b/gate_api/models/place_biz_push_order.py @@ -569,7 +569,7 @@ def expire_min(self, expire_min): def trade_tips(self): """Gets the trade_tips of this PlaceBizPushOrder. # noqa: E501 - Ad trading terms shown to the taker. # 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 @@ -580,7 +580,7 @@ def trade_tips(self): def trade_tips(self, trade_tips): """Sets the trade_tips of this PlaceBizPushOrder. - Ad trading terms shown to the taker. # 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 @@ -592,7 +592,7 @@ def trade_tips(self, trade_tips): def auto_reply(self): """Gets the auto_reply of this PlaceBizPushOrder. # noqa: E501 - Auto-reply message after order creation. # 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 @@ -603,7 +603,7 @@ def auto_reply(self): def auto_reply(self, auto_reply): """Sets the auto_reply of this PlaceBizPushOrder. - Auto-reply message after order creation. # 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 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/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/send_chat_message_request.py b/gate_api/models/send_chat_message_request.py index bd118c77..3a58ccc1 100644 --- a/gate_api/models/send_chat_message_request.py +++ b/gate_api/models/send_chat_message_request.py @@ -119,7 +119,7 @@ def type(self, type): def message(self): """Gets the message of this SendChatMessageRequest. # noqa: E501 - Message body. For `type=0`, plain text up to 500 characters; for `type=1`, pass the `file_key` returned by `upload_chat_file`. # 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 @@ -130,7 +130,7 @@ def message(self): def message(self, message): """Sets the message of this SendChatMessageRequest. - Message body. For `type=0`, plain text up to 500 characters; for `type=1`, pass the `file_key` returned by `upload_chat_file`. # 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_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/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/symbol.py b/gate_api/models/symbol.py index 671d1ad7..f05655eb 100644 --- a/gate_api/models/symbol.py +++ b/gate_api/models/symbol.py @@ -133,7 +133,7 @@ def symbol(self, symbol): def exchange_type(self): """Gets the exchange_type of this Symbol. # noqa: E501 - Exchange type (`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. - Exchange type (`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 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/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/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/setup.py b/setup.py index 0f5add9f..8167c66d 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.78" +VERSION = "7.2.99" # To install the library, run the following # # python setup.py install From 413b48604d4796e1e7e63d160e417f6785061d87 Mon Sep 17 00:00:00 2001 From: gate Date: Thu, 25 Jun 2026 14:40:31 +0000 Subject: [PATCH 2/3] update to v7.2.100 --- README.md | 4 ++-- docs/OTCApi.md | 4 ++-- docs/OtcBankCreateMultipartRequest.md | 2 +- gate_api/__init__.py | 2 +- gate_api/api/otc_api.py | 6 +++--- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 ++-- gate_api/models/otc_bank_create_multipart_request.py | 12 ++++++------ setup.py | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 062c416e..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.99 -- Package version: 7.2.99 +- 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) diff --git a/docs/OTCApi.md b/docs/OTCApi.md index 986a3054..c71b905d 100644 --- a/docs/OTCApi.md +++ b/docs/OTCApi.md @@ -330,7 +330,7 @@ bank_country = 'bank_country_example' # str | bank_address = 'bank_address_example' # str | iban = 'iban_example' # str | swift = 'swift_example' # str | -documentation_file = '/path/to/file' # file | Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). +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) @@ -355,7 +355,7 @@ Name | Type | Description | Notes **bank_address** | **str**| | **iban** | **str**| | **swift** | **str**| | - **documentation_file** | **file**| Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). | + **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] diff --git a/docs/OtcBankCreateMultipartRequest.md b/docs/OtcBankCreateMultipartRequest.md index ebb7e2f4..db4194f0 100644 --- a/docs/OtcBankCreateMultipartRequest.md +++ b/docs/OtcBankCreateMultipartRequest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **remittance_line_number** | **str** | | [optional] **agent_bank_name** | **str** | | [optional] **agent_bank_swift** | **str** | | [optional] -**documentation_file** | **file** | Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). | +**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/gate_api/__init__.py b/gate_api/__init__.py index 098210df..218cb7ba 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "7.2.99" +__version__ = "7.2.100" # import apis into sdk package from gate_api.api.activity_api import ActivityApi diff --git a/gate_api/api/otc_api.py b/gate_api/api/otc_api.py index 5f9f2cf6..fbbfccd2 100644 --- a/gate_api/api/otc_api.py +++ b/gate_api/api/otc_api.py @@ -511,7 +511,7 @@ def create_otc_bank(self, bank_account_name, bank_name, bank_country, bank_addre :param str bank_address: (required) :param str iban: (required) :param str swift: (required) - :param file documentation_file: Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). (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: @@ -545,7 +545,7 @@ def create_otc_bank_with_http_info(self, bank_account_name, bank_name, bank_coun :param str bank_address: (required) :param str iban: (required) :param str swift: (required) - :param file documentation_file: Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). (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: @@ -652,7 +652,7 @@ def create_otc_bank_with_http_info(self, bank_account_name, bank_name, bank_coun 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: - local_var_files['documentation_file'] = local_var_params['documentation_file'] # noqa: E501 + form_params.append(('documentation_file', local_var_params['documentation_file'])) # noqa: E501 body_params = None # HTTP header `Accept` diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 84276836..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.99/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 5c54c8bd..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.99\n"\ - "SDK Package Version: 7.2.99".\ + "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/otc_bank_create_multipart_request.py b/gate_api/models/otc_bank_create_multipart_request.py index a7205715..697de0b8 100644 --- a/gate_api/models/otc_bank_create_multipart_request.py +++ b/gate_api/models/otc_bank_create_multipart_request.py @@ -42,7 +42,7 @@ class OtcBankCreateMultipartRequest(object): 'remittance_line_number': 'str', 'agent_bank_name': 'str', 'agent_bank_swift': 'str', - 'documentation_file': 'file' + 'documentation_file': 'str' } attribute_map = { @@ -59,7 +59,7 @@ class OtcBankCreateMultipartRequest(object): } 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, file, Configuration) -> None + # 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() @@ -296,10 +296,10 @@ def agent_bank_swift(self, agent_bank_swift): def documentation_file(self): """Gets the documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 - Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). # noqa: E501 + 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) # noqa: E501 :return: The documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 - :rtype: file + :rtype: str """ return self._documentation_file @@ -307,10 +307,10 @@ def documentation_file(self): def documentation_file(self, documentation_file): """Sets the documentation_file of this OtcBankCreateMultipartRequest. - Account-opening proof file (jpg/jpeg/png/pdf, etc.; single file ≤4MB — subject to production environment). # noqa: E501 + 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) # noqa: E501 :param documentation_file: The documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 - :type: file + :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 diff --git a/setup.py b/setup.py index 8167c66d..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.99" +VERSION = "7.2.100" # To install the library, run the following # # python setup.py install From 0d99dbb6d93bcc288e2aef1f4fd73b0d94938e07 Mon Sep 17 00:00:00 2001 From: gate Date: Thu, 13 Aug 2026 09:17:07 +0000 Subject: [PATCH 3/3] update to v7.2.123 --- README.md | 187 ++- docs/AccountTransferDetail.md | 18 + docs/AlphaCurrency.md | 4 +- docs/AutoInvestOrderItem.md | 2 +- docs/AutoInvestPlanDetail.md | 2 +- docs/AutoInvestPlanRecordItem.md | 2 +- docs/{TradFiApi.md => CFDApi.md} | 213 +-- docs/CandyDropV4ActivityCd01.md | 17 - docs/CandyDropV4ActivityRulesCd03.md | 14 - docs/CandyDropV4AirdropRecordCd06.md | 13 - docs/CandyDropV4PrizePoolCd03.md | 13 - docs/CandyDropV4TaskProgressCd04.md | 14 - docs/ClosePosition.md | 11 + ...chPoolResponse.md => ClosePositionData.md} | 4 +- docs/Contract.md | 4 +- docs/ContractDetailDataList.md | 2 +- docs/ContractStat.md | 4 +- ...OrderResponse.md => CreateTransaction2.md} | 6 +- docs/CreateUserRespData.md | 2 +- docs/CrossExApi.md | 460 ++++++- docs/CrossexAccountBookRecord.md | 3 +- docs/CrossexAccountUpdateRequest.md | 2 +- docs/CrossexAccountUpdateResponse.md | 2 +- docs/CrossexAdlRank.md | 2 +- ...3.md => CrossexBatchCancelOrderRequest.md} | 8 +- docs/CrossexBatchCancelOrderResponse.md | 15 + docs/CrossexIsolatedMarginRequest.md | 13 + docs/CrossexIsolatedMarginResponse.md | 11 + docs/CrossexLeverageRequest.md | 2 +- docs/CrossexMarginModeRequest.md | 12 + docs/CrossexMarginModeResponse.md | 11 + docs/CrossexOrder.md | 4 +- docs/CrossexOrderRequest.md | 4 +- docs/CrossexPosition.md | 5 +- docs/CrossexSpecialFee.md | 1 + docs/CrossexTransferRecord.md | 4 +- docs/CrossexTransferRequest.md | 4 +- docs/CurrencyPair.md | 8 +- docs/DeleteOrder.md | 11 + docs/DeliveryContract.md | 4 +- docs/DeliveryPosition.md | 2 +- docs/DeliverySettlement.md | 4 +- ...rAirdropV4OrderRequest.md => Exchanges.md} | 6 +- ...oolV4ErrorResponse.md => ExchangesData.md} | 5 +- ...tionRecordCd05.md => ExchangesDataList.md} | 10 +- docs/FeeRate.md | 11 + ...opV4RegisterRespCd02.md => FeeRateData.md} | 4 +- docs/FeeRateDataList.md | 12 + docs/FlashSwapMultiCurrencyOrder.md | 2 +- docs/FlashSwapOrderCreateRespData.md | 2 +- docs/FuturesApi.md | 4 +- docs/FuturesLeverage.md | 2 +- docs/FuturesLiqOrder.md | 2 +- docs/FuturesPremiumIndex.md | 4 +- docs/HodlerAirdropV4ProjectItem.md | 20 - docs/HodlerAirdropV4UserAirdropRecord.md | 16 - docs/HodlerAirdropV4UserOrderRecord.md | 16 - docs/I18nTxt.md | 11 + docs/InlineResponse200.md | 2 + docs/InlineResponse2001.md | 21 + ...gisterReqCd02.md => InlineResponse2002.md} | 8 +- docs/LaunchApi.md | 1134 ---------------- docs/LaunchPoolV4PledgeRecord.md | 15 - docs/LaunchPoolV4Project.md | 17 - docs/LaunchPoolV4RewardPool.md | 16 - docs/LaunchPoolV4RewardRecord.md | 14 - docs/LeverageFailedCurrencies.md | 12 + docs/MarginMarketLeverage.md | 2 +- docs/MarginTiers.md | 2 +- docs/Mt5AccountData.md | 2 +- docs/OTCApi.md | 16 +- docs/OptionsContract.md | 4 +- docs/OrderBook2.md | 11 + docs/OrderBook2Data.md | 12 + docs/OrderBookPrice.md | 11 + docs/OrderHistoryList2.md | 11 + docs/OrderHistoryList2Data.md | 12 + docs/OrderHistoryListDataList.md | 6 +- docs/OrderHistoryListItem.md | 29 + docs/OrderHistoryListItemStatusDetail.md | 11 + docs/OrderList2.md | 11 + docs/OrderList2Data.md | 10 + docs/OrderListDataList.md | 6 +- docs/OrderListItem.md | 34 + docs/OrderLogData.md | 4 +- docs/OtcBankCreateMultipartRequest.md | 2 +- docs/OtcBankListItem.md | 8 +- docs/OtcBankSupplementChecklistItem.md | 6 +- .../OtcBankSupplementChecklistResponseData.md | 2 +- docs/OtcMarkOrderPaidRequest.md | 2 +- docs/OtcOrderDetail.md | 31 +- docs/OtcOrderListItem.md | 14 +- docs/OtcOrderRequest.md | 4 +- docs/OtcQuoteRequest.md | 8 +- docs/OtcQuoteResponse.md | 1 + docs/OtcQuoteResult.md | 3 + docs/OtcStableCoinOrderCreateResponse.md | 5 +- docs/OtcStableCoinOrderListItem.md | 4 +- docs/OtcStableCoinOrderRequest.md | 14 +- docs/P2pAdDetail.md | 9 +- docs/P2pAdsListItem.md | 6 + docs/P2pAdsListTradeMethod.md | 14 + docs/P2pApi.md | 65 + docs/PlaceBizPushOrder.md | 12 +- docs/Position.md | 2 +- docs/PositionHistoryListDataCloseDetail.md | 2 +- docs/PositionList2.md | 11 + ...ropV4ErrorCd01.md => PositionList2Data.md} | 5 +- docs/PositionListItem.md | 40 + docs/PositionTimerange.md | 2 +- docs/RedeemV4.md | 12 - docs/SpotAccount.md | 13 - docs/SpotApi.md | 422 +++++- docs/SpotPovOrder.md | 26 + docs/SpotPovOrderCreator.md | 18 + docs/StockApi.md | 1131 ++++++++++++++++ docs/SubCrossMarginAccount.md | 2 +- docs/SwapCoinStruct.md | 2 +- docs/Symbol.md | 7 +- docs/SymbolCommissions.md | 11 + ...orResponse.md => SymbolCommissionsData.md} | 7 +- docs/SymbolCommissionsDataList.md | 13 + docs/SymbolDetail.md | 11 + ...ansactionConfig.md => SymbolDetailData.md} | 7 +- docs/SymbolDetailItem.md | 35 + docs/SymbolDetailItemSymbolDescs.md | 11 + docs/SymbolListItem.md | 29 + docs/Symbols2.md | 11 + docs/Symbols2Data.md | 12 + docs/Tokens.md | 4 +- docs/TradFiOrderRequest.md | 4 +- docs/TradFiSpotClosePositionRequest.md | 13 + ...ProgressItemCd04.md => TradFiSpotError.md} | 9 +- docs/TradFiSpotOrderRequest.md | 18 + docs/TradFiSpotOrderUpdateRequest.md | 12 + docs/TradFiSpotTransactionRequest.md | 14 + docs/TradFiTickerData.md | 4 +- docs/TrailOrder.md | 2 +- docs/TransactionItem.md | 20 + docs/TransactionList2.md | 11 + docs/TransactionList2Data.md | 12 + docs/TransactionListDataList.md | 2 +- docs/UniCurrencyPair.md | 2 +- docs/UnifiedApi.md | 70 + docs/UnifiedDiscountTiers.md | 2 +- docs/UpdateOrder2.md | 11 + ...teOrderResponse.md => UpdateOrder2Data.md} | 4 +- docs/UpdateOrderData.md | 2 +- docs/UserAssetResp2.md | 11 + docs/UserAssetResp2Data.md | 16 + ...reateOrderV4.md => UserLeverageSetting.md} | 7 +- docs/WalletApi.md | 70 + example/p2p_merchant_api.py | 6 +- gate_api/__init__.py | 94 +- gate_api/api/__init__.py | 4 +- gate_api/api/{trad_fi_api.py => cfd_api.py} | 133 +- gate_api/api/cross_ex_api.py | 828 ++++++++++-- gate_api/api/futures_api.py | 8 +- gate_api/api/otc_api.py | 24 +- gate_api/api/p2p_api.py | 101 ++ gate_api/api/spot_api.py | 700 ++++++++-- gate_api/api/{launch_api.py => stock_api.py} | 1139 ++++++++--------- gate_api/api/unified_api.py | 118 ++ gate_api/api/wallet_api.py | 114 ++ gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 +- gate_api/models/__init__.py | 88 +- gate_api/models/account_transfer_detail.py | 341 +++++ gate_api/models/alpha_currency.py | 8 +- gate_api/models/auto_invest_order_item.py | 4 +- gate_api/models/auto_invest_plan_detail.py | 4 +- .../models/auto_invest_plan_record_item.py | 4 +- .../models/candy_drop_v4_activity_cd01.py | 319 ----- .../candy_drop_v4_activity_rules_cd03.py | 235 ---- .../candy_drop_v4_airdrop_record_cd06.py | 207 --- ...candy_drop_v4_participation_record_cd05.py | 207 --- .../models/candy_drop_v4_prize_pool_cd03.py | 207 --- .../candy_drop_v4_task_progress_cd04.py | 235 ---- .../candy_drop_v4_task_progress_item_cd04.py | 179 --- gate_api/models/close_position.py | 147 +++ ...ool_response.py => close_position_data.py} | 48 +- gate_api/models/contract.py | 8 +- gate_api/models/contract_detail_data_list.py | 4 +- gate_api/models/contract_stat.py | 14 +- gate_api/models/create_order_v4.py | 188 --- gate_api/models/create_transaction2.py | 149 +++ gate_api/models/create_user_resp_data.py | 4 +- .../models/crossex_account_book_record.py | 36 +- .../models/crossex_account_update_request.py | 4 +- .../models/crossex_account_update_response.py | 4 +- gate_api/models/crossex_adl_rank.py | 4 +- ... => crossex_batch_cancel_order_request.py} | 84 +- .../crossex_batch_cancel_order_response.py | 240 ++++ .../models/crossex_isolated_margin_request.py | 187 +++ .../crossex_isolated_margin_response.py | 153 +++ gate_api/models/crossex_leverage_request.py | 4 +- ...onse.py => crossex_margin_mode_request.py} | 90 +- .../models/crossex_margin_mode_response.py | 153 +++ gate_api/models/crossex_order.py | 8 +- gate_api/models/crossex_order_request.py | 10 +- gate_api/models/crossex_position.py | 92 +- gate_api/models/crossex_special_fee.py | 36 +- gate_api/models/crossex_transfer_record.py | 8 +- gate_api/models/crossex_transfer_request.py | 8 +- gate_api/models/currency_pair.py | 16 +- gate_api/models/delete_order.py | 149 +++ gate_api/models/delivery_contract.py | 8 +- gate_api/models/delivery_position.py | 4 +- gate_api/models/delivery_settlement.py | 8 +- gate_api/models/exchanges.py | 147 +++ ...v4_order_response.py => exchanges_data.py} | 47 +- gate_api/models/exchanges_data_list.py | 213 +++ gate_api/models/fee_rate.py | 147 +++ gate_api/models/fee_rate_data.py | 121 ++ gate_api/models/fee_rate_data_list.py | 179 +++ .../models/flash_swap_multi_currency_order.py | 4 +- .../flash_swap_order_create_resp_data.py | 4 +- gate_api/models/futures_leverage.py | 4 +- gate_api/models/futures_liq_order.py | 4 +- gate_api/models/futures_premium_index.py | 8 +- .../models/hodler_airdrop_v4_project_item.py | 388 ------ .../hodler_airdrop_v4_user_airdrop_record.py | 266 ---- .../hodler_airdrop_v4_user_order_record.py | 266 ---- gate_api/models/i18n_txt.py | 147 +++ gate_api/models/inline_response200.py | 60 +- gate_api/models/inline_response2001.py | 433 +++++++ gate_api/models/inline_response2002.py | 211 +++ .../models/launch_pool_v4_pledge_record.py | 269 ---- gate_api/models/launch_pool_v4_project.py | 333 ----- gate_api/models/launch_pool_v4_reward_pool.py | 297 ----- .../models/launch_pool_v4_reward_record.py | 240 ---- ..._cd02.py => leverage_failed_currencies.py} | 79 +- gate_api/models/margin_market_leverage.py | 4 +- gate_api/models/margin_tiers.py | 4 +- gate_api/models/mt5_account_data.py | 4 +- gate_api/models/options_contract.py | 8 +- gate_api/models/order_book2.py | 147 +++ gate_api/models/order_book2_data.py | 179 +++ gate_api/models/order_book_price.py | 151 +++ gate_api/models/order_history_list2.py | 147 +++ gate_api/models/order_history_list2_data.py | 179 +++ .../models/order_history_list_data_list.py | 12 +- gate_api/models/order_history_list_item.py | 655 ++++++++++ ... order_history_list_item_status_detail.py} | 50 +- gate_api/models/order_list2.py | 147 +++ gate_api/models/order_list2_data.py | 123 ++ gate_api/models/order_list_data_list.py | 12 +- gate_api/models/order_list_item.py | 825 ++++++++++++ gate_api/models/order_log_data.py | 8 +- .../otc_bank_create_multipart_request.py | 4 +- gate_api/models/otc_bank_list_item.py | 180 +-- .../otc_bank_supplement_checklist_item.py | 119 +- ...bank_supplement_checklist_response_data.py | 4 +- .../models/otc_mark_order_paid_request.py | 4 +- gate_api/models/otc_order_detail.py | 608 ++++++--- gate_api/models/otc_order_list_item.py | 134 +- gate_api/models/otc_order_request.py | 8 +- gate_api/models/otc_quote_request.py | 16 +- gate_api/models/otc_quote_response.py | 37 +- gate_api/models/otc_quote_result.py | 92 +- .../otc_stable_coin_order_create_response.py | 41 +- .../models/otc_stable_coin_order_list_item.py | 64 +- .../models/otc_stable_coin_order_request.py | 38 +- gate_api/models/p2p_ad_detail.py | 164 ++- gate_api/models/p2p_ads_list_item.py | 184 ++- gate_api/models/p2p_ads_list_trade_method.py | 235 ++++ gate_api/models/place_biz_push_order.py | 154 ++- gate_api/models/position.py | 4 +- ...position_history_list_data_close_detail.py | 4 +- gate_api/models/position_list2.py | 147 +++ gate_api/models/position_list2_data.py | 123 ++ gate_api/models/position_list_item.py | 956 ++++++++++++++ gate_api/models/position_timerange.py | 4 +- gate_api/models/redeem_v4.py | 188 --- gate_api/models/spot_account.py | 207 --- gate_api/models/spot_pov_order.py | 551 ++++++++ gate_api/models/spot_pov_order_creator.py | 330 +++++ gate_api/models/sub_cross_margin_account.py | 4 +- gate_api/models/swap_coin_struct.py | 4 +- gate_api/models/symbol.py | 48 +- gate_api/models/symbol_commissions.py | 149 +++ ...esp_cd02.py => symbol_commissions_data.py} | 48 +- ...d03.py => symbol_commissions_data_list.py} | 106 +- gate_api/models/symbol_detail.py | 147 +++ gate_api/models/symbol_detail_data.py | 173 +++ gate_api/models/symbol_detail_item.py | 809 ++++++++++++ .../models/symbol_detail_item_symbol_descs.py | 147 +++ gate_api/models/symbol_list_item.py | 679 ++++++++++ ...irdrop_v4_order_request.py => symbols2.py} | 72 +- gate_api/models/symbols2_data.py | 179 +++ gate_api/models/tokens.py | 8 +- gate_api/models/trad_fi_order_request.py | 8 +- .../trad_fi_spot_close_position_request.py | 187 +++ gate_api/models/trad_fi_spot_error.py | 206 +++ gate_api/models/trad_fi_spot_order_request.py | 349 +++++ ...y => trad_fi_spot_order_update_request.py} | 84 +- .../trad_fi_spot_transaction_request.py | 223 ++++ gate_api/models/trad_fi_ticker_data.py | 8 +- gate_api/models/trail_order.py | 4 +- gate_api/models/transaction_item.py | 409 ++++++ gate_api/models/transaction_list2.py | 147 +++ gate_api/models/transaction_list2_data.py | 175 +++ gate_api/models/transaction_list_data_list.py | 4 +- gate_api/models/uni_currency_pair.py | 4 +- gate_api/models/unified_discount_tiers.py | 4 +- gate_api/models/update_order2.py | 147 +++ ...rder_response.py => update_order2_data.py} | 39 +- gate_api/models/update_order_data.py | 4 +- gate_api/models/user_asset_resp2.py | 149 +++ gate_api/models/user_asset_resp2_data.py | 291 +++++ gate_api/models/user_leverage_setting.py | 123 ++ setup.py | 2 +- 312 files changed, 20474 insertions(+), 8025 deletions(-) create mode 100644 docs/AccountTransferDetail.md rename docs/{TradFiApi.md => CFDApi.md} (84%) delete mode 100644 docs/CandyDropV4ActivityCd01.md delete mode 100644 docs/CandyDropV4ActivityRulesCd03.md delete mode 100644 docs/CandyDropV4AirdropRecordCd06.md delete mode 100644 docs/CandyDropV4PrizePoolCd03.md delete mode 100644 docs/CandyDropV4TaskProgressCd04.md create mode 100644 docs/ClosePosition.md rename docs/{RedeemLaunchPoolResponse.md => ClosePositionData.md} (73%) rename docs/{HodlerAirdropV4OrderResponse.md => CreateTransaction2.md} (66%) rename docs/{CandyDropV4TaskCd03.md => CrossexBatchCancelOrderRequest.md} (50%) create mode 100644 docs/CrossexBatchCancelOrderResponse.md create mode 100644 docs/CrossexIsolatedMarginRequest.md create mode 100644 docs/CrossexIsolatedMarginResponse.md create mode 100644 docs/CrossexMarginModeRequest.md create mode 100644 docs/CrossexMarginModeResponse.md create mode 100644 docs/DeleteOrder.md rename docs/{HodlerAirdropV4OrderRequest.md => Exchanges.md} (69%) rename docs/{LaunchPoolV4ErrorResponse.md => ExchangesData.md} (72%) rename docs/{CandyDropV4ParticipationRecordCd05.md => ExchangesDataList.md} (50%) create mode 100644 docs/FeeRate.md rename docs/{CandyDropV4RegisterRespCd02.md => FeeRateData.md} (71%) create mode 100644 docs/FeeRateDataList.md delete mode 100644 docs/HodlerAirdropV4ProjectItem.md delete mode 100644 docs/HodlerAirdropV4UserAirdropRecord.md delete mode 100644 docs/HodlerAirdropV4UserOrderRecord.md create mode 100644 docs/I18nTxt.md create mode 100644 docs/InlineResponse2001.md rename docs/{CandyDropV4RegisterReqCd02.md => InlineResponse2002.md} (58%) delete mode 100644 docs/LaunchApi.md delete mode 100644 docs/LaunchPoolV4PledgeRecord.md delete mode 100644 docs/LaunchPoolV4Project.md delete mode 100644 docs/LaunchPoolV4RewardPool.md delete mode 100644 docs/LaunchPoolV4RewardRecord.md create mode 100644 docs/LeverageFailedCurrencies.md create mode 100644 docs/OrderBook2.md create mode 100644 docs/OrderBook2Data.md create mode 100644 docs/OrderBookPrice.md create mode 100644 docs/OrderHistoryList2.md create mode 100644 docs/OrderHistoryList2Data.md create mode 100644 docs/OrderHistoryListItem.md create mode 100644 docs/OrderHistoryListItemStatusDetail.md create mode 100644 docs/OrderList2.md create mode 100644 docs/OrderList2Data.md create mode 100644 docs/OrderListItem.md create mode 100644 docs/P2pAdsListTradeMethod.md create mode 100644 docs/PositionList2.md rename docs/{CandyDropV4ErrorCd01.md => PositionList2Data.md} (68%) create mode 100644 docs/PositionListItem.md delete mode 100644 docs/RedeemV4.md delete mode 100644 docs/SpotAccount.md create mode 100644 docs/SpotPovOrder.md create mode 100644 docs/SpotPovOrderCreator.md create mode 100644 docs/StockApi.md create mode 100644 docs/SymbolCommissions.md rename docs/{HodlerAirdropV4ErrorResponse.md => SymbolCommissionsData.md} (62%) create mode 100644 docs/SymbolCommissionsDataList.md create mode 100644 docs/SymbolDetail.md rename docs/{TransactionConfig.md => SymbolDetailData.md} (64%) create mode 100644 docs/SymbolDetailItem.md create mode 100644 docs/SymbolDetailItemSymbolDescs.md create mode 100644 docs/SymbolListItem.md create mode 100644 docs/Symbols2.md create mode 100644 docs/Symbols2Data.md create mode 100644 docs/TradFiSpotClosePositionRequest.md rename docs/{CandyDropV4TaskProgressItemCd04.md => TradFiSpotError.md} (50%) create mode 100644 docs/TradFiSpotOrderRequest.md create mode 100644 docs/TradFiSpotOrderUpdateRequest.md create mode 100644 docs/TradFiSpotTransactionRequest.md create mode 100644 docs/TransactionItem.md create mode 100644 docs/TransactionList2.md create mode 100644 docs/TransactionList2Data.md create mode 100644 docs/UpdateOrder2.md rename docs/{LaunchPoolV4CreateOrderResponse.md => UpdateOrder2Data.md} (79%) create mode 100644 docs/UserAssetResp2.md create mode 100644 docs/UserAssetResp2Data.md rename docs/{CreateOrderV4.md => UserLeverageSetting.md} (61%) rename gate_api/api/{trad_fi_api.py => cfd_api.py} (94%) rename gate_api/api/{launch_api.py => stock_api.py} (54%) create mode 100644 gate_api/models/account_transfer_detail.py delete mode 100644 gate_api/models/candy_drop_v4_activity_cd01.py delete mode 100644 gate_api/models/candy_drop_v4_activity_rules_cd03.py delete mode 100644 gate_api/models/candy_drop_v4_airdrop_record_cd06.py delete mode 100644 gate_api/models/candy_drop_v4_participation_record_cd05.py delete mode 100644 gate_api/models/candy_drop_v4_prize_pool_cd03.py delete mode 100644 gate_api/models/candy_drop_v4_task_progress_cd04.py delete mode 100644 gate_api/models/candy_drop_v4_task_progress_item_cd04.py create mode 100644 gate_api/models/close_position.py rename gate_api/models/{redeem_launch_pool_response.py => close_position_data.py} (69%) delete mode 100644 gate_api/models/create_order_v4.py create mode 100644 gate_api/models/create_transaction2.py rename gate_api/models/{transaction_config.py => crossex_batch_cancel_order_request.py} (55%) create mode 100644 gate_api/models/crossex_batch_cancel_order_response.py create mode 100644 gate_api/models/crossex_isolated_margin_request.py create mode 100644 gate_api/models/crossex_isolated_margin_response.py rename gate_api/models/{launch_pool_v4_error_response.py => crossex_margin_mode_request.py} (57%) create mode 100644 gate_api/models/crossex_margin_mode_response.py create mode 100644 gate_api/models/delete_order.py create mode 100644 gate_api/models/exchanges.py rename gate_api/models/{hodler_airdrop_v4_order_response.py => exchanges_data.py} (63%) create mode 100644 gate_api/models/exchanges_data_list.py create mode 100644 gate_api/models/fee_rate.py create mode 100644 gate_api/models/fee_rate_data.py create mode 100644 gate_api/models/fee_rate_data_list.py delete mode 100644 gate_api/models/hodler_airdrop_v4_project_item.py delete mode 100644 gate_api/models/hodler_airdrop_v4_user_airdrop_record.py delete mode 100644 gate_api/models/hodler_airdrop_v4_user_order_record.py create mode 100644 gate_api/models/i18n_txt.py create mode 100644 gate_api/models/inline_response2001.py create mode 100644 gate_api/models/inline_response2002.py delete mode 100644 gate_api/models/launch_pool_v4_pledge_record.py delete mode 100644 gate_api/models/launch_pool_v4_project.py delete mode 100644 gate_api/models/launch_pool_v4_reward_pool.py delete mode 100644 gate_api/models/launch_pool_v4_reward_record.py rename gate_api/models/{candy_drop_v4_register_req_cd02.py => leverage_failed_currencies.py} (59%) create mode 100644 gate_api/models/order_book2.py create mode 100644 gate_api/models/order_book2_data.py create mode 100644 gate_api/models/order_book_price.py create mode 100644 gate_api/models/order_history_list2.py create mode 100644 gate_api/models/order_history_list2_data.py create mode 100644 gate_api/models/order_history_list_item.py rename gate_api/models/{candy_drop_v4_error_cd01.py => order_history_list_item_status_detail.py} (70%) create mode 100644 gate_api/models/order_list2.py create mode 100644 gate_api/models/order_list2_data.py create mode 100644 gate_api/models/order_list_item.py create mode 100644 gate_api/models/p2p_ads_list_trade_method.py create mode 100644 gate_api/models/position_list2.py create mode 100644 gate_api/models/position_list2_data.py create mode 100644 gate_api/models/position_list_item.py delete mode 100644 gate_api/models/redeem_v4.py delete mode 100644 gate_api/models/spot_account.py create mode 100644 gate_api/models/spot_pov_order.py create mode 100644 gate_api/models/spot_pov_order_creator.py create mode 100644 gate_api/models/symbol_commissions.py rename gate_api/models/{candy_drop_v4_register_resp_cd02.py => symbol_commissions_data.py} (69%) rename gate_api/models/{candy_drop_v4_task_cd03.py => symbol_commissions_data_list.py} (53%) create mode 100644 gate_api/models/symbol_detail.py create mode 100644 gate_api/models/symbol_detail_data.py create mode 100644 gate_api/models/symbol_detail_item.py create mode 100644 gate_api/models/symbol_detail_item_symbol_descs.py create mode 100644 gate_api/models/symbol_list_item.py rename gate_api/models/{hodler_airdrop_v4_order_request.py => symbols2.py} (63%) create mode 100644 gate_api/models/symbols2_data.py create mode 100644 gate_api/models/trad_fi_spot_close_position_request.py create mode 100644 gate_api/models/trad_fi_spot_error.py create mode 100644 gate_api/models/trad_fi_spot_order_request.py rename gate_api/models/{hodler_airdrop_v4_error_response.py => trad_fi_spot_order_update_request.py} (57%) create mode 100644 gate_api/models/trad_fi_spot_transaction_request.py create mode 100644 gate_api/models/transaction_item.py create mode 100644 gate_api/models/transaction_list2.py create mode 100644 gate_api/models/transaction_list2_data.py create mode 100644 gate_api/models/update_order2.py rename gate_api/models/{launch_pool_v4_create_order_response.py => update_order2_data.py} (70%) create mode 100644 gate_api/models/user_asset_resp2.py create mode 100644 gate_api/models/user_asset_resp2_data.py create mode 100644 gate_api/models/user_leverage_setting.py diff --git a/README.md b/README.md index 9587d53f..06503302 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.100 -- Package version: 7.2.100 +- API version: v4.106.123 +- Package version: 7.2.123 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) @@ -116,12 +116,34 @@ Class | Method | HTTP request | Description *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 +*CFDApi* | [**query_mt5_account_info**](docs/CFDApi.md#query_mt5_account_info) | **GET** /tradfi/users/mt5-account | Query MT5 account information +*CFDApi* | [**query_categories**](docs/CFDApi.md#query_categories) | **GET** /tradfi/symbols/categories | Query trading symbol categories +*CFDApi* | [**query_symbol_commissions**](docs/CFDApi.md#query_symbol_commissions) | **GET** /tradfi/symbols/commissions | Query symbol commission rates +*CFDApi* | [**query_symbols**](docs/CFDApi.md#query_symbols) | **GET** /tradfi/symbols | Query trading symbol list +*CFDApi* | [**query_symbol_detail**](docs/CFDApi.md#query_symbol_detail) | **GET** /tradfi/symbols/detail | Query trading symbol details +*CFDApi* | [**query_symbol_kline**](docs/CFDApi.md#query_symbol_kline) | **GET** /tradfi/symbols/{symbol}/klines | Query trading symbol klines +*CFDApi* | [**query_symbol_ticker**](docs/CFDApi.md#query_symbol_ticker) | **GET** /tradfi/symbols/{symbol}/tickers | Query trading symbol ticker +*CFDApi* | [**create_trad_fi_user**](docs/CFDApi.md#create_trad_fi_user) | **POST** /tradfi/users | Create CFD user +*CFDApi* | [**query_user_assets**](docs/CFDApi.md#query_user_assets) | **GET** /tradfi/users/assets | Query account assets +*CFDApi* | [**query_transaction**](docs/CFDApi.md#query_transaction) | **GET** /tradfi/transactions | Query Fund Transfer In/Out Records +*CFDApi* | [**create_transaction**](docs/CFDApi.md#create_transaction) | **POST** /tradfi/transactions | Fund transfer +*CFDApi* | [**query_order_list**](docs/CFDApi.md#query_order_list) | **GET** /tradfi/orders | Query active order list +*CFDApi* | [**create_trad_fi_order**](docs/CFDApi.md#create_trad_fi_order) | **POST** /tradfi/orders | Create order +*CFDApi* | [**update_order**](docs/CFDApi.md#update_order) | **PUT** /tradfi/orders/{order_id} | Modify order +*CFDApi* | [**delete_order**](docs/CFDApi.md#delete_order) | **DELETE** /tradfi/orders/{order_id} | Cancel order +*CFDApi* | [**query_order_history_list**](docs/CFDApi.md#query_order_history_list) | **GET** /tradfi/orders/history | Query historical order list +*CFDApi* | [**query_order_log**](docs/CFDApi.md#query_order_log) | **GET** /tradfi/orders/log/{log_id} | Get order details by log ID +*CFDApi* | [**query_position_list**](docs/CFDApi.md#query_position_list) | **GET** /tradfi/positions | Query active position list +*CFDApi* | [**update_position**](docs/CFDApi.md#update_position) | **PUT** /tradfi/positions/{position_id} | Modify position +*CFDApi* | [**close_position**](docs/CFDApi.md#close_position) | **POST** /tradfi/positions/{position_id}/close | Close position +*CFDApi* | [**query_position_history_list**](docs/CFDApi.md#query_position_history_list) | **GET** /tradfi/positions/history | Query historical position 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 +*CrossExApi* | [**create_crossex_order**](docs/CrossExApi.md#create_crossex_order) | **POST** /crossex/orders | Create order +*CrossExApi* | [**cancel_batch_crossex_orders**](docs/CrossExApi.md#cancel_batch_crossex_orders) | **POST** /crossex/batch_cancel_orders | Batch cancel orders *CrossExApi* | [**get_crossex_order**](docs/CrossExApi.md#get_crossex_order) | **GET** /crossex/orders/{order_id} | Query order details *CrossExApi* | [**update_crossex_order**](docs/CrossExApi.md#update_crossex_order) | **PUT** /crossex/orders/{order_id} | Modify Order *CrossExApi* | [**cancel_crossex_order**](docs/CrossExApi.md#cancel_crossex_order) | **DELETE** /crossex/orders/{order_id} | Cancel Order @@ -134,19 +156,24 @@ Class | Method | HTTP request | Description *CrossExApi* | [**get_crossex_margin_positions_leverage**](docs/CrossExApi.md#get_crossex_margin_positions_leverage) | **GET** /crossex/margin_positions/leverage | Query Leveraged Trading Pair Leverage Multiplier *CrossExApi* | [**update_crossex_margin_positions_leverage**](docs/CrossExApi.md#update_crossex_margin_positions_leverage) | **POST** /crossex/margin_positions/leverage | Modify Leveraged Trading Pair Leverage Multiplier *CrossExApi* | [**close_crossex_position**](docs/CrossExApi.md#close_crossex_position) | **POST** /crossex/position | Full Close Position +*CrossExApi* | [**get_crossex_positions_margin_mode**](docs/CrossExApi.md#get_crossex_positions_margin_mode) | **GET** /crossex/positions/margin_mode | Get futures position margin mode +*CrossExApi* | [**update_crossex_positions_margin_mode**](docs/CrossExApi.md#update_crossex_positions_margin_mode) | **POST** /crossex/positions/margin_mode | Update futures position margin mode +*CrossExApi* | [**update_crossex_positions_margin**](docs/CrossExApi.md#update_crossex_positions_margin) | **POST** /crossex/positions/margin | Increase or decrease isolated margin *CrossExApi* | [**get_crossex_interest_rate**](docs/CrossExApi.md#get_crossex_interest_rate) | **GET** /crossex/interest_rate | Query margin asset interest rates *CrossExApi* | [**get_crossex_fee**](docs/CrossExApi.md#get_crossex_fee) | **GET** /crossex/fee | Query User Fee Rates *CrossExApi* | [**list_crossex_positions**](docs/CrossExApi.md#list_crossex_positions) | **GET** /crossex/positions | Query Contract Positions *CrossExApi* | [**list_crossex_margin_positions**](docs/CrossExApi.md#list_crossex_margin_positions) | **GET** /crossex/margin_positions | Query Leveraged Positions *CrossExApi* | [**list_crossex_adl_rank**](docs/CrossExApi.md#list_crossex_adl_rank) | **GET** /crossex/adl_rank | Query ADL Position Reduction Ranking *CrossExApi* | [**list_crossex_open_orders**](docs/CrossExApi.md#list_crossex_open_orders) | **GET** /crossex/open_orders | Query All Current Open Orders -*CrossExApi* | [**list_crossex_history_orders**](docs/CrossExApi.md#list_crossex_history_orders) | **GET** /crossex/history_orders | queryorderhistory +*CrossExApi* | [**list_crossex_history_orders**](docs/CrossExApi.md#list_crossex_history_orders) | **GET** /crossex/history_orders | Query order history *CrossExApi* | [**list_crossex_history_positions**](docs/CrossExApi.md#list_crossex_history_positions) | **GET** /crossex/history_positions | Query Contract Position History *CrossExApi* | [**list_crossex_history_margin_positions**](docs/CrossExApi.md#list_crossex_history_margin_positions) | **GET** /crossex/history_margin_positions | Query Leveraged Position History *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_history_trades**](docs/CrossExApi.md#list_crossex_history_trades) | **GET** /crossex/history_trades | Query filled history *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 +*CrossExApi* | [**list_crossex_market_tickers**](docs/CrossExApi.md#list_crossex_market_tickers) | **GET** /crossex/market/tickers | Get exchange tickers +*CrossExApi* | [**list_crossex_market_funding_info**](docs/CrossExApi.md#list_crossex_market_funding_info) | **GET** /crossex/market/funding_info | Get exchange futures funding rate information *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 @@ -181,6 +208,22 @@ Class | Method | HTTP request | Description *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 *OTCApi* | [**get_otc_order_detail**](docs/OTCApi.md#get_otc_order_detail) | **GET** /otc/order/detail | Fiat order details +*StockApi* | [**query_stock_user_assets**](docs/StockApi.md#query_stock_user_assets) | **GET** /stock/users/assets | Query user assets +*StockApi* | [**query_stock_symbols**](docs/StockApi.md#query_stock_symbols) | **GET** /stock/symbols | Query symbol list +*StockApi* | [**query_stock_symbol_detail**](docs/StockApi.md#query_stock_symbol_detail) | **GET** /stock/symbols/detail | Query symbol details +*StockApi* | [**query_stock_order_book**](docs/StockApi.md#query_stock_order_book) | **GET** /stock/market/{symbol}/orderbook | Query market order book +*StockApi* | [**query_stock_order_list**](docs/StockApi.md#query_stock_order_list) | **GET** /stock/orders | Query open order list +*StockApi* | [**create_stock_order**](docs/StockApi.md#create_stock_order) | **POST** /stock/orders | Create order +*StockApi* | [**delete_all_stock_orders**](docs/StockApi.md#delete_all_stock_orders) | **DELETE** /stock/orders | Cancel all open orders +*StockApi* | [**query_stock_order_history**](docs/StockApi.md#query_stock_order_history) | **GET** /stock/orders/history | Query historical order list +*StockApi* | [**update_stock_order**](docs/StockApi.md#update_stock_order) | **PUT** /stock/orders/{order_id} | Modify order +*StockApi* | [**delete_stock_order**](docs/StockApi.md#delete_stock_order) | **DELETE** /stock/orders/{order_id} | Cancel order +*StockApi* | [**query_stock_positions**](docs/StockApi.md#query_stock_positions) | **GET** /stock/positions | Query current position list +*StockApi* | [**close_stock_position**](docs/StockApi.md#close_stock_position) | **POST** /stock/positions/close | Close position +*StockApi* | [**query_stock_transactions**](docs/StockApi.md#query_stock_transactions) | **GET** /stock/transactions | Query transaction records +*StockApi* | [**create_stock_transaction**](docs/StockApi.md#create_stock_transaction) | **POST** /stock/transactions | Fund transfer +*StockApi* | [**query_stock_exchanges**](docs/StockApi.md#query_stock_exchanges) | **GET** /stock/exchanges | Query supported exchanges +*StockApi* | [**query_stock_fee_rate**](docs/StockApi.md#query_stock_fee_rate) | **GET** /stock/fee-rate | Query fee rates for Japanese and Korean stocks *SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts *SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account *SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get sub-account @@ -192,26 +235,6 @@ Class | Method | HTTP request | Description *SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock sub-account *SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock sub-account *SubAccountApi* | [**list_unified_mode**](docs/SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode -*TradFiApi* | [**query_mt5_account_info**](docs/TradFiApi.md#query_mt5_account_info) | **GET** /tradfi/users/mt5-account | Query MT5 account information -*TradFiApi* | [**query_categories**](docs/TradFiApi.md#query_categories) | **GET** /tradfi/symbols/categories | Query trading symbol categories -*TradFiApi* | [**query_symbols**](docs/TradFiApi.md#query_symbols) | **GET** /tradfi/symbols | Query trading symbol list -*TradFiApi* | [**query_symbol_detail**](docs/TradFiApi.md#query_symbol_detail) | **GET** /tradfi/symbols/detail | Query trading symbol details -*TradFiApi* | [**query_symbol_kline**](docs/TradFiApi.md#query_symbol_kline) | **GET** /tradfi/symbols/{symbol}/klines | Query trading symbol klines -*TradFiApi* | [**query_symbol_ticker**](docs/TradFiApi.md#query_symbol_ticker) | **GET** /tradfi/symbols/{symbol}/tickers | Query trading symbol ticker -*TradFiApi* | [**create_trad_fi_user**](docs/TradFiApi.md#create_trad_fi_user) | **POST** /tradfi/users | Create TradFi user -*TradFiApi* | [**query_user_assets**](docs/TradFiApi.md#query_user_assets) | **GET** /tradfi/users/assets | Query account assets -*TradFiApi* | [**query_transaction**](docs/TradFiApi.md#query_transaction) | **GET** /tradfi/transactions | Query Fund Transfer In/Out Records -*TradFiApi* | [**create_transaction**](docs/TradFiApi.md#create_transaction) | **POST** /tradfi/transactions | Fund Deposit and Withdrawal -*TradFiApi* | [**query_order_list**](docs/TradFiApi.md#query_order_list) | **GET** /tradfi/orders | Query active order list -*TradFiApi* | [**create_trad_fi_order**](docs/TradFiApi.md#create_trad_fi_order) | **POST** /tradfi/orders | Create an order -*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 -*TradFiApi* | [**query_position_history_list**](docs/TradFiApi.md#query_position_history_list) | **GET** /tradfi/positions/history | Query historical position list *UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information *UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query maximum borrowable amount for unified account *UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query maximum transferable amount for unified account @@ -228,6 +251,7 @@ Class | Method | HTTP request | Description *UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered *UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin *UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator +*UnifiedApi* | [**set_user_leverage**](docs/UnifiedApi.md#set_user_leverage) | **POST** /unified/leverage/user_setting | Set leverage for all of the user's borrowed currencies *UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set *UnifiedApi* | [**get_user_leverage_currency_setting**](docs/UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get user currency leverage *UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set loan currency leverage @@ -416,21 +440,6 @@ Class | Method | HTTP request | Description *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 | 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 @@ -484,6 +493,7 @@ Class | Method | HTTP request | Description *OptionsApi* | [**get_options_mmp**](docs/OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query. *OptionsApi* | [**set_options_mmp**](docs/OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings *OptionsApi* | [**reset_options_mmp**](docs/OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset +*P2pApi* | [**p2p_merchant_query_spot_balance**](docs/P2pApi.md#p2p_merchant_query_spot_balance) | **GET** /spot/accounts | Query spot balance *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 @@ -524,13 +534,12 @@ Class | Method | HTTP request | Description *SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market K-line chart *SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query account fee rates *SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Batch query account fee rates -*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot trading accounts *SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query spot account transaction history *SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Batch place orders *SpotApi* | [**list_all_open_orders**](docs/SpotApi.md#list_all_open_orders) | **GET** /spot/open_orders | List all open orders *SpotApi* | [**create_cross_liquidate_order**](docs/SpotApi.md#create_cross_liquidate_order) | **POST** /spot/cross_liquidate_orders | Close position when cross-currency is disabled *SpotApi* | [**list_orders**](docs/SpotApi.md#list_orders) | **GET** /spot/orders | List orders -*SpotApi* | [**create_order**](docs/SpotApi.md#create_order) | **POST** /spot/orders | Create an order +*SpotApi* | [**create_order**](docs/SpotApi.md#create_order) | **POST** /spot/orders | Create order *SpotApi* | [**cancel_orders**](docs/SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair *SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel batch orders by specified ID list *SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Query single order details @@ -546,12 +555,18 @@ 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 +*SpotApi* | [**list_spot_pov_orders**](docs/SpotApi.md#list_spot_pov_orders) | **GET** /spot/pov_orders | List Spot POV orders +*SpotApi* | [**create_spot_pov_order**](docs/SpotApi.md#create_spot_pov_order) | **POST** /spot/pov_orders | Create a Spot POV order +*SpotApi* | [**cancel_spot_pov_orders**](docs/SpotApi.md#cancel_spot_pov_orders) | **POST** /spot/pov_orders/cancel | Cancel Spot POV orders +*SpotApi* | [**get_spot_pov_order**](docs/SpotApi.md#get_spot_pov_order) | **GET** /spot/pov_orders/{order_id} | Query Spot POV order details +*SpotApi* | [**cancel_spot_pov_order**](docs/SpotApi.md#cancel_spot_pov_order) | **POST** /spot/pov_orders/{order_id}/cancel | Cancel a Spot POV 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 *WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Get deposit records +*WalletApi* | [**get_transfer**](docs/WalletApi.md#get_transfer) | **GET** /wallet/transfers | Get trading account transfer *WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts *WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Get transfer records between main and sub accounts *WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts @@ -604,6 +619,7 @@ Class | Method | HTTP request | Description - [AccountKeyInfo](docs/AccountKeyInfo.md) - [AccountKeyInfoPerms](docs/AccountKeyInfoPerms.md) - [AccountRateLimit](docs/AccountRateLimit.md) + - [AccountTransferDetail](docs/AccountTransferDetail.md) - [AccountsResponse](docs/AccountsResponse.md) - [AdsDetailRequest](docs/AdsDetailRequest.md) - [AdsListRequest](docs/AdsListRequest.md) @@ -667,23 +683,14 @@ Class | Method | HTTP request | Description - [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) + - [ClosePosition](docs/ClosePosition.md) + - [ClosePositionData](docs/ClosePositionData.md) - [CollateralAdjust](docs/CollateralAdjust.md) - [CollateralAdjustRes](docs/CollateralAdjustRes.md) - [CollateralCurrency](docs/CollateralCurrency.md) @@ -717,12 +724,12 @@ Class | Method | HTTP request | Description - [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) + - [CreateTransaction2](docs/CreateTransaction2.md) - [CreateUniLend](docs/CreateUniLend.md) - [CreateUniLoan](docs/CreateUniLoan.md) - [CreateUserResp](docs/CreateUserResp.md) @@ -736,6 +743,8 @@ Class | Method | HTTP request | Description - [CrossexAccountUpdateRequest](docs/CrossexAccountUpdateRequest.md) - [CrossexAccountUpdateResponse](docs/CrossexAccountUpdateResponse.md) - [CrossexAdlRank](docs/CrossexAdlRank.md) + - [CrossexBatchCancelOrderRequest](docs/CrossexBatchCancelOrderRequest.md) + - [CrossexBatchCancelOrderResponse](docs/CrossexBatchCancelOrderResponse.md) - [CrossexClosePositionRequest](docs/CrossexClosePositionRequest.md) - [CrossexCoinDiscountRate](docs/CrossexCoinDiscountRate.md) - [CrossexConvertOrderRequest](docs/CrossexConvertOrderRequest.md) @@ -745,9 +754,13 @@ Class | Method | HTTP request | Description - [CrossexHistoricalMarginPosition](docs/CrossexHistoricalMarginPosition.md) - [CrossexHistoricalPosition](docs/CrossexHistoricalPosition.md) - [CrossexInterestRate](docs/CrossexInterestRate.md) + - [CrossexIsolatedMarginRequest](docs/CrossexIsolatedMarginRequest.md) + - [CrossexIsolatedMarginResponse](docs/CrossexIsolatedMarginResponse.md) - [CrossexLeverageRequest](docs/CrossexLeverageRequest.md) - [CrossexLeverageResponse](docs/CrossexLeverageResponse.md) - [CrossexMarginInterestRecord](docs/CrossexMarginInterestRecord.md) + - [CrossexMarginModeRequest](docs/CrossexMarginModeRequest.md) + - [CrossexMarginModeResponse](docs/CrossexMarginModeResponse.md) - [CrossexMarginPosition](docs/CrossexMarginPosition.md) - [CrossexOrder](docs/CrossexOrder.md) - [CrossexOrderActionResponse](docs/CrossexOrderActionResponse.md) @@ -767,6 +780,7 @@ Class | Method | HTTP request | Description - [CurrencyPair](docs/CurrencyPair.md) - [CurrencyQuota](docs/CurrencyQuota.md) - [DebitFee](docs/DebitFee.md) + - [DeleteOrder](docs/DeleteOrder.md) - [DeletePosition](docs/DeletePosition.md) - [DeliveryAccount](docs/DeliveryAccount.md) - [DeliveryAccountBook](docs/DeliveryAccountBook.md) @@ -805,6 +819,12 @@ Class | Method | HTTP request | Description - [EvaluateResp](docs/EvaluateResp.md) - [ExSkillClaimRewardReq](docs/ExSkillClaimRewardReq.md) - [ExSkillClaimTaskReq](docs/ExSkillClaimTaskReq.md) + - [Exchanges](docs/Exchanges.md) + - [ExchangesData](docs/ExchangesData.md) + - [ExchangesDataList](docs/ExchangesDataList.md) + - [FeeRate](docs/FeeRate.md) + - [FeeRateData](docs/FeeRateData.md) + - [FeeRateDataList](docs/FeeRateDataList.md) - [FixedTermBonusInfo](docs/FixedTermBonusInfo.md) - [FixedTermCouponInfo](docs/FixedTermCouponInfo.md) - [FixedTermHistoryRecord](docs/FixedTermHistoryRecord.md) @@ -888,28 +908,20 @@ Class | Method | HTTP request | Description - [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) + - [I18nTxt](docs/I18nTxt.md) - [IndexConstituent](docs/IndexConstituent.md) - [InfiniteGridCreateParams](docs/InfiniteGridCreateParams.md) - [InfiniteGridCreateRequest](docs/InfiniteGridCreateRequest.md) - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InlineResponse2002](docs/InlineResponse2002.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) + - [LeverageFailedCurrencies](docs/LeverageFailedCurrencies.md) - [LiquidateOrder](docs/LiquidateOrder.md) - [ListActivitiesResponse](docs/ListActivitiesResponse.md) - [ListActivitiesResponseData](docs/ListActivitiesResponseData.md) @@ -996,15 +1008,25 @@ Class | Method | HTTP request | Description - [OptionsUnderlyingTicker](docs/OptionsUnderlyingTicker.md) - [Order](docs/Order.md) - [OrderBook](docs/OrderBook.md) + - [OrderBook2](docs/OrderBook2.md) + - [OrderBook2Data](docs/OrderBook2Data.md) + - [OrderBookPrice](docs/OrderBookPrice.md) - [OrderCancel](docs/OrderCancel.md) - [OrderCreateV1Req](docs/OrderCreateV1Req.md) - [OrderCreateV1Resp](docs/OrderCreateV1Resp.md) - [OrderHistoryList](docs/OrderHistoryList.md) + - [OrderHistoryList2](docs/OrderHistoryList2.md) + - [OrderHistoryList2Data](docs/OrderHistoryList2Data.md) - [OrderHistoryListData](docs/OrderHistoryListData.md) - [OrderHistoryListDataList](docs/OrderHistoryListDataList.md) + - [OrderHistoryListItem](docs/OrderHistoryListItem.md) + - [OrderHistoryListItemStatusDetail](docs/OrderHistoryListItemStatusDetail.md) - [OrderList](docs/OrderList.md) + - [OrderList2](docs/OrderList2.md) + - [OrderList2Data](docs/OrderList2Data.md) - [OrderListData](docs/OrderListData.md) - [OrderListDataList](docs/OrderListDataList.md) + - [OrderListItem](docs/OrderListItem.md) - [OrderListStruct](docs/OrderListStruct.md) - [OrderListStructList](docs/OrderListStructList.md) - [OrderListV1Resp](docs/OrderListV1Resp.md) @@ -1050,6 +1072,7 @@ Class | Method | HTTP request | Description - [P2pAdDetailResponse](docs/P2pAdDetailResponse.md) - [P2pAdsListItem](docs/P2pAdsListItem.md) - [P2pAdsListResponse](docs/P2pAdsListResponse.md) + - [P2pAdsListTradeMethod](docs/P2pAdsListTradeMethod.md) - [P2pAdsUpdateStatusResponse](docs/P2pAdsUpdateStatusResponse.md) - [P2pAdsUpdateStatusResult](docs/P2pAdsUpdateStatusResult.md) - [P2pChatListResponse](docs/P2pChatListResponse.md) @@ -1112,8 +1135,11 @@ Class | Method | HTTP request | Description - [PositionHistoryListDataList](docs/PositionHistoryListDataList.md) - [PositionHistoryListDataRealizedPnlDetail](docs/PositionHistoryListDataRealizedPnlDetail.md) - [PositionList](docs/PositionList.md) + - [PositionList2](docs/PositionList2.md) + - [PositionList2Data](docs/PositionList2Data.md) - [PositionListData](docs/PositionListData.md) - [PositionListDataList](docs/PositionListDataList.md) + - [PositionListItem](docs/PositionListItem.md) - [PositionTimerange](docs/PositionTimerange.md) - [PreviewFromParam](docs/PreviewFromParam.md) - [PreviewOrder](docs/PreviewOrder.md) @@ -1129,8 +1155,6 @@ Class | Method | HTTP request | Description - [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) @@ -1143,7 +1167,6 @@ Class | Method | HTTP request | Description - [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) @@ -1154,6 +1177,8 @@ Class | Method | HTTP request | Description - [SpotMartingaleCreateRequest](docs/SpotMartingaleCreateRequest.md) - [SpotOrderStopLoss](docs/SpotOrderStopLoss.md) - [SpotOrderStopProfit](docs/SpotOrderStopProfit.md) + - [SpotPovOrder](docs/SpotPovOrder.md) + - [SpotPovOrderCreator](docs/SpotPovOrderCreator.md) - [SpotPricePutOrder](docs/SpotPricePutOrder.md) - [SpotPriceTrigger](docs/SpotPriceTrigger.md) - [SpotPriceTriggeredOrder](docs/SpotPriceTriggeredOrder.md) @@ -1181,7 +1206,17 @@ Class | Method | HTTP request | Description - [SwapCoin](docs/SwapCoin.md) - [SwapCoinStruct](docs/SwapCoinStruct.md) - [Symbol](docs/Symbol.md) + - [SymbolCommissions](docs/SymbolCommissions.md) + - [SymbolCommissionsData](docs/SymbolCommissionsData.md) + - [SymbolCommissionsDataList](docs/SymbolCommissionsDataList.md) + - [SymbolDetail](docs/SymbolDetail.md) + - [SymbolDetailData](docs/SymbolDetailData.md) + - [SymbolDetailItem](docs/SymbolDetailItem.md) + - [SymbolDetailItemSymbolDescs](docs/SymbolDetailItemSymbolDescs.md) + - [SymbolListItem](docs/SymbolListItem.md) - [Symbols](docs/Symbols.md) + - [Symbols2](docs/Symbols2.md) + - [Symbols2Data](docs/Symbols2Data.md) - [SymbolsData](docs/SymbolsData.md) - [SymbolsDataList](docs/SymbolsDataList.md) - [SystemTime](docs/SystemTime.md) @@ -1193,6 +1228,11 @@ Class | Method | HTTP request | Description - [TradFiOrderRequest](docs/TradFiOrderRequest.md) - [TradFiOrderUpdateRequest](docs/TradFiOrderUpdateRequest.md) - [TradFiPositionUpdateRequest](docs/TradFiPositionUpdateRequest.md) + - [TradFiSpotClosePositionRequest](docs/TradFiSpotClosePositionRequest.md) + - [TradFiSpotError](docs/TradFiSpotError.md) + - [TradFiSpotOrderRequest](docs/TradFiSpotOrderRequest.md) + - [TradFiSpotOrderUpdateRequest](docs/TradFiSpotOrderUpdateRequest.md) + - [TradFiSpotTransactionRequest](docs/TradFiSpotTransactionRequest.md) - [TradFiTicker](docs/TradFiTicker.md) - [TradFiTickerData](docs/TradFiTickerData.md) - [TradFiTransactionRequest](docs/TradFiTransactionRequest.md) @@ -1204,9 +1244,11 @@ Class | Method | HTTP request | Description - [TrailOrderDetailResponse](docs/TrailOrderDetailResponse.md) - [TrailOrderListResponse](docs/TrailOrderListResponse.md) - [TrailOrderResponse](docs/TrailOrderResponse.md) - - [TransactionConfig](docs/TransactionConfig.md) - [TransactionID](docs/TransactionID.md) + - [TransactionItem](docs/TransactionItem.md) - [TransactionList](docs/TransactionList.md) + - [TransactionList2](docs/TransactionList2.md) + - [TransactionList2Data](docs/TransactionList2Data.md) - [TransactionListData](docs/TransactionListData.md) - [TransactionListDataList](docs/TransactionListDataList.md) - [Transfer](docs/Transfer.md) @@ -1257,12 +1299,17 @@ Class | Method | HTTP request | Description - [UnifiedTransferable](docs/UnifiedTransferable.md) - [UpdateDualCompPositionCrossModeRequest](docs/UpdateDualCompPositionCrossModeRequest.md) - [UpdateOrder](docs/UpdateOrder.md) + - [UpdateOrder2](docs/UpdateOrder2.md) + - [UpdateOrder2Data](docs/UpdateOrder2Data.md) - [UpdateOrderData](docs/UpdateOrderData.md) - [UpdatePosition](docs/UpdatePosition.md) - [UpdateTrailOrder](docs/UpdateTrailOrder.md) - [UploadChatFile](docs/UploadChatFile.md) - [UserAssetResp](docs/UserAssetResp.md) + - [UserAssetResp2](docs/UserAssetResp2.md) + - [UserAssetResp2Data](docs/UserAssetResp2Data.md) - [UserAssetRespData](docs/UserAssetRespData.md) + - [UserLeverageSetting](docs/UserLeverageSetting.md) - [UserSub](docs/UserSub.md) - [UserSubRelation](docs/UserSubRelation.md) - [WithdrawStatus](docs/WithdrawStatus.md) diff --git a/docs/AccountTransferDetail.md b/docs/AccountTransferDetail.md new file mode 100644 index 00000000..1d64a7ba --- /dev/null +++ b/docs/AccountTransferDetail.md @@ -0,0 +1,18 @@ +# AccountTransferDetail + +Trading account transfer details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tx_id** | **str** | Transfer transaction ID | [readonly] +**status** | **str** | Transfer status: - `pending`: Processing - `success`: Successful - `fail`: Failed | [readonly] +**currency** | **str** | Transfer currency | [readonly] +**amount** | **str** | Transfer amount | [readonly] +**from_account** | **str** | Source account type: - `spot`: Spot account - `margin`: Margin account - `futures`: Perpetual futures account - `delivery`: Delivery futures account - `options`: Options account - `unknown`: Unrecognized account type | [readonly] +**to_account** | **str** | Destination account type: - `spot`: Spot account - `margin`: Margin account - `futures`: Perpetual futures account - `delivery`: Delivery futures account - `options`: Options account - `unknown`: Unrecognized account type | [readonly] +**settle** | **str** | Settlement currency for futures, delivery, and options transfers; otherwise, null | [readonly] +**currency_pair** | **str** | Currency pair for margin transfers; otherwise, null | [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/AlphaCurrency.md b/docs/AlphaCurrency.md index d3adda45..a27a78cf 100644 --- a/docs/AlphaCurrency.md +++ b/docs/AlphaCurrency.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **name** | **str** | Currency name | [optional] **chain** | **str** | The main chain corresponding to the coin | [optional] **address** | **str** | Contract Address | [optional] -**amount_precision** | **int** | Amount scale | [optional] -**precision** | **int** | Price scale | [optional] +**amount_precision** | **int** | Quantity precision | [optional] +**precision** | **int** | Price precision | [optional] **status** | **int** | Currency Trading Status - `1` : Normal trading - `2` : Suspended trading - `3` : Delisted | [optional] [[Back to Model list]](../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 index 02da072a..d991cb4e 100644 --- a/docs/AutoInvestOrderItem.md +++ b/docs/AutoInvestOrderItem.md @@ -5,7 +5,7 @@ Auto invest order item Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Order ID | -**type** | **str** | type | +**type** | **str** | Type | **amount** | **str** | Size | **plan_id** | **int** | Plan ID | **side** | **int** | direction | diff --git a/docs/AutoInvestPlanDetail.md b/docs/AutoInvestPlanDetail.md index e5d988ae..6b0ecd0b 100644 --- a/docs/AutoInvestPlanDetail.md +++ b/docs/AutoInvestPlanDetail.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **period_type** | **str** | Cycle type(e.g., monthly) | **period_day** | **int** | Cycle day | **period_hour** | **int** | CycleHours | -**portfolio** | [**list[AutoInvestPortfolioItem]**](AutoInvestPortfolioItem.md) | InvestmentPortfolio | +**portfolio** | [**list[AutoInvestPortfolioItem]**](AutoInvestPortfolioItem.md) | Portfolio | **next_time** | **int** | Next execution time (Unix timestamp) | **period** | **int** | Executed periods | **fund_source** | **str** | Fund source(spot/earn) | diff --git a/docs/AutoInvestPlanRecordItem.md b/docs/AutoInvestPlanRecordItem.md index 5844321d..419f5b99 100644 --- a/docs/AutoInvestPlanRecordItem.md +++ b/docs/AutoInvestPlanRecordItem.md @@ -5,7 +5,7 @@ Plan execution record item Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Record ID | -**type** | **str** | type | +**type** | **str** | Type | **money** | **str** | SourceCurrency | **user_id** | **int** | User ID | **plan_id** | **int** | Plan ID | diff --git a/docs/TradFiApi.md b/docs/CFDApi.md similarity index 84% rename from docs/TradFiApi.md rename to docs/CFDApi.md index 30d22116..226d96de 100644 --- a/docs/TradFiApi.md +++ b/docs/CFDApi.md @@ -1,29 +1,30 @@ -# gate_api.TradFiApi +# gate_api.CFDApi All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**query_mt5_account_info**](TradFiApi.md#query_mt5_account_info) | **GET** /tradfi/users/mt5-account | Query MT5 account information -[**query_categories**](TradFiApi.md#query_categories) | **GET** /tradfi/symbols/categories | Query trading symbol categories -[**query_symbols**](TradFiApi.md#query_symbols) | **GET** /tradfi/symbols | Query trading symbol list -[**query_symbol_detail**](TradFiApi.md#query_symbol_detail) | **GET** /tradfi/symbols/detail | Query trading symbol details -[**query_symbol_kline**](TradFiApi.md#query_symbol_kline) | **GET** /tradfi/symbols/{symbol}/klines | Query trading symbol klines -[**query_symbol_ticker**](TradFiApi.md#query_symbol_ticker) | **GET** /tradfi/symbols/{symbol}/tickers | Query trading symbol ticker -[**create_trad_fi_user**](TradFiApi.md#create_trad_fi_user) | **POST** /tradfi/users | Create TradFi user -[**query_user_assets**](TradFiApi.md#query_user_assets) | **GET** /tradfi/users/assets | Query account assets -[**query_transaction**](TradFiApi.md#query_transaction) | **GET** /tradfi/transactions | Query Fund Transfer In/Out Records -[**create_transaction**](TradFiApi.md#create_transaction) | **POST** /tradfi/transactions | Fund Deposit and Withdrawal -[**query_order_list**](TradFiApi.md#query_order_list) | **GET** /tradfi/orders | Query active order list -[**create_trad_fi_order**](TradFiApi.md#create_trad_fi_order) | **POST** /tradfi/orders | Create an order -[**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 -[**query_position_history_list**](TradFiApi.md#query_position_history_list) | **GET** /tradfi/positions/history | Query historical position list +[**query_mt5_account_info**](CFDApi.md#query_mt5_account_info) | **GET** /tradfi/users/mt5-account | Query MT5 account information +[**query_categories**](CFDApi.md#query_categories) | **GET** /tradfi/symbols/categories | Query trading symbol categories +[**query_symbol_commissions**](CFDApi.md#query_symbol_commissions) | **GET** /tradfi/symbols/commissions | Query symbol commission rates +[**query_symbols**](CFDApi.md#query_symbols) | **GET** /tradfi/symbols | Query trading symbol list +[**query_symbol_detail**](CFDApi.md#query_symbol_detail) | **GET** /tradfi/symbols/detail | Query trading symbol details +[**query_symbol_kline**](CFDApi.md#query_symbol_kline) | **GET** /tradfi/symbols/{symbol}/klines | Query trading symbol klines +[**query_symbol_ticker**](CFDApi.md#query_symbol_ticker) | **GET** /tradfi/symbols/{symbol}/tickers | Query trading symbol ticker +[**create_trad_fi_user**](CFDApi.md#create_trad_fi_user) | **POST** /tradfi/users | Create CFD user +[**query_user_assets**](CFDApi.md#query_user_assets) | **GET** /tradfi/users/assets | Query account assets +[**query_transaction**](CFDApi.md#query_transaction) | **GET** /tradfi/transactions | Query Fund Transfer In/Out Records +[**create_transaction**](CFDApi.md#create_transaction) | **POST** /tradfi/transactions | Fund transfer +[**query_order_list**](CFDApi.md#query_order_list) | **GET** /tradfi/orders | Query active order list +[**create_trad_fi_order**](CFDApi.md#create_trad_fi_order) | **POST** /tradfi/orders | Create order +[**update_order**](CFDApi.md#update_order) | **PUT** /tradfi/orders/{order_id} | Modify order +[**delete_order**](CFDApi.md#delete_order) | **DELETE** /tradfi/orders/{order_id} | Cancel order +[**query_order_history_list**](CFDApi.md#query_order_history_list) | **GET** /tradfi/orders/history | Query historical order list +[**query_order_log**](CFDApi.md#query_order_log) | **GET** /tradfi/orders/log/{log_id} | Get order details by log ID +[**query_position_list**](CFDApi.md#query_position_list) | **GET** /tradfi/positions | Query active position list +[**update_position**](CFDApi.md#update_position) | **PUT** /tradfi/positions/{position_id} | Modify position +[**close_position**](CFDApi.md#close_position) | **POST** /tradfi/positions/{position_id}/close | Close position +[**query_position_history_list**](CFDApi.md#query_position_history_list) | **GET** /tradfi/positions/history | Query historical position list # **query_mt5_account_info** @@ -54,7 +55,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) try: # Query MT5 account information @@ -63,7 +64,7 @@ try: 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_mt5_account_info: %s\n" % e) + print("Exception when calling CFDApi->query_mt5_account_info: %s\n" % e) ``` ### Parameters @@ -109,7 +110,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) try: # Query trading symbol categories @@ -118,7 +119,7 @@ try: 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_categories: %s\n" % e) + print("Exception when calling CFDApi->query_categories: %s\n" % e) ``` ### Parameters @@ -145,6 +146,67 @@ 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_commissions** +> SymbolCommissions query_symbol_commissions(symbols=symbols, category_code=category_code) + +Query symbol commission rates + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.CFDApi(api_client) +symbols = 'AUDUSD,XAUUSD' # str | List of symbol codes (multiple codes separated by commas). At least one of symbol and category_code is required (optional) +category_code = 'forex-外汇,metal-金属,index-指数,commodity-大宗商品,stock-股票' # str | List of category codes (multiple codes separated by commas). When provided together with symbols, filters symbols by category. At least one of symbol and category_code is required (optional) + +try: + # Query symbol commission rates + api_response = api_instance.query_symbol_commissions(symbols=symbols, category_code=category_code) + 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 CFDApi->query_symbol_commissions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbols** | **str**| List of symbol codes (multiple codes separated by commas). At least one of symbol and category_code is required | [optional] + **category_code** | **str**| List of category codes (multiple codes separated by commas). When provided together with symbols, filters symbols by category. At least one of symbol and category_code is required | [optional] + +### Return type + +[**SymbolCommissions**](SymbolCommissions.md) + +### Authorization + +No authorization required + +### 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_symbols** > Symbols query_symbols() @@ -164,7 +226,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) try: # Query trading symbol list @@ -173,7 +235,7 @@ try: 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_symbols: %s\n" % e) + print("Exception when calling CFDApi->query_symbols: %s\n" % e) ``` ### Parameters @@ -207,28 +269,19 @@ 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", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" + host = "https://api.gateio.ws/api/v4" ) api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) symbols = 'EURUSD,XAGUSD' # str | Trading symbol code list (comma-separated, max 10 symbols) try: @@ -238,7 +291,7 @@ try: 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_symbol_detail: %s\n" % e) + print("Exception when calling CFDApi->query_symbol_detail: %s\n" % e) ``` ### Parameters @@ -253,7 +306,7 @@ Name | Type | Description | Notes ### Authorization -[apiv4](../README.md#apiv4) +No authorization required ### HTTP request headers @@ -287,7 +340,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) symbol = 'EURUSD' # str | Trading symbol code kline_type = '1m' # str | Kline type (time period) begin_time = 1769378400 # int | Start time (Unix timestamp in seconds) (optional) @@ -301,7 +354,7 @@ try: 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_symbol_kline: %s\n" % e) + print("Exception when calling CFDApi->query_symbol_kline: %s\n" % e) ``` ### Parameters @@ -354,7 +407,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) symbol = 'EURUSD' # str | Trading symbol code try: @@ -364,7 +417,7 @@ try: 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_symbol_ticker: %s\n" % e) + print("Exception when calling CFDApi->query_symbol_ticker: %s\n" % e) ``` ### Parameters @@ -397,7 +450,7 @@ No authorization required # **create_trad_fi_user** > CreateUserResp create_trad_fi_user() -Create TradFi user +Create CFD user ### Example @@ -422,16 +475,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) try: - # Create TradFi user + # Create CFD user api_response = api_instance.create_trad_fi_user() 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->create_trad_fi_user: %s\n" % e) + print("Exception when calling CFDApi->create_trad_fi_user: %s\n" % e) ``` ### Parameters @@ -488,7 +541,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) try: # Query account assets @@ -497,7 +550,7 @@ try: 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_user_assets: %s\n" % e) + print("Exception when calling CFDApi->query_user_assets: %s\n" % e) ``` ### Parameters @@ -552,7 +605,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) begin_time = 1704067200 # int | Start Time (Second-level Timestamp) (optional) end_time = 1706745599 # int | End Time (Second-level Timestamp) (optional) type = 'withdraw' # str | Transaction Type (deposit - transfer in, withdraw - transfer out, dividend - dividend payment, fill_negative - cover negative balance) (optional) @@ -566,7 +619,7 @@ try: 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_transaction: %s\n" % e) + print("Exception when calling CFDApi->query_transaction: %s\n" % e) ``` ### Parameters @@ -603,7 +656,7 @@ Name | Type | Description | Notes # **create_transaction** > CreateTransaction create_transaction(trad_fi_transaction_request) -Fund Deposit and Withdrawal +Fund transfer ### Example @@ -628,17 +681,17 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) trad_fi_transaction_request = gate_api.TradFiTransactionRequest() # TradFiTransactionRequest | try: - # Fund Deposit and Withdrawal + # Fund transfer api_response = api_instance.create_transaction(trad_fi_transaction_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 TradFiApi->create_transaction: %s\n" % e) + print("Exception when calling CFDApi->create_transaction: %s\n" % e) ``` ### Parameters @@ -696,7 +749,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) try: # Query active order list @@ -705,7 +758,7 @@ try: 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_list: %s\n" % e) + print("Exception when calling CFDApi->query_order_list: %s\n" % e) ``` ### Parameters @@ -735,7 +788,7 @@ This endpoint does not need any parameter. # **create_trad_fi_order** > CreateOrder2 create_trad_fi_order(trad_fi_order_request) -Create an order +Create order ### Example @@ -760,17 +813,17 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) trad_fi_order_request = gate_api.TradFiOrderRequest() # TradFiOrderRequest | try: - # Create an order + # Create order api_response = api_instance.create_trad_fi_order(trad_fi_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 TradFiApi->create_trad_fi_order: %s\n" % e) + print("Exception when calling CFDApi->create_trad_fi_order: %s\n" % e) ``` ### Parameters @@ -828,7 +881,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) order_id = 1223 # int | Order ID trad_fi_order_update_request = gate_api.TradFiOrderUpdateRequest() # TradFiOrderUpdateRequest | @@ -839,7 +892,7 @@ try: 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->update_order: %s\n" % e) + print("Exception when calling CFDApi->update_order: %s\n" % e) ``` ### Parameters @@ -898,7 +951,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) order_id = 1223 # int | Order ID try: @@ -908,7 +961,7 @@ try: 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->delete_order: %s\n" % e) + print("Exception when calling CFDApi->delete_order: %s\n" % e) ``` ### Parameters @@ -966,11 +1019,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) begin_time = 1769397000 # int | Start time (Unix timestamp in seconds), earliest query is one month ago (optional) end_time = 1769398000 # int | End time (Unix timestamp in seconds) (optional) symbol = 'USDCAD' # str | Currency pair (optional) -side = 2 # int | Order side (1=sell, 2=buy) (optional) +side = 2 # int | Side (1=sell, 2=buy) (optional) try: # Query historical order list @@ -979,7 +1032,7 @@ try: 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_history_list: %s\n" % e) + print("Exception when calling CFDApi->query_order_history_list: %s\n" % e) ``` ### Parameters @@ -989,7 +1042,7 @@ Name | Type | Description | Notes **begin_time** | **int**| Start time (Unix timestamp in seconds), earliest query is one month ago | [optional] **end_time** | **int**| End time (Unix timestamp in seconds) | [optional] **symbol** | **str**| Currency pair | [optional] - **side** | **int**| Order side (1=sell, 2=buy) | [optional] + **side** | **int**| Side (1=sell, 2=buy) | [optional] ### Return type @@ -1040,7 +1093,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) log_id = 1223 # int | log_id returned from the order placement API try: @@ -1050,7 +1103,7 @@ try: 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) + print("Exception when calling CFDApi->query_order_log: %s\n" % e) ``` ### Parameters @@ -1108,7 +1161,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) try: # Query active position list @@ -1117,7 +1170,7 @@ try: 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_position_list: %s\n" % e) + print("Exception when calling CFDApi->query_position_list: %s\n" % e) ``` ### Parameters @@ -1172,7 +1225,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) position_id = 1223 # int | Position ID trad_fi_position_update_request = gate_api.TradFiPositionUpdateRequest() # TradFiPositionUpdateRequest | @@ -1183,7 +1236,7 @@ try: 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->update_position: %s\n" % e) + print("Exception when calling CFDApi->update_position: %s\n" % e) ``` ### Parameters @@ -1242,7 +1295,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(api_client) position_id = 1223 # int | Position ID trad_fi_close_position_request = gate_api.TradFiClosePositionRequest() # TradFiClosePositionRequest | @@ -1253,7 +1306,7 @@ try: 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->close_position: %s\n" % e) + print("Exception when calling CFDApi->close_position: %s\n" % e) ``` ### Parameters @@ -1312,7 +1365,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class -api_instance = gate_api.TradFiApi(api_client) +api_instance = gate_api.CFDApi(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) @@ -1327,7 +1380,7 @@ try: 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_position_history_list: %s\n" % e) + print("Exception when calling CFDApi->query_position_history_list: %s\n" % e) ``` ### Parameters diff --git a/docs/CandyDropV4ActivityCd01.md b/docs/CandyDropV4ActivityCd01.md deleted file mode 100644 index 7b70ef51..00000000 --- a/docs/CandyDropV4ActivityCd01.md +++ /dev/null @@ -1,17 +0,0 @@ -# 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 deleted file mode 100644 index 58319db4..00000000 --- a/docs/CandyDropV4ActivityRulesCd03.md +++ /dev/null @@ -1,14 +0,0 @@ -# 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 deleted file mode 100644 index 44a3d844..00000000 --- a/docs/CandyDropV4AirdropRecordCd06.md +++ /dev/null @@ -1,13 +0,0 @@ -# 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/CandyDropV4PrizePoolCd03.md b/docs/CandyDropV4PrizePoolCd03.md deleted file mode 100644 index 738f5587..00000000 --- a/docs/CandyDropV4PrizePoolCd03.md +++ /dev/null @@ -1,13 +0,0 @@ -# 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/CandyDropV4TaskProgressCd04.md b/docs/CandyDropV4TaskProgressCd04.md deleted file mode 100644 index f381c3ef..00000000 --- a/docs/CandyDropV4TaskProgressCd04.md +++ /dev/null @@ -1,14 +0,0 @@ -# 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/ClosePosition.md b/docs/ClosePosition.md new file mode 100644 index 00000000..70c7c10a --- /dev/null +++ b/docs/ClosePosition.md @@ -0,0 +1,11 @@ +# ClosePosition + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ClosePositionData**](ClosePositionData.md) | | [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/RedeemLaunchPoolResponse.md b/docs/ClosePositionData.md similarity index 73% rename from docs/RedeemLaunchPoolResponse.md rename to docs/ClosePositionData.md index a4aa0b6f..9f196597 100644 --- a/docs/RedeemLaunchPoolResponse.md +++ b/docs/ClosePositionData.md @@ -1,9 +1,9 @@ -# RedeemLaunchPoolResponse +# ClosePositionData ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **bool** | Whether redemption was successful | [optional] +**order_id** | **int** | Close 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/Contract.md b/docs/Contract.md index a61975b8..1047abca 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -25,9 +25,9 @@ Name | Type | Description | Notes **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] +**order_size_min** | **str** | Minimum order quantity | [optional] **enable_decimal** | **bool** | Whether decimal string type is supported for contract lot size. When this field is set to `true`, it indicates that the contract supports decimal lot sizes (i.e., the `size` field can use a decimal string type); when set to `false`, it indicates that the contract does not support decimal lot sizes (i.e., the `size` field can only use an integer type). | [optional] -**order_size_max** | **str** | Maximum order size allowed by the contract | [optional] +**order_size_max** | **str** | Maximum order quantity | [optional] **order_price_deviate** | **str** | Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] **ref_discount_rate** | **str** | Trading fee discount for referred users | [optional] **ref_rebate_rate** | **str** | Commission rate for referrers | [optional] diff --git a/docs/ContractDetailDataList.md b/docs/ContractDetailDataList.md index 17f2b01c..855a431b 100644 --- a/docs/ContractDetailDataList.md +++ b/docs/ContractDetailDataList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **settlement_currency** | **str** | Settle currency | [optional] **max_order_volume** | **str** | Maximum Order Volume | [optional] **min_order_volume** | **str** | Minimum Order Volume | [optional] -**leverage** | **str** | Position leverage | [optional] +**leverage** | **str** | Leverage multiplier | [optional] **price_precision** | **int** | Price precision (decimal places) | [optional] **price_sl_level** | **str** | Stop Loss Price Level | [optional] **swap_cost_type** | **str** | Swap Cost Type | [optional] diff --git a/docs/ContractStat.md b/docs/ContractStat.md index f79f8e07..d1d09c82 100644 --- a/docs/ContractStat.md +++ b/docs/ContractStat.md @@ -25,8 +25,8 @@ Name | Type | Description | Notes **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] +**long_users** | **int** | Number of users holding long positions | [optional] +**short_users** | **int** | 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/HodlerAirdropV4OrderResponse.md b/docs/CreateTransaction2.md similarity index 66% rename from docs/HodlerAirdropV4OrderResponse.md rename to docs/CreateTransaction2.md index ecb5f3c3..de68fe56 100644 --- a/docs/HodlerAirdropV4OrderResponse.md +++ b/docs/CreateTransaction2.md @@ -1,10 +1,10 @@ -# HodlerAirdropV4OrderResponse +# CreateTransaction2 -Participate in event response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**interest_coin** | **list[str]** | Get the list of airdropped currencies | +**data** | [**object**](.md) | Returns empty object on success | [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/CreateUserRespData.md b/docs/CreateUserRespData.md index 98b0d6f8..bd3784a4 100644 --- a/docs/CreateUserRespData.md +++ b/docs/CreateUserRespData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **int** | Status (1=not opened, 2=pending review, 3=opened) | [optional] -**leverage** | **int** | leverage | [optional] +**leverage** | **int** | Leverage | [optional] **mt5_uid** | **str** | mt5uid | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossExApi.md b/docs/CrossExApi.md index ab7b235b..ab1a0026 100644 --- a/docs/CrossExApi.md +++ b/docs/CrossExApi.md @@ -9,7 +9,8 @@ Method | HTTP request | Description [**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 +[**create_crossex_order**](CrossExApi.md#create_crossex_order) | **POST** /crossex/orders | Create order +[**cancel_batch_crossex_orders**](CrossExApi.md#cancel_batch_crossex_orders) | **POST** /crossex/batch_cancel_orders | Batch cancel orders [**get_crossex_order**](CrossExApi.md#get_crossex_order) | **GET** /crossex/orders/{order_id} | Query order details [**update_crossex_order**](CrossExApi.md#update_crossex_order) | **PUT** /crossex/orders/{order_id} | Modify Order [**cancel_crossex_order**](CrossExApi.md#cancel_crossex_order) | **DELETE** /crossex/orders/{order_id} | Cancel Order @@ -22,19 +23,24 @@ Method | HTTP request | Description [**get_crossex_margin_positions_leverage**](CrossExApi.md#get_crossex_margin_positions_leverage) | **GET** /crossex/margin_positions/leverage | Query Leveraged Trading Pair Leverage Multiplier [**update_crossex_margin_positions_leverage**](CrossExApi.md#update_crossex_margin_positions_leverage) | **POST** /crossex/margin_positions/leverage | Modify Leveraged Trading Pair Leverage Multiplier [**close_crossex_position**](CrossExApi.md#close_crossex_position) | **POST** /crossex/position | Full Close Position +[**get_crossex_positions_margin_mode**](CrossExApi.md#get_crossex_positions_margin_mode) | **GET** /crossex/positions/margin_mode | Get futures position margin mode +[**update_crossex_positions_margin_mode**](CrossExApi.md#update_crossex_positions_margin_mode) | **POST** /crossex/positions/margin_mode | Update futures position margin mode +[**update_crossex_positions_margin**](CrossExApi.md#update_crossex_positions_margin) | **POST** /crossex/positions/margin | Increase or decrease isolated margin [**get_crossex_interest_rate**](CrossExApi.md#get_crossex_interest_rate) | **GET** /crossex/interest_rate | Query margin asset interest rates [**get_crossex_fee**](CrossExApi.md#get_crossex_fee) | **GET** /crossex/fee | Query User Fee Rates [**list_crossex_positions**](CrossExApi.md#list_crossex_positions) | **GET** /crossex/positions | Query Contract Positions [**list_crossex_margin_positions**](CrossExApi.md#list_crossex_margin_positions) | **GET** /crossex/margin_positions | Query Leveraged Positions [**list_crossex_adl_rank**](CrossExApi.md#list_crossex_adl_rank) | **GET** /crossex/adl_rank | Query ADL Position Reduction Ranking [**list_crossex_open_orders**](CrossExApi.md#list_crossex_open_orders) | **GET** /crossex/open_orders | Query All Current Open Orders -[**list_crossex_history_orders**](CrossExApi.md#list_crossex_history_orders) | **GET** /crossex/history_orders | queryorderhistory +[**list_crossex_history_orders**](CrossExApi.md#list_crossex_history_orders) | **GET** /crossex/history_orders | Query order history [**list_crossex_history_positions**](CrossExApi.md#list_crossex_history_positions) | **GET** /crossex/history_positions | Query Contract Position History [**list_crossex_history_margin_positions**](CrossExApi.md#list_crossex_history_margin_positions) | **GET** /crossex/history_margin_positions | Query Leveraged Position History [**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_history_trades**](CrossExApi.md#list_crossex_history_trades) | **GET** /crossex/history_trades | Query filled history [**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 +[**list_crossex_market_tickers**](CrossExApi.md#list_crossex_market_tickers) | **GET** /crossex/market/tickers | Get exchange tickers +[**list_crossex_market_funding_info**](CrossExApi.md#list_crossex_market_funding_info) | **GET** /crossex/market/funding_info | Get exchange futures funding rate information # **list_crossex_rule_symbols** @@ -162,7 +168,7 @@ No authorization required 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 +`est_fee`: On-chain withdrawal fee. When a fund transfer involves an on-chain withdrawal, the exchange charges this fee. This value is for reference only; the actual fee charged by the exchange applies ### Example @@ -368,7 +374,7 @@ Name | Type | Description | Notes # **create_crossex_order** > CrossexOrderActionResponse create_crossex_order(crossex_order_request=crossex_order_request) -Create an order +Create order Rate Limit: 100 requests per 10 seconds, maximum 1,000 open orders per user @@ -399,7 +405,7 @@ api_instance = gate_api.CrossExApi(api_client) crossex_order_request = gate_api.CrossexOrderRequest() # CrossexOrderRequest | (optional) try: - # Create an order + # Create order api_response = api_instance.create_crossex_order(crossex_order_request=crossex_order_request) print(api_response) except GateApiException as ex: @@ -434,6 +440,75 @@ 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_batch_crossex_orders** +> list[CrossexBatchCancelOrderResponse] cancel_batch_crossex_orders(crossex_batch_cancel_order_request) + +Batch cancel orders + +Cancel multiple specified orders. Either order_id or text is required; if both are provided, order_id takes precedence. Rate limit: 100 requests per 10 seconds + +### 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.CrossExApi(api_client) +crossex_batch_cancel_order_request = [gate_api.CrossexBatchCancelOrderRequest()] # list[CrossexBatchCancelOrderRequest] | + +try: + # Batch cancel orders + api_response = api_instance.cancel_batch_crossex_orders(crossex_batch_cancel_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 CrossExApi->cancel_batch_crossex_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **crossex_batch_cancel_order_request** | [**list[CrossexBatchCancelOrderRequest]**](CrossexBatchCancelOrderRequest.md)| | + +### Return type + +[**list[CrossexBatchCancelOrderResponse]**](CrossexBatchCancelOrderResponse.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** | Batch order cancellation request results | - | + +[[Back to top]](#) [[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** > CrossexOrder get_crossex_order(order_id) @@ -648,7 +723,7 @@ Name | Type | Description | Notes Flash Swap Inquiry -Rate Limit: 100 requests per day +Rate limit: 100 requests per day For HYPERLIQUID, swaps between `HYPERLIQUID_USDC` and `CROSSEX_USDT` are supported. Flash Swap in isolated exchange mode is not currently supported for HYPERLIQUID ### Example @@ -812,7 +887,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,KRAKEN,HYPERLIQUID' # str | Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). (optional) +exchange_type = 'BINANCE,OKX,GATE,BYBIT,KRAKEN,HYPERLIQUID,DERIBIT' # str | Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). (optional) try: # Query Account Assets @@ -828,7 +903,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **exchange_type** | **str**| Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). | [optional] + **exchange_type** | **str**| Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). | [optional] ### Return type @@ -1200,7 +1275,7 @@ Name | Type | Description | Notes Full Close Position -Rate Limit: 100 requests per day. Automatic close-out rules. Supports closing FUTURE or MARGIN positions. Prerequisites before using this interface: - No pending orders for the symbol exist in the current account. - When the system detects the position meets any of the following limits while prerequisites are met: - Less than or equal to the minimum notional amount (minNotional) - Less than or equal to the minimum order quantity (minSize) After meeting the conditions, the system will automatically generate a close-out order and immediately fully close the position. This interface is used to avoid issues where orders are too small to be placed on the exchange, ensuring small positions can be closed smoothly when reaching the threshold. +Rate limit: 100 requests per day. Automatic position-closing rules. FUTURE and MARGIN positions are supported. Before using this endpoint, ensure that the following prerequisite is met: - There are no open orders for the symbol in the current account. - Once the prerequisite is met, the system checks whether the position meets either of the following conditions: - Less than the minimum notional amount (minNotional) - Less than the minimum order size (minSize) When either condition is met, the system automatically creates a closing order and immediately closes the entire position. This endpoint prevents positions that are too small to be submitted to an exchange from becoming stranded and ensures that small positions can be closed when they fall below the threshold. ### Example @@ -1264,6 +1339,213 @@ 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_positions_margin_mode** +> CrossexMarginModeResponse get_crossex_positions_margin_mode(symbol) + +Get futures position margin mode + +Rate Limit: 200 requests per 10 seconds + +### 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.CrossExApi(api_client) +symbol = 'HYPERLIQUID_FUTURE_CXMT_USDC' # str | Futures trading pair + +try: + # Get futures position margin mode + api_response = api_instance.get_crossex_positions_margin_mode(symbol) + 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->get_crossex_positions_margin_mode: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Futures trading pair | + +### Return type + +[**CrossexMarginModeResponse**](CrossexMarginModeResponse.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-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) + +# **update_crossex_positions_margin_mode** +> CrossexMarginModeResponse update_crossex_positions_margin_mode(crossex_margin_mode_request=crossex_margin_mode_request) + +Update futures position margin mode + +Rate limit: 100 requests per 10 seconds. Only Hyperliquid futures trading pairs are supported. The margin mode cannot be changed while open orders or positions exist + +### 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.CrossExApi(api_client) +crossex_margin_mode_request = gate_api.CrossexMarginModeRequest() # CrossexMarginModeRequest | (optional) + +try: + # Update futures position margin mode + api_response = api_instance.update_crossex_positions_margin_mode(crossex_margin_mode_request=crossex_margin_mode_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 CrossExApi->update_crossex_positions_margin_mode: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **crossex_margin_mode_request** | [**CrossexMarginModeRequest**](CrossexMarginModeRequest.md)| | [optional] + +### Return type + +[**CrossexMarginModeResponse**](CrossexMarginModeResponse.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | 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) + +# **update_crossex_positions_margin** +> CrossexIsolatedMarginResponse update_crossex_positions_margin(crossex_isolated_margin_request=crossex_isolated_margin_request) + +Increase or decrease isolated margin + +Rate limit: 100 requests per 10 seconds. Only Hyperliquid isolated futures positions are supported. Positive values increase margin, while negative values decrease margin + +### 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.CrossExApi(api_client) +crossex_isolated_margin_request = gate_api.CrossexIsolatedMarginRequest() # CrossexIsolatedMarginRequest | (optional) + +try: + # Increase or decrease isolated margin + api_response = api_instance.update_crossex_positions_margin(crossex_isolated_margin_request=crossex_isolated_margin_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 CrossExApi->update_crossex_positions_margin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **crossex_isolated_margin_request** | [**CrossexIsolatedMarginRequest**](CrossexIsolatedMarginRequest.md)| | [optional] + +### Return type + +[**CrossexIsolatedMarginResponse**](CrossexIsolatedMarginResponse.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | 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) + # **get_crossex_interest_rate** > list[CrossexInterestRate] get_crossex_interest_rate(coin=coin, exchange_type=exchange_type) @@ -1296,7 +1578,7 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) coin = 'SOL' # str | Query by specified currency name (optional) -exchange_type = 'BINANCE,OKX,GATE,BYBIT,KRAKEN,HYPERLIQUID' # str | Exchange (optional) +exchange_type = 'BINANCE,OKX,GATE,BYBIT,KRAKEN,HYPERLIQUID,DERIBIT' # str | Exchange (optional) try: # Query margin asset interest rates @@ -1432,7 +1714,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,KRAKEN,HYPERLIQUID' # str | Exchange (optional) +exchange_type = 'BINANCE,OKX,GATE,BYBIT,KRAKEN,HYPERLIQUID,DERIBIT' # str | Exchange (optional) try: # Query Contract Positions @@ -1543,7 +1825,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[CrossexAdlRank] list_crossex_adl_rank(symbol) +> CrossexAdlRank list_crossex_adl_rank(symbol) Query ADL Position Reduction Ranking @@ -1593,7 +1875,7 @@ Name | Type | Description | Notes ### Return type -[**list[CrossexAdlRank]**](CrossexAdlRank.md) +[**CrossexAdlRank**](CrossexAdlRank.md) ### Authorization @@ -1687,7 +1969,7 @@ Name | Type | Description | Notes # **list_crossex_history_orders** > list[CrossexOrder] list_crossex_history_orders(page=page, limit=limit, symbol=symbol, _from=_from, to=to, attributes=attributes) -queryorderhistory +Query order history Rate Limit: 200 requests per 10 seconds @@ -1723,7 +2005,7 @@ 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 + # Query order history 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: @@ -1999,7 +2281,7 @@ Name | Type | Description | Notes # **list_crossex_history_trades** > list[CrossexTrade] list_crossex_history_trades(page=page, limit=limit, symbol=symbol, _from=_from, to=to) -queryfilledhistory +Query filled history Rate Limit: 200 requests per 10 seconds @@ -2034,7 +2316,7 @@ _from = 56 # int | Start Millisecond Timestamp (optional) to = 56 # int | End Millisecond Timestamp (optional) try: - # queryfilledhistory + # Query filled history api_response = api_instance.list_crossex_history_trades(page=page, limit=limit, symbol=symbol, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -2184,7 +2466,7 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CrossExApi(api_client) coin = 'SOL' # str | Query by specified currency name (optional) -exchange_type = 'OKX' # str | OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID (optional) +exchange_type = 'OKX' # str | OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID/DERIBIT (optional) try: # Query Currency Discount Rate @@ -2201,7 +2483,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **coin** | **str**| Query by specified currency name | [optional] - **exchange_type** | **str**| OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID | [optional] + **exchange_type** | **str**| OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID/DERIBIT | [optional] ### Return type @@ -2223,3 +2505,141 @@ 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_market_tickers** +> list[InlineResponse2001] list_crossex_market_tickers(symbols=symbols) + +Get exchange tickers + +Rate limit: 1 request per second - Margin trading pairs cannot be passed directly as parameters. For example, `GATE_MARGIN_BTC_USDT` is invalid. + +### 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.CrossExApi(api_client) +symbols = 'GATE_SPOT_BTC_USDT,GATE_FUTURE_BTC_USDT' # str | Trading Pair List, multiple separated by commas (optional) + +try: + # Get exchange tickers + api_response = api_instance.list_crossex_market_tickers(symbols=symbols) + 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_market_tickers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbols** | **str**| Trading Pair List, multiple separated by commas | [optional] + +### Return type + +[**list[InlineResponse2001]**](InlineResponse2001.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-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) + +# **list_crossex_market_funding_info** +> list[InlineResponse2002] list_crossex_market_funding_info(symbols=symbols) + +Get exchange futures funding rate information + +Rate limit: 1 request per second - For `Deribit`, `funding_rate` is the current real-time rate calculated over an 8-hour period. + +### 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.CrossExApi(api_client) +symbols = 'BINANCE_MARGIN_BTC_USDT,OKX_MARGIN_BTC_USDT,GATE_MARGIN_BTC_USDT' # str | Trading Pair List, multiple separated by commas (optional) + +try: + # Get exchange futures funding rate information + api_response = api_instance.list_crossex_market_funding_info(symbols=symbols) + 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_market_funding_info: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbols** | **str**| Trading Pair List, multiple separated by commas | [optional] + +### Return type + +[**list[InlineResponse2002]**](InlineResponse2002.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-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) + diff --git a/docs/CrossexAccountBookRecord.md b/docs/CrossexAccountBookRecord.md index 6af13000..ebbde5f7 100644 --- a/docs/CrossexAccountBookRecord.md +++ b/docs/CrossexAccountBookRecord.md @@ -5,10 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Account Change Record ID | **user_id** | **str** | User ID | -**business_id** | **str** | Business ID | +**business_id** | **str** | Business ID. Its meaning varies by `statement_type`. `TRANSACTION`: order ID. `TRADING_FEE`: order ID. `LIQUIDATION_FEE`: liquidation order ID. `FUNDING_FEE`: position ID and funding fee settlement time. For other types, it is a system-generated processing ID with no business meaning. | **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 | +**symbol** | **str** | Trading Pair | [optional] **change** | **str** | Change amount (positive indicates transfer in; negative indicates transfer out) | **balance** | **str** | Balance after change | **create_time** | **str** | Created time | diff --git a/docs/CrossexAccountUpdateRequest.md b/docs/CrossexAccountUpdateRequest.md index fd9bc93f..113c29c2 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` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to adjust futures position mode. | [optional] +**exchange_type** | **str** | Exchange (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT` / `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/CrossexAccountUpdateResponse.md b/docs/CrossexAccountUpdateResponse.md index c74a87b3..74fe88db 100644 --- a/docs/CrossexAccountUpdateResponse.md +++ b/docs/CrossexAccountUpdateResponse.md @@ -5,7 +5,7 @@ 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** | 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] +**exchange_type** | **str** | Exchange targeted by the requested change (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT` / `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/CrossexAdlRank.md b/docs/CrossexAdlRank.md index 8d4b6b5c..371750e0 100644 --- a/docs/CrossexAdlRank.md +++ b/docs/CrossexAdlRank.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **user_id** | **str** | User ID | **symbol** | **str** | Currency pair | **crossex_adl_rank** | **str** | CROSSEX position-reduction indicator ranking (1–5, higher value ranks higher) | -**exchange_adl_rank** | **str** | 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) | +**exchange_adl_rank** | **str** | Exchange raw information (BINANCE: 0-4, larger numbers rank higher; OKX: 0-5, larger numbers rank higher; GATE: 1-5, smaller numbers rank higher; Kraken: 20, 40, 80, 100, smaller numbers rank higher; BYBIT: 0-5, larger numbers rank higher) | [[Back to Model list]](../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/CrossexBatchCancelOrderRequest.md similarity index 50% rename from docs/CandyDropV4TaskCd03.md rename to docs/CrossexBatchCancelOrderRequest.md index 529d8a37..46d044ad 100644 --- a/docs/CandyDropV4TaskCd03.md +++ b/docs/CrossexBatchCancelOrderRequest.md @@ -1,11 +1,11 @@ -# CandyDropV4TaskCd03 +# CrossexBatchCancelOrderRequest +Batch cancel orders ## 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] +**order_id** | **str** | Order ID; either this field or text is required | [optional] +**text** | **str** | Custom ID specified by the user when creating the order; either this field or order_id 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/CrossexBatchCancelOrderResponse.md b/docs/CrossexBatchCancelOrderResponse.md new file mode 100644 index 00000000..2d127659 --- /dev/null +++ b/docs/CrossexBatchCancelOrderResponse.md @@ -0,0 +1,15 @@ +# CrossexBatchCancelOrderResponse + +Batch order cancellation request results +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | +**text** | **str** | Custom ID specified by the user when creating the order | +**accepted** | **str** | Whether the request was accepted, as the string true or false | +**label** | **str** | Error label when the request is not accepted; empty on success | +**message** | **str** | Error message when the request is not accepted; empty on success | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossexIsolatedMarginRequest.md b/docs/CrossexIsolatedMarginRequest.md new file mode 100644 index 00000000..6fab815b --- /dev/null +++ b/docs/CrossexIsolatedMarginRequest.md @@ -0,0 +1,13 @@ +# CrossexIsolatedMarginRequest + +Request body for increasing or decreasing isolated margin +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Hyperliquid futures trading pair | +**margin** | **str** | Margin adjustment amount. Positive values increase margin, while negative values decrease margin. Values with more than two decimal places are truncated to two decimal places | +**position_side** | **str** | Position side (NONE/LONG/SHORT). Defaults to NONE for one-way positions if omitted | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossexIsolatedMarginResponse.md b/docs/CrossexIsolatedMarginResponse.md new file mode 100644 index 00000000..bca3f9c4 --- /dev/null +++ b/docs/CrossexIsolatedMarginResponse.md @@ -0,0 +1,11 @@ +# CrossexIsolatedMarginResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Futures trading pair | +**margin** | **str** | Amount of isolated margin increased or decreased in this request | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossexLeverageRequest.md b/docs/CrossexLeverageRequest.md index 32c5fa32..05d81d17 100644 --- a/docs/CrossexLeverageRequest.md +++ b/docs/CrossexLeverageRequest.md @@ -5,7 +5,7 @@ Change Leverage Request Body (for futures/margin) Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **symbol** | **str** | Currency pair | -**leverage** | **str** | leverage | +**leverage** | **str** | Leverage | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossexMarginModeRequest.md b/docs/CrossexMarginModeRequest.md new file mode 100644 index 00000000..6b1658db --- /dev/null +++ b/docs/CrossexMarginModeRequest.md @@ -0,0 +1,12 @@ +# CrossexMarginModeRequest + +Request body for updating the futures position margin mode +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Hyperliquid futures trading pair | +**margin_mode** | **str** | Margin mode (CROSS/ISOLATED) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossexMarginModeResponse.md b/docs/CrossexMarginModeResponse.md new file mode 100644 index 00000000..fac0fa8d --- /dev/null +++ b/docs/CrossexMarginModeResponse.md @@ -0,0 +1,11 @@ +# CrossexMarginModeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Futures trading pair | +**margin_mode** | **str** | Margin mode (CROSS/ISOLATED) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossexOrder.md b/docs/CrossexOrder.md index 73c77deb..753865b4 100644 --- a/docs/CrossexOrder.md +++ b/docs/CrossexOrder.md @@ -11,12 +11,12 @@ Name | Type | Description | Notes **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`). | +**exchange_type** | **str** | Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). | **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`). | +**time_in_force** | **str** | Time-in-force policy (default: GTC; allowed values: GTC, IOC, FOK, POC, and RPI) | **executed_qty** | **str** | Filled base amount. | **executed_amount** | **str** | Filled quote amount. | **executed_avg_price** | **str** | Average Filled Price | diff --git a/docs/CrossexOrderRequest.md b/docs/CrossexOrderRequest.md index 163f0b84..d7130705 100644 --- a/docs/CrossexOrderRequest.md +++ b/docs/CrossexOrderRequest.md @@ -5,10 +5,10 @@ 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 `{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. | +**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`; For an ADA/USDC futures order on Deribit, use `DERIBIT_FUTURE_ADA_USDC`; Supports spot trades, USDT-margined perpetual futures, and spot margin templates. BYBIT and DERIBIT omit 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'] +**time_in_force** | **str** | Defaults to GTC. Supported values: `GTC`, `IOC`, `FOK`, `POC`, and `RPI` `GTC`: GoodTillCancelled `IOC`: ImmediateOrCancelled `FOK`: FillOrKill `POC`: PendingOrCancelled or PostOnly `RPI`: Retail Price Improvement | [optional] [default to 'GTC'] **qty** | **str** | Order quantity (required unless spot market buy) | [optional] **price** | **str** | Limit Order Price (Required for Limit Orders) | [optional] **quote_qty** | **str** | Order quote quantity; required for spot and margin market buy orders | [optional] diff --git a/docs/CrossexPosition.md b/docs/CrossexPosition.md index c1adb64e..a3826243 100644 --- a/docs/CrossexPosition.md +++ b/docs/CrossexPosition.md @@ -8,18 +8,21 @@ Name | Type | Description | Notes **symbol** | **str** | Currency pair | [optional] **position_side** | **str** | Position Direction | [optional] **initial_margin** | **str** | Initial Margin | [optional] +**isolated_margin** | **str** | Isolated margin. It is 0 in cross margin mode and applies only to isolated margin positions | [optional] +**margin_mode** | **str** | Margin mode (CROSS/ISOLATED) | [optional] **maintenance_margin** | **str** | Maintenance margin | [optional] **position_qty** | **str** | Position Quantity | [optional] **position_value** | **str** | Position Value | [optional] **upnl** | **str** | Unrealized P&L | [optional] **upnl_rate** | **str** | Unrealized P&L Ratio | [optional] **entry_price** | **str** | Position Average Entry Price | [optional] +**liq_price** | **str** | Liquidation price. It is 0 in cross margin mode and applies only to isolated margin positions; 0 in isolated margin mode means the position will not be liquidated | [optional] **mark_price** | **str** | Mark price | [optional] **leverage** | **str** | Position Leverage | [optional] **max_leverage** | **str** | Maximum leverage | [optional] **risk_limit** | **str** | Position risk limit | [optional] **fee** | **str** | Position Fee | [optional] -**funding_fee** | **str** | Position Funding Fee | [optional] +**funding_fee** | **str** | Accumulated position funding fee. A positive value indicates a gain, while a negative value indicates a loss. | [optional] **funding_time** | **str** | Position funding fee collection time (0 indicates it has not been collected yet) | [optional] **create_time** | **str** | Position Creation Time | [optional] **update_time** | **str** | Position Update Time | [optional] diff --git a/docs/CrossexSpecialFee.md b/docs/CrossexSpecialFee.md index 0c06cc93..16bffa8c 100644 --- a/docs/CrossexSpecialFee.md +++ b/docs/CrossexSpecialFee.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **symbol** | **str** | Currency pair | **taker_fee_rate** | **str** | Taker fee rate | **maker_fee_rate** | **str** | Maker fee rate | +**rpi_fee_rate** | **str** | RPI order maker fee 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/CrossexTransferRecord.md b/docs/CrossexTransferRecord.md index ec9c4be9..5c6800ee 100644 --- a/docs/CrossexTransferRecord.md +++ b/docs/CrossexTransferRecord.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Order ID | **text** | **str** | Client Custom ID | -**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`). | +**from_account_type** | **str** | `from` credit account touched by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `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_DERIBIT`, `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 020d86fd..122b9cb3 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** | `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` | +**_from** | **str** | `from` receiving account (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `CROSSEX`, `SPOT`). | +**to** | **str** | `to` debit account (funds withdrawn from): `CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `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/CurrencyPair.md b/docs/CurrencyPair.md index 502814d1..b7110b61 100644 --- a/docs/CurrencyPair.md +++ b/docs/CurrencyPair.md @@ -14,8 +14,8 @@ Name | Type | Description | Notes **min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit | [optional] **max_base_amount** | **str** | Maximum amount of base currency to trade, `null` means no limit | [optional] **max_quote_amount** | **str** | Maximum amount of quote currency to trade, `null` means no limit | [optional] -**amount_precision** | **int** | Amount scale | [optional] -**precision** | **int** | Price scale | [optional] +**amount_precision** | **int** | Quantity precision | [optional] +**precision** | **int** | Price precision | [optional] **trade_status** | **str** | Trading status - untradable: cannot be traded - buyable: can be bought - sellable: can be sold - tradable: can be bought and sold | [optional] **sell_start** | **int** | Sell start unix timestamp in seconds | [optional] **buy_start** | **int** | Buy start unix timestamp in seconds | [optional] @@ -26,8 +26,8 @@ Name | Type | Description | Notes **up_rate** | **str** | Maximum Quote Rise Percentage | [optional] **down_rate** | **str** | Maximum Quote Decline Percentage | [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] -**market_order_max_stock** | **str** | Maximum Market Order Quantity | [optional] -**market_order_max_money** | **str** | Maximum Market Order Amount | [optional] +**market_order_max_stock** | **str** | Maximum market order quantity. `null` or `0` means no limit | [optional] +**market_order_max_money** | **str** | Maximum market order amount. `null` or `0` means no 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/DeleteOrder.md b/docs/DeleteOrder.md new file mode 100644 index 00000000..fd4da96d --- /dev/null +++ b/docs/DeleteOrder.md @@ -0,0 +1,11 @@ +# DeleteOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**object**](.md) | Returns empty object on success | [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/DeliveryContract.md b/docs/DeliveryContract.md index 00dc2add..b1e7ccfa 100644 --- a/docs/DeliveryContract.md +++ b/docs/DeliveryContract.md @@ -30,8 +30,8 @@ Name | Type | Description | Notes **risk_limit_base** | **str** | Risk limit base | [optional] **risk_limit_step** | **str** | Step of adjusting risk limit | [optional] **risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional] -**order_size_min** | **int** | Minimum order size allowed by the contract | [optional] -**order_size_max** | **int** | Maximum order size allowed by the contract | [optional] +**order_size_min** | **int** | Minimum order quantity | [optional] +**order_size_max** | **int** | Maximum order quantity | [optional] **order_price_deviate** | **str** | Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] **ref_discount_rate** | **str** | Trading fee discount for referred users | [optional] **ref_rebate_rate** | **str** | Commission rate for referrers | [optional] diff --git a/docs/DeliveryPosition.md b/docs/DeliveryPosition.md index 60daea57..f44e2835 100644 --- a/docs/DeliveryPosition.md +++ b/docs/DeliveryPosition.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **leverage_max** | **str** | Maximum leverage under current risk limit | [optional] [readonly] **maintenance_rate** | **str** | The maintenance margin rate of the first tier of risk limit sheet | [optional] [readonly] **value** | **str** | Position value calculated in settlement currency | [optional] [readonly] -**margin** | **str** | Position margin | [optional] +**margin** | **str** | Margin | [optional] **entry_price** | **str** | Entry price | [optional] [readonly] **liq_price** | **str** | Liquidation price | [optional] [readonly] **mark_price** | **str** | Current mark price | [optional] [readonly] diff --git a/docs/DeliverySettlement.md b/docs/DeliverySettlement.md index 06a479a7..71708fd4 100644 --- a/docs/DeliverySettlement.md +++ b/docs/DeliverySettlement.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **int** | Liquidation time | [optional] [readonly] **contract** | **str** | Futures contract | [optional] [readonly] -**leverage** | **str** | Position leverage | [optional] [readonly] +**leverage** | **str** | Leverage multiplier | [optional] [readonly] **size** | **int** | Position size | [optional] [readonly] -**margin** | **str** | Position margin | [optional] [readonly] +**margin** | **str** | Margin | [optional] [readonly] **entry_price** | **str** | Average entry price | [optional] [readonly] **settle_price** | **str** | Settled price | [optional] [readonly] **profit** | **str** | Profit | [optional] [readonly] diff --git a/docs/HodlerAirdropV4OrderRequest.md b/docs/Exchanges.md similarity index 69% rename from docs/HodlerAirdropV4OrderRequest.md rename to docs/Exchanges.md index 867bbdc0..056845a3 100644 --- a/docs/HodlerAirdropV4OrderRequest.md +++ b/docs/Exchanges.md @@ -1,10 +1,10 @@ -# HodlerAirdropV4OrderRequest +# Exchanges -Participation activity request body ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hodler_id** | **int** | Activity ID, required | +**data** | [**ExchangesData**](ExchangesData.md) | | [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/LaunchPoolV4ErrorResponse.md b/docs/ExchangesData.md similarity index 72% rename from docs/LaunchPoolV4ErrorResponse.md rename to docs/ExchangesData.md index 50dcaf22..e4ed59ef 100644 --- a/docs/LaunchPoolV4ErrorResponse.md +++ b/docs/ExchangesData.md @@ -1,10 +1,9 @@ -# LaunchPoolV4ErrorResponse +# ExchangesData ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**label** | **str** | Error label | -**message** | **str** | Error message | +**list** | [**list[ExchangesDataList]**](ExchangesDataList.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/CandyDropV4ParticipationRecordCd05.md b/docs/ExchangesDataList.md similarity index 50% rename from docs/CandyDropV4ParticipationRecordCd05.md rename to docs/ExchangesDataList.md index 6823e171..9b014209 100644 --- a/docs/CandyDropV4ParticipationRecordCd05.md +++ b/docs/ExchangesDataList.md @@ -1,12 +1,12 @@ -# CandyDropV4ParticipationRecordCd05 +# ExchangesDataList ## 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] +**exchange** | **str** | Trading market, supports us, hk, and kr | [optional] +**exchange_desc** | **str** | Market display name | [optional] +**icon_link** | **str** | Market icon | [optional] +**support_transfer** | **bool** | Whether stock transfer is supported | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FeeRate.md b/docs/FeeRate.md new file mode 100644 index 00000000..e06b05a7 --- /dev/null +++ b/docs/FeeRate.md @@ -0,0 +1,11 @@ +# FeeRate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**FeeRateData**](FeeRateData.md) | | [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/CandyDropV4RegisterRespCd02.md b/docs/FeeRateData.md similarity index 71% rename from docs/CandyDropV4RegisterRespCd02.md rename to docs/FeeRateData.md index 4291de85..2ac6311c 100644 --- a/docs/CandyDropV4RegisterRespCd02.md +++ b/docs/FeeRateData.md @@ -1,9 +1,9 @@ -# CandyDropV4RegisterRespCd02 +# FeeRateData ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **bool** | Whether the registration is successful | [optional] +**list** | [**list[FeeRateDataList]**](FeeRateDataList.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/FeeRateDataList.md b/docs/FeeRateDataList.md new file mode 100644 index 00000000..354ec155 --- /dev/null +++ b/docs/FeeRateDataList.md @@ -0,0 +1,12 @@ +# FeeRateDataList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vip_level** | **int** | VIP level | [optional] +**maker_fee** | **str** | Maker fee rate for Japanese and Korean stocks | [optional] +**taker_fee** | **str** | Taker fee rate for Japanese and Korean stocks | [optional] + +[[Back to Model list]](../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 index af421133..c77c44d6 100644 --- a/docs/FlashSwapMultiCurrencyOrder.md +++ b/docs/FlashSwapMultiCurrencyOrder.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **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] +**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] diff --git a/docs/FlashSwapOrderCreateRespData.md b/docs/FlashSwapOrderCreateRespData.md index 9e6c9f63..de13c6a1 100644 --- a/docs/FlashSwapOrderCreateRespData.md +++ b/docs/FlashSwapOrderCreateRespData.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **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] +**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] diff --git a/docs/FuturesApi.md b/docs/FuturesApi.md index 1a4bb281..a1624735 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -1227,7 +1227,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency holding = true # bool | Return only real positions - true, return all - false (optional) -limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +limit = 100 # int | Maximum number of positions returned. If omitted, all current positions are returned by default; if provided, the value must be within [1,100]. (optional) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: @@ -1246,7 +1246,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **holding** | **bool**| Return only real positions - true, return all - false | [optional] - **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **limit** | **int**| Maximum number of positions returned. If omitted, all current positions are returned by default; if provided, the value must be within [1,100]. | [optional] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type diff --git a/docs/FuturesLeverage.md b/docs/FuturesLeverage.md index e5d02ee8..df85dedf 100644 --- a/docs/FuturesLeverage.md +++ b/docs/FuturesLeverage.md @@ -4,7 +4,7 @@ Return result includes Lever field ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lever** | **str** | leverage | [optional] +**lever** | **str** | Leverage | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesLiqOrder.md b/docs/FuturesLiqOrder.md index 400112c3..378a4e3a 100644 --- a/docs/FuturesLiqOrder.md +++ b/docs/FuturesLiqOrder.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **order_size** | **str** | Number of forced liquidation orders | [optional] [readonly] **order_price** | **str** | Liquidation order price | [optional] [readonly] **fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] -**left** | **str** | System liquidation order maker size | [optional] [readonly] +**left** | **str** | Reserved field with no current business significance. | [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/FuturesPremiumIndex.md b/docs/FuturesPremiumIndex.md index 91041efd..8060acd4 100644 --- a/docs/FuturesPremiumIndex.md +++ b/docs/FuturesPremiumIndex.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **t** | **float** | Unix timestamp in seconds | [optional] **c** | **str** | Close price | [optional] -**h** | **str** | Highest price | [optional] -**l** | **str** | Lowest price | [optional] +**h** | **str** | High price | [optional] +**l** | **str** | Low price | [optional] **o** | **str** | Open price | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/HodlerAirdropV4ProjectItem.md b/docs/HodlerAirdropV4ProjectItem.md deleted file mode 100644 index ef405346..00000000 --- a/docs/HodlerAirdropV4ProjectItem.md +++ /dev/null @@ -1,20 +0,0 @@ -# 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 deleted file mode 100644 index b1d7310d..00000000 --- a/docs/HodlerAirdropV4UserAirdropRecord.md +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index 3ed95081..00000000 --- a/docs/HodlerAirdropV4UserOrderRecord.md +++ /dev/null @@ -1,16 +0,0 @@ -# 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/I18nTxt.md b/docs/I18nTxt.md new file mode 100644 index 00000000..500ac6e3 --- /dev/null +++ b/docs/I18nTxt.md @@ -0,0 +1,11 @@ +# I18nTxt + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lang** | **str** | | [optional] +**value** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md index 190ed649..dcfe8c63 100644 --- a/docs/InlineResponse200.md +++ b/docs/InlineResponse200.md @@ -6,8 +6,10 @@ Name | Type | Description | Notes **exchange_type** | **str** | Exchange | [optional] **spot_maker_fee** | **str** | spotMakerfee rate | **spot_taker_fee** | **str** | spotTakerfee rate | +**spot_rpi_maker_fee** | **str** | Spot RPI order maker fee rate | [optional] **future_maker_fee** | **str** | contractMakerfee rate | **future_taker_fee** | **str** | contractTakerfee rate | +**future_rpi_maker_fee** | **str** | Futures RPI order maker fee rate | [optional] **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/InlineResponse2001.md b/docs/InlineResponse2001.md new file mode 100644 index 00000000..c93c8972 --- /dev/null +++ b/docs/InlineResponse2001.md @@ -0,0 +1,21 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Trading Pair | +**last_price** | **str** | Last price | [optional] +**open_24h** | **str** | 24-hour opening price | [optional] +**low_24h** | **str** | 24h Low | [optional] +**high_24h** | **str** | 24h High | [optional] +**volume_24h_base** | **str** | 24-hour trading volume in base currency | [optional] +**volume_24h_quote** | **str** | 24-hour trading volume in quote currency | [optional] +**mark_price** | **str** | Mark price | [optional] +**index_price** | **str** | Index price | [optional] +**open_interest** | **str** | Open interest | [optional] +**open_interest_quote** | **str** | Open interest (in quote currency) | [optional] +**timestamp** | **str** | Update 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/CandyDropV4RegisterReqCd02.md b/docs/InlineResponse2002.md similarity index 58% rename from docs/CandyDropV4RegisterReqCd02.md rename to docs/InlineResponse2002.md index 7e180ff6..4670cb11 100644 --- a/docs/CandyDropV4RegisterReqCd02.md +++ b/docs/InlineResponse2002.md @@ -1,10 +1,12 @@ -# CandyDropV4RegisterReqCd02 +# InlineResponse2002 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**activity_id** | **int** | Activity ID (optional, used with currency) | [optional] -**currency** | **str** | Project/currency name (required) | +**symbol** | **str** | Currency | +**funding_rate** | **str** | Funding rate | +**funding_interval** | **str** | Tier | +**funding_time** | **str** | Next funding 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/LaunchApi.md b/docs/LaunchApi.md deleted file mode 100644 index 5803f21e..00000000 --- a/docs/LaunchApi.md +++ /dev/null @@ -1,1134 +0,0 @@ -# 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/LaunchPoolV4PledgeRecord.md b/docs/LaunchPoolV4PledgeRecord.md deleted file mode 100644 index 148fe590..00000000 --- a/docs/LaunchPoolV4PledgeRecord.md +++ /dev/null @@ -1,15 +0,0 @@ -# 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 deleted file mode 100644 index f7eaf639..00000000 --- a/docs/LaunchPoolV4Project.md +++ /dev/null @@ -1,17 +0,0 @@ -# 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 deleted file mode 100644 index f7f39bb2..00000000 --- a/docs/LaunchPoolV4RewardPool.md +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index 851238a2..00000000 --- a/docs/LaunchPoolV4RewardRecord.md +++ /dev/null @@ -1,14 +0,0 @@ -# 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/LeverageFailedCurrencies.md b/docs/LeverageFailedCurrencies.md new file mode 100644 index 00000000..7de2a115 --- /dev/null +++ b/docs/LeverageFailedCurrencies.md @@ -0,0 +1,12 @@ +# LeverageFailedCurrencies + +List of currencies for which the leverage update failed +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency for which the update failed | [optional] +**reason** | **str** | Reason the leverage update failed | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginMarketLeverage.md b/docs/MarginMarketLeverage.md index 63ce6867..e529ef19 100644 --- a/docs/MarginMarketLeverage.md +++ b/docs/MarginMarketLeverage.md @@ -5,7 +5,7 @@ Market leverage settings Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency_pair** | **str** | Market | [optional] -**leverage** | **str** | Position leverage | +**leverage** | **str** | Leverage multiplier | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginTiers.md b/docs/MarginTiers.md index 5e953c2d..bf169d15 100644 --- a/docs/MarginTiers.md +++ b/docs/MarginTiers.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **margin_rate** | **str** | Discount | [optional] **lower_limit** | **str** | Lower limit | [optional] **upper_limit** | **str** | Upper limit, `` indicates greater than (the last tier) | [optional] -**leverage** | **str** | Position leverage | [optional] +**leverage** | **str** | Leverage multiplier | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Mt5AccountData.md b/docs/Mt5AccountData.md index 2b94b4fb..a5e1ce07 100644 --- a/docs/Mt5AccountData.md +++ b/docs/Mt5AccountData.md @@ -5,7 +5,7 @@ Response data Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **mt5_uid** | **int** | MT5 userID | [optional] -**leverage** | **int** | Position leverage | [optional] +**leverage** | **int** | Leverage multiplier | [optional] **stop_out_level** | **str** | Liquidation margin ratio | [optional] **status** | **int** | Account status (1=not opened, 2=pending review, 3=active) | [optional] diff --git a/docs/OTCApi.md b/docs/OTCApi.md index c71b905d..19c0e192 100644 --- a/docs/OTCApi.md +++ b/docs/OTCApi.md @@ -164,7 +164,7 @@ Name | Type | Description | Notes Create stablecoin order -Create stablecoin order +Create a stablecoin order. All request body fields except `promotion_code` are required. ### Example @@ -233,7 +233,7 @@ Name | Type | Description | Notes Get user bank card list -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`. +List the user's bank cards for selecting a card when placing an order. **Default card**: use the `is_default` field in each list item (`1` indicates the default). The deprecated standalone default-bank-card endpoint is no longer required. ### Example @@ -330,7 +330,7 @@ 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 以现网为准) +documentation_file = 'documentation_file_example' # str | Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment) 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) @@ -355,7 +355,7 @@ Name | Type | Description | Notes **bank_address** | **str**| | **iban** | **str**| | **swift** | **str**| | - **documentation_file** | **str**| 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) | + **documentation_file** | **str**| Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment) | **remittance_line_number** | **str**| | [optional] **agent_bank_name** | **str**| | [optional] **agent_bank_swift** | **str**| | [optional] @@ -523,7 +523,7 @@ Name | Type | Description | Notes 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`. +**①** `bank_id` must be specified. After verifying that the card belongs to the current user and its status allows supplementary documents, the endpoint returns the required items based on the user's **approved advanced verification type** (personal/enterprise); each item's `description` states the submission requirements. Corresponding Inner endpoint: `GET /bank/bank_supplement_checklist`. ### Example @@ -750,7 +750,7 @@ Name | Type | Description | Notes Mark fiat order as paid (deposit confirmation) -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. +Mark a fiat BUY order as paid (deposit confirmation). **A user payment receipt must be uploaded**: `payment_receipt_file_key` is required; supported formats are jpg/jpeg/png/pdf, with a maximum size of 10 MB per file (validated jointly by the service and gateway). The compatibility field name `payment_receipt` is subject to the gateway/live environment. The persisted field is `otc_trade_record.payment_receipt_file_key`. The Pay Inner path is `POST .../pay/order_set_paid` (commonly associated by `client_order_id`); the Inner path corresponding to this OpenAPI endpoint, `POST /order/paid`, still primarily uses `order_id`. If the gateway standardizes on the merchant order ID, follow the gateway documentation. ### Example @@ -919,7 +919,7 @@ fiat_currency = 'fiat_currency_example' # str | Fiat currency (optional) crypto_currency = 'crypto_currency_example' # str | Digital currency (optional) start_time = 'start_time_example' # str | starttime for example : 2025-09-09 (optional) end_time = 'end_time_example' # str | endtime for example :2025-09-09 (optional) -status = 'status_example' # str | DONE: Completed CANCEL: Canceled PROCESSING: In Progress (optional) +status = 'status_example' # str | DONE: completed CANCEL: canceled PROCESSING: in progress DISBURSED: disbursed (optional) pn = 'pn_example' # str | Page number (optional) ps = 'ps_example' # str | Number of items per page (optional) @@ -942,7 +942,7 @@ Name | Type | Description | Notes **crypto_currency** | **str**| Digital currency | [optional] **start_time** | **str**| starttime for example : 2025-09-09 | [optional] **end_time** | **str**| endtime for example :2025-09-09 | [optional] - **status** | **str**| DONE: Completed CANCEL: Canceled PROCESSING: In Progress | [optional] + **status** | **str**| DONE: completed CANCEL: canceled PROCESSING: in progress DISBURSED: disbursed | [optional] **pn** | **str**| Page number | [optional] **ps** | **str**| Number of items per page | [optional] diff --git a/docs/OptionsContract.md b/docs/OptionsContract.md index bb73447c..fdbcefc8 100644 --- a/docs/OptionsContract.md +++ b/docs/OptionsContract.md @@ -19,8 +19,8 @@ Name | Type | Description | Notes **taker_fee_rate** | **str** | Taker fee rate | [optional] **order_price_round** | **str** | Minimum order price increment | [optional] **mark_price_round** | **str** | Minimum mark price increment | [optional] -**order_size_min** | **int** | Minimum order size allowed by the contract | [optional] -**order_size_max** | **int** | Maximum order size allowed by the contract | [optional] +**order_size_min** | **int** | Minimum order quantity | [optional] +**order_size_max** | **int** | Maximum order quantity | [optional] **order_price_deviate** | **str** | Deprecated | [optional] **ref_discount_rate** | **str** | Trading fee discount for referred users | [optional] **ref_rebate_rate** | **str** | Commission rate for referrers | [optional] diff --git a/docs/OrderBook2.md b/docs/OrderBook2.md new file mode 100644 index 00000000..389889e5 --- /dev/null +++ b/docs/OrderBook2.md @@ -0,0 +1,11 @@ +# OrderBook2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**OrderBook2Data**](OrderBook2Data.md) | | [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/OrderBook2Data.md b/docs/OrderBook2Data.md new file mode 100644 index 00000000..b37ac8b0 --- /dev/null +++ b/docs/OrderBook2Data.md @@ -0,0 +1,12 @@ +# OrderBook2Data + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Symbol | [optional] +**bids** | [**list[OrderBookPrice]**](OrderBookPrice.md) | Bid orders | [optional] +**asks** | [**list[OrderBookPrice]**](OrderBookPrice.md) | Ask 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/OrderBookPrice.md b/docs/OrderBookPrice.md new file mode 100644 index 00000000..a9c984ac --- /dev/null +++ b/docs/OrderBookPrice.md @@ -0,0 +1,11 @@ +# OrderBookPrice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**p** | **str** | Price | [optional] +**user_order** | **bool** | Whether it is the user's own 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/OrderHistoryList2.md b/docs/OrderHistoryList2.md new file mode 100644 index 00000000..c84e1098 --- /dev/null +++ b/docs/OrderHistoryList2.md @@ -0,0 +1,11 @@ +# OrderHistoryList2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**OrderHistoryList2Data**](OrderHistoryList2Data.md) | | [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/OrderHistoryList2Data.md b/docs/OrderHistoryList2Data.md new file mode 100644 index 00000000..8c7de56b --- /dev/null +++ b/docs/OrderHistoryList2Data.md @@ -0,0 +1,12 @@ +# OrderHistoryList2Data + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total quantity | [optional] +**total_page** | **int** | Total pages | [optional] +**list** | [**list[OrderHistoryListItem]**](OrderHistoryListItem.md) | Query historical order 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/OrderHistoryListDataList.md b/docs/OrderHistoryListDataList.md index b5a1e6dd..11c0a290 100644 --- a/docs/OrderHistoryListDataList.md +++ b/docs/OrderHistoryListDataList.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **order_id** | **int** | Order ID | [optional] **symbol** | **str** | Currency pair | [optional] -**symbol_desc** | **str** | Trading symbol description | [optional] +**symbol_desc** | **str** | Symbol description | [optional] **price_type** | **str** | Trade type (market=market price, trigger=trigger price) | [optional] **order_opt_type** | **int** | Order operation type (1=sell, 2=buy, 3=close long, 4=close short, 5=force close long, 6=force close short) | [optional] **state** | **int** | Order status code | [optional] **state_desc** | **str** | Order status description | [optional] -**side** | **int** | Order side (1=sell, 2=buy) | [optional] -**volume** | **str** | Order volume | [optional] +**side** | **int** | Side (1=sell, 2=buy) | [optional] +**volume** | **str** | Order quantity | [optional] **fill_volume** | **str** | Trading size | [optional] **close_pnl** | **str** | Close Position P&L | [optional] **price** | **str** | Average fill price | [optional] diff --git a/docs/OrderHistoryListItem.md b/docs/OrderHistoryListItem.md new file mode 100644 index 00000000..af72477f --- /dev/null +++ b/docs/OrderHistoryListItem.md @@ -0,0 +1,29 @@ +# OrderHistoryListItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | | [optional] +**symbol** | **str** | | [optional] +**exchange** | **str** | Exchange, supports us, hk, and kr | [optional] +**quote_currency** | **str** | | [optional] +**fx_rate** | **str** | Quote currency to USD exchange rate | [optional] +**symbol_desc** | **str** | | [optional] +**price_type** | **str** | Price type (market = market order, limit = limit order) | [optional] +**status** | **int** | Order status | [optional] +**status_desc** | **str** | Order status description | [optional] +**status_detail** | [**OrderHistoryListItemStatusDetail**](OrderHistoryListItemStatusDetail.md) | | [optional] +**finish_as** | **int** | Order completion reason | [optional] +**side** | **int** | Side (1=sell, 2=buy) | [optional] +**time_in_force** | **str** | Time in force. - day: Day order. | [optional] +**volume** | **str** | | [optional] +**fill_volume** | **str** | | [optional] +**price** | **str** | | [optional] +**avg_fill_price** | **str** | | [optional] +**commission** | **str** | fee | [optional] +**time_setup** | **int** | | [optional] +**time_done** | **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/OrderHistoryListItemStatusDetail.md b/docs/OrderHistoryListItemStatusDetail.md new file mode 100644 index 00000000..16a27cd4 --- /dev/null +++ b/docs/OrderHistoryListItemStatusDetail.md @@ -0,0 +1,11 @@ +# OrderHistoryListItemStatusDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**message** | **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/OrderList2.md b/docs/OrderList2.md new file mode 100644 index 00000000..85587a40 --- /dev/null +++ b/docs/OrderList2.md @@ -0,0 +1,11 @@ +# OrderList2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**OrderList2Data**](OrderList2Data.md) | | [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/OrderList2Data.md b/docs/OrderList2Data.md new file mode 100644 index 00000000..8e095093 --- /dev/null +++ b/docs/OrderList2Data.md @@ -0,0 +1,10 @@ +# OrderList2Data + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[OrderListItem]**](OrderListItem.md) | Query active order 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/OrderListDataList.md b/docs/OrderListDataList.md index bc5739d7..b18fc3fe 100644 --- a/docs/OrderListDataList.md +++ b/docs/OrderListDataList.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **order_id** | **int** | Order ID | [optional] **symbol** | **str** | Currency pair | [optional] -**symbol_desc** | **str** | Trading symbol description | [optional] +**symbol_desc** | **str** | Symbol description | [optional] **price_type** | **str** | Trade type (market=market price, trigger=trigger price) | [optional] **state** | **int** | Order status code | [optional] **state_desc** | **str** | Order status description | [optional] **finished** | **int** | Is completed (0=shown in active order list, 1=not shown in active list) | [optional] -**side** | **int** | Order side (1=sell, 2=buy) | [optional] -**volume** | **str** | Order volume | [optional] +**side** | **int** | Side (1=sell, 2=buy) | [optional] +**volume** | **str** | Order quantity | [optional] **price** | **str** | Trigger price | [optional] **price_tp** | **str** | Take profit price | [optional] **price_sl** | **str** | Stop loss price | [optional] diff --git a/docs/OrderListItem.md b/docs/OrderListItem.md new file mode 100644 index 00000000..acf183e3 --- /dev/null +++ b/docs/OrderListItem.md @@ -0,0 +1,34 @@ +# OrderListItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | [optional] +**symbol** | **str** | Symbol | [optional] +**exchange** | **str** | Exchange, supports us, hk, and kr | [optional] +**quote_currency** | **str** | Quote currency | [optional] +**fx_rate** | **str** | Quote currency to USD exchange rate | [optional] +**symbol_desc** | **str** | Symbol description | [optional] +**trade_status** | **str** | Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. | [optional] +**trade_mode** | **int** | Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. | [optional] +**price_type** | **str** | Price type (market = market order, limit = limit order) | [optional] +**side** | **int** | Side (1=sell, 2=buy) | [optional] +**status** | **int** | Order status | [optional] +**volume** | **str** | Order quantity | [optional] +**fill_volume** | **str** | Trading size | [optional] +**price** | **str** | Order price | [optional] +**time_setup** | **int** | Order creation time (Unix timestamp, seconds) | [optional] +**time_update** | **int** | Order update time (Unix timestamp, seconds) | [optional] +**max_order_volume** | **str** | Maximum order quantity | [optional] +**step_order_volume** | **str** | Order step size | [optional] +**min_order_volume** | **str** | Minimum order quantity | [optional] +**price_precision** | **int** | Price precision | [optional] +**price_protection** | **str** | Price protection range | [optional] +**sell_price_protection** | **str** | Sell price protection rate | [optional] +**buy_price_protection** | **str** | Buy price protection rate | [optional] +**commission_rate** | **str** | Fee Rate | [optional] +**slippage_rate** | **str** | Slippage | [optional] + +[[Back to Model list]](../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 index 65eb136d..31b5d2d9 100644 --- a/docs/OrderLogData.md +++ b/docs/OrderLogData.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **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] +**side** | **int** | Side (1=sell, 2=buy) | [optional] +**volume** | **str** | Order quantity | [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/OtcBankCreateMultipartRequest.md b/docs/OtcBankCreateMultipartRequest.md index db4194f0..87aa21e5 100644 --- a/docs/OtcBankCreateMultipartRequest.md +++ b/docs/OtcBankCreateMultipartRequest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **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 以现网为准) | +**documentation_file** | **str** | Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OtcBankListItem.md b/docs/OtcBankListItem.md index 1faf0ed4..8320a4e5 100644 --- a/docs/OtcBankListItem.md +++ b/docs/OtcBankListItem.md @@ -3,13 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Bank ID (required for order placement) | +**id** | **str** | Bank card ID (used when placing an order; the synonymous `bank_id` field has been consolidated into `id`) | **bank_account_name** | **str** | Bank account name | **bank_name** | **str** | Bank name | **bank_country** | **str** | Bank country | [optional] **bank_address** | **str** | Bank address | [optional] -**bank_code** | **str** | Bank code | [optional] -**branch_code** | **str** | Branch code | [optional] **iban** | **str** | IBAN number | [optional] **swift** | **str** | SWIFT code | [optional] **remittance_line_number** | **str** | Remittance routing number | [optional] @@ -18,11 +16,7 @@ Name | Type | Description | Notes **submit_time** | **str** | Submission time | [optional] **update_time** | **str** | Update time | [optional] **status** | **str** | Status | [optional] -**documentation_file_type** | **str** | Document file type | [optional] -**memo** | **str** | Remark | [optional] **is_default** | **int** | Whether it is the default bank card. 1 - Yes, 0 - No | [optional] -**bank_id** | **str** | Bank ID | [optional] -**documentation_file_key_url** | **str** | Document file 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/OtcBankSupplementChecklistItem.md b/docs/OtcBankSupplementChecklistItem.md index 15aa879a..c0e8034a 100644 --- a/docs/OtcBankSupplementChecklistItem.md +++ b/docs/OtcBankSupplementChecklistItem.md @@ -1,12 +1,10 @@ # OtcBankSupplementChecklistItem +Supplementary document item ## 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 | +**description** | **str** | Supplementary document submission description | [[Back to Model list]](../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 index 1771ac3d..40dac8ca 100644 --- a/docs/OtcBankSupplementChecklistResponseData.md +++ b/docs/OtcBankSupplementChecklistResponseData.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_type** | **str** | personal or enterprise | +**user_type** | **str** | `personal` or `enterprise`, matching the supplementary document submission type; `items[].description` describes the submission requirements for each item | **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 9dad1b81..54518657 100644 --- a/docs/OtcMarkOrderPaidRequest.md +++ b/docs/OtcMarkOrderPaidRequest.md @@ -6,7 +6,7 @@ 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_file_key** | **str** | User payment receipt: **required**. Stored as a file_key. One file; jpg/jpeg/png/pdf; maximum 10 MB. | **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/OtcOrderDetail.md b/docs/OtcOrderDetail.md index 660b9c71..a8b4ce6f 100644 --- a/docs/OtcOrderDetail.md +++ b/docs/OtcOrderDetail.md @@ -6,20 +6,31 @@ Name | Type | Description | Notes **order_id** | **str** | Order ID | **uid** | **str** | User ID | **type** | **str** | Order Type | -**fiat_currency** | **str** | Fiat type | +**fiat_currency** | **str** | Fiat currency | **fiat_amount** | **str** | Fiat amount | -**crypto_currency** | **str** | Stablecoin | -**crypto_amount** | **str** | Stablecoin amount | +**crypto_currency** | **str** | Digital currency | +**crypto_amount** | **str** | Cryptocurrency amount | **rate** | **str** | Exchange rate | -**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] +**bank_account_name** | **str** | User payment/receiving name | [optional] +**bank_name** | **str** | User payment/receiving bank name | [optional] +**bank_country** | **str** | User payment/receiving bank country | [optional] +**bank_address** | **str** | User payment/receiving bank address | [optional] +**bank_account_number_iban** | **str** | User payment/receiving bank account number/IBAN | [optional] +**swift_code** | **str** | User payment/receiving bank SWIFT code | [optional] +**intermediate_bank_name** | **str** | User payment/receiving intermediary bank name | [optional] +**intermediary_bank_swift_code** | **str** | User payment/receiving intermediary bank SWIFT code | [optional] +**gate_bank_account_name** | **str** | Gate beneficiary name, shown for BUY only | [optional] +**gate_bank_name** | **str** | Gate beneficiary bank name, shown for BUY only | [optional] +**gate_bank_country** | **str** | Gate beneficiary bank country, shown for BUY only | [optional] +**gate_bank_address** | **str** | Gate beneficiary bank address, shown for BUY only | [optional] +**gate_bank_account_number_iban** | **str** | Gate beneficiary bank account number/IBAN, shown for BUY only | [optional] +**gate_swift_code** | **str** | Gate beneficiary bank SWIFT code, shown for BUY only | [optional] +**gate_intermediary_bank_name** | **str** | Gate beneficiary intermediary bank name, shown for BUY only | [optional] +**gate_intermediary_bank_swift_code** | **str** | Gate beneficiary intermediary bank SWIFT code, shown for BUY only | [optional] +**gate_transfer_remark** | **str** | Transfer remark (mutually exclusive with `gate_reference_code`; empty when a BUY deposit order has a reference code), shown for BUY only | [optional] +**gate_reference_code** | **str** | Be sure to include the reference code when making the transfer so that your order can be processed promptly. (Mutually exclusive with `gate_transfer_remark`.) | [optional] **status** | **str** | Status | -**db_status** | **str** | | **create_time** | **str** | Created time | -**memo** | **str** | Cancellation or rejection reason | -**side** | **str** | Quote direction | -**promotion_code** | **str** | Promotion code | -**trade_no** | **str** | Trade number | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OtcOrderListItem.md b/docs/OtcOrderListItem.md index 47abc3f7..8940d47c 100644 --- a/docs/OtcOrderListItem.md +++ b/docs/OtcOrderListItem.md @@ -7,19 +7,15 @@ Name | Type | Description | Notes **timestamp** | **int** | Current timestamp | [optional] **order_id** | **str** | orderId | [optional] **trade_no** | **str** | Trade number | [optional] -**type** | **str** | Quote direction buy/sell/all | [optional] -**status** | **str** | Order Status | [optional] -**db_status** | **str** | | [optional] -**fiat_currency** | **str** | Fiat type | [optional] +**type** | **str** | BUY deposit / SELL withdrawal | [optional] +**status** | **str** | Order status | [optional] +**fiat_currency** | **str** | Fiat currency | [optional] **fiat_currency_info** | [**OtcOrderListFiatCurrencyInfo**](OtcOrderListFiatCurrencyInfo.md) | | [optional] **fiat_amount** | **str** | Fiat amount | [optional] -**crypto_currency** | **str** | Stablecoin | [optional] +**crypto_currency** | **str** | Digital currency | [optional] **crypto_currency_info** | [**OtcOrderListCryptoCurrencyInfo**](OtcOrderListCryptoCurrencyInfo.md) | | [optional] -**crypto_amount** | **str** | Stablecoin amount | [optional] +**crypto_amount** | **str** | Cryptocurrency amount | [optional] **rate** | **str** | Exchange rate | [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] [[Back to Model list]](../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 d8bcd186..91295064 100644 --- a/docs/OtcOrderRequest.md +++ b/docs/OtcOrderRequest.md @@ -5,14 +5,14 @@ Fiat Order Request Body Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | BUY for on-ramp, SELL for off-ramp | -**side** | **str** | Quote direction returned by the quote API (used for order validation) | +**side** | **str** | The side returned by the quote endpoint (used for order validation). For backward compatibility, `FIAT`/`CRYPTO` or `PAY`/`GET` are accepted; new integrations should use the value returned by the quote response. | **crypto_currency** | **str** | Cryptocurrency (supported currencies can be queried from the OTC web fiat quote page) | **fiat_currency** | **str** | Fiat currency (supported currencies can be queried from the OTC web fiat quote page) | **crypto_amount** | **str** | Amount of cryptocurrency | **fiat_amount** | **str** | Fiat amount | **promotion_code** | **str** | Promotion code | [optional] **quote_token** | **str** | Parameter returned by the quote 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` | +**bank_id** | **str** | Bank card ID used to place the order. Select one from the list returned by `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/OtcQuoteRequest.md b/docs/OtcQuoteRequest.md index 617d34c3..7f5b1610 100644 --- a/docs/OtcQuoteRequest.md +++ b/docs/OtcQuoteRequest.md @@ -4,13 +4,13 @@ Fiat and Stablecoin Quote Request Body ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**side** | **str** | PAY/GET quote direction. PAY means user inputs pay amount, GET means user inputs get amount. If PAY, pay_amount is required. If GET, get_amount is required | -**pay_coin** | **str** | Currency the user pays. Supported currencies can be found on the OTC web quote page. | -**get_coin** | **str** | Currency the user receives. Supported currencies can be found on the OTC web quote page. | +**side** | **str** | PAY: specify the payment amount (`pay_amount` is required); GET: specify the receive amount (`get_amount` is required). | +**pay_coin** | **str** | Payment currency. Supported currencies are available on the OTC web quote page. | +**get_coin** | **str** | Receive currency. Supported currencies are available on the OTC web quote page. | **pay_amount** | **str** | User payment currency amount | [optional] **get_amount** | **str** | Amount of currency received by the user | [optional] **create_quote_token** | **str** | Create quote token: 0: quote preview only; 1: generate quote token for order placement. | [optional] -**promotion_code** | **str** | Promotion code (optional) | [optional] +**promotion_code** | **str** | Promotion code | [optional] [[Back to Model list]](../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 index df5d4fe7..f1e08740 100644 --- a/docs/OtcQuoteResponse.md +++ b/docs/OtcQuoteResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **code** | **int** | | **message** | **str** | | **data** | [**OtcQuoteResult**](OtcQuoteResult.md) | | +**timestamp** | **int** | Server Unix 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/OtcQuoteResult.md b/docs/OtcQuoteResult.md index 5439ea5d..0a5687e1 100644 --- a/docs/OtcQuoteResult.md +++ b/docs/OtcQuoteResult.md @@ -14,6 +14,9 @@ Name | Type | Description | Notes **side** | **str** | Quote method | **order_type** | **str** | Order type: FIAT (fiat) / STABLE (stablecoin) | **quote_token** | **str** | Quote token required when placing an order | +**validity_period** | **str** | Quote validity period (seconds) | [optional] +**refresh_limit** | **int** | Quote refresh limit | [optional] +**refresh_limit_msg** | **str** | Quote refresh limit 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/OtcStableCoinOrderCreateResponse.md b/docs/OtcStableCoinOrderCreateResponse.md index 64496e8d..07c3e049 100644 --- a/docs/OtcStableCoinOrderCreateResponse.md +++ b/docs/OtcStableCoinOrderCreateResponse.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **int** | | -**message** | **str** | | +**code** | **int** | Business code; 0 indicates success | +**message** | **str** | Message | +**timestamp** | **int** | Server Unix 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/OtcStableCoinOrderListItem.md b/docs/OtcStableCoinOrderListItem.md index 636c3438..821769e3 100644 --- a/docs/OtcStableCoinOrderListItem.md +++ b/docs/OtcStableCoinOrderListItem.md @@ -6,13 +6,15 @@ Name | Type | Description | Notes **id** | **int** | Order ID | [optional] **trade_no** | **str** | Transaction reference number | [optional] **pay_coin** | **str** | Payment currency | [optional] +**pay_icon** | **str** | Payment currency icon | [optional] **pay_amount** | **str** | Payment amount | [optional] **get_coin** | **str** | Received currency | [optional] +**get_icon** | **str** | Received currency icon | [optional] **get_amount** | **str** | Received amount | [optional] **rate** | **str** | Exchange rate | [optional] **rate_reci** | **str** | Reciprocal of the exchange rate | [optional] **status** | **str** | PROCESSING: in progress / DONE: completed / FAILED: failed | [optional] -**create_timest** | **int** | timetimestamp | [optional] +**create_timest** | **int** | Created time | [optional] **create_time** | **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/OtcStableCoinOrderRequest.md b/docs/OtcStableCoinOrderRequest.md index f75e14ae..9e1c60f0 100644 --- a/docs/OtcStableCoinOrderRequest.md +++ b/docs/OtcStableCoinOrderRequest.md @@ -4,13 +4,13 @@ Stablecoin Order Request Body ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pay_coin** | **str** | Currency paid by the user. Supported currencies can be queried from the OTC web stablecoin quote page. | [optional] -**get_coin** | **str** | Currency to be received by the user. Supported currencies can be queried from the OTC web stablecoin quote page. | [optional] -**pay_amount** | **str** | User payment currency amount | [optional] -**get_amount** | **str** | Amount of currency received by the user | [optional] -**side** | **str** | Quote direction returned by the quote API (used for order validation) | [optional] -**promotion_code** | **str** | promotion code | [optional] -**quote_token** | **str** | Parameter returned by the quote API | [optional] +**pay_coin** | **str** | Currency paid by the user. Supported currencies can be queried from the OTC web stablecoin quote page. | +**get_coin** | **str** | Currency to be received by the user. Supported currencies can be queried from the OTC web stablecoin quote page. | +**pay_amount** | **str** | User payment currency amount | +**get_amount** | **str** | Amount of currency received by the user | +**side** | **str** | The side returned by the quote endpoint (used for order validation). For backward compatibility, `PAY`/`GET` are accepted; new integrations should use the value returned by the quote response. | +**promotion_code** | **str** | Promotion code (optional) | [optional] +**quote_token** | **str** | Parameter returned by the quote API | [[Back to Model list]](../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 index e6e98c11..f6a507b3 100644 --- a/docs/P2pAdDetail.md +++ b/docs/P2pAdDetail.md @@ -6,8 +6,12 @@ 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] +**min_amount** | **str** | Minimum quantity per order, denominated by currency_type | [optional] +**max_amount** | **str** | Maximum quantity per order, denominated by currency_type | [optional] +**fiat_min_amount** | **str** | Minimum trade amount in `want_type`. | [optional] +**fiat_max_amount** | **str** | Maximum trade amount priced in `want_type`. | [optional] +**limit_basis** | **int** | Trading limit unit. 0: crypto quantity, 1: fiat amount | [optional] +**limit_basis_text** | **str** | Trading limit unit label. crypto: crypto quantity, fiat: fiat amount | [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] @@ -32,6 +36,7 @@ Name | Type | Description | Notes **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] +**polymarket_limit** | **int** | Whether to restrict trading with Polymarket users. 0: no restriction, 1: restricted | [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] diff --git a/docs/P2pAdsListItem.md b/docs/P2pAdsListItem.md index 3598a262..87754af2 100644 --- a/docs/P2pAdsListItem.md +++ b/docs/P2pAdsListItem.md @@ -8,8 +8,14 @@ Name | Type | Description | Notes **fiat_unit** | **str** | Fiat currency | [optional] **adv_no** | **int** | Ad ID | [optional] **price** | **str** | Price | [optional] +**surplus_amount** | **str** | Remaining tradable crypto quantity | [optional] **max_single_trans_amount** | **str** | Maximum crypto size per trade. | [optional] **min_single_trans_amount** | **str** | Minimum crypto size per trade. | [optional] +**fiat_min_amount** | **str** | Minimum fiat amount per order | [optional] +**fiat_max_amount** | **str** | Maximum fiat amount per order | [optional] +**limit_basis** | **int** | Trading limit unit. 0: crypto quantity, 1: fiat amount | [optional] +**limit_basis_text** | **str** | Trading limit unit label. crypto: crypto quantity, fiat: fiat amount | [optional] +**trade_methods** | [**list[P2pAdsListTradeMethod]**](P2pAdsListTradeMethod.md) | Supported payment methods list | [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/P2pAdsListTradeMethod.md b/docs/P2pAdsListTradeMethod.md new file mode 100644 index 00000000..1a028cc2 --- /dev/null +++ b/docs/P2pAdsListTradeMethod.md @@ -0,0 +1,14 @@ +# P2pAdsListTradeMethod + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**icon_url_color** | **str** | Payment method color icon URL | [optional] +**identifier** | **str** | Payment method identifier | [optional] +**pay_id** | **str** | Payment method ID | [optional] +**pay_type** | **str** | Payment method type | [optional] +**trade_method_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/P2pApi.md b/docs/P2pApi.md index 5d63484f..8c2c2b6b 100644 --- a/docs/P2pApi.md +++ b/docs/P2pApi.md @@ -4,6 +4,7 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- +[**p2p_merchant_query_spot_balance**](P2pApi.md#p2p_merchant_query_spot_balance) | **GET** /spot/accounts | Query spot balance [**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 @@ -24,6 +25,70 @@ Method | HTTP request | Description [**p2p_merchant_chat_upload_chat_file**](P2pApi.md#p2p_merchant_chat_upload_chat_file) | **POST** /p2p/merchant/chat/upload_chat_file | Upload chat file +# **p2p_merchant_query_spot_balance** +> p2p_merchant_query_spot_balance() + +Query spot balance + +Use Spot API `GET /spot/accounts` to query spot account balance; this entry is for guidance only and does not define separate P2P Merchant request parameters or response body. + +### 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) + +try: + # Query spot balance + api_instance.p2p_merchant_query_spot_balance() +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling P2pApi->p2p_merchant_query_spot_balance: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Refer to the Spot API `GET /spot/accounts` response definition. | - | + +[[Back to top]](#) [[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_user_info** > P2pMerchantUserInfoResponse p2p_merchant_account_get_user_info() diff --git a/docs/PlaceBizPushOrder.md b/docs/PlaceBizPushOrder.md index f8870e39..d1934aee 100644 --- a/docs/PlaceBizPushOrder.md +++ b/docs/PlaceBizPushOrder.md @@ -9,16 +9,20 @@ Name | Type | Description | Notes **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] +**pay_type** | **str** | Payment types enabled for the ad, comma-separated; values can be obtained from `pay_type` in the payment method list, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. `pay_type_json` uses the types in this field as keys to specify the corresponding payment accounts. | +**pay_type_json** | **str** | JSON string of specific payment accounts corresponding to `payType`. Each key is a payment type listed in `payType`, and each value is the current user's payment method ID for that type. For example, when `payType` is `bank,swift`, this field can be {\"bank\":\"10001\",\"swift\":\"10002\"}. | [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. | +**min_amount** | **str** | Minimum quantity per order, denominated by currencyType; required when limitBasis is not passed or is 0 | [optional] +**max_amount** | **str** | Maximum quantity per order, denominated by currencyType; required when limitBasis is not passed or is 0 | [optional] +**limit_basis** | **int** | Trading limit unit. 0: by crypto quantity, 1: by fiat amount; defaults to 0 when not passed for a new ad. The limit unit of an existing ad cannot be changed when editing; a fiat-limit ad must keep passing 1 when edited | [optional] +**fiat_min_amount** | **str** | Minimum amount per order, denominated by exchangeType; required when limitBasis is 1 | [optional] +**fiat_max_amount** | **str** | Maximum amount per order, denominated by exchangeType; required when limitBasis is 1, and must not exceed the total fiat value of the ad quantity converted at the price | [optional] **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] +**polymarket_limit** | **int** | Whether to restrict trading with Polymarket users. 0: no restriction, 1: restricted | [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] diff --git a/docs/Position.md b/docs/Position.md index 3af6be2d..f60b771e 100644 --- a/docs/Position.md +++ b/docs/Position.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **leverage_max** | **str** | the maximum permissible leverage given to the current positon value: the higher positon value, the lower maximum permissible leverage | [optional] [readonly] **maintenance_rate** | **str** | The maintenance margin requirement for the risk limit at which the current position size is located.Since the maintenance margin for the position has been calculated using a tiered system, the actual maintenance margin rate required for this position is based on `average_maintenance_rate`. | [optional] [readonly] **value** | **str** | Position value calculated in settlement currency | [optional] [readonly] -**margin** | **str** | Position margin | [optional] +**margin** | **str** | Margin | [optional] **entry_price** | **str** | Entry price | [optional] [readonly] **liq_price** | **str** | Estimated liquidation price, for reference only. The actual liquidation trigger is based on the position mmr or the account maintenance margin level. | [optional] [readonly] **mark_price** | **str** | Current mark price | [optional] [readonly] diff --git a/docs/PositionHistoryListDataCloseDetail.md b/docs/PositionHistoryListDataCloseDetail.md index db12ef56..05e88a02 100644 --- a/docs/PositionHistoryListDataCloseDetail.md +++ b/docs/PositionHistoryListDataCloseDetail.md @@ -5,7 +5,7 @@ Liquidation details (null for normal close) Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **margin_level** | **str** | Margin ratio (multiplied by 100) | [optional] -**margin** | **str** | Position margin | [optional] +**margin** | **str** | Margin | [optional] **equity** | **str** | Net equity | [optional] **stop_out_level** | **str** | Liquidation ratio (multiplied by 100) | [optional] diff --git a/docs/PositionList2.md b/docs/PositionList2.md new file mode 100644 index 00000000..ece87e20 --- /dev/null +++ b/docs/PositionList2.md @@ -0,0 +1,11 @@ +# PositionList2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PositionList2Data**](PositionList2Data.md) | | [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/CandyDropV4ErrorCd01.md b/docs/PositionList2Data.md similarity index 68% rename from docs/CandyDropV4ErrorCd01.md rename to docs/PositionList2Data.md index 53063f1c..d24a56a5 100644 --- a/docs/CandyDropV4ErrorCd01.md +++ b/docs/PositionList2Data.md @@ -1,10 +1,9 @@ -# CandyDropV4ErrorCd01 +# PositionList2Data ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**label** | **str** | Error label | [optional] -**message** | **str** | Error message | [optional] +**list** | [**list[PositionListItem]**](PositionListItem.md) | Query active 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/PositionListItem.md b/docs/PositionListItem.md new file mode 100644 index 00000000..89e6d2fa --- /dev/null +++ b/docs/PositionListItem.md @@ -0,0 +1,40 @@ +# PositionListItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Symbol | [optional] +**exchange** | **str** | Exchange, supports us, hk, and kr | [optional] +**quote_currency** | **str** | Quote currency | [optional] +**quote_currency_precision** | **int** | Quote currency precision | [optional] +**fx_rate** | **str** | Quote currency to USD exchange rate | [optional] +**trade_status** | **str** | Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. | [optional] +**symbol_desc** | **str** | | [optional] +**position_pnl** | **str** | Position P&L | [optional] +**today_pnl** | **str** | Today's P&L | [optional] +**pnl_rate** | **str** | Yield | [optional] +**today_sell_amount** | **str** | Today's sales amount | [optional] +**today_buy_amount** | **str** | Today's purchase amount | [optional] +**today_sell_volume** | **str** | Today's sell volume | [optional] +**today_buy_volume** | **str** | Today's buy volume | [optional] +**yesterday_volume** | **str** | Previous close position quantity | [optional] +**volume** | **str** | Position quantity | [optional] +**available** | **str** | Available position quantity | [optional] +**transfer_out_pending_qty** | **str** | Stock transfer in progress quantity | [optional] +**avg_cost_price** | **str** | Cost price | [optional] +**diluted_cost_price** | **str** | Diluted cost price | [optional] +**last_price** | **str** | Latest price | [optional] +**extended_last_price** | **str** | Extended hours latest price | [optional] +**max_order_volume** | **str** | | [optional] +**step_order_volume** | **str** | | [optional] +**min_order_volume** | **str** | | [optional] +**price_precision** | **int** | | [optional] +**price_protection** | **str** | | [optional] +**sell_price_protection** | **str** | | [optional] +**buy_price_protection** | **str** | | [optional] +**commission_rate** | **str** | Fee Rate | [optional] +**slippage_rate** | **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/PositionTimerange.md b/docs/PositionTimerange.md index 6b680d14..a0741985 100644 --- a/docs/PositionTimerange.md +++ b/docs/PositionTimerange.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **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] **maintenance_rate** | **str** | The maintenance margin rate of the first tier of risk limit sheet | [optional] [readonly] -**margin** | **str** | Position margin | [optional] +**margin** | **str** | Margin | [optional] **liq_price** | **str** | Liquidation price | [optional] [readonly] **realised_pnl** | **str** | Realized PnL | [optional] [readonly] **history_pnl** | **str** | Total realized PnL from closed positions | [optional] [readonly] diff --git a/docs/RedeemV4.md b/docs/RedeemV4.md deleted file mode 100644 index b86a5329..00000000 --- a/docs/RedeemV4.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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/SpotAccount.md b/docs/SpotAccount.md deleted file mode 100644 index 6bb761ea..00000000 --- a/docs/SpotAccount.md +++ /dev/null @@ -1,13 +0,0 @@ -# SpotAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**available** | **str** | Available amount | [optional] -**locked** | **str** | Locked amount, used in trading | [optional] -**update_id** | **int** | Version number | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpotApi.md b/docs/SpotApi.md index 22c412c8..598f4ead 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -14,13 +14,12 @@ Method | HTTP request | Description [**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market K-line chart [**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query account fee rates [**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Batch query account fee rates -[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot trading accounts [**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query spot account transaction history [**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Batch place orders [**list_all_open_orders**](SpotApi.md#list_all_open_orders) | **GET** /spot/open_orders | List all open orders [**create_cross_liquidate_order**](SpotApi.md#create_cross_liquidate_order) | **POST** /spot/cross_liquidate_orders | Close position when cross-currency is disabled [**list_orders**](SpotApi.md#list_orders) | **GET** /spot/orders | List orders -[**create_order**](SpotApi.md#create_order) | **POST** /spot/orders | Create an order +[**create_order**](SpotApi.md#create_order) | **POST** /spot/orders | Create order [**cancel_orders**](SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair [**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel batch orders by specified ID list [**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Query single order details @@ -36,6 +35,11 @@ Method | HTTP request | Description [**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel all auto orders [**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Query single auto order details [**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | Cancel single auto order +[**list_spot_pov_orders**](SpotApi.md#list_spot_pov_orders) | **GET** /spot/pov_orders | List Spot POV orders +[**create_spot_pov_order**](SpotApi.md#create_spot_pov_order) | **POST** /spot/pov_orders | Create a Spot POV order +[**cancel_spot_pov_orders**](SpotApi.md#cancel_spot_pov_orders) | **POST** /spot/pov_orders/cancel | Cancel Spot POV orders +[**get_spot_pov_order**](SpotApi.md#get_spot_pov_order) | **GET** /spot/pov_orders/{order_id} | Query Spot POV order details +[**cancel_spot_pov_order**](SpotApi.md#cancel_spot_pov_order) | **POST** /spot/pov_orders/{order_id}/cancel | Cancel a Spot POV order # **list_currencies** @@ -668,73 +672,6 @@ 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_spot_accounts** -> list[SpotAccount] list_spot_accounts(currency=currency) - -List spot trading accounts - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -currency = 'BTC' # str | Query by specified currency name (optional) - -try: - # List spot trading accounts - api_response = api_instance.list_spot_accounts(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 SpotApi->list_spot_accounts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Query by specified currency name | [optional] - -### Return type - -[**list[SpotAccount]**](SpotAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **list_spot_account_book** > list[SpotAccountBook] list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=code) @@ -1115,7 +1052,7 @@ Name | Type | Description | Notes # **create_order** > Order create_order(order, x_gate_exptime=x_gate_exptime) -Create an order +Create order Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use @@ -1147,7 +1084,7 @@ order = gate_api.Order() # Order | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Create an order + # Create order api_response = api_instance.create_order(order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2246,3 +2183,346 @@ 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_spot_pov_orders** +> list[SpotPovOrder] list_spot_pov_orders(status, currency_pair=currency_pair, side=side, page=page, limit=limit) + +List Spot POV 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.SpotApi(api_client) +status = 'open' # str | Order status. Defaults to open - open: Active orders - finished: Finished orders (default to 'open') +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +side = 'sell' # str | Specify all bids or all asks, both included if not specified (optional) +page = 1 # int | Page number, up to 100 (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) + +try: + # List Spot POV orders + api_response = api_instance.list_spot_pov_orders(status, currency_pair=currency_pair, side=side, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->list_spot_pov_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| Order status. Defaults to open - open: Active orders - finished: Finished orders | [default to 'open'] + **currency_pair** | **str**| Currency pair | [optional] + **side** | **str**| Specify all bids or all asks, both included if not specified | [optional] + **page** | **int**| Page number, up to 100 | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + +### Return type + +[**list[SpotPovOrder]**](SpotPovOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Query successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_spot_pov_order** +> SpotPovOrder create_spot_pov_order(spot_pov_order_creator) + +Create a Spot POV order + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +spot_pov_order_creator = gate_api.SpotPovOrderCreator() # SpotPovOrderCreator | + +try: + # Create a Spot POV order + api_response = api_instance.create_spot_pov_order(spot_pov_order_creator) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->create_spot_pov_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **spot_pov_order_creator** | [**SpotPovOrderCreator**](SpotPovOrderCreator.md)| | + +### Return type + +[**SpotPovOrder**](SpotPovOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Order created successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_spot_pov_orders** +> list[SpotPovOrder] cancel_spot_pov_orders(currency_pair=currency_pair) + +Cancel Spot POV 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.SpotApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) + +try: + # Cancel Spot POV orders + api_response = api_instance.cancel_spot_pov_orders(currency_pair=currency_pair) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->cancel_spot_pov_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | [optional] + +### Return type + +[**list[SpotPovOrder]**](SpotPovOrder.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** | Batch cancel request is received and processed. Success is determined based on the order list | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_spot_pov_order** +> SpotPovOrder get_spot_pov_order(order_id) + +Query Spot POV order details + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +order_id = '12345' # str | The order ID returned after successful creation, or the custom ID specified by the user in the `text` field. + +try: + # Query Spot POV order details + api_response = api_instance.get_spot_pov_order(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 SpotApi->get_spot_pov_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| The order ID returned after successful creation, or the custom ID specified by the user in the `text` field. | + +### Return type + +[**SpotPovOrder**](SpotPovOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Detail retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_spot_pov_order** +> SpotPovOrder cancel_spot_pov_order(order_id) + +Cancel a Spot POV order + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +order_id = '12345' # str | The order ID returned after successful creation, or the custom ID specified by the user in the `text` field. + +try: + # Cancel a Spot POV order + api_response = api_instance.cancel_spot_pov_order(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 SpotApi->cancel_spot_pov_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| The order ID returned after successful creation, or the custom ID specified by the user in the `text` field. | + +### Return type + +[**SpotPovOrder**](SpotPovOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order cancelled | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SpotPovOrder.md b/docs/SpotPovOrder.md new file mode 100644 index 00000000..4302b582 --- /dev/null +++ b/docs/SpotPovOrder.md @@ -0,0 +1,26 @@ +# SpotPovOrder + +Spot POV order details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Order ID | [readonly] +**currency_pair** | **str** | Currency pair | [readonly] +**side** | **str** | Buy or sell order | [readonly] +**amount** | **str** | Trade amount | [readonly] +**participation_rate** | **int** | Target participation rate as a percentage. Allowed values: 5, 10, 20, and 40 | [readonly] +**ttl** | **str** | Time to live. Valid values: 1h, 6h, 12h, 1d, 2d, 3d, 4d, 5d, 6d, and 7d | [readonly] +**limit_price** | **str** | Limit price. If omitted, the market price is used | [optional] [readonly] +**trigger_price** | **str** | Trigger price. If omitted, the order is triggered immediately | [optional] [readonly] +**status** | **str** | Order status - CREATED: Created - CANCELING: Canceling - RUNNING: Running - COMPLETED: Completed - EXPIRED: Expired - TERMINATED: Terminated | [readonly] +**terminated_as** | **str** | Order termination reason code | [optional] [readonly] +**start_time_ms** | **int** | Order execution start time in milliseconds | [optional] [readonly] +**end_time_ms** | **int** | Order execution end time in milliseconds | [optional] [readonly] +**expire_time_ms** | **int** | Order expiration time in milliseconds | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds) | [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] +**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/SpotPovOrderCreator.md b/docs/SpotPovOrderCreator.md new file mode 100644 index 00000000..d0267dab --- /dev/null +++ b/docs/SpotPovOrderCreator.md @@ -0,0 +1,18 @@ +# SpotPovOrderCreator + +Spot POV order creation request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Currency pair | +**side** | **str** | Buy or sell order | +**amount** | **str** | Trade amount | +**participation_rate** | **int** | Target participation rate as a percentage. Valid values: 5, 10, 20, and 40 | +**ttl** | **str** | Time to live. Valid values: 1h, 6h, 12h, 1d, 2d, 3d, 4d, 5d, 6d, and 7d | +**limit_price** | **str** | Limit price. If omitted, the market price is used | [optional] +**trigger_price** | **str** | Trigger price. If omitted, the order is triggered immediately | [optional] +**text** | **str** | Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StockApi.md b/docs/StockApi.md new file mode 100644 index 00000000..d83d1c8e --- /dev/null +++ b/docs/StockApi.md @@ -0,0 +1,1131 @@ +# gate_api.StockApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**query_stock_user_assets**](StockApi.md#query_stock_user_assets) | **GET** /stock/users/assets | Query user assets +[**query_stock_symbols**](StockApi.md#query_stock_symbols) | **GET** /stock/symbols | Query symbol list +[**query_stock_symbol_detail**](StockApi.md#query_stock_symbol_detail) | **GET** /stock/symbols/detail | Query symbol details +[**query_stock_order_book**](StockApi.md#query_stock_order_book) | **GET** /stock/market/{symbol}/orderbook | Query market order book +[**query_stock_order_list**](StockApi.md#query_stock_order_list) | **GET** /stock/orders | Query open order list +[**create_stock_order**](StockApi.md#create_stock_order) | **POST** /stock/orders | Create order +[**delete_all_stock_orders**](StockApi.md#delete_all_stock_orders) | **DELETE** /stock/orders | Cancel all open orders +[**query_stock_order_history**](StockApi.md#query_stock_order_history) | **GET** /stock/orders/history | Query historical order list +[**update_stock_order**](StockApi.md#update_stock_order) | **PUT** /stock/orders/{order_id} | Modify order +[**delete_stock_order**](StockApi.md#delete_stock_order) | **DELETE** /stock/orders/{order_id} | Cancel order +[**query_stock_positions**](StockApi.md#query_stock_positions) | **GET** /stock/positions | Query current position list +[**close_stock_position**](StockApi.md#close_stock_position) | **POST** /stock/positions/close | Close position +[**query_stock_transactions**](StockApi.md#query_stock_transactions) | **GET** /stock/transactions | Query transaction records +[**create_stock_transaction**](StockApi.md#create_stock_transaction) | **POST** /stock/transactions | Fund transfer +[**query_stock_exchanges**](StockApi.md#query_stock_exchanges) | **GET** /stock/exchanges | Query supported exchanges +[**query_stock_fee_rate**](StockApi.md#query_stock_fee_rate) | **GET** /stock/fee-rate | Query fee rates for Japanese and Korean stocks + + +# **query_stock_user_assets** +> UserAssetResp2 query_stock_user_assets(pnl_calc_type=pnl_calc_type, pnl_calc_price=pnl_calc_price) + +Query user assets + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +pnl_calc_type = 1 # int | PnL calculation cost type. Defaults to average cost price when omitted (1 = average cost price, 2 = diluted cost price) (optional) +pnl_calc_price = 1 # int | PnL calculation price type. Defaults to intraday price when omitted (1 = intraday price, 2 = latest extended-hours price) (optional) + +try: + # Query user assets + api_response = api_instance.query_stock_user_assets(pnl_calc_type=pnl_calc_type, pnl_calc_price=pnl_calc_price) + 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 StockApi->query_stock_user_assets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pnl_calc_type** | **int**| PnL calculation cost type. Defaults to average cost price when omitted (1 = average cost price, 2 = diluted cost price) | [optional] + **pnl_calc_price** | **int**| PnL calculation price type. Defaults to intraday price when omitted (1 = intraday price, 2 = latest extended-hours price) | [optional] + +### Return type + +[**UserAssetResp2**](UserAssetResp2.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_stock_symbols** +> Symbols2 query_stock_symbols(symbols=symbols, exchange=exchange, with_desc_i18n=with_desc_i18n, page=page, page_size=page_size) + +Query symbol list + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +symbols = 'AAPL,TSLA' # str | Symbol list, multiple separated by commas (optional) +exchange = 'us' # str | Exchange, supports us, hk, and kr (optional) +with_desc_i18n = true # bool | Whether to return multilingual symbol description (optional) +page = 1 # int | Page number, defaults to 1 (optional) +page_size = 100 # int | Page size, defaults to 10, max 500; server caps at 500 (optional) + +try: + # Query symbol list + api_response = api_instance.query_stock_symbols(symbols=symbols, exchange=exchange, with_desc_i18n=with_desc_i18n, 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 StockApi->query_stock_symbols: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbols** | **str**| Symbol list, multiple separated by commas | [optional] + **exchange** | **str**| Exchange, supports us, hk, and kr | [optional] + **with_desc_i18n** | **bool**| Whether to return multilingual symbol description | [optional] + **page** | **int**| Page number, defaults to 1 | [optional] + **page_size** | **int**| Page size, defaults to 10, max 500; server caps at 500 | [optional] + +### Return type + +[**Symbols2**](Symbols2.md) + +### Authorization + +No authorization required + +### 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_stock_symbol_detail** +> SymbolDetail query_stock_symbol_detail(symbols=symbols, exchange=exchange, page=page, page_size=page_size) + +Query symbol details + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +symbols = 'AAPL,TSLA' # str | Symbol list, multiple separated by commas (optional) +exchange = 'us' # str | Exchange, supports us, hk, and kr (optional) +page = 1 # int | Page number, defaults to 1 (optional) +page_size = 100 # int | Page size, defaults to 10, max 500; server caps at 500 (optional) + +try: + # Query symbol details + api_response = api_instance.query_stock_symbol_detail(symbols=symbols, exchange=exchange, 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 StockApi->query_stock_symbol_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbols** | **str**| Symbol list, multiple separated by commas | [optional] + **exchange** | **str**| Exchange, supports us, hk, and kr | [optional] + **page** | **int**| Page number, defaults to 1 | [optional] + **page_size** | **int**| Page size, defaults to 10, max 500; server caps at 500 | [optional] + +### Return type + +[**SymbolDetail**](SymbolDetail.md) + +### Authorization + +No authorization required + +### 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_stock_order_book** +> OrderBook2 query_stock_order_book(symbol) + +Query market order book + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +symbol = 'AAPL' # str | Symbol + +try: + # Query market order book + api_response = api_instance.query_stock_order_book(symbol) + 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 StockApi->query_stock_order_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Symbol | + +### Return type + +[**OrderBook2**](OrderBook2.md) + +### Authorization + +No authorization required + +### 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_stock_order_list** +> OrderList2 query_stock_order_list(symbol=symbol) + +Query open order list + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +symbol = 'AAPL' # str | Symbol (optional) + +try: + # Query open order list + api_response = api_instance.query_stock_order_list(symbol=symbol) + 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 StockApi->query_stock_order_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Symbol | [optional] + +### Return type + +[**OrderList2**](OrderList2.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) + +# **create_stock_order** +> CreateOrder2 create_stock_order(trad_fi_spot_order_request) + +Create order + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +trad_fi_spot_order_request = gate_api.TradFiSpotOrderRequest() # TradFiSpotOrderRequest | + +try: + # Create order + api_response = api_instance.create_stock_order(trad_fi_spot_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 StockApi->create_stock_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trad_fi_spot_order_request** | [**TradFiSpotOrderRequest**](TradFiSpotOrderRequest.md)| | + +### Return type + +[**CreateOrder2**](CreateOrder2.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order placed successfully | - | +**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) + +# **delete_all_stock_orders** +> DeleteOrder delete_all_stock_orders() + +Cancel all open orders + +Rate limit: 5 qps. + +### 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.StockApi(api_client) + +try: + # Cancel all open orders + api_response = api_instance.delete_all_stock_orders() + 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 StockApi->delete_all_stock_orders: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DeleteOrder**](DeleteOrder.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_stock_order_history** +> OrderHistoryList2 query_stock_order_history(symbol=symbol, order_ids=order_ids, begin_time=begin_time, end_time=end_time, side=side, page=page, page_size=page_size) + +Query historical order list + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +symbol = 'AAPL' # str | Symbol (optional) +order_ids = '123456,123457' # str | Order ID list, multiple separated by commas; max 20, each must be a positive integer (optional) +begin_time = 1769378400 # int | Start time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. (optional) +end_time = 1769464800 # int | End time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. (optional) +side = 2 # int | Side (1=sell, 2=buy) (optional) +page = 1 # int | Page number, defaults to 1 (optional) +page_size = 100 # int | Page size, defaults to 10, max 500; server caps at 500 (optional) + +try: + # Query historical order list + api_response = api_instance.query_stock_order_history(symbol=symbol, order_ids=order_ids, begin_time=begin_time, end_time=end_time, side=side, 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 StockApi->query_stock_order_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Symbol | [optional] + **order_ids** | **str**| Order ID list, multiple separated by commas; max 20, each must be a positive integer | [optional] + **begin_time** | **int**| Start time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. | [optional] + **end_time** | **int**| End time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. | [optional] + **side** | **int**| Side (1=sell, 2=buy) | [optional] + **page** | **int**| Page number, defaults to 1 | [optional] + **page_size** | **int**| Page size, defaults to 10, max 500; server caps at 500 | [optional] + +### Return type + +[**OrderHistoryList2**](OrderHistoryList2.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) + +# **update_stock_order** +> UpdateOrder2 update_stock_order(order_id, trad_fi_spot_order_update_request) + +Modify order + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +order_id = 123456 # int | Order ID +trad_fi_spot_order_update_request = gate_api.TradFiSpotOrderUpdateRequest() # TradFiSpotOrderUpdateRequest | + +try: + # Modify order + api_response = api_instance.update_stock_order(order_id, trad_fi_spot_order_update_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 StockApi->update_stock_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| Order ID | + **trad_fi_spot_order_update_request** | [**TradFiSpotOrderUpdateRequest**](TradFiSpotOrderUpdateRequest.md)| | + +### Return type + +[**UpdateOrder2**](UpdateOrder2.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request 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) + +# **delete_stock_order** +> DeleteOrder delete_stock_order(order_id) + +Cancel order + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +order_id = 123456 # int | Order ID + +try: + # Cancel order + api_response = api_instance.delete_stock_order(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 StockApi->delete_stock_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| Order ID | + +### Return type + +[**DeleteOrder**](DeleteOrder.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_stock_positions** +> PositionList2 query_stock_positions(pnl_calc_type=pnl_calc_type, pnl_calc_price=pnl_calc_price, symbol=symbol, exchange=exchange) + +Query current position list + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +pnl_calc_type = 1 # int | PnL calculation cost type. Defaults to average cost price when omitted (1 = average cost price, 2 = diluted cost price) (optional) +pnl_calc_price = 1 # int | PnL calculation price type. Defaults to intraday price when omitted (1 = intraday price, 2 = latest extended-hours price) (optional) +symbol = 'AAPL' # str | Symbol (optional) +exchange = 'us' # str | Exchange, supports us, hk, and kr (optional) + +try: + # Query current position list + api_response = api_instance.query_stock_positions(pnl_calc_type=pnl_calc_type, pnl_calc_price=pnl_calc_price, symbol=symbol, exchange=exchange) + 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 StockApi->query_stock_positions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pnl_calc_type** | **int**| PnL calculation cost type. Defaults to average cost price when omitted (1 = average cost price, 2 = diluted cost price) | [optional] + **pnl_calc_price** | **int**| PnL calculation price type. Defaults to intraday price when omitted (1 = intraday price, 2 = latest extended-hours price) | [optional] + **symbol** | **str**| Symbol | [optional] + **exchange** | **str**| Exchange, supports us, hk, and kr | [optional] + +### Return type + +[**PositionList2**](PositionList2.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) + +# **close_stock_position** +> ClosePosition close_stock_position(trad_fi_spot_close_position_request) + +Close position + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +trad_fi_spot_close_position_request = gate_api.TradFiSpotClosePositionRequest() # TradFiSpotClosePositionRequest | + +try: + # Close position + api_response = api_instance.close_stock_position(trad_fi_spot_close_position_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 StockApi->close_stock_position: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trad_fi_spot_close_position_request** | [**TradFiSpotClosePositionRequest**](TradFiSpotClosePositionRequest.md)| | + +### Return type + +[**ClosePosition**](ClosePosition.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request 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_stock_transactions** +> TransactionList2 query_stock_transactions(begin_time=begin_time, end_time=end_time, ref_id=ref_id, type=type, page=page, page_size=page_size) + +Query transaction records + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +begin_time = 1769378400 # int | Start time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. (optional) +end_time = 1769464800 # int | End time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. (optional) +ref_id = 'transfer-202607070001' # str | Business idempotent ID. When ref_id is provided, the server queries by ref_id, ignoring other parameters such as begin_time, end_time, type, page, page_size (optional) +type = 'deposit' # str | Transaction type (optional) +page = 1 # int | Page number, defaults to 1 (optional) +page_size = 100 # int | Page size, defaults to 10, max 500; server caps at 500 (optional) + +try: + # Query transaction records + api_response = api_instance.query_stock_transactions(begin_time=begin_time, end_time=end_time, ref_id=ref_id, type=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 StockApi->query_stock_transactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **begin_time** | **int**| Start time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. | [optional] + **end_time** | **int**| End time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. | [optional] + **ref_id** | **str**| Business idempotent ID. When ref_id is provided, the server queries by ref_id, ignoring other parameters such as begin_time, end_time, type, page, page_size | [optional] + **type** | **str**| Transaction type | [optional] + **page** | **int**| Page number, defaults to 1 | [optional] + **page_size** | **int**| Page size, defaults to 10, max 500; server caps at 500 | [optional] + +### Return type + +[**TransactionList2**](TransactionList2.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) + +# **create_stock_transaction** +> CreateTransaction2 create_stock_transaction(trad_fi_spot_transaction_request) + +Fund transfer + +Rate limit: 5 qps. + +### 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.StockApi(api_client) +trad_fi_spot_transaction_request = gate_api.TradFiSpotTransactionRequest() # TradFiSpotTransactionRequest | + +try: + # Fund transfer + api_response = api_instance.create_stock_transaction(trad_fi_spot_transaction_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 StockApi->create_stock_transaction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trad_fi_spot_transaction_request** | [**TradFiSpotTransactionRequest**](TradFiSpotTransactionRequest.md)| | + +### Return type + +[**CreateTransaction2**](CreateTransaction2.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request 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_stock_exchanges** +> Exchanges query_stock_exchanges() + +Query supported exchanges + +### 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.StockApi(api_client) + +try: + # Query supported exchanges + api_response = api_instance.query_stock_exchanges() + 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 StockApi->query_stock_exchanges: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Exchanges**](Exchanges.md) + +### Authorization + +No authorization required + +### 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_stock_fee_rate** +> FeeRate query_stock_fee_rate() + +Query fee rates for Japanese and Korean stocks + +Query fee rates for Japanese and Korean stocks. Rate limit: 5 qps. + +### 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.StockApi(api_client) + +try: + # Query fee rates for Japanese and Korean stocks + api_response = api_instance.query_stock_fee_rate() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling StockApi->query_stock_fee_rate: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FeeRate**](FeeRate.md) + +### Authorization + +No authorization required + +### 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) + diff --git a/docs/SubCrossMarginAccount.md b/docs/SubCrossMarginAccount.md index b3ab2241..8cfdead7 100644 --- a/docs/SubCrossMarginAccount.md +++ b/docs/SubCrossMarginAccount.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] **borrowed_net** | **str** | Total borrowed value in USDT * leverage factor | [optional] **net** | **str** | Total net assets in USDT | [optional] -**leverage** | **str** | Position leverage | [optional] +**leverage** | **str** | Leverage multiplier | [optional] **interest** | **str** | Total unpaid interest in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] **risk** | **str** | Risk rate. When it falls below 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] **total_initial_margin** | **str** | Total initial margin | [optional] diff --git a/docs/SwapCoinStruct.md b/docs/SwapCoinStruct.md index 15735e16..9b3296f9 100644 --- a/docs/SwapCoinStruct.md +++ b/docs/SwapCoinStruct.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **amount** | **str** | Amount | [optional] **exchange_rate** | **str** | Exchange ratio | [optional] **exchange_amount** | **str** | Redemption Amount | [optional] -**update_stamp** | **int** | UpdateTimestamp | [optional] +**update_stamp** | **int** | Update timestamp | [optional] **create_stamp** | **int** | Transaction timestamp | [optional] **status** | **int** | status 1-success | [optional] **protocol_type** | **int** | DEFI Protocol Type | [optional] diff --git a/docs/Symbol.md b/docs/Symbol.md index 9041524c..2cd7343f 100644 --- a/docs/Symbol.md +++ b/docs/Symbol.md @@ -4,19 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **symbol** | **str** | Unique trading pair identifier in the form ExchangeType_BusinessType_Base_Counter. | -**exchange_type** | **str** | Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). | +**exchange_type** | **str** | Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). | **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_size** | **str** | Minimum order quantity | **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 | +**contract_size** | **str** | Contract multiplier (deprecated; quantity is used uniformly) | **liquidation_fee** | **str** | Liquidation Fee Rate | **delist_time** | **str** | Millisecond timestamp; `0` means not delisted. | +**support_rpi** | **str** | Whether RPI order placement is supported (true if supported; false otherwise) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SymbolCommissions.md b/docs/SymbolCommissions.md new file mode 100644 index 00000000..58b742af --- /dev/null +++ b/docs/SymbolCommissions.md @@ -0,0 +1,11 @@ +# SymbolCommissions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Server timestamp (milliseconds) | [optional] +**data** | [**SymbolCommissionsData**](SymbolCommissionsData.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/HodlerAirdropV4ErrorResponse.md b/docs/SymbolCommissionsData.md similarity index 62% rename from docs/HodlerAirdropV4ErrorResponse.md rename to docs/SymbolCommissionsData.md index 0802d15e..bdd5b51f 100644 --- a/docs/HodlerAirdropV4ErrorResponse.md +++ b/docs/SymbolCommissionsData.md @@ -1,11 +1,10 @@ -# HodlerAirdropV4ErrorResponse +# SymbolCommissionsData -v4 interface unified error response +Response data ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**label** | **str** | Error label | -**message** | **str** | Error messages (multilingual) | +**list** | [**list[SymbolCommissionsDataList]**](SymbolCommissionsDataList.md) | List of symbol commission rates | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SymbolCommissionsDataList.md b/docs/SymbolCommissionsDataList.md new file mode 100644 index 00000000..4e2f1367 --- /dev/null +++ b/docs/SymbolCommissionsDataList.md @@ -0,0 +1,13 @@ +# SymbolCommissionsDataList + +Symbol commission rate +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category_code** | **str** | Category code | [optional] +**symbol** | **str** | Trading symbol code | [optional] +**fee_per_lot** | **str** | Commission rate per lot | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SymbolDetail.md b/docs/SymbolDetail.md new file mode 100644 index 00000000..626bf7d4 --- /dev/null +++ b/docs/SymbolDetail.md @@ -0,0 +1,11 @@ +# SymbolDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SymbolDetailData**](SymbolDetailData.md) | | [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/TransactionConfig.md b/docs/SymbolDetailData.md similarity index 64% rename from docs/TransactionConfig.md rename to docs/SymbolDetailData.md index 6201e315..cfbf4355 100644 --- a/docs/TransactionConfig.md +++ b/docs/SymbolDetailData.md @@ -1,10 +1,11 @@ -# TransactionConfig +# SymbolDetailData ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction_amount** | **float** | Trading amount requirement | [optional] -**mortgage_limit** | **float** | Pledge limit | [optional] +**total** | **int** | | [optional] +**total_page** | **int** | | [optional] +**list** | [**list[SymbolDetailItem]**](SymbolDetailItem.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/SymbolDetailItem.md b/docs/SymbolDetailItem.md new file mode 100644 index 00000000..24216502 --- /dev/null +++ b/docs/SymbolDetailItem.md @@ -0,0 +1,35 @@ +# SymbolDetailItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | [optional] +**exchange** | **str** | Exchange, supports us, hk, and kr | [optional] +**exchange_desc** | **str** | | [optional] +**quote_currency** | **str** | | [optional] +**quote_currency_precision** | **int** | | [optional] +**fx_rate** | **str** | Quote currency to USD exchange rate | [optional] +**symbol_desc** | **str** | | [optional] +**category** | **str** | | [optional] +**settlement_currency** | **str** | | [optional] +**max_order_volume** | **str** | | [optional] +**step_order_volume** | **str** | | [optional] +**min_order_volume** | **str** | | [optional] +**price_precision** | **int** | Price precision | [optional] +**volume_precision** | **int** | | [optional] +**is_ipo** | **bool** | | [optional] +**ipo_price** | **str** | | [optional] +**price_protection** | **str** | | [optional] +**sell_price_protection** | **str** | | [optional] +**buy_price_protection** | **str** | | [optional] +**slippage_rate** | **str** | | [optional] +**commission_rate** | **str** | Fee Rate | [optional] +**trade_status** | **str** | Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. | [optional] +**trade_mode** | **int** | Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. | [optional] +**order_fill_timing** | **int** | Order fill timing (1=immediate, 2=after pre-market opens, 3=after regular session opens) | [optional] +**symbol_descs** | [**list[SymbolDetailItemSymbolDescs]**](SymbolDetailItemSymbolDescs.md) | | [optional] +**icon_link** | **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/SymbolDetailItemSymbolDescs.md b/docs/SymbolDetailItemSymbolDescs.md new file mode 100644 index 00000000..9df04daf --- /dev/null +++ b/docs/SymbolDetailItemSymbolDescs.md @@ -0,0 +1,11 @@ +# SymbolDetailItemSymbolDescs + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lang** | **str** | | [optional] +**value** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SymbolListItem.md b/docs/SymbolListItem.md new file mode 100644 index 00000000..92453ad5 --- /dev/null +++ b/docs/SymbolListItem.md @@ -0,0 +1,29 @@ +# SymbolListItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Symbol | [optional] +**exchange** | **str** | Exchange, supports us, hk, and kr | [optional] +**exchange_desc** | **str** | Exchange description | [optional] +**quote_currency** | **str** | Quote currency | [optional] +**quote_currency_precision** | **int** | Quote currency precision | [optional] +**fx_rate** | **str** | Quote currency to USD exchange rate | [optional] +**symbol_desc** | **str** | Symbol description | [optional] +**category** | **str** | Category | [optional] +**trade_status** | **str** | Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. | [optional] +**trade_mode** | **int** | Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. | [optional] +**order_fill_timing** | **int** | Order fill timing (1=immediate, 2=after pre-market opens, 3=after regular session opens) | [optional] +**icon_link** | **str** | Icon URL | [optional] +**quote_currency_symbol** | **str** | Quote currency symbol | [optional] +**price_precision** | **int** | Price precision | [optional] +**volume_precision** | **int** | Quantity precision | [optional] +**is_ipo** | **bool** | Whether it is an IPO symbol | [optional] +**ipo_price** | **str** | IPO price | [optional] +**sell_price_protection** | **str** | Sell price protection rate | [optional] +**buy_price_protection** | **str** | Buy price protection rate | [optional] +**symbol_descs** | [**list[I18nTxt]**](I18nTxt.md) | Multilingual symbol description | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Symbols2.md b/docs/Symbols2.md new file mode 100644 index 00000000..9c701a97 --- /dev/null +++ b/docs/Symbols2.md @@ -0,0 +1,11 @@ +# Symbols2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Symbols2Data**](Symbols2Data.md) | | [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/Symbols2Data.md b/docs/Symbols2Data.md new file mode 100644 index 00000000..7096f643 --- /dev/null +++ b/docs/Symbols2Data.md @@ -0,0 +1,12 @@ +# Symbols2Data + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total quantity | [optional] +**total_page** | **int** | Total pages | [optional] +**list** | [**list[SymbolListItem]**](SymbolListItem.md) | Symbol 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/Tokens.md b/docs/Tokens.md index f1d8581c..8abd3247 100644 --- a/docs/Tokens.md +++ b/docs/Tokens.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **name** | **str** | Currency name | [optional] **chain** | **str** | The main chain corresponding to the coin | [optional] **address** | **str** | Contract Address | [optional] -**amount_precision** | **int** | Amount scale | [optional] -**precision** | **int** | Price scale | [optional] +**amount_precision** | **int** | Quantity precision | [optional] +**precision** | **int** | Price precision | [optional] **status** | **int** | Currency Trading Status - `1` : Normal trading - `2` : Suspended trading - `3` : Delisted | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TradFiOrderRequest.md b/docs/TradFiOrderRequest.md index c1f194c2..cce19c0e 100644 --- a/docs/TradFiOrderRequest.md +++ b/docs/TradFiOrderRequest.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **price** | **str** | Order price | **price_type** | **str** | Price type (trigger=trigger price, market=market price) | -**side** | **int** | Order side (1=sell, 2=buy) | +**side** | **int** | Side (1=sell, 2=buy) | **symbol** | **str** | Trading symbol code | -**volume** | **str** | Order volume | +**volume** | **str** | Order quantity | **price_tp** | **str** | Take profit price (optional) | [optional] **price_sl** | **str** | Stop loss price (optional) | [optional] diff --git a/docs/TradFiSpotClosePositionRequest.md b/docs/TradFiSpotClosePositionRequest.md new file mode 100644 index 00000000..360bedf2 --- /dev/null +++ b/docs/TradFiSpotClosePositionRequest.md @@ -0,0 +1,13 @@ +# TradFiSpotClosePositionRequest + +Close position request parameters +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Symbol | +**close_volume** | **str** | Close quantity; required for partial close | [optional] +**close_type** | **int** | Close type (1=partial close, 2=close all) | + +[[Back to Model list]](../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/TradFiSpotError.md similarity index 50% rename from docs/CandyDropV4TaskProgressItemCd04.md rename to docs/TradFiSpotError.md index 6751280a..ca8d7019 100644 --- a/docs/CandyDropV4TaskProgressItemCd04.md +++ b/docs/TradFiSpotError.md @@ -1,11 +1,12 @@ -# CandyDropV4TaskProgressItemCd04 +# TradFiSpotError ## 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] +**label** | **str** | Business error label | [optional] +**message** | **str** | Error message | [optional] +**data** | [**object**](.md) | Error additional data | [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/TradFiSpotOrderRequest.md b/docs/TradFiSpotOrderRequest.md new file mode 100644 index 00000000..1dbc9c6d --- /dev/null +++ b/docs/TradFiSpotOrderRequest.md @@ -0,0 +1,18 @@ +# TradFiSpotOrderRequest + +Place order request parameters +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**volume** | **str** | Order quantity | +**symbol** | **str** | Symbol | +**side** | **int** | Side (1=sell, 2=buy) | +**price_type** | **str** | Price type (market = market order, limit = limit order) | +**trading_session** | **str** | Trading session. Limit orders support only All, while market orders support only Regular. | +**time_in_force** | **str** | Time in force. - day: Day order. | +**price** | **str** | Order price, used for limit orders | [optional] +**client_order_id** | **str** | Client-defined 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/TradFiSpotOrderUpdateRequest.md b/docs/TradFiSpotOrderUpdateRequest.md new file mode 100644 index 00000000..3c82e379 --- /dev/null +++ b/docs/TradFiSpotOrderUpdateRequest.md @@ -0,0 +1,12 @@ +# TradFiSpotOrderUpdateRequest + +Modify order request parameters +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**volume** | **str** | Modified order quantity | +**price** | **str** | Modified order price | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TradFiSpotTransactionRequest.md b/docs/TradFiSpotTransactionRequest.md new file mode 100644 index 00000000..d56cf6bf --- /dev/null +++ b/docs/TradFiSpotTransactionRequest.md @@ -0,0 +1,14 @@ +# TradFiSpotTransactionRequest + +Transfer request parameters +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | Asset, USDT only | +**change** | **str** | Change amount | +**type** | **str** | Transaction type (deposit=deposit, withdraw=withdrawal) | +**ref_id** | **str** | Business idempotent 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/TradFiTickerData.md b/docs/TradFiTickerData.md index 2b8a5012..155dbfab 100644 --- a/docs/TradFiTickerData.md +++ b/docs/TradFiTickerData.md @@ -4,8 +4,8 @@ Response data ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**highest_price** | **str** | Highest price | [optional] -**lowest_price** | **str** | Lowest price | [optional] +**highest_price** | **str** | High price | [optional] +**lowest_price** | **str** | Low price | [optional] **price_change** | **str** | Price change percentage (multiplied by 100) | [optional] **price_change_amount** | **str** | Price change amount | [optional] **today_open_price** | **str** | Today's open price | [optional] diff --git a/docs/TrailOrder.md b/docs/TrailOrder.md index d84c7c0f..645ca9ad 100644 --- a/docs/TrailOrder.md +++ b/docs/TrailOrder.md @@ -42,7 +42,7 @@ Name | Type | Description | Notes **pos_margin_mode** | **str** | Position margin mode: isolated/cross | [optional] [readonly] **position_mode** | **str** | Position mode: single, dual, and dual_plus | [optional] [readonly] **error_label** | **str** | Error label | [optional] [readonly] -**leverage** | **str** | leverage | [optional] [readonly] +**leverage** | **str** | Leverage | [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/TransactionItem.md b/docs/TransactionItem.md new file mode 100644 index 00000000..31d1d75b --- /dev/null +++ b/docs/TransactionItem.md @@ -0,0 +1,20 @@ +# TransactionItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | Asset | [optional] +**symbol** | **str** | Symbol | [optional] +**symbol_display** | **str** | Symbol display name | [optional] +**type** | **str** | Transaction type. - deposit: Funds transfer in. - withdraw: Funds transfer out. - fee: Trading fee. - dividend: Dividend payout. - sell: Stock sale credit. - buy: Stock purchase debit. - award: Airdrop reward. - stock_transfer_in: Stock transfer in. - stock_transfer_out: Stock transfer out. | [optional] +**type_desc** | **str** | Transaction type description | [optional] +**change** | **str** | Change amount | [optional] +**balance** | **str** | Balance after change | [optional] +**ref_id** | **str** | Business idempotent ID | [optional] +**time** | **int** | Unix timestamp (seconds) | [optional] +**unit_text** | **str** | Unit display text | [optional] +**detail** | **dict(str, object)** | Business 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/TransactionList2.md b/docs/TransactionList2.md new file mode 100644 index 00000000..2d0f098f --- /dev/null +++ b/docs/TransactionList2.md @@ -0,0 +1,11 @@ +# TransactionList2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TransactionList2Data**](TransactionList2Data.md) | | [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/TransactionList2Data.md b/docs/TransactionList2Data.md new file mode 100644 index 00000000..af71229a --- /dev/null +++ b/docs/TransactionList2Data.md @@ -0,0 +1,12 @@ +# TransactionList2Data + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | [optional] +**total_page** | **int** | | [optional] +**list** | [**list[TransactionItem]**](TransactionItem.md) | Transaction record 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/TransactionListDataList.md b/docs/TransactionListDataList.md index 79c377e9..6d529125 100644 --- a/docs/TransactionListDataList.md +++ b/docs/TransactionListDataList.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **asset** | **str** | Asset Type | [optional] **type** | **str** | Trading Type | [optional] **type_desc** | **str** | Transaction Type Description | [optional] -**change** | **str** | Change Quantity | [optional] +**change** | **str** | Change amount | [optional] **balance** | **str** | Current Balance | [optional] **time** | **int** | Occurrence Time (Second-level Timestamp) | [optional] diff --git a/docs/UniCurrencyPair.md b/docs/UniCurrencyPair.md index 4e0d0c61..20539dbf 100644 --- a/docs/UniCurrencyPair.md +++ b/docs/UniCurrencyPair.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **currency_pair** | **str** | Currency pair | [optional] [readonly] **base_min_borrow_amount** | **str** | Minimum borrow amount of base currency | [optional] [readonly] **quote_min_borrow_amount** | **str** | Minimum borrow amount of quote currency | [optional] [readonly] -**leverage** | **str** | Position leverage | [optional] [readonly] +**leverage** | **str** | Leverage multiplier | [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/UnifiedApi.md b/docs/UnifiedApi.md index 917bea76..79e38161 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered [**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin [**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator +[**set_user_leverage**](UnifiedApi.md#set_user_leverage) | **POST** /unified/leverage/user_setting | Set leverage for all of the user's borrowed currencies [**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set [**get_user_leverage_currency_setting**](UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get user currency leverage [**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set loan currency leverage @@ -1098,6 +1099,75 @@ 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) +# **set_user_leverage** +> list[LeverageFailedCurrencies] set_user_leverage(user_leverage_setting) + +Set leverage for all of the user's borrowed currencies + +Note the following: - Leverage cannot be changed for currencies with outstanding loans. - A leverage value above a currency's limit is capped at that limit. - Failures are not rolled back and affect only the currencies that failed. For example, if USDT has an outstanding loan, only the USDT leverage remains unchanged. + +### 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) +user_leverage_setting = gate_api.UserLeverageSetting() # UserLeverageSetting | + +try: + # Set leverage for all of the user's borrowed currencies + api_response = api_instance.set_user_leverage(user_leverage_setting) + 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_user_leverage: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_leverage_setting** | [**UserLeverageSetting**](UserLeverageSetting.md)| | + +### Return type + +[**list[LeverageFailedCurrencies]**](LeverageFailedCurrencies.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_user_leverage_currency_config** > UnifiedLeverageConfig get_user_leverage_currency_config(currency) diff --git a/docs/UnifiedDiscountTiers.md b/docs/UnifiedDiscountTiers.md index ba78cc73..740dbffe 100644 --- a/docs/UnifiedDiscountTiers.md +++ b/docs/UnifiedDiscountTiers.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **discount** | **str** | Discount | [optional] **lower_limit** | **str** | Lower limit | [optional] **upper_limit** | **str** | Upper limit, + indicates positive infinity | [optional] -**leverage** | **str** | Position leverage | [optional] +**leverage** | **str** | Leverage multiplier | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateOrder2.md b/docs/UpdateOrder2.md new file mode 100644 index 00000000..a6316f62 --- /dev/null +++ b/docs/UpdateOrder2.md @@ -0,0 +1,11 @@ +# UpdateOrder2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**UpdateOrder2Data**](UpdateOrder2Data.md) | | [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/LaunchPoolV4CreateOrderResponse.md b/docs/UpdateOrder2Data.md similarity index 79% rename from docs/LaunchPoolV4CreateOrderResponse.md rename to docs/UpdateOrder2Data.md index 3b00b290..5643cd26 100644 --- a/docs/LaunchPoolV4CreateOrderResponse.md +++ b/docs/UpdateOrder2Data.md @@ -1,9 +1,9 @@ -# LaunchPoolV4CreateOrderResponse +# UpdateOrder2Data ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**flow_id** | **int** | Order ID | +**order_id** | **int** | Order ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateOrderData.md b/docs/UpdateOrderData.md index 684fd21f..e296f02e 100644 --- a/docs/UpdateOrderData.md +++ b/docs/UpdateOrderData.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **order_id** | **int** | Order ID | [optional] **symbol** | **str** | Currency pair | [optional] **state** | **str** | Order status code | [optional] -**volume** | **str** | Order volume | [optional] +**volume** | **str** | Order quantity | [optional] **price** | **str** | Current price | [optional] **price_tp** | **str** | Current take profit price | [optional] **price_sl** | **str** | Current stop loss price | [optional] diff --git a/docs/UserAssetResp2.md b/docs/UserAssetResp2.md new file mode 100644 index 00000000..7e5970d0 --- /dev/null +++ b/docs/UserAssetResp2.md @@ -0,0 +1,11 @@ +# UserAssetResp2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**UserAssetResp2Data**](UserAssetResp2Data.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/UserAssetResp2Data.md b/docs/UserAssetResp2Data.md new file mode 100644 index 00000000..f7bfc365 --- /dev/null +++ b/docs/UserAssetResp2Data.md @@ -0,0 +1,16 @@ +# UserAssetResp2Data + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**equity** | **str** | Account equity | [optional] +**balance** | **str** | Account Balance | [optional] +**available** | **str** | Available Balance | [optional] +**position_market_value** | **str** | Position market value | [optional] +**position_pnl** | **str** | Position P&L | [optional] +**today_pnl** | **str** | Today's P&L | [optional] +**user_exists** | **bool** | Whether the user has activated the service | [optional] + +[[Back to Model list]](../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/UserLeverageSetting.md similarity index 61% rename from docs/CreateOrderV4.md rename to docs/UserLeverageSetting.md index 01a7da66..59870ffb 100644 --- a/docs/CreateOrderV4.md +++ b/docs/UserLeverageSetting.md @@ -1,11 +1,10 @@ -# CreateOrderV4 +# UserLeverageSetting +User leverage settings ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pid** | **int** | Product ID | -**rid** | **int** | Reward pool ID | -**amount** | **str** | Pledge amount (string format to preserve precision) | +**leverage** | **str** | Leverage. Values exceeding a currency's leverage limit are capped at that 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/WalletApi.md b/docs/WalletApi.md index 115d4ee4..50862c01 100644 --- a/docs/WalletApi.md +++ b/docs/WalletApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address [**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Get withdrawal records [**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Get deposit records +[**get_transfer**](WalletApi.md#get_transfer) | **GET** /wallet/transfers | Get trading account transfer [**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts [**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Get transfer records between main and sub accounts [**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts @@ -315,6 +316,75 @@ 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_transfer** +> AccountTransferDetail get_transfer(tx_id) + +Get trading account transfer + +Get the current user's trading account transfer details using the tx_id returned by the transfer endpoint + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +tx_id = '59636381286' # str | Transfer transaction ID + +try: + # Get trading account transfer + api_response = api_instance.get_transfer(tx_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->get_transfer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tx_id** | **str**| Transfer transaction ID | + +### Return type + +[**AccountTransferDetail**](AccountTransferDetail.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** | Trading account transfer retrieved successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **transfer** > TransactionID transfer(transfer) diff --git a/example/p2p_merchant_api.py b/example/p2p_merchant_api.py index a9bf4344..3a29fe86 100644 --- a/example/p2p_merchant_api.py +++ b/example/p2p_merchant_api.py @@ -95,11 +95,13 @@ def p2p_merchant_demo(run_config): # type="0", # unit_price="7.20", # number="1000", - # min_amount="100", - # max_amount="1000", + # limit_basis=1, + # fiat_min_amount="100", + # fiat_max_amount="1000", # pay_type="bank", # pay_type_json='{"bank":"10001"}', # rate_fixed="1", + # polymarket_limit=0, # expire_min="20", # trade_tips="Please pay from an account under your own name.", # auto_reply="Please tap Paid after completing the transfer.", diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 218cb7ba..6c34fe73 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,16 +14,17 @@ from __future__ import absolute_import -__version__ = "7.2.100" +__version__ = "7.2.123" # import apis into sdk package from gate_api.api.activity_api import ActivityApi +from gate_api.api.cfd_api import CFDApi 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 from gate_api.api.otc_api import OTCApi +from gate_api.api.stock_api import StockApi from gate_api.api.sub_account_api import SubAccountApi -from gate_api.api.trad_fi_api import TradFiApi from gate_api.api.unified_api import UnifiedApi from gate_api.api.account_api import AccountApi from gate_api.api.alpha_api import AlphaApi @@ -34,7 +35,6 @@ 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 @@ -78,6 +78,7 @@ from gate_api.models.account_key_info import AccountKeyInfo from gate_api.models.account_key_info_perms import AccountKeyInfoPerms from gate_api.models.account_rate_limit import AccountRateLimit +from gate_api.models.account_transfer_detail import AccountTransferDetail from gate_api.models.accounts_response import AccountsResponse from gate_api.models.ads_detail_request import AdsDetailRequest from gate_api.models.ads_list_request import AdsListRequest @@ -141,23 +142,14 @@ 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.close_position import ClosePosition +from gate_api.models.close_position_data import ClosePositionData 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 @@ -191,12 +183,12 @@ 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_transaction2 import CreateTransaction2 from gate_api.models.create_uni_lend import CreateUniLend from gate_api.models.create_uni_loan import CreateUniLoan from gate_api.models.create_user_resp import CreateUserResp @@ -210,6 +202,8 @@ 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_batch_cancel_order_request import CrossexBatchCancelOrderRequest +from gate_api.models.crossex_batch_cancel_order_response import CrossexBatchCancelOrderResponse 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 @@ -219,9 +213,13 @@ 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_isolated_margin_request import CrossexIsolatedMarginRequest +from gate_api.models.crossex_isolated_margin_response import CrossexIsolatedMarginResponse 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_mode_request import CrossexMarginModeRequest +from gate_api.models.crossex_margin_mode_response import CrossexMarginModeResponse 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 @@ -241,6 +239,7 @@ from gate_api.models.currency_pair import CurrencyPair from gate_api.models.currency_quota import CurrencyQuota from gate_api.models.debit_fee import DebitFee +from gate_api.models.delete_order import DeleteOrder from gate_api.models.delete_position import DeletePosition from gate_api.models.delivery_account import DeliveryAccount from gate_api.models.delivery_account_book import DeliveryAccountBook @@ -279,6 +278,12 @@ 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.exchanges import Exchanges +from gate_api.models.exchanges_data import ExchangesData +from gate_api.models.exchanges_data_list import ExchangesDataList +from gate_api.models.fee_rate import FeeRate +from gate_api.models.fee_rate_data import FeeRateData +from gate_api.models.fee_rate_data_list import FeeRateDataList 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 @@ -362,28 +367,20 @@ 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.i18n_txt import I18nTxt from gate_api.models.index_constituent import IndexConstituent 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_response2002 import InlineResponse2002 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.leverage_failed_currencies import LeverageFailedCurrencies 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 @@ -470,15 +467,25 @@ from gate_api.models.options_underlying_ticker import OptionsUnderlyingTicker from gate_api.models.order import Order from gate_api.models.order_book import OrderBook +from gate_api.models.order_book2 import OrderBook2 +from gate_api.models.order_book2_data import OrderBook2Data +from gate_api.models.order_book_price import OrderBookPrice 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_list2 import OrderHistoryList2 +from gate_api.models.order_history_list2_data import OrderHistoryList2Data from gate_api.models.order_history_list_data import OrderHistoryListData from gate_api.models.order_history_list_data_list import OrderHistoryListDataList +from gate_api.models.order_history_list_item import OrderHistoryListItem +from gate_api.models.order_history_list_item_status_detail import OrderHistoryListItemStatusDetail from gate_api.models.order_list import OrderList +from gate_api.models.order_list2 import OrderList2 +from gate_api.models.order_list2_data import OrderList2Data from gate_api.models.order_list_data import OrderListData from gate_api.models.order_list_data_list import OrderListDataList +from gate_api.models.order_list_item import OrderListItem 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 @@ -524,6 +531,7 @@ 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_list_trade_method import P2pAdsListTradeMethod 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 @@ -586,8 +594,11 @@ from gate_api.models.position_history_list_data_list import PositionHistoryListDataList from gate_api.models.position_history_list_data_realized_pnl_detail import PositionHistoryListDataRealizedPnlDetail from gate_api.models.position_list import PositionList +from gate_api.models.position_list2 import PositionList2 +from gate_api.models.position_list2_data import PositionList2Data from gate_api.models.position_list_data import PositionListData from gate_api.models.position_list_data_list import PositionListDataList +from gate_api.models.position_list_item import PositionListItem 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 @@ -603,8 +614,6 @@ 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 @@ -617,7 +626,6 @@ 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 @@ -628,6 +636,8 @@ 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_pov_order import SpotPovOrder +from gate_api.models.spot_pov_order_creator import SpotPovOrderCreator 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 @@ -655,7 +665,17 @@ from gate_api.models.swap_coin import SwapCoin from gate_api.models.swap_coin_struct import SwapCoinStruct from gate_api.models.symbol import Symbol +from gate_api.models.symbol_commissions import SymbolCommissions +from gate_api.models.symbol_commissions_data import SymbolCommissionsData +from gate_api.models.symbol_commissions_data_list import SymbolCommissionsDataList +from gate_api.models.symbol_detail import SymbolDetail +from gate_api.models.symbol_detail_data import SymbolDetailData +from gate_api.models.symbol_detail_item import SymbolDetailItem +from gate_api.models.symbol_detail_item_symbol_descs import SymbolDetailItemSymbolDescs +from gate_api.models.symbol_list_item import SymbolListItem from gate_api.models.symbols import Symbols +from gate_api.models.symbols2 import Symbols2 +from gate_api.models.symbols2_data import Symbols2Data from gate_api.models.symbols_data import SymbolsData from gate_api.models.symbols_data_list import SymbolsDataList from gate_api.models.system_time import SystemTime @@ -667,6 +687,11 @@ 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_spot_close_position_request import TradFiSpotClosePositionRequest +from gate_api.models.trad_fi_spot_error import TradFiSpotError +from gate_api.models.trad_fi_spot_order_request import TradFiSpotOrderRequest +from gate_api.models.trad_fi_spot_order_update_request import TradFiSpotOrderUpdateRequest +from gate_api.models.trad_fi_spot_transaction_request import TradFiSpotTransactionRequest 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 @@ -678,9 +703,11 @@ 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_item import TransactionItem from gate_api.models.transaction_list import TransactionList +from gate_api.models.transaction_list2 import TransactionList2 +from gate_api.models.transaction_list2_data import TransactionList2Data from gate_api.models.transaction_list_data import TransactionListData from gate_api.models.transaction_list_data_list import TransactionListDataList from gate_api.models.transfer import Transfer @@ -731,12 +758,17 @@ 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_order2 import UpdateOrder2 +from gate_api.models.update_order2_data import UpdateOrder2Data from gate_api.models.update_order_data import UpdateOrderData from gate_api.models.update_position import UpdatePosition from gate_api.models.update_trail_order import UpdateTrailOrder from gate_api.models.upload_chat_file import UploadChatFile from gate_api.models.user_asset_resp import UserAssetResp +from gate_api.models.user_asset_resp2 import UserAssetResp2 +from gate_api.models.user_asset_resp2_data import UserAssetResp2Data from gate_api.models.user_asset_resp_data import UserAssetRespData +from gate_api.models.user_leverage_setting import UserLeverageSetting from gate_api.models.user_sub import UserSub from gate_api.models.user_sub_relation import UserSubRelation from gate_api.models.withdraw_status import WithdrawStatus diff --git a/gate_api/api/__init__.py b/gate_api/api/__init__.py index 62d96039..2112f429 100644 --- a/gate_api/api/__init__.py +++ b/gate_api/api/__init__.py @@ -4,12 +4,13 @@ # import apis into api package from gate_api.api.activity_api import ActivityApi +from gate_api.api.cfd_api import CFDApi 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 from gate_api.api.otc_api import OTCApi +from gate_api.api.stock_api import StockApi from gate_api.api.sub_account_api import SubAccountApi -from gate_api.api.trad_fi_api import TradFiApi from gate_api.api.unified_api import UnifiedApi from gate_api.api.account_api import AccountApi from gate_api.api.alpha_api import AlphaApi @@ -20,7 +21,6 @@ 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 diff --git a/gate_api/api/trad_fi_api.py b/gate_api/api/cfd_api.py similarity index 94% rename from gate_api/api/trad_fi_api.py rename to gate_api/api/cfd_api.py index 5c3922db..1137d91a 100644 --- a/gate_api/api/trad_fi_api.py +++ b/gate_api/api/cfd_api.py @@ -24,7 +24,7 @@ ) -class TradFiApi(object): +class CFDApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -242,6 +242,119 @@ def query_categories_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def query_symbol_commissions(self, **kwargs): # noqa: E501 + """Query symbol commission rates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.query_symbol_commissions(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: List of symbol codes (multiple codes separated by commas). At least one of symbol and category_code is required + :param str category_code: List of category codes (multiple codes separated by commas). When provided together with symbols, filters symbols by category. At least one of symbol and category_code is 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.SymbolCommissions + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.query_symbol_commissions_with_http_info(**kwargs) # noqa: E501 + + def query_symbol_commissions_with_http_info(self, **kwargs): # noqa: E501 + """Query symbol commission rates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.query_symbol_commissions_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: List of symbol codes (multiple codes separated by commas). At least one of symbol and category_code is required + :param str category_code: List of category codes (multiple codes separated by commas). When provided together with symbols, filters symbols by category. At least one of symbol and category_code is 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.SymbolCommissions, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'symbols', + 'category_code' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method query_symbol_commissions" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'symbols' in local_var_params and local_var_params['symbols'] is not None: # noqa: E501 + query_params.append(('symbols', local_var_params['symbols'])) # noqa: E501 + if 'category_code' in local_var_params and local_var_params['category_code'] is not None: # noqa: E501 + query_params.append(('category_code', local_var_params['category_code'])) # 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( + '/tradfi/symbols/commissions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SymbolCommissions', # noqa: E501 + auth_settings=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_symbols(self, **kwargs): # noqa: E501 """Query trading symbol list # noqa: E501 @@ -439,7 +552,7 @@ def query_symbol_detail_with_http_info(self, symbols, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( '/tradfi/symbols/detail', 'GET', @@ -710,7 +823,7 @@ def query_symbol_ticker_with_http_info(self, symbol, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_trad_fi_user(self, **kwargs): # noqa: E501 - """Create TradFi user # noqa: E501 + """Create CFD user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -733,7 +846,7 @@ def create_trad_fi_user(self, **kwargs): # noqa: E501 return self.create_trad_fi_user_with_http_info(**kwargs) # noqa: E501 def create_trad_fi_user_with_http_info(self, **kwargs): # noqa: E501 - """Create TradFi user # noqa: E501 + """Create CFD user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1046,7 +1159,7 @@ def query_transaction_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_transaction(self, trad_fi_transaction_request, **kwargs): # noqa: E501 - """Fund Deposit and Withdrawal # noqa: E501 + """Fund transfer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1070,7 +1183,7 @@ def create_transaction(self, trad_fi_transaction_request, **kwargs): # noqa: E5 return self.create_transaction_with_http_info(trad_fi_transaction_request, **kwargs) # noqa: E501 def create_transaction_with_http_info(self, trad_fi_transaction_request, **kwargs): # noqa: E501 - """Fund Deposit and Withdrawal # noqa: E501 + """Fund transfer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1265,7 +1378,7 @@ def query_order_list_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_trad_fi_order(self, trad_fi_order_request, **kwargs): # noqa: E501 - """Create an order # noqa: E501 + """Create order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1289,7 +1402,7 @@ def create_trad_fi_order(self, trad_fi_order_request, **kwargs): # noqa: E501 return self.create_trad_fi_order_with_http_info(trad_fi_order_request, **kwargs) # noqa: E501 def create_trad_fi_order_with_http_info(self, trad_fi_order_request, **kwargs): # noqa: E501 - """Create an order # noqa: E501 + """Create order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1629,7 +1742,7 @@ def query_order_history_list(self, **kwargs): # noqa: E501 :param int begin_time: Start time (Unix timestamp in seconds), earliest query is one month ago :param int end_time: End time (Unix timestamp in seconds) :param str symbol: Currency pair - :param int side: Order side (1=sell, 2=buy) + :param int side: Side (1=sell, 2=buy) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1656,7 +1769,7 @@ def query_order_history_list_with_http_info(self, **kwargs): # noqa: E501 :param int begin_time: Start time (Unix timestamp in seconds), earliest query is one month ago :param int end_time: End time (Unix timestamp in seconds) :param str symbol: Currency pair - :param int side: Order side (1=sell, 2=buy) + :param int side: Side (1=sell, 2=buy) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/cross_ex_api.py b/gate_api/api/cross_ex_api.py index 399747f9..a4c262c6 100644 --- a/gate_api/api/cross_ex_api.py +++ b/gate_api/api/cross_ex_api.py @@ -263,7 +263,7 @@ def list_crossex_rule_risk_limits_with_http_info(self, symbols, **kwargs): # no def list_crossex_transfer_coins(self, **kwargs): # 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 + `est_fee`: On-chain withdrawal fee. When a fund transfer involves an on-chain withdrawal, the exchange charges this fee. This value is for reference only; the actual fee charged by the exchange applies # 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_crossex_transfer_coins(async_req=True) @@ -288,7 +288,7 @@ def list_crossex_transfer_coins(self, **kwargs): # noqa: E501 def list_crossex_transfer_coins_with_http_info(self, **kwargs): # 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 + `est_fee`: On-chain withdrawal fee. When a fund transfer involves an on-chain withdrawal, the exchange charges this fee. This value is for reference only; the actual fee charged by the exchange applies # 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_crossex_transfer_coins_with_http_info(async_req=True) @@ -620,7 +620,7 @@ def create_crossex_transfer_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_crossex_order(self, **kwargs): # noqa: E501 - """Create an order # noqa: E501 + """Create order # noqa: E501 Rate Limit: 100 requests per 10 seconds, maximum 1,000 open orders per user # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -645,7 +645,7 @@ def create_crossex_order(self, **kwargs): # noqa: E501 return self.create_crossex_order_with_http_info(**kwargs) # noqa: E501 def create_crossex_order_with_http_info(self, **kwargs): # noqa: E501 - """Create an order # noqa: E501 + """Create order # noqa: E501 Rate Limit: 100 requests per 10 seconds, maximum 1,000 open orders per user # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -733,6 +733,124 @@ def create_crossex_order_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def cancel_batch_crossex_orders(self, crossex_batch_cancel_order_request, **kwargs): # noqa: E501 + """Batch cancel orders # noqa: E501 + + Cancel multiple specified orders. Either order_id or text is required; if both are provided, order_id takes precedence. Rate limit: 100 requests per 10 seconds # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_batch_crossex_orders(crossex_batch_cancel_order_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[CrossexBatchCancelOrderRequest] crossex_batch_cancel_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: list[gate_api.CrossexBatchCancelOrderResponse] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_batch_crossex_orders_with_http_info(crossex_batch_cancel_order_request, **kwargs) # noqa: E501 + + def cancel_batch_crossex_orders_with_http_info(self, crossex_batch_cancel_order_request, **kwargs): # noqa: E501 + """Batch cancel orders # noqa: E501 + + Cancel multiple specified orders. Either order_id or text is required; if both are provided, order_id takes precedence. Rate limit: 100 requests per 10 seconds # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_batch_crossex_orders_with_http_info(crossex_batch_cancel_order_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[CrossexBatchCancelOrderRequest] crossex_batch_cancel_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(list[gate_api.CrossexBatchCancelOrderResponse], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'crossex_batch_cancel_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 cancel_batch_crossex_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'crossex_batch_cancel_order_request' is set + if self.api_client.client_side_validation and ('crossex_batch_cancel_order_request' not in local_var_params or # noqa: E501 + local_var_params['crossex_batch_cancel_order_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `crossex_batch_cancel_order_request` when calling `cancel_batch_crossex_orders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'crossex_batch_cancel_order_request' in local_var_params: + body_params = local_var_params['crossex_batch_cancel_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( + '/crossex/batch_cancel_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CrossexBatchCancelOrderResponse]', # noqa: E501 + auth_settings=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_crossex_order(self, order_id, **kwargs): # noqa: E501 """Query order details # noqa: E501 @@ -1087,7 +1205,7 @@ def cancel_crossex_order_with_http_info(self, order_id, **kwargs): # noqa: E501 def create_crossex_convert_quote(self, **kwargs): # noqa: E501 """Flash Swap Inquiry # noqa: E501 - Rate Limit: 100 requests per day # noqa: E501 + Rate limit: 100 requests per day For HYPERLIQUID, swaps between `HYPERLIQUID_USDC` and `CROSSEX_USDT` are supported. Flash Swap in isolated exchange mode is not currently supported for HYPERLIQUID # 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_convert_quote(async_req=True) @@ -1112,7 +1230,7 @@ def create_crossex_convert_quote(self, **kwargs): # noqa: E501 def create_crossex_convert_quote_with_http_info(self, **kwargs): # noqa: E501 """Flash Swap Inquiry # noqa: E501 - Rate Limit: 100 requests per day # noqa: E501 + Rate limit: 100 requests per day For HYPERLIQUID, swaps between `HYPERLIQUID_USDC` and `CROSSEX_USDT` are supported. Flash Swap in isolated exchange mode is not currently supported for HYPERLIQUID # 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_convert_quote_with_http_info(async_req=True) @@ -1322,7 +1440,7 @@ def get_crossex_account(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :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 str exchange_type: Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1347,7 +1465,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: Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). + :param str exchange_type: Trading venue identifier. Omit in cross-exchange mode; required in isolated-per-venue mode (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1745,14 +1863,352 @@ def update_crossex_positions_leverage_with_http_info(self, **kwargs): # noqa: E auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/crossex/positions/leverage', 'POST', + '/crossex/positions/leverage', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_crossex_margin_positions_leverage(self, **kwargs): # noqa: E501 + """Query Leveraged Trading Pair Leverage Multiplier # noqa: E501 + + Rate Limit: 200 requests per 10 seconds # 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_crossex_margin_positions_leverage(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: Trading Pair List, multiple separated by commas + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: dict(str, str) + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_crossex_margin_positions_leverage_with_http_info(**kwargs) # noqa: E501 + + def get_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # noqa: E501 + """Query Leveraged Trading Pair Leverage Multiplier # noqa: E501 + + Rate Limit: 200 requests per 10 seconds # 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_crossex_margin_positions_leverage_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: Trading Pair List, multiple separated by commas + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(dict(str, str), status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'symbols' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_crossex_margin_positions_leverage" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'symbols' in local_var_params and local_var_params['symbols'] is not None: # noqa: E501 + query_params.append(('symbols', local_var_params['symbols'])) # 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( + '/crossex/margin_positions/leverage', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='dict(str, str)', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_crossex_margin_positions_leverage(self, **kwargs): # noqa: E501 + """Modify Leveraged Trading Pair Leverage Multiplier # noqa: E501 + + Rate Limit: 100 requests per 10 seconds # 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_crossex_margin_positions_leverage(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CrossexLeverageRequest crossex_leverage_request: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CrossexLeverageResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_crossex_margin_positions_leverage_with_http_info(**kwargs) # noqa: E501 + + def update_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # noqa: E501 + """Modify Leveraged Trading Pair Leverage Multiplier # noqa: E501 + + Rate Limit: 100 requests per 10 seconds # 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_crossex_margin_positions_leverage_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CrossexLeverageRequest crossex_leverage_request: + :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.CrossexLeverageResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'crossex_leverage_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 update_crossex_margin_positions_leverage" % 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 + if 'crossex_leverage_request' in local_var_params: + body_params = local_var_params['crossex_leverage_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( + '/crossex/margin_positions/leverage', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def close_crossex_position(self, **kwargs): # noqa: E501 + """Full Close Position # noqa: E501 + + Rate limit: 100 requests per day. Automatic position-closing rules. FUTURE and MARGIN positions are supported. Before using this endpoint, ensure that the following prerequisite is met: - There are no open orders for the symbol in the current account. - Once the prerequisite is met, the system checks whether the position meets either of the following conditions: - Less than the minimum notional amount (minNotional) - Less than the minimum order size (minSize) When either condition is met, the system automatically creates a closing order and immediately closes the entire position. This endpoint prevents positions that are too small to be submitted to an exchange from becoming stranded and ensures that small positions can be closed when they fall below the threshold. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.close_crossex_position(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CrossexClosePositionRequest crossex_close_position_request: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CrossexOrderActionResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.close_crossex_position_with_http_info(**kwargs) # noqa: E501 + + def close_crossex_position_with_http_info(self, **kwargs): # noqa: E501 + """Full Close Position # noqa: E501 + + Rate limit: 100 requests per day. Automatic position-closing rules. FUTURE and MARGIN positions are supported. Before using this endpoint, ensure that the following prerequisite is met: - There are no open orders for the symbol in the current account. - Once the prerequisite is met, the system checks whether the position meets either of the following conditions: - Less than the minimum notional amount (minNotional) - Less than the minimum order size (minSize) When either condition is met, the system automatically creates a closing order and immediately closes the entire position. This endpoint prevents positions that are too small to be submitted to an exchange from becoming stranded and ensures that small positions can be closed when they fall below the threshold. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.close_crossex_position_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CrossexClosePositionRequest crossex_close_position_request: + :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.CrossexOrderActionResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'crossex_close_position_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 close_crossex_position" % 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 + if 'crossex_close_position_request' in local_var_params: + body_params = local_var_params['crossex_close_position_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( + '/crossex/position', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CrossexLeverageResponse', # 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 @@ -1760,17 +2216,17 @@ def update_crossex_positions_leverage_with_http_info(self, **kwargs): # noqa: E _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_crossex_margin_positions_leverage(self, **kwargs): # noqa: E501 - """Query Leveraged Trading Pair Leverage Multiplier # noqa: E501 + def get_crossex_positions_margin_mode(self, symbol, **kwargs): # noqa: E501 + """Get futures position margin mode # noqa: E501 Rate Limit: 200 requests per 10 seconds # 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_crossex_margin_positions_leverage(async_req=True) + >>> thread = api.get_crossex_positions_margin_mode(symbol, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str symbols: Trading Pair List, multiple separated by commas + :param str symbol: Futures trading pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1778,24 +2234,24 @@ def get_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: dict(str, str) + :rtype: gate_api.CrossexMarginModeResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_crossex_margin_positions_leverage_with_http_info(**kwargs) # noqa: E501 + return self.get_crossex_positions_margin_mode_with_http_info(symbol, **kwargs) # noqa: E501 - def get_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # noqa: E501 - """Query Leveraged Trading Pair Leverage Multiplier # noqa: E501 + def get_crossex_positions_margin_mode_with_http_info(self, symbol, **kwargs): # noqa: E501 + """Get futures position margin mode # noqa: E501 Rate Limit: 200 requests per 10 seconds # 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_crossex_margin_positions_leverage_with_http_info(async_req=True) + >>> thread = api.get_crossex_positions_margin_mode_with_http_info(symbol, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str symbols: Trading Pair List, multiple separated by commas + :param str symbol: Futures trading pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1805,7 +2261,7 @@ def get_crossex_margin_positions_leverage_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(dict(str, str), status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexMarginModeResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1813,7 +2269,7 @@ def get_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # noq local_var_params = locals() all_params = [ - 'symbols' + 'symbol' ] all_params.extend( [ @@ -1828,18 +2284,22 @@ def get_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # noq if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_crossex_margin_positions_leverage" % k + " to method get_crossex_positions_margin_mode" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'symbol' is set + if self.api_client.client_side_validation and ('symbol' not in local_var_params or # noqa: E501 + local_var_params['symbol'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `symbol` when calling `get_crossex_positions_margin_mode`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'symbols' in local_var_params and local_var_params['symbols'] is not None: # noqa: E501 - query_params.append(('symbols', local_var_params['symbols'])) # noqa: E501 + if 'symbol' in local_var_params and local_var_params['symbol'] is not None: # noqa: E501 + query_params.append(('symbol', local_var_params['symbol'])) # noqa: E501 header_params = {} @@ -1855,14 +2315,14 @@ def get_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # noq auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/crossex/margin_positions/leverage', 'GET', + '/crossex/positions/margin_mode', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='dict(str, str)', # noqa: E501 + response_type='CrossexMarginModeResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1870,17 +2330,17 @@ def get_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # noq _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_crossex_margin_positions_leverage(self, **kwargs): # noqa: E501 - """Modify Leveraged Trading Pair Leverage Multiplier # noqa: E501 + def update_crossex_positions_margin_mode(self, **kwargs): # noqa: E501 + """Update futures position margin mode # noqa: E501 - Rate Limit: 100 requests per 10 seconds # noqa: E501 + Rate limit: 100 requests per 10 seconds. Only Hyperliquid futures trading pairs are supported. The margin mode cannot be changed while open orders or positions exist # 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_crossex_margin_positions_leverage(async_req=True) + >>> thread = api.update_crossex_positions_margin_mode(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CrossexLeverageRequest crossex_leverage_request: + :param CrossexMarginModeRequest crossex_margin_mode_request: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1888,24 +2348,24 @@ 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.CrossexLeverageResponse + :rtype: gate_api.CrossexMarginModeResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.update_crossex_margin_positions_leverage_with_http_info(**kwargs) # noqa: E501 + return self.update_crossex_positions_margin_mode_with_http_info(**kwargs) # noqa: E501 - def update_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # noqa: E501 - """Modify Leveraged Trading Pair Leverage Multiplier # noqa: E501 + def update_crossex_positions_margin_mode_with_http_info(self, **kwargs): # noqa: E501 + """Update futures position margin mode # noqa: E501 - Rate Limit: 100 requests per 10 seconds # noqa: E501 + Rate limit: 100 requests per 10 seconds. Only Hyperliquid futures trading pairs are supported. The margin mode cannot be changed while open orders or positions exist # 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_crossex_margin_positions_leverage_with_http_info(async_req=True) + >>> thread = api.update_crossex_positions_margin_mode_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CrossexLeverageRequest crossex_leverage_request: + :param CrossexMarginModeRequest crossex_margin_mode_request: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1915,7 +2375,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.CrossexLeverageResponse, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexMarginModeResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1923,7 +2383,7 @@ def update_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # local_var_params = locals() all_params = [ - 'crossex_leverage_request' + 'crossex_margin_mode_request' ] all_params.extend( [ @@ -1938,7 +2398,7 @@ def update_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_crossex_margin_positions_leverage" % k + " to method update_crossex_positions_margin_mode" % k ) local_var_params[k] = v del local_var_params['kwargs'] @@ -1955,8 +2415,8 @@ def update_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # local_var_files = {} body_params = None - if 'crossex_leverage_request' in local_var_params: - body_params = local_var_params['crossex_leverage_request'] + if 'crossex_margin_mode_request' in local_var_params: + body_params = local_var_params['crossex_margin_mode_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1969,14 +2429,14 @@ def update_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/crossex/margin_positions/leverage', 'POST', + '/crossex/positions/margin_mode', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CrossexLeverageResponse', # noqa: E501 + response_type='CrossexMarginModeResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1984,17 +2444,17 @@ def update_crossex_margin_positions_leverage_with_http_info(self, **kwargs): # _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def close_crossex_position(self, **kwargs): # noqa: E501 - """Full Close Position # noqa: E501 + def update_crossex_positions_margin(self, **kwargs): # noqa: E501 + """Increase or decrease isolated margin # noqa: E501 - Rate Limit: 100 requests per day. Automatic close-out rules. Supports closing FUTURE or MARGIN positions. Prerequisites before using this interface: - No pending orders for the symbol exist in the current account. - When the system detects the position meets any of the following limits while prerequisites are met: - Less than or equal to the minimum notional amount (minNotional) - Less than or equal to the minimum order quantity (minSize) After meeting the conditions, the system will automatically generate a close-out order and immediately fully close the position. This interface is used to avoid issues where orders are too small to be placed on the exchange, ensuring small positions can be closed smoothly when reaching the threshold. # noqa: E501 + Rate limit: 100 requests per 10 seconds. Only Hyperliquid isolated futures positions are supported. Positive values increase margin, while negative values decrease margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.close_crossex_position(async_req=True) + >>> thread = api.update_crossex_positions_margin(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CrossexClosePositionRequest crossex_close_position_request: + :param CrossexIsolatedMarginRequest crossex_isolated_margin_request: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2002,24 +2462,24 @@ 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.CrossexOrderActionResponse + :rtype: gate_api.CrossexIsolatedMarginResponse :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.close_crossex_position_with_http_info(**kwargs) # noqa: E501 + return self.update_crossex_positions_margin_with_http_info(**kwargs) # noqa: E501 - def close_crossex_position_with_http_info(self, **kwargs): # noqa: E501 - """Full Close Position # noqa: E501 + def update_crossex_positions_margin_with_http_info(self, **kwargs): # noqa: E501 + """Increase or decrease isolated margin # noqa: E501 - Rate Limit: 100 requests per day. Automatic close-out rules. Supports closing FUTURE or MARGIN positions. Prerequisites before using this interface: - No pending orders for the symbol exist in the current account. - When the system detects the position meets any of the following limits while prerequisites are met: - Less than or equal to the minimum notional amount (minNotional) - Less than or equal to the minimum order quantity (minSize) After meeting the conditions, the system will automatically generate a close-out order and immediately fully close the position. This interface is used to avoid issues where orders are too small to be placed on the exchange, ensuring small positions can be closed smoothly when reaching the threshold. # noqa: E501 + Rate limit: 100 requests per 10 seconds. Only Hyperliquid isolated futures positions are supported. Positive values increase margin, while negative values decrease margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.close_crossex_position_with_http_info(async_req=True) + >>> thread = api.update_crossex_positions_margin_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CrossexClosePositionRequest crossex_close_position_request: + :param CrossexIsolatedMarginRequest crossex_isolated_margin_request: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2029,7 +2489,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.CrossexOrderActionResponse, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexIsolatedMarginResponse, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2037,7 +2497,7 @@ def close_crossex_position_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'crossex_close_position_request' + 'crossex_isolated_margin_request' ] all_params.extend( [ @@ -2052,7 +2512,7 @@ def close_crossex_position_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method close_crossex_position" % k + " to method update_crossex_positions_margin" % k ) local_var_params[k] = v del local_var_params['kwargs'] @@ -2069,8 +2529,8 @@ def close_crossex_position_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'crossex_close_position_request' in local_var_params: - body_params = local_var_params['crossex_close_position_request'] + if 'crossex_isolated_margin_request' in local_var_params: + body_params = local_var_params['crossex_isolated_margin_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -2083,14 +2543,14 @@ def close_crossex_position_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/crossex/position', 'POST', + '/crossex/positions/margin', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CrossexOrderActionResponse', # noqa: E501 + response_type='CrossexIsolatedMarginResponse', # noqa: E501 auth_settings=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 +3026,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.CrossexAdlRank] + :rtype: gate_api.CrossexAdlRank :return: If the method is called asynchronously, returns the request thread. """ @@ -2593,7 +3053,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.CrossexAdlRank], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CrossexAdlRank, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2654,7 +3114,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[CrossexAdlRank]', # noqa: E501 + response_type='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 @@ -2783,7 +3243,7 @@ def list_crossex_open_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_crossex_history_orders(self, **kwargs): # noqa: E501 - """queryorderhistory # noqa: E501 + """Query order history # noqa: E501 Rate Limit: 200 requests per 10 seconds # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2813,7 +3273,7 @@ def list_crossex_history_orders(self, **kwargs): # noqa: E501 return self.list_crossex_history_orders_with_http_info(**kwargs) # noqa: E501 def list_crossex_history_orders_with_http_info(self, **kwargs): # noqa: E501 - """queryorderhistory # noqa: E501 + """Query order history # noqa: E501 Rate Limit: 200 requests per 10 seconds # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3313,7 +3773,7 @@ def list_crossex_history_margin_interests_with_http_info(self, **kwargs): # noq collection_formats=collection_formats) def list_crossex_history_trades(self, **kwargs): # noqa: E501 - """queryfilledhistory # noqa: E501 + """Query filled history # noqa: E501 Rate Limit: 200 requests per 10 seconds # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3342,7 +3802,7 @@ def list_crossex_history_trades(self, **kwargs): # noqa: E501 return self.list_crossex_history_trades_with_http_info(**kwargs) # noqa: E501 def list_crossex_history_trades_with_http_info(self, **kwargs): # noqa: E501 - """queryfilledhistory # noqa: E501 + """Query filled history # noqa: E501 Rate Limit: 200 requests per 10 seconds # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3588,7 +4048,7 @@ def list_crossex_coin_discount_rate(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str coin: Query by specified currency name - :param str exchange_type: OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID + :param str exchange_type: OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID/DERIBIT :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3614,7 +4074,7 @@ def list_crossex_coin_discount_rate_with_http_info(self, **kwargs): # noqa: E50 :param bool async_req: execute request asynchronously :param str coin: Query by specified currency name - :param str exchange_type: OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID + :param str exchange_type: OKX/GATE/BINANCE/BYBIT/KRAKEN/HYPERLIQUID/DERIBIT :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3691,3 +4151,223 @@ def list_crossex_coin_discount_rate_with_http_info(self, **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 list_crossex_market_tickers(self, **kwargs): # noqa: E501 + """Get exchange tickers # noqa: E501 + + Rate limit: 1 request per second - Margin trading pairs cannot be passed directly as parameters. For example, `GATE_MARGIN_BTC_USDT` is invalid. # 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_crossex_market_tickers(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: Trading Pair List, multiple separated by commas + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.InlineResponse2001] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_crossex_market_tickers_with_http_info(**kwargs) # noqa: E501 + + def list_crossex_market_tickers_with_http_info(self, **kwargs): # noqa: E501 + """Get exchange tickers # noqa: E501 + + Rate limit: 1 request per second - Margin trading pairs cannot be passed directly as parameters. For example, `GATE_MARGIN_BTC_USDT` is invalid. # 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_crossex_market_tickers_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: Trading Pair List, multiple separated by commas + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.InlineResponse2001], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'symbols' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_crossex_market_tickers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'symbols' in local_var_params and local_var_params['symbols'] is not None: # noqa: E501 + query_params.append(('symbols', local_var_params['symbols'])) # 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( + '/crossex/market/tickers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[InlineResponse2001]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_crossex_market_funding_info(self, **kwargs): # noqa: E501 + """Get exchange futures funding rate information # noqa: E501 + + Rate limit: 1 request per second - For `Deribit`, `funding_rate` is the current real-time rate calculated over an 8-hour period. # 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_crossex_market_funding_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: Trading Pair List, multiple separated by commas + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.InlineResponse2002] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_crossex_market_funding_info_with_http_info(**kwargs) # noqa: E501 + + def list_crossex_market_funding_info_with_http_info(self, **kwargs): # noqa: E501 + """Get exchange futures funding rate information # noqa: E501 + + Rate limit: 1 request per second - For `Deribit`, `funding_rate` is the current real-time rate calculated over an 8-hour period. # 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_crossex_market_funding_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: Trading Pair List, multiple separated by commas + :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.InlineResponse2002], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'symbols' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_crossex_market_funding_info" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'symbols' in local_var_params and local_var_params['symbols'] is not None: # noqa: E501 + query_params.append(('symbols', local_var_params['symbols'])) # 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( + '/crossex/market/funding_info', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[InlineResponse2002]', # noqa: E501 + auth_settings=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 6b2d7c4a..ab61a937 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -2314,7 +2314,7 @@ def list_positions(self, settle, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param bool holding: Return only real positions - true, return all - false - :param int limit: Maximum number of records returned in a single list + :param int limit: Maximum number of positions returned. If omitted, all current positions are returned by default; if provided, the value must be within [1,100]. :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2341,7 +2341,7 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param bool holding: Return only real positions - true, return all - false - :param int limit: Maximum number of records returned in a single list + :param int limit: Maximum number of positions returned. If omitted, all current positions are returned by default; if provided, the value must be within [1,100]. :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers @@ -2387,8 +2387,8 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 local_var_params['settle'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `settle` when calling `list_positions`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_positions`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_positions`, 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_positions`, must be a value greater than or equal to `1`") # noqa: E501 if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 diff --git a/gate_api/api/otc_api.py b/gate_api/api/otc_api.py index fbbfccd2..6b1a1b53 100644 --- a/gate_api/api/otc_api.py +++ b/gate_api/api/otc_api.py @@ -275,7 +275,7 @@ def create_otc_order_with_http_info(self, otc_order_request, **kwargs): # noqa: def create_stable_coin_order(self, otc_stable_coin_order_request, **kwargs): # noqa: E501 """Create stablecoin order # noqa: E501 - Create stablecoin order # noqa: E501 + Create a stablecoin order. All request body fields except `promotion_code` are 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.create_stable_coin_order(otc_stable_coin_order_request, async_req=True) @@ -300,7 +300,7 @@ def create_stable_coin_order(self, otc_stable_coin_order_request, **kwargs): # def create_stable_coin_order_with_http_info(self, otc_stable_coin_order_request, **kwargs): # noqa: E501 """Create stablecoin order # noqa: E501 - Create stablecoin order # noqa: E501 + Create a stablecoin order. All request body fields except `promotion_code` are 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.create_stable_coin_order_with_http_info(otc_stable_coin_order_request, async_req=True) @@ -393,7 +393,7 @@ def create_stable_coin_order_with_http_info(self, otc_stable_coin_order_request, def get_bank_list_inner_path(self, **kwargs): # noqa: E501 """Get user bank card list # 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 + List the user's bank cards for selecting a card when placing an order. **Default card**: use the `is_default` field in each list item (`1` indicates the default). The deprecated standalone default-bank-card endpoint is no longer 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_bank_list_inner_path(async_req=True) @@ -417,7 +417,7 @@ def get_bank_list_inner_path(self, **kwargs): # noqa: E501 def get_bank_list_inner_path_with_http_info(self, **kwargs): # noqa: E501 """Get user bank card list # 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 + List the user's bank cards for selecting a card when placing an order. **Default card**: use the `is_default` field in each list item (`1` indicates the default). The deprecated standalone default-bank-card endpoint is no longer 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_bank_list_inner_path_with_http_info(async_req=True) @@ -511,7 +511,7 @@ def create_otc_bank(self, bank_account_name, bank_name, bank_country, bank_addre :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 documentation_file: Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment) (required) :param str remittance_line_number: :param str agent_bank_name: :param str agent_bank_swift: @@ -545,7 +545,7 @@ def create_otc_bank_with_http_info(self, bank_account_name, bank_name, bank_coun :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 documentation_file: Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment) (required) :param str remittance_line_number: :param str agent_bank_name: :param str agent_bank_swift: @@ -921,7 +921,7 @@ def set_default_otc_bank_with_http_info(self, otc_bank_id_request, **kwargs): # 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 + **①** `bank_id` must be specified. After verifying that the card belongs to the current user and its status allows supplementary documents, the endpoint returns the required items based on the user's **approved advanced verification type** (personal/enterprise); each item's `description` states the submission requirements. Corresponding Inner endpoint: `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) @@ -946,7 +946,7 @@ def get_otc_bank_supplement_checklist(self, 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 + **①** `bank_id` must be specified. After verifying that the card belongs to the current user and its status allows supplementary documents, the endpoint returns the required items based on the user's **approved advanced verification type** (personal/enterprise); each item's `description` states the submission requirements. Corresponding Inner endpoint: `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) @@ -1349,7 +1349,7 @@ def submit_otc_bank_enterprise_supplement_with_http_info(self, bank_id, certific def mark_otc_order_paid(self, otc_mark_order_paid_request, **kwargs): # noqa: E501 """Mark fiat order as paid (deposit confirmation) # 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 + Mark a fiat BUY order as paid (deposit confirmation). **A user payment receipt must be uploaded**: `payment_receipt_file_key` is required; supported formats are jpg/jpeg/png/pdf, with a maximum size of 10 MB per file (validated jointly by the service and gateway). The compatibility field name `payment_receipt` is subject to the gateway/live environment. The persisted field is `otc_trade_record.payment_receipt_file_key`. The Pay Inner path is `POST .../pay/order_set_paid` (commonly associated by `client_order_id`); the Inner path corresponding to this OpenAPI endpoint, `POST /order/paid`, still primarily uses `order_id`. If the gateway standardizes on the merchant order ID, follow the gateway documentation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_otc_order_paid(otc_mark_order_paid_request, async_req=True) @@ -1374,7 +1374,7 @@ def mark_otc_order_paid(self, otc_mark_order_paid_request, **kwargs): # noqa: E def mark_otc_order_paid_with_http_info(self, otc_mark_order_paid_request, **kwargs): # noqa: E501 """Mark fiat order as paid (deposit confirmation) # 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 + Mark a fiat BUY order as paid (deposit confirmation). **A user payment receipt must be uploaded**: `payment_receipt_file_key` is required; supported formats are jpg/jpeg/png/pdf, with a maximum size of 10 MB per file (validated jointly by the service and gateway). The compatibility field name `payment_receipt` is subject to the gateway/live environment. The persisted field is `otc_trade_record.payment_receipt_file_key`. The Pay Inner path is `POST .../pay/order_set_paid` (commonly associated by `client_order_id`); the Inner path corresponding to this OpenAPI endpoint, `POST /order/paid`, still primarily uses `order_id`. If the gateway standardizes on the merchant order ID, follow the gateway documentation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_otc_order_paid_with_http_info(otc_mark_order_paid_request, async_req=True) @@ -1593,7 +1593,7 @@ def list_otc_orders(self, **kwargs): # noqa: E501 :param str crypto_currency: Digital currency :param str start_time: starttime for example : 2025-09-09 :param str end_time: endtime for example :2025-09-09 - :param str status: DONE: Completed CANCEL: Canceled PROCESSING: In Progress + :param str status: DONE: completed CANCEL: canceled PROCESSING: in progress DISBURSED: disbursed :param str pn: Page number :param str ps: Number of items per page :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1625,7 +1625,7 @@ def list_otc_orders_with_http_info(self, **kwargs): # noqa: E501 :param str crypto_currency: Digital currency :param str start_time: starttime for example : 2025-09-09 :param str end_time: endtime for example :2025-09-09 - :param str status: DONE: Completed CANCEL: Canceled PROCESSING: In Progress + :param str status: DONE: completed CANCEL: canceled PROCESSING: in progress DISBURSED: disbursed :param str pn: Page number :param str ps: Number of items per page :param _return_http_data_only: response data without head status code diff --git a/gate_api/api/p2p_api.py b/gate_api/api/p2p_api.py index f3eab2c0..ea6aab29 100644 --- a/gate_api/api/p2p_api.py +++ b/gate_api/api/p2p_api.py @@ -36,6 +36,107 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def p2p_merchant_query_spot_balance(self, **kwargs): # noqa: E501 + """Query spot balance # noqa: E501 + + Use Spot API `GET /spot/accounts` to query spot account balance; this entry is for guidance only and does not define separate P2P Merchant request parameters or response body. # 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_query_spot_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: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.p2p_merchant_query_spot_balance_with_http_info(**kwargs) # noqa: E501 + + def p2p_merchant_query_spot_balance_with_http_info(self, **kwargs): # noqa: E501 + """Query spot balance # noqa: E501 + + Use Spot API `GET /spot/accounts` to query spot account balance; this entry is for guidance only and does not define separate P2P Merchant request parameters or response body. # 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_query_spot_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: None + :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 p2p_merchant_query_spot_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 + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/spot/accounts', 'GET', + 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 p2p_merchant_account_get_user_info(self, **kwargs): # noqa: E501 """Get account information # noqa: E501 diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py index a66c4afd..7fc02ecb 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -1222,114 +1222,6 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_spot_accounts(self, **kwargs): # noqa: E501 - """List spot trading accounts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_spot_accounts(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Query by specified currency name - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SpotAccount] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_spot_accounts_with_http_info(**kwargs) # noqa: E501 - - def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501 - """List spot trading accounts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_spot_accounts_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Query by specified currency name - :param _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.SpotAccount], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_spot_accounts" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - 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( - '/spot/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SpotAccount]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - def list_spot_account_book(self, **kwargs): # noqa: E501 """Query spot account transaction history # noqa: E501 @@ -2003,7 +1895,7 @@ def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa: collection_formats=collection_formats) def create_order(self, order, **kwargs): # noqa: E501 - """Create an order # noqa: E501 + """Create order # noqa: E501 Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2029,7 +1921,7 @@ def create_order(self, order, **kwargs): # noqa: E501 return self.create_order_with_http_info(order, **kwargs) # noqa: E501 def create_order_with_http_info(self, order, **kwargs): # noqa: E501 - """Create an order # noqa: E501 + """Create order # noqa: E501 Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4021,3 +3913,591 @@ def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + + def list_spot_pov_orders(self, status, **kwargs): # noqa: E501 + """List Spot POV 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.list_spot_pov_orders(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Order status. Defaults to open - open: Active orders - finished: Finished orders (required) + :param str currency_pair: Currency pair + :param str side: Specify all bids or all asks, both included if not specified + :param int page: Page number, up to 100 + :param int limit: Maximum number of records returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SpotPovOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_spot_pov_orders_with_http_info(status, **kwargs) # noqa: E501 + + def list_spot_pov_orders_with_http_info(self, status, **kwargs): # noqa: E501 + """List Spot POV 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.list_spot_pov_orders_with_http_info(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Order status. Defaults to open - open: Active orders - finished: Finished orders (required) + :param str currency_pair: Currency pair + :param str side: Specify all bids or all asks, both included if not specified + :param int page: Page number, up to 100 + :param int limit: Maximum number of records returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SpotPovOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'currency_pair', + 'side', + '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_spot_pov_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'status' is set + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `status` when calling `list_spot_pov_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_spot_pov_orders`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_spot_pov_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_spot_pov_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_pov_orders`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + query_params.append(('status', local_var_params['status'])) # noqa: E501 + if 'side' in local_var_params and local_var_params['side'] is not None: # noqa: E501 + query_params.append(('side', local_var_params['side'])) # noqa: E501 + if '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( + '/spot/pov_orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SpotPovOrder]', # noqa: E501 + auth_settings=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_spot_pov_order(self, spot_pov_order_creator, **kwargs): # noqa: E501 + """Create a Spot POV 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_spot_pov_order(spot_pov_order_creator, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SpotPovOrderCreator spot_pov_order_creator: (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.SpotPovOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_spot_pov_order_with_http_info(spot_pov_order_creator, **kwargs) # noqa: E501 + + def create_spot_pov_order_with_http_info(self, spot_pov_order_creator, **kwargs): # noqa: E501 + """Create a Spot POV 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_spot_pov_order_with_http_info(spot_pov_order_creator, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SpotPovOrderCreator spot_pov_order_creator: (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.SpotPovOrder, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'spot_pov_order_creator' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_spot_pov_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'spot_pov_order_creator' is set + if self.api_client.client_side_validation and ('spot_pov_order_creator' not in local_var_params or # noqa: E501 + local_var_params['spot_pov_order_creator'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `spot_pov_order_creator` when calling `create_spot_pov_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'spot_pov_order_creator' in local_var_params: + body_params = local_var_params['spot_pov_order_creator'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/spot/pov_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SpotPovOrder', # noqa: E501 + auth_settings=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_spot_pov_orders(self, **kwargs): # noqa: E501 + """Cancel Spot POV 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_spot_pov_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.SpotPovOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_spot_pov_orders_with_http_info(**kwargs) # noqa: E501 + + def cancel_spot_pov_orders_with_http_info(self, **kwargs): # noqa: E501 + """Cancel Spot POV 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_spot_pov_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.SpotPovOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_spot_pov_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + + header_params = {} + + 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( + '/spot/pov_orders/cancel', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SpotPovOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_spot_pov_order(self, order_id, **kwargs): # noqa: E501 + """Query Spot POV 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_spot_pov_order(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned after successful creation, or the custom ID specified by the user in the `text` field. (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.SpotPovOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_spot_pov_order_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_spot_pov_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Query Spot POV 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_spot_pov_order_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned after successful creation, or the custom ID specified by the user in the `text` field. (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.SpotPovOrder, 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_spot_pov_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_spot_pov_order`") # 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( + '/spot/pov_orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SpotPovOrder', # noqa: E501 + auth_settings=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_spot_pov_order(self, order_id, **kwargs): # noqa: E501 + """Cancel a Spot POV 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.cancel_spot_pov_order(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned after successful creation, or the custom ID specified by the user in the `text` field. (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.SpotPovOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_spot_pov_order_with_http_info(order_id, **kwargs) # noqa: E501 + + def cancel_spot_pov_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Cancel a Spot POV 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.cancel_spot_pov_order_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned after successful creation, or the custom ID specified by the user in the `text` field. (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.SpotPovOrder, 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 cancel_spot_pov_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_spot_pov_order`") # 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( + '/spot/pov_orders/{order_id}/cancel', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SpotPovOrder', # noqa: E501 + auth_settings=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/launch_api.py b/gate_api/api/stock_api.py similarity index 54% rename from gate_api/api/launch_api.py rename to gate_api/api/stock_api.py index bbe52fe2..a5a8bd0e 100644 --- a/gate_api/api/launch_api.py +++ b/gate_api/api/stock_api.py @@ -24,7 +24,7 @@ ) -class LaunchApi(object): +class StockApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -36,23 +36,18 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def list_launch_pool_projects(self, **kwargs): # noqa: E501 - """Query LaunchPool project list # noqa: E501 + def query_stock_user_assets(self, **kwargs): # noqa: E501 + """Query user assets # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_user_assets(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 int pnl_calc_type: PnL calculation cost type. Defaults to average cost price when omitted (1 = average cost price, 2 = diluted cost price) + :param int pnl_calc_price: PnL calculation price type. Defaults to intraday price when omitted (1 = intraday price, 2 = latest extended-hours price) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -60,30 +55,25 @@ def list_launch_pool_projects(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.LaunchPoolV4Project] + :rtype: gate_api.UserAssetResp2 :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 + return self.query_stock_user_assets_with_http_info(**kwargs) # noqa: E501 - def list_launch_pool_projects_with_http_info(self, **kwargs): # noqa: E501 - """Query LaunchPool project list # noqa: E501 + def query_stock_user_assets_with_http_info(self, **kwargs): # noqa: E501 + """Query user assets # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_user_assets_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 int pnl_calc_type: PnL calculation cost type. Defaults to average cost price when omitted (1 = average cost price, 2 = diluted cost price) + :param int pnl_calc_price: PnL calculation price type. Defaults to intraday price when omitted (1 = intraday price, 2 = latest extended-hours price) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -93,7 +83,7 @@ def list_launch_pool_projects_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.LaunchPoolV4Project], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.UserAssetResp2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -101,11 +91,130 @@ def list_launch_pool_projects_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'status', - 'mortgage_coin', - 'search_coin', - 'limit_rule', - 'sort_type', + 'pnl_calc_type', + 'pnl_calc_price' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_stock_user_assets" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'pnl_calc_type' in local_var_params and local_var_params['pnl_calc_type'] is not None: # noqa: E501 + query_params.append(('pnl_calc_type', local_var_params['pnl_calc_type'])) # noqa: E501 + if 'pnl_calc_price' in local_var_params and local_var_params['pnl_calc_price'] is not None: # noqa: E501 + query_params.append(('pnl_calc_price', local_var_params['pnl_calc_price'])) # 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( + '/stock/users/assets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserAssetResp2', # noqa: E501 + auth_settings=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_stock_symbols(self, **kwargs): # noqa: E501 + """Query symbol list # noqa: E501 + + Rate limit: 5 qps. # 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_stock_symbols(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: Symbol list, multiple separated by commas + :param str exchange: Exchange, supports us, hk, and kr + :param bool with_desc_i18n: Whether to return multilingual symbol description + :param int page: Page number, defaults to 1 + :param int page_size: Page size, defaults to 10, max 500; server caps at 500 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Symbols2 + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.query_stock_symbols_with_http_info(**kwargs) # noqa: E501 + + def query_stock_symbols_with_http_info(self, **kwargs): # noqa: E501 + """Query symbol list # noqa: E501 + + Rate limit: 5 qps. # 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_stock_symbols_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str symbols: Symbol list, multiple separated by commas + :param str exchange: Exchange, supports us, hk, and kr + :param bool with_desc_i18n: Whether to return multilingual symbol description + :param int page: Page number, defaults to 1 + :param int page_size: Page size, defaults to 10, max 500; server caps at 500 + :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.Symbols2, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'symbols', + 'exchange', + 'with_desc_i18n', 'page', 'page_size' ] @@ -122,48 +231,28 @@ def list_launch_pool_projects_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_launch_pool_projects" % k + " to method query_stock_symbols" % 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 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 500: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `query_stock_symbols`, must be a value less than or equal to `500`") # 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 'symbols' in local_var_params and local_var_params['symbols'] is not None: # noqa: E501 + query_params.append(('symbols', local_var_params['symbols'])) # noqa: E501 + if 'exchange' in local_var_params and local_var_params['exchange'] is not None: # noqa: E501 + query_params.append(('exchange', local_var_params['exchange'])) # noqa: E501 + if 'with_desc_i18n' in local_var_params and local_var_params['with_desc_i18n'] is not None: # noqa: E501 + query_params.append(('with_desc_i18n', local_var_params['with_desc_i18n'])) # 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 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 header_params = {} @@ -179,14 +268,14 @@ def list_launch_pool_projects_with_http_info(self, **kwargs): # noqa: E501 auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/launch/project-list', 'GET', + '/stock/symbols', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[LaunchPoolV4Project]', # noqa: E501 + response_type='Symbols2', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -194,17 +283,20 @@ def list_launch_pool_projects_with_http_info(self, **kwargs): # noqa: E501 _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 + def query_stock_symbol_detail(self, **kwargs): # noqa: E501 + """Query symbol details # noqa: E501 - Create a new staking order for asset staking mining. This endpoint requires API Key signature authentication. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_symbol_detail(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CreateOrderV4 create_order_v4: (required) + :param str symbols: Symbol list, multiple separated by commas + :param str exchange: Exchange, supports us, hk, and kr + :param int page: Page number, defaults to 1 + :param int page_size: Page size, defaults to 10, max 500; server caps at 500 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -212,24 +304,27 @@ def create_launch_pool_order(self, create_order_v4, **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.LaunchPoolV4CreateOrderResponse + :rtype: gate_api.SymbolDetail :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 + return self.query_stock_symbol_detail_with_http_info(**kwargs) # noqa: E501 - def create_launch_pool_order_with_http_info(self, create_order_v4, **kwargs): # noqa: E501 - """Create LaunchPool staking order # noqa: E501 + def query_stock_symbol_detail_with_http_info(self, **kwargs): # noqa: E501 + """Query symbol details # noqa: E501 - Create a new staking order for asset staking mining. This endpoint requires API Key signature authentication. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_symbol_detail_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CreateOrderV4 create_order_v4: (required) + :param str symbols: Symbol list, multiple separated by commas + :param str exchange: Exchange, supports us, hk, and kr + :param int page: Page number, defaults to 1 + :param int page_size: Page size, defaults to 10, max 500; server caps at 500 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -239,7 +334,7 @@ def create_launch_pool_order_with_http_info(self, create_order_v4, **kwargs): # 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)) + :rtype: tuple(gate_api.SymbolDetail, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -247,7 +342,10 @@ def create_launch_pool_order_with_http_info(self, create_order_v4, **kwargs): # local_var_params = locals() all_params = [ - 'create_order_v4' + 'symbols', + 'exchange', + 'page', + 'page_size' ] all_params.extend( [ @@ -262,20 +360,26 @@ def create_launch_pool_order_with_http_info(self, create_order_v4, **kwargs): # if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_launch_pool_order" % k + " to method query_stock_symbol_detail" % 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 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 500: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `query_stock_symbol_detail`, must be a value less than or equal to `500`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'symbols' in local_var_params and local_var_params['symbols'] is not None: # noqa: E501 + query_params.append(('symbols', local_var_params['symbols'])) # noqa: E501 + if 'exchange' in local_var_params and local_var_params['exchange'] is not None: # noqa: E501 + query_params.append(('exchange', local_var_params['exchange'])) # 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 = {} @@ -283,28 +387,22 @@ def create_launch_pool_order_with_http_info(self, create_order_v4, **kwargs): # 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 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/launch/create-order', 'POST', + '/stock/symbols/detail', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='LaunchPoolV4CreateOrderResponse', # noqa: E501 + response_type='SymbolDetail', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -312,17 +410,17 @@ def create_launch_pool_order_with_http_info(self, create_order_v4, **kwargs): # _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 + def query_stock_order_book(self, symbol, **kwargs): # noqa: E501 + """Query market order book # noqa: E501 - Redeem staked assets and end staking mining. This endpoint requires API Key signature authentication. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_order_book(symbol, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param RedeemV4 redeem_v4: (required) + :param str symbol: Symbol (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -330,24 +428,24 @@ def redeem_launch_pool(self, redeem_v4, **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.RedeemLaunchPoolResponse + :rtype: gate_api.OrderBook2 :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 + return self.query_stock_order_book_with_http_info(symbol, **kwargs) # noqa: E501 - def redeem_launch_pool_with_http_info(self, redeem_v4, **kwargs): # noqa: E501 - """Redeem LaunchPool staked assets # noqa: E501 + def query_stock_order_book_with_http_info(self, symbol, **kwargs): # noqa: E501 + """Query market order book # noqa: E501 - Redeem staked assets and end staking mining. This endpoint requires API Key signature authentication. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_order_book_with_http_info(symbol, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param RedeemV4 redeem_v4: (required) + :param str symbol: Symbol (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -357,7 +455,7 @@ def redeem_launch_pool_with_http_info(self, redeem_v4, **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.RedeemLaunchPoolResponse, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OrderBook2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -365,7 +463,7 @@ def redeem_launch_pool_with_http_info(self, redeem_v4, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'redeem_v4' + 'symbol' ] all_params.extend( [ @@ -380,18 +478,20 @@ def redeem_launch_pool_with_http_info(self, redeem_v4, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method redeem_launch_pool" % k + " to method query_stock_order_book" % 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 + # verify the required parameter 'symbol' is set + if self.api_client.client_side_validation and ('symbol' not in local_var_params or # noqa: E501 + local_var_params['symbol'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `symbol` when calling `query_stock_order_book`") # noqa: E501 collection_formats = {} path_params = {} + if 'symbol' in local_var_params: + path_params['symbol'] = local_var_params['symbol'] # noqa: E501 query_params = [] @@ -401,28 +501,22 @@ def redeem_launch_pool_with_http_info(self, redeem_v4, **kwargs): # noqa: E501 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 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/launch/redeem', 'POST', + '/stock/market/{symbol}/orderbook', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='RedeemLaunchPoolResponse', # noqa: E501 + response_type='OrderBook2', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -430,22 +524,17 @@ def redeem_launch_pool_with_http_info(self, redeem_v4, **kwargs): # noqa: E501 _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 + def query_stock_order_list(self, **kwargs): # noqa: E501 + """Query open order list # noqa: E501 - Query user's staking and redemption operation records. This endpoint requires user authentication. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_order_list(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 str symbol: Symbol :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -453,29 +542,24 @@ def list_launch_pool_pledge_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.LaunchPoolV4PledgeRecord] + :rtype: gate_api.OrderList2 :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 + return self.query_stock_order_list_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 + def query_stock_order_list_with_http_info(self, **kwargs): # noqa: E501 + """Query open order list # noqa: E501 - Query user's staking and redemption operation records. This endpoint requires user authentication. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_order_list_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 str symbol: Symbol :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -485,7 +569,7 @@ def list_launch_pool_pledge_records_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.LaunchPoolV4PledgeRecord], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OrderList2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -493,12 +577,7 @@ def list_launch_pool_pledge_records_with_http_info(self, **kwargs): # noqa: E50 local_var_params = locals() all_params = [ - 'page', - 'page_size', - 'type', - 'start_time', - 'end_time', - 'coin' + 'symbol' ] all_params.extend( [ @@ -513,38 +592,18 @@ def list_launch_pool_pledge_records_with_http_info(self, **kwargs): # noqa: E50 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_launch_pool_pledge_records" % k + " to method query_stock_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 `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 + if 'symbol' in local_var_params and local_var_params['symbol'] is not None: # noqa: E501 + query_params.append(('symbol', local_var_params['symbol'])) # noqa: E501 header_params = {} @@ -560,14 +619,14 @@ def list_launch_pool_pledge_records_with_http_info(self, **kwargs): # noqa: E50 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/launch/user-pledge-records', 'GET', + '/stock/orders', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[LaunchPoolV4PledgeRecord]', # noqa: E501 + response_type='OrderList2', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -575,21 +634,17 @@ def list_launch_pool_pledge_records_with_http_info(self, **kwargs): # noqa: E50 _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 + def create_stock_order(self, trad_fi_spot_order_request, **kwargs): # noqa: E501 + """Create order # noqa: E501 - Query the user's staking reward records. This endpoint requires user authentication. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.create_stock_order(trad_fi_spot_order_request, 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 TradFiSpotOrderRequest trad_fi_spot_order_request: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -597,28 +652,24 @@ def list_launch_pool_reward_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.LaunchPoolV4RewardRecord] + :rtype: gate_api.CreateOrder2 :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 + return self.create_stock_order_with_http_info(trad_fi_spot_order_request, **kwargs) # noqa: E501 - def list_launch_pool_reward_records_with_http_info(self, **kwargs): # noqa: E501 - """Query user reward records # noqa: E501 + def create_stock_order_with_http_info(self, trad_fi_spot_order_request, **kwargs): # noqa: E501 + """Create order # noqa: E501 - Query the user's staking reward records. This endpoint requires user authentication. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.create_stock_order_with_http_info(trad_fi_spot_order_request, 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 TradFiSpotOrderRequest trad_fi_spot_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 @@ -628,7 +679,7 @@ def list_launch_pool_reward_records_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.LaunchPoolV4RewardRecord], 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. """ @@ -636,11 +687,7 @@ def list_launch_pool_reward_records_with_http_info(self, **kwargs): # noqa: E50 local_var_params = locals() all_params = [ - 'page', - 'page_size', - 'start_time', - 'end_time', - 'coin' + 'trad_fi_spot_order_request' ] all_params.extend( [ @@ -655,32 +702,20 @@ def list_launch_pool_reward_records_with_http_info(self, **kwargs): # noqa: E50 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_launch_pool_reward_records" % k + " to method create_stock_order" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'trad_fi_spot_order_request' is set + if self.api_client.client_side_validation and ('trad_fi_spot_order_request' not in local_var_params or # noqa: E501 + local_var_params['trad_fi_spot_order_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `trad_fi_spot_order_request` when calling `create_stock_order`") # 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_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 = {} @@ -688,22 +723,28 @@ def list_launch_pool_reward_records_with_http_info(self, **kwargs): # noqa: E50 local_var_files = {} body_params = None + if 'trad_fi_spot_order_request' in local_var_params: + body_params = local_var_params['trad_fi_spot_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/get-user-reward-records', 'GET', + '/stock/orders', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[LaunchPoolV4RewardRecord]', # 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 @@ -711,21 +752,16 @@ def list_launch_pool_reward_records_with_http_info(self, **kwargs): # noqa: E50 _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 + def delete_all_stock_orders(self, **kwargs): # noqa: E501 + """Cancel all open orders # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.delete_all_stock_orders(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. @@ -733,28 +769,23 @@ def get_hodler_airdrop_project_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[gate_api.HodlerAirdropV4ProjectItem] + :rtype: gate_api.DeleteOrder :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 + return self.delete_all_stock_orders_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 + def delete_all_stock_orders_with_http_info(self, **kwargs): # noqa: E501 + """Cancel all open orders # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.delete_all_stock_orders_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 @@ -764,7 +795,7 @@ def get_hodler_airdrop_project_list_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.HodlerAirdropV4ProjectItem], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.DeleteOrder, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -772,11 +803,6 @@ def get_hodler_airdrop_project_list_with_http_info(self, **kwargs): # noqa: E50 local_var_params = locals() all_params = [ - 'status', - 'keyword', - 'join', - 'page', - 'size' ] all_params.extend( [ @@ -791,30 +817,16 @@ def get_hodler_airdrop_project_list_with_http_info(self, **kwargs): # noqa: E50 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_hodler_airdrop_project_list" % k + " to method delete_all_stock_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 `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 = {} @@ -827,17 +839,17 @@ def get_hodler_airdrop_project_list_with_http_info(self, **kwargs): # noqa: E50 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/launch/hodler-airdrop/project-list', 'GET', + '/stock/orders', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[HodlerAirdropV4ProjectItem]', # noqa: E501 + response_type='DeleteOrder', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -845,17 +857,23 @@ def get_hodler_airdrop_project_list_with_http_info(self, **kwargs): # noqa: E50 _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 + def query_stock_order_history(self, **kwargs): # noqa: E501 + """Query historical order list # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_order_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param HodlerAirdropV4OrderRequest hodler_airdrop_v4_order_request: (required) + :param str symbol: Symbol + :param str order_ids: Order ID list, multiple separated by commas; max 20, each must be a positive integer + :param int begin_time: Start time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. + :param int end_time: End time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. + :param int side: Side (1=sell, 2=buy) + :param int page: Page number, defaults to 1 + :param int page_size: Page size, defaults to 10, max 500; server caps at 500 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -863,24 +881,30 @@ def hodler_airdrop_order(self, hodler_airdrop_v4_order_request, **kwargs): # no number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.HodlerAirdropV4OrderResponse + :rtype: gate_api.OrderHistoryList2 :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 + return self.query_stock_order_history_with_http_info(**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 + def query_stock_order_history_with_http_info(self, **kwargs): # noqa: E501 + """Query historical order list # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_order_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param HodlerAirdropV4OrderRequest hodler_airdrop_v4_order_request: (required) + :param str symbol: Symbol + :param str order_ids: Order ID list, multiple separated by commas; max 20, each must be a positive integer + :param int begin_time: Start time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. + :param int end_time: End time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. + :param int side: Side (1=sell, 2=buy) + :param int page: Page number, defaults to 1 + :param int page_size: Page size, defaults to 10, max 500; server caps at 500 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -890,7 +914,7 @@ def hodler_airdrop_order_with_http_info(self, hodler_airdrop_v4_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.HodlerAirdropV4OrderResponse, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.OrderHistoryList2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -898,7 +922,13 @@ def hodler_airdrop_order_with_http_info(self, hodler_airdrop_v4_order_request, * local_var_params = locals() all_params = [ - 'hodler_airdrop_v4_order_request' + 'symbol', + 'order_ids', + 'begin_time', + 'end_time', + 'side', + 'page', + 'page_size' ] all_params.extend( [ @@ -913,20 +943,32 @@ def hodler_airdrop_order_with_http_info(self, hodler_airdrop_v4_order_request, * if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method hodler_airdrop_order" % k + " to method query_stock_order_history" % 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 + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 500: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `query_stock_order_history`, must be a value less than or equal to `500`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'symbol' in local_var_params and local_var_params['symbol'] is not None: # noqa: E501 + query_params.append(('symbol', local_var_params['symbol'])) # noqa: E501 + if 'order_ids' in local_var_params and local_var_params['order_ids'] is not None: # noqa: E501 + query_params.append(('order_ids', local_var_params['order_ids'])) # 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 + query_params.append(('end_time', local_var_params['end_time'])) # 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 '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 = {} @@ -934,28 +976,22 @@ def hodler_airdrop_order_with_http_info(self, hodler_airdrop_v4_order_request, * 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', + '/stock/orders/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='HodlerAirdropV4OrderResponse', # noqa: E501 + response_type='OrderHistoryList2', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -963,21 +999,18 @@ def hodler_airdrop_order_with_http_info(self, hodler_airdrop_v4_order_request, * _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 + def update_stock_order(self, order_id, trad_fi_spot_order_update_request, **kwargs): # noqa: E501 + """Modify order # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.update_stock_order(order_id, trad_fi_spot_order_update_request, 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 int order_id: Order ID (required) + :param TradFiSpotOrderUpdateRequest trad_fi_spot_order_update_request: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -985,28 +1018,25 @@ def get_hodler_airdrop_user_order_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.HodlerAirdropV4UserOrderRecord] + :rtype: gate_api.UpdateOrder2 :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 + return self.update_stock_order_with_http_info(order_id, trad_fi_spot_order_update_request, **kwargs) # noqa: E501 - def get_hodler_airdrop_user_order_records_with_http_info(self, **kwargs): # noqa: E501 - """Check HODLer Airdrop participation records # noqa: E501 + def update_stock_order_with_http_info(self, order_id, trad_fi_spot_order_update_request, **kwargs): # noqa: E501 + """Modify order # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.update_stock_order_with_http_info(order_id, trad_fi_spot_order_update_request, 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 int order_id: Order ID (required) + :param TradFiSpotOrderUpdateRequest trad_fi_spot_order_update_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 @@ -1016,7 +1046,7 @@ def get_hodler_airdrop_user_order_records_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.HodlerAirdropV4UserOrderRecord], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.UpdateOrder2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1024,11 +1054,8 @@ def get_hodler_airdrop_user_order_records_with_http_info(self, **kwargs): # noq local_var_params = locals() all_params = [ - 'keyword', - 'start_timest', - 'end_timest', - 'page', - 'size' + 'order_id', + 'trad_fi_spot_order_update_request' ] all_params.extend( [ @@ -1043,30 +1070,26 @@ def get_hodler_airdrop_user_order_records_with_http_info(self, **kwargs): # noq if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_hodler_airdrop_user_order_records" % k + " to method update_stock_order" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `update_stock_order`") # noqa: E501 + # verify the required parameter 'trad_fi_spot_order_update_request' is set + if self.api_client.client_side_validation and ('trad_fi_spot_order_update_request' not in local_var_params or # noqa: E501 + local_var_params['trad_fi_spot_order_update_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `trad_fi_spot_order_update_request` when calling `update_stock_order`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `get_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 = {} + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 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 = {} @@ -1074,22 +1097,28 @@ def get_hodler_airdrop_user_order_records_with_http_info(self, **kwargs): # noq local_var_files = {} body_params = None + if 'trad_fi_spot_order_update_request' in local_var_params: + body_params = local_var_params['trad_fi_spot_order_update_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/user-order-records', 'GET', + '/stock/orders/{order_id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[HodlerAirdropV4UserOrderRecord]', # noqa: E501 + response_type='UpdateOrder2', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1097,21 +1126,17 @@ def get_hodler_airdrop_user_order_records_with_http_info(self, **kwargs): # noq _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 + def delete_stock_order(self, order_id, **kwargs): # noqa: E501 + """Cancel order # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.delete_stock_order(order_id, 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 int 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. @@ -1119,28 +1144,24 @@ def get_hodler_airdrop_user_airdrop_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.HodlerAirdropV4UserAirdropRecord] + :rtype: gate_api.DeleteOrder :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 + return self.delete_stock_order_with_http_info(order_id, **kwargs) # noqa: E501 - def get_hodler_airdrop_user_airdrop_records_with_http_info(self, **kwargs): # noqa: E501 - """Query HODLer Airdrop records # noqa: E501 + def delete_stock_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Cancel order # 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 + Rate limit: 5 qps. # 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) + >>> thread = api.delete_stock_order_with_http_info(order_id, 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 int 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 @@ -1150,7 +1171,7 @@ def get_hodler_airdrop_user_airdrop_records_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(list[gate_api.HodlerAirdropV4UserAirdropRecord], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.DeleteOrder, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1158,11 +1179,7 @@ def get_hodler_airdrop_user_airdrop_records_with_http_info(self, **kwargs): # n local_var_params = locals() all_params = [ - 'keyword', - 'start_timest', - 'end_timest', - 'page', - 'size' + 'order_id' ] all_params.extend( [ @@ -1177,30 +1194,22 @@ def get_hodler_airdrop_user_airdrop_records_with_http_info(self, **kwargs): # n if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_hodler_airdrop_user_airdrop_records" % k + " to method delete_stock_order" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `delete_stock_order`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `get_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 = {} + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 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 = {} @@ -1216,14 +1225,14 @@ def get_hodler_airdrop_user_airdrop_records_with_http_info(self, **kwargs): # n auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/launch/hodler-airdrop/user-airdrop-records', 'GET', + '/stock/orders/{order_id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[HodlerAirdropV4UserAirdropRecord]', # noqa: E501 + response_type='DeleteOrder', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1231,22 +1240,20 @@ def get_hodler_airdrop_user_airdrop_records_with_http_info(self, **kwargs): # n _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 + def query_stock_positions(self, **kwargs): # noqa: E501 + """Query current position 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 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_positions(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 int pnl_calc_type: PnL calculation cost type. Defaults to average cost price when omitted (1 = average cost price, 2 = diluted cost price) + :param int pnl_calc_price: PnL calculation price type. Defaults to intraday price when omitted (1 = intraday price, 2 = latest extended-hours price) + :param str symbol: Symbol + :param str exchange: Exchange, supports us, hk, and kr :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1254,29 +1261,27 @@ def get_candy_drop_activity_list_v4(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.CandyDropV4ActivityCd01] + :rtype: gate_api.PositionList2 :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 + return self.query_stock_positions_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 + def query_stock_positions_with_http_info(self, **kwargs): # noqa: E501 + """Query current position 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 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_positions_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 int pnl_calc_type: PnL calculation cost type. Defaults to average cost price when omitted (1 = average cost price, 2 = diluted cost price) + :param int pnl_calc_price: PnL calculation price type. Defaults to intraday price when omitted (1 = intraday price, 2 = latest extended-hours price) + :param str symbol: Symbol + :param str exchange: Exchange, supports us, hk, and kr :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1286,7 +1291,7 @@ def get_candy_drop_activity_list_v4_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.CandyDropV4ActivityCd01], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.PositionList2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1294,12 +1299,10 @@ def get_candy_drop_activity_list_v4_with_http_info(self, **kwargs): # noqa: E50 local_var_params = locals() all_params = [ - 'status', - 'rule_name', - 'register_status', - 'currency', - 'limit', - 'offset' + 'pnl_calc_type', + 'pnl_calc_price', + 'symbol', + 'exchange' ] all_params.extend( [ @@ -1314,34 +1317,24 @@ def get_candy_drop_activity_list_v4_with_http_info(self, **kwargs): # noqa: E50 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_candy_drop_activity_list_v4" % k + " to method query_stock_positions" % 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 + if 'pnl_calc_type' in local_var_params and local_var_params['pnl_calc_type'] is not None: # noqa: E501 + query_params.append(('pnl_calc_type', local_var_params['pnl_calc_type'])) # noqa: E501 + if 'pnl_calc_price' in local_var_params and local_var_params['pnl_calc_price'] is not None: # noqa: E501 + query_params.append(('pnl_calc_price', local_var_params['pnl_calc_price'])) # noqa: E501 + if 'symbol' in local_var_params and local_var_params['symbol'] is not None: # noqa: E501 + query_params.append(('symbol', local_var_params['symbol'])) # noqa: E501 + if 'exchange' in local_var_params and local_var_params['exchange'] is not None: # noqa: E501 + query_params.append(('exchange', local_var_params['exchange'])) # noqa: E501 header_params = {} @@ -1354,17 +1347,17 @@ def get_candy_drop_activity_list_v4_with_http_info(self, **kwargs): # noqa: E50 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/launch/candydrop/activity-list', 'GET', + '/stock/positions', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[CandyDropV4ActivityCd01]', # noqa: E501 + response_type='PositionList2', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1372,17 +1365,17 @@ def get_candy_drop_activity_list_v4_with_http_info(self, **kwargs): # noqa: E50 _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 + def close_stock_position(self, trad_fi_spot_close_position_request, **kwargs): # noqa: E501 + """Close position # noqa: E501 - Sign up for select CandyDrop events. Login is required and API Key signature authentication is required. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.close_stock_position(trad_fi_spot_close_position_request, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CandyDropV4RegisterReqCd02 candy_drop_v4_register_req_cd02: (required) + :param TradFiSpotClosePositionRequest trad_fi_spot_close_position_request: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1390,24 +1383,24 @@ def register_candy_drop_v4(self, candy_drop_v4_register_req_cd02, **kwargs): # number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.CandyDropV4RegisterRespCd02 + :rtype: gate_api.ClosePosition :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 + return self.close_stock_position_with_http_info(trad_fi_spot_close_position_request, **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 + def close_stock_position_with_http_info(self, trad_fi_spot_close_position_request, **kwargs): # noqa: E501 + """Close position # noqa: E501 - Sign up for select CandyDrop events. Login is required and API Key signature authentication is required. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.close_stock_position_with_http_info(trad_fi_spot_close_position_request, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CandyDropV4RegisterReqCd02 candy_drop_v4_register_req_cd02: (required) + :param TradFiSpotClosePositionRequest trad_fi_spot_close_position_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 @@ -1417,7 +1410,7 @@ def register_candy_drop_v4_with_http_info(self, candy_drop_v4_register_req_cd02, 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)) + :rtype: tuple(gate_api.ClosePosition, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1425,7 +1418,7 @@ def register_candy_drop_v4_with_http_info(self, candy_drop_v4_register_req_cd02, local_var_params = locals() all_params = [ - 'candy_drop_v4_register_req_cd02' + 'trad_fi_spot_close_position_request' ] all_params.extend( [ @@ -1440,14 +1433,14 @@ def register_candy_drop_v4_with_http_info(self, candy_drop_v4_register_req_cd02, if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method register_candy_drop_v4" % k + " to method close_stock_position" % 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 + # verify the required parameter 'trad_fi_spot_close_position_request' is set + if self.api_client.client_side_validation and ('trad_fi_spot_close_position_request' not in local_var_params or # noqa: E501 + local_var_params['trad_fi_spot_close_position_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `trad_fi_spot_close_position_request` when calling `close_stock_position`") # noqa: E501 collection_formats = {} @@ -1461,8 +1454,8 @@ def register_candy_drop_v4_with_http_info(self, candy_drop_v4_register_req_cd02, 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'] + if 'trad_fi_spot_close_position_request' in local_var_params: + body_params = local_var_params['trad_fi_spot_close_position_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1475,14 +1468,14 @@ def register_candy_drop_v4_with_http_info(self, candy_drop_v4_register_req_cd02, auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/launch/candydrop/register', 'POST', + '/stock/positions/close', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CandyDropV4RegisterRespCd02', # noqa: E501 + response_type='ClosePosition', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1490,18 +1483,22 @@ def register_candy_drop_v4_with_http_info(self, candy_drop_v4_register_req_cd02, _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 + def query_stock_transactions(self, **kwargs): # noqa: E501 + """Query transaction records # noqa: E501 - Query the rules of a specific activity, including prize pool and corresponding task data. No login required. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_transactions(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 int begin_time: Start time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. + :param int end_time: End time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. + :param str ref_id: Business idempotent ID. When ref_id is provided, the server queries by ref_id, ignoring other parameters such as begin_time, end_time, type, page, page_size + :param str type: Transaction type + :param int page: Page number, defaults to 1 + :param int page_size: Page size, defaults to 10, max 500; server caps at 500 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1509,25 +1506,29 @@ def get_candy_drop_activity_rules_v4(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.CandyDropV4ActivityRulesCd03 + :rtype: gate_api.TransactionList2 :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 + return self.query_stock_transactions_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 + def query_stock_transactions_with_http_info(self, **kwargs): # noqa: E501 + """Query transaction records # noqa: E501 - Query the rules of a specific activity, including prize pool and corresponding task data. No login required. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_transactions_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 int begin_time: Start time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. + :param int end_time: End time (Unix timestamp, seconds). When both begin_time and end_time are provided, end_time must be >= begin_time, query range must not exceed 3 months. + :param str ref_id: Business idempotent ID. When ref_id is provided, the server queries by ref_id, ignoring other parameters such as begin_time, end_time, type, page, page_size + :param str type: Transaction type + :param int page: Page number, defaults to 1 + :param int page_size: Page size, defaults to 10, max 500; server caps at 500 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1537,7 +1538,7 @@ def get_candy_drop_activity_rules_v4_with_http_info(self, **kwargs): # noqa: E5 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.CandyDropV4ActivityRulesCd03, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.TransactionList2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1545,8 +1546,12 @@ def get_candy_drop_activity_rules_v4_with_http_info(self, **kwargs): # noqa: E5 local_var_params = locals() all_params = [ - 'activity_id', - 'currency' + 'begin_time', + 'end_time', + 'ref_id', + 'type', + 'page', + 'page_size' ] all_params.extend( [ @@ -1561,20 +1566,30 @@ def get_candy_drop_activity_rules_v4_with_http_info(self, **kwargs): # noqa: E5 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_candy_drop_activity_rules_v4" % k + " to method query_stock_transactions" % k ) local_var_params[k] = v del local_var_params['kwargs'] + if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 500: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page_size` when calling `query_stock_transactions`, must be a value less than or equal to `500`") # noqa: E501 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 + 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 + query_params.append(('end_time', local_var_params['end_time'])) # noqa: E501 + if 'ref_id' in local_var_params and local_var_params['ref_id'] is not None: # noqa: E501 + query_params.append(('ref_id', local_var_params['ref_id'])) # 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 '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 = {} @@ -1587,17 +1602,17 @@ def get_candy_drop_activity_rules_v4_with_http_info(self, **kwargs): # noqa: E5 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/launch/candydrop/activity-rules', 'GET', + '/stock/transactions', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CandyDropV4ActivityRulesCd03', # noqa: E501 + response_type='TransactionList2', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1605,18 +1620,17 @@ def get_candy_drop_activity_rules_v4_with_http_info(self, **kwargs): # noqa: E5 _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 + def create_stock_transaction(self, trad_fi_spot_transaction_request, **kwargs): # noqa: E501 + """Fund transfer # noqa: E501 - Check the completion progress of tasks that are in progress and have been registered/participated. Login required. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.create_stock_transaction(trad_fi_spot_transaction_request, 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 TradFiSpotTransactionRequest trad_fi_spot_transaction_request: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1624,25 +1638,24 @@ def get_candy_drop_task_progress_v4(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.CandyDropV4TaskProgressCd04 + :rtype: gate_api.CreateTransaction2 :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 + return self.create_stock_transaction_with_http_info(trad_fi_spot_transaction_request, **kwargs) # noqa: E501 - def get_candy_drop_task_progress_v4_with_http_info(self, **kwargs): # noqa: E501 - """Query task completion progress # noqa: E501 + def create_stock_transaction_with_http_info(self, trad_fi_spot_transaction_request, **kwargs): # noqa: E501 + """Fund transfer # noqa: E501 - Check the completion progress of tasks that are in progress and have been registered/participated. Login required. # noqa: E501 + Rate limit: 5 qps. # 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) + >>> thread = api.create_stock_transaction_with_http_info(trad_fi_spot_transaction_request, 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 TradFiSpotTransactionRequest trad_fi_spot_transaction_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 @@ -1652,7 +1665,7 @@ def get_candy_drop_task_progress_v4_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(gate_api.CandyDropV4TaskProgressCd04, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.CreateTransaction2, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1660,8 +1673,7 @@ def get_candy_drop_task_progress_v4_with_http_info(self, **kwargs): # noqa: E50 local_var_params = locals() all_params = [ - 'activity_id', - 'currency' + 'trad_fi_spot_transaction_request' ] all_params.extend( [ @@ -1676,20 +1688,20 @@ def get_candy_drop_task_progress_v4_with_http_info(self, **kwargs): # noqa: E50 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_candy_drop_task_progress_v4" % k + " to method create_stock_transaction" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'trad_fi_spot_transaction_request' is set + if self.api_client.client_side_validation and ('trad_fi_spot_transaction_request' not in local_var_params or # noqa: E501 + local_var_params['trad_fi_spot_transaction_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `trad_fi_spot_transaction_request` when calling `create_stock_transaction`") # noqa: E501 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 = {} @@ -1697,22 +1709,28 @@ def get_candy_drop_task_progress_v4_with_http_info(self, **kwargs): # noqa: E50 local_var_files = {} body_params = None + if 'trad_fi_spot_transaction_request' in local_var_params: + body_params = local_var_params['trad_fi_spot_transaction_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/candydrop/task-progress', 'GET', + '/stock/transactions', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CandyDropV4TaskProgressCd04', # noqa: E501 + response_type='CreateTransaction2', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1720,22 +1738,15 @@ def get_candy_drop_task_progress_v4_with_http_info(self, **kwargs): # noqa: E50 _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 + def query_stock_exchanges(self, **kwargs): # noqa: E501 + """Query supported exchanges # 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) + >>> thread = api.query_stock_exchanges(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. @@ -1743,29 +1754,22 @@ def get_candy_drop_participation_records_v4(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.CandyDropV4ParticipationRecordCd05] + :rtype: gate_api.Exchanges :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 + return self.query_stock_exchanges_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 + def query_stock_exchanges_with_http_info(self, **kwargs): # noqa: E501 + """Query supported exchanges # 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) + >>> thread = api.query_stock_exchanges_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 @@ -1775,7 +1779,7 @@ def get_candy_drop_participation_records_v4_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(list[gate_api.CandyDropV4ParticipationRecordCd05], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.Exchanges, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1783,12 +1787,6 @@ def get_candy_drop_participation_records_v4_with_http_info(self, **kwargs): # n local_var_params = locals() all_params = [ - 'currency', - 'status', - 'start_time', - 'end_time', - 'page', - 'limit' ] all_params.extend( [ @@ -1803,34 +1801,16 @@ def get_candy_drop_participation_records_v4_with_http_info(self, **kwargs): # n if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_candy_drop_participation_records_v4" % k + " to method query_stock_exchanges" % 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 = {} @@ -1843,17 +1823,17 @@ def get_candy_drop_participation_records_v4_with_http_info(self, **kwargs): # n ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/launch/candydrop/participation-records', 'GET', + '/stock/exchanges', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[CandyDropV4ParticipationRecordCd05]', # noqa: E501 + response_type='Exchanges', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1861,21 +1841,16 @@ def get_candy_drop_participation_records_v4_with_http_info(self, **kwargs): # n _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 + def query_stock_fee_rate(self, **kwargs): # noqa: E501 + """Query fee rates for Japanese and Korean stocks # noqa: E501 - Query the user's CandyDrop airdrop details. Login required. # noqa: E501 + Query fee rates for Japanese and Korean stocks. Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_fee_rate(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. @@ -1883,28 +1858,23 @@ def get_candy_drop_airdrop_records_v4(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.CandyDropV4AirdropRecordCd06] + :rtype: gate_api.FeeRate :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 + return self.query_stock_fee_rate_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 + def query_stock_fee_rate_with_http_info(self, **kwargs): # noqa: E501 + """Query fee rates for Japanese and Korean stocks # noqa: E501 - Query the user's CandyDrop airdrop details. Login required. # noqa: E501 + Query fee rates for Japanese and Korean stocks. Rate limit: 5 qps. # 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) + >>> thread = api.query_stock_fee_rate_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 @@ -1914,7 +1884,7 @@ def get_candy_drop_airdrop_records_v4_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.CandyDropV4AirdropRecordCd06], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.FeeRate, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1922,11 +1892,6 @@ def get_candy_drop_airdrop_records_v4_with_http_info(self, **kwargs): # noqa: E local_var_params = locals() all_params = [ - 'currency', - 'start_time', - 'end_time', - 'page', - 'limit' ] all_params.extend( [ @@ -1941,32 +1906,16 @@ def get_candy_drop_airdrop_records_v4_with_http_info(self, **kwargs): # noqa: E if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_candy_drop_airdrop_records_v4" % k + " to method query_stock_fee_rate" % 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 = {} @@ -1979,17 +1928,17 @@ def get_candy_drop_airdrop_records_v4_with_http_info(self, **kwargs): # noqa: E ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/launch/candydrop/airdrop-records', 'GET', + '/stock/fee-rate', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[CandyDropV4AirdropRecordCd06]', # noqa: E501 + response_type='FeeRate', # noqa: E501 auth_settings=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/unified_api.py b/gate_api/api/unified_api.py index ac0ec7f2..349ab0cb 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -1890,6 +1890,124 @@ def calculate_portfolio_margin_with_http_info(self, unified_portfolio_input, **k _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def set_user_leverage(self, user_leverage_setting, **kwargs): # noqa: E501 + """Set leverage for all of the user's borrowed currencies # noqa: E501 + + Note the following: - Leverage cannot be changed for currencies with outstanding loans. - A leverage value above a currency's limit is capped at that limit. - Failures are not rolled back and affect only the currencies that failed. For example, if USDT has an outstanding loan, only the USDT leverage remains unchanged. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_user_leverage(user_leverage_setting, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UserLeverageSetting user_leverage_setting: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.LeverageFailedCurrencies] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_user_leverage_with_http_info(user_leverage_setting, **kwargs) # noqa: E501 + + def set_user_leverage_with_http_info(self, user_leverage_setting, **kwargs): # noqa: E501 + """Set leverage for all of the user's borrowed currencies # noqa: E501 + + Note the following: - Leverage cannot be changed for currencies with outstanding loans. - A leverage value above a currency's limit is capped at that limit. - Failures are not rolled back and affect only the currencies that failed. For example, if USDT has an outstanding loan, only the USDT leverage remains unchanged. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_user_leverage_with_http_info(user_leverage_setting, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UserLeverageSetting user_leverage_setting: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.LeverageFailedCurrencies], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_leverage_setting' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_user_leverage" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_leverage_setting' is set + if self.api_client.client_side_validation and ('user_leverage_setting' not in local_var_params or # noqa: E501 + local_var_params['user_leverage_setting'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_leverage_setting` when calling `set_user_leverage`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'user_leverage_setting' in local_var_params: + body_params = local_var_params['user_leverage_setting'] + # 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/leverage/user_setting', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LeverageFailedCurrencies]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 """Maximum and minimum currency leverage that can be set # noqa: E501 diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py index ff4f564f..1c2f2f6e 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -549,6 +549,120 @@ def list_deposits_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def get_transfer(self, tx_id, **kwargs): # noqa: E501 + """Get trading account transfer # noqa: E501 + + Get the current user's trading account transfer details using the tx_id returned by the transfer endpoint # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_transfer(tx_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str tx_id: Transfer transaction 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.AccountTransferDetail + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_transfer_with_http_info(tx_id, **kwargs) # noqa: E501 + + def get_transfer_with_http_info(self, tx_id, **kwargs): # noqa: E501 + """Get trading account transfer # noqa: E501 + + Get the current user's trading account transfer details using the tx_id returned by the transfer endpoint # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_transfer_with_http_info(tx_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str tx_id: Transfer transaction 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.AccountTransferDetail, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'tx_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_transfer" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'tx_id' is set + if self.api_client.client_side_validation and ('tx_id' not in local_var_params or # noqa: E501 + local_var_params['tx_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `tx_id` when calling `get_transfer`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'tx_id' in local_var_params and local_var_params['tx_id'] is not None: # noqa: E501 + query_params.append(('tx_id', local_var_params['tx_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/transfers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountTransferDetail', # noqa: E501 + auth_settings=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 transfer(self, transfer, **kwargs): # noqa: E501 """Transfer between trading accounts # noqa: E501 diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 8118909a..c68f5102 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.100/python' + self.user_agent = 'OpenAPI-Generator/7.2.123/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 2df3abfc..ff07ebc0 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.100\n"\ - "SDK Package Version: 7.2.100".\ + "Version of the API: v4.106.123\n"\ + "SDK Package Version: 7.2.123".\ 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 ef30069f..dcb189a1 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -37,6 +37,7 @@ from gate_api.models.account_key_info import AccountKeyInfo from gate_api.models.account_key_info_perms import AccountKeyInfoPerms from gate_api.models.account_rate_limit import AccountRateLimit +from gate_api.models.account_transfer_detail import AccountTransferDetail from gate_api.models.accounts_response import AccountsResponse from gate_api.models.ads_detail_request import AdsDetailRequest from gate_api.models.ads_list_request import AdsListRequest @@ -100,23 +101,14 @@ 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.close_position import ClosePosition +from gate_api.models.close_position_data import ClosePositionData 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 @@ -150,12 +142,12 @@ 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_transaction2 import CreateTransaction2 from gate_api.models.create_uni_lend import CreateUniLend from gate_api.models.create_uni_loan import CreateUniLoan from gate_api.models.create_user_resp import CreateUserResp @@ -169,6 +161,8 @@ 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_batch_cancel_order_request import CrossexBatchCancelOrderRequest +from gate_api.models.crossex_batch_cancel_order_response import CrossexBatchCancelOrderResponse 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 @@ -178,9 +172,13 @@ 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_isolated_margin_request import CrossexIsolatedMarginRequest +from gate_api.models.crossex_isolated_margin_response import CrossexIsolatedMarginResponse 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_mode_request import CrossexMarginModeRequest +from gate_api.models.crossex_margin_mode_response import CrossexMarginModeResponse 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 @@ -200,6 +198,7 @@ from gate_api.models.currency_pair import CurrencyPair from gate_api.models.currency_quota import CurrencyQuota from gate_api.models.debit_fee import DebitFee +from gate_api.models.delete_order import DeleteOrder from gate_api.models.delete_position import DeletePosition from gate_api.models.delivery_account import DeliveryAccount from gate_api.models.delivery_account_book import DeliveryAccountBook @@ -238,6 +237,12 @@ 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.exchanges import Exchanges +from gate_api.models.exchanges_data import ExchangesData +from gate_api.models.exchanges_data_list import ExchangesDataList +from gate_api.models.fee_rate import FeeRate +from gate_api.models.fee_rate_data import FeeRateData +from gate_api.models.fee_rate_data_list import FeeRateDataList 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 @@ -321,28 +326,20 @@ 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.i18n_txt import I18nTxt from gate_api.models.index_constituent import IndexConstituent 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_response2002 import InlineResponse2002 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.leverage_failed_currencies import LeverageFailedCurrencies 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 @@ -429,15 +426,25 @@ from gate_api.models.options_underlying_ticker import OptionsUnderlyingTicker from gate_api.models.order import Order from gate_api.models.order_book import OrderBook +from gate_api.models.order_book2 import OrderBook2 +from gate_api.models.order_book2_data import OrderBook2Data +from gate_api.models.order_book_price import OrderBookPrice 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_list2 import OrderHistoryList2 +from gate_api.models.order_history_list2_data import OrderHistoryList2Data from gate_api.models.order_history_list_data import OrderHistoryListData from gate_api.models.order_history_list_data_list import OrderHistoryListDataList +from gate_api.models.order_history_list_item import OrderHistoryListItem +from gate_api.models.order_history_list_item_status_detail import OrderHistoryListItemStatusDetail from gate_api.models.order_list import OrderList +from gate_api.models.order_list2 import OrderList2 +from gate_api.models.order_list2_data import OrderList2Data from gate_api.models.order_list_data import OrderListData from gate_api.models.order_list_data_list import OrderListDataList +from gate_api.models.order_list_item import OrderListItem 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 @@ -483,6 +490,7 @@ 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_list_trade_method import P2pAdsListTradeMethod 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 @@ -545,8 +553,11 @@ from gate_api.models.position_history_list_data_list import PositionHistoryListDataList from gate_api.models.position_history_list_data_realized_pnl_detail import PositionHistoryListDataRealizedPnlDetail from gate_api.models.position_list import PositionList +from gate_api.models.position_list2 import PositionList2 +from gate_api.models.position_list2_data import PositionList2Data from gate_api.models.position_list_data import PositionListData from gate_api.models.position_list_data_list import PositionListDataList +from gate_api.models.position_list_item import PositionListItem 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 @@ -562,8 +573,6 @@ 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 @@ -576,7 +585,6 @@ 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 @@ -587,6 +595,8 @@ 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_pov_order import SpotPovOrder +from gate_api.models.spot_pov_order_creator import SpotPovOrderCreator 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 @@ -614,7 +624,17 @@ from gate_api.models.swap_coin import SwapCoin from gate_api.models.swap_coin_struct import SwapCoinStruct from gate_api.models.symbol import Symbol +from gate_api.models.symbol_commissions import SymbolCommissions +from gate_api.models.symbol_commissions_data import SymbolCommissionsData +from gate_api.models.symbol_commissions_data_list import SymbolCommissionsDataList +from gate_api.models.symbol_detail import SymbolDetail +from gate_api.models.symbol_detail_data import SymbolDetailData +from gate_api.models.symbol_detail_item import SymbolDetailItem +from gate_api.models.symbol_detail_item_symbol_descs import SymbolDetailItemSymbolDescs +from gate_api.models.symbol_list_item import SymbolListItem from gate_api.models.symbols import Symbols +from gate_api.models.symbols2 import Symbols2 +from gate_api.models.symbols2_data import Symbols2Data from gate_api.models.symbols_data import SymbolsData from gate_api.models.symbols_data_list import SymbolsDataList from gate_api.models.system_time import SystemTime @@ -626,6 +646,11 @@ 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_spot_close_position_request import TradFiSpotClosePositionRequest +from gate_api.models.trad_fi_spot_error import TradFiSpotError +from gate_api.models.trad_fi_spot_order_request import TradFiSpotOrderRequest +from gate_api.models.trad_fi_spot_order_update_request import TradFiSpotOrderUpdateRequest +from gate_api.models.trad_fi_spot_transaction_request import TradFiSpotTransactionRequest 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 @@ -637,9 +662,11 @@ 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_item import TransactionItem from gate_api.models.transaction_list import TransactionList +from gate_api.models.transaction_list2 import TransactionList2 +from gate_api.models.transaction_list2_data import TransactionList2Data from gate_api.models.transaction_list_data import TransactionListData from gate_api.models.transaction_list_data_list import TransactionListDataList from gate_api.models.transfer import Transfer @@ -690,12 +717,17 @@ 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_order2 import UpdateOrder2 +from gate_api.models.update_order2_data import UpdateOrder2Data from gate_api.models.update_order_data import UpdateOrderData from gate_api.models.update_position import UpdatePosition from gate_api.models.update_trail_order import UpdateTrailOrder from gate_api.models.upload_chat_file import UploadChatFile from gate_api.models.user_asset_resp import UserAssetResp +from gate_api.models.user_asset_resp2 import UserAssetResp2 +from gate_api.models.user_asset_resp2_data import UserAssetResp2Data from gate_api.models.user_asset_resp_data import UserAssetRespData +from gate_api.models.user_leverage_setting import UserLeverageSetting from gate_api.models.user_sub import UserSub from gate_api.models.user_sub_relation import UserSubRelation from gate_api.models.withdraw_status import WithdrawStatus diff --git a/gate_api/models/account_transfer_detail.py b/gate_api/models/account_transfer_detail.py new file mode 100644 index 00000000..b9925f31 --- /dev/null +++ b/gate_api/models/account_transfer_detail.py @@ -0,0 +1,341 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AccountTransferDetail(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'tx_id': 'str', + 'status': 'str', + 'currency': 'str', + 'amount': 'str', + 'from_account': 'str', + 'to_account': 'str', + 'settle': 'str', + 'currency_pair': 'str' + } + + attribute_map = { + 'tx_id': 'tx_id', + 'status': 'status', + 'currency': 'currency', + 'amount': 'amount', + 'from_account': 'from_account', + 'to_account': 'to_account', + 'settle': 'settle', + 'currency_pair': 'currency_pair' + } + + def __init__(self, tx_id=None, status=None, currency=None, amount=None, from_account=None, to_account=None, settle=None, currency_pair=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, Configuration) -> None + """AccountTransferDetail - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._tx_id = None + self._status = None + self._currency = None + self._amount = None + self._from_account = None + self._to_account = None + self._settle = None + self._currency_pair = None + self.discriminator = None + + self.tx_id = tx_id + self.status = status + self.currency = currency + self.amount = amount + self.from_account = from_account + self.to_account = to_account + self.settle = settle + self.currency_pair = currency_pair + + @property + def tx_id(self): + """Gets the tx_id of this AccountTransferDetail. # noqa: E501 + + Transfer transaction ID # noqa: E501 + + :return: The tx_id of this AccountTransferDetail. # noqa: E501 + :rtype: str + """ + return self._tx_id + + @tx_id.setter + def tx_id(self, tx_id): + """Sets the tx_id of this AccountTransferDetail. + + Transfer transaction ID # noqa: E501 + + :param tx_id: The tx_id of this AccountTransferDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and tx_id is None: # noqa: E501 + raise ValueError("Invalid value for `tx_id`, must not be `None`") # noqa: E501 + + self._tx_id = tx_id + + @property + def status(self): + """Gets the status of this AccountTransferDetail. # noqa: E501 + + Transfer status: - `pending`: Processing - `success`: Successful - `fail`: Failed # noqa: E501 + + :return: The status of this AccountTransferDetail. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AccountTransferDetail. + + Transfer status: - `pending`: Processing - `success`: Successful - `fail`: Failed # noqa: E501 + + :param status: The status of this AccountTransferDetail. # 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 = ["pending", "success", "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 currency(self): + """Gets the currency of this AccountTransferDetail. # noqa: E501 + + Transfer currency # noqa: E501 + + :return: The currency of this AccountTransferDetail. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this AccountTransferDetail. + + Transfer currency # noqa: E501 + + :param currency: The currency of this AccountTransferDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this AccountTransferDetail. # noqa: E501 + + Transfer amount # noqa: E501 + + :return: The amount of this AccountTransferDetail. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AccountTransferDetail. + + Transfer amount # noqa: E501 + + :param amount: The amount of this AccountTransferDetail. # 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 from_account(self): + """Gets the from_account of this AccountTransferDetail. # noqa: E501 + + Source account type: - `spot`: Spot account - `margin`: Margin account - `futures`: Perpetual futures account - `delivery`: Delivery futures account - `options`: Options account - `unknown`: Unrecognized account type # noqa: E501 + + :return: The from_account of this AccountTransferDetail. # noqa: E501 + :rtype: str + """ + return self._from_account + + @from_account.setter + def from_account(self, from_account): + """Sets the from_account of this AccountTransferDetail. + + Source account type: - `spot`: Spot account - `margin`: Margin account - `futures`: Perpetual futures account - `delivery`: Delivery futures account - `options`: Options account - `unknown`: Unrecognized account type # noqa: E501 + + :param from_account: The from_account of this AccountTransferDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and from_account is None: # noqa: E501 + raise ValueError("Invalid value for `from_account`, must not be `None`") # noqa: E501 + allowed_values = ["spot", "margin", "futures", "delivery", "options", "unknown"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and from_account not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `from_account` ({0}), must be one of {1}" # noqa: E501 + .format(from_account, allowed_values) + ) + + self._from_account = from_account + + @property + def to_account(self): + """Gets the to_account of this AccountTransferDetail. # noqa: E501 + + Destination account type: - `spot`: Spot account - `margin`: Margin account - `futures`: Perpetual futures account - `delivery`: Delivery futures account - `options`: Options account - `unknown`: Unrecognized account type # noqa: E501 + + :return: The to_account of this AccountTransferDetail. # noqa: E501 + :rtype: str + """ + return self._to_account + + @to_account.setter + def to_account(self, to_account): + """Sets the to_account of this AccountTransferDetail. + + Destination account type: - `spot`: Spot account - `margin`: Margin account - `futures`: Perpetual futures account - `delivery`: Delivery futures account - `options`: Options account - `unknown`: Unrecognized account type # noqa: E501 + + :param to_account: The to_account of this AccountTransferDetail. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and to_account is None: # noqa: E501 + raise ValueError("Invalid value for `to_account`, must not be `None`") # noqa: E501 + allowed_values = ["spot", "margin", "futures", "delivery", "options", "unknown"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and to_account not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `to_account` ({0}), must be one of {1}" # noqa: E501 + .format(to_account, allowed_values) + ) + + self._to_account = to_account + + @property + def settle(self): + """Gets the settle of this AccountTransferDetail. # noqa: E501 + + Settlement currency for futures, delivery, and options transfers; otherwise, null # noqa: E501 + + :return: The settle of this AccountTransferDetail. # noqa: E501 + :rtype: str + """ + return self._settle + + @settle.setter + def settle(self, settle): + """Sets the settle of this AccountTransferDetail. + + Settlement currency for futures, delivery, and options transfers; otherwise, null # noqa: E501 + + :param settle: The settle of this AccountTransferDetail. # noqa: E501 + :type: str + """ + + self._settle = settle + + @property + def currency_pair(self): + """Gets the currency_pair of this AccountTransferDetail. # noqa: E501 + + Currency pair for margin transfers; otherwise, null # noqa: E501 + + :return: The currency_pair of this AccountTransferDetail. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this AccountTransferDetail. + + Currency pair for margin transfers; otherwise, null # noqa: E501 + + :param currency_pair: The currency_pair of this AccountTransferDetail. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountTransferDetail): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountTransferDetail): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/alpha_currency.py b/gate_api/models/alpha_currency.py index 9abb3799..c3e84805 100644 --- a/gate_api/models/alpha_currency.py +++ b/gate_api/models/alpha_currency.py @@ -179,7 +179,7 @@ def address(self, address): def amount_precision(self): """Gets the amount_precision of this AlphaCurrency. # noqa: E501 - Amount scale # noqa: E501 + Quantity precision # noqa: E501 :return: The amount_precision of this AlphaCurrency. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def amount_precision(self): def amount_precision(self, amount_precision): """Sets the amount_precision of this AlphaCurrency. - Amount scale # noqa: E501 + Quantity precision # noqa: E501 :param amount_precision: The amount_precision of this AlphaCurrency. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def amount_precision(self, amount_precision): def precision(self): """Gets the precision of this AlphaCurrency. # noqa: E501 - Price scale # noqa: E501 + Price precision # noqa: E501 :return: The precision of this AlphaCurrency. # noqa: E501 :rtype: int @@ -213,7 +213,7 @@ def precision(self): def precision(self, precision): """Sets the precision of this AlphaCurrency. - Price scale # noqa: E501 + Price precision # noqa: E501 :param precision: The precision of this AlphaCurrency. # noqa: E501 :type: int diff --git a/gate_api/models/auto_invest_order_item.py b/gate_api/models/auto_invest_order_item.py index 48edf0d8..6ef6f85a 100644 --- a/gate_api/models/auto_invest_order_item.py +++ b/gate_api/models/auto_invest_order_item.py @@ -141,7 +141,7 @@ def id(self, id): def type(self): """Gets the type of this AutoInvestOrderItem. # noqa: E501 - type # noqa: E501 + Type # noqa: E501 :return: The type of this AutoInvestOrderItem. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def type(self): def type(self, type): """Sets the type of this AutoInvestOrderItem. - type # noqa: E501 + Type # noqa: E501 :param type: The type of this AutoInvestOrderItem. # noqa: E501 :type: str diff --git a/gate_api/models/auto_invest_plan_detail.py b/gate_api/models/auto_invest_plan_detail.py index 2bc9387d..7fde60ba 100644 --- a/gate_api/models/auto_invest_plan_detail.py +++ b/gate_api/models/auto_invest_plan_detail.py @@ -390,7 +390,7 @@ def period_hour(self, period_hour): def portfolio(self): """Gets the portfolio of this AutoInvestPlanDetail. # noqa: E501 - InvestmentPortfolio # noqa: E501 + Portfolio # noqa: E501 :return: The portfolio of this AutoInvestPlanDetail. # noqa: E501 :rtype: list[AutoInvestPortfolioItem] @@ -401,7 +401,7 @@ def portfolio(self): def portfolio(self, portfolio): """Sets the portfolio of this AutoInvestPlanDetail. - InvestmentPortfolio # noqa: E501 + Portfolio # noqa: E501 :param portfolio: The portfolio of this AutoInvestPlanDetail. # noqa: E501 :type: list[AutoInvestPortfolioItem] diff --git a/gate_api/models/auto_invest_plan_record_item.py b/gate_api/models/auto_invest_plan_record_item.py index f8af5c6c..585b01f3 100644 --- a/gate_api/models/auto_invest_plan_record_item.py +++ b/gate_api/models/auto_invest_plan_record_item.py @@ -139,7 +139,7 @@ def id(self, id): def type(self): """Gets the type of this AutoInvestPlanRecordItem. # noqa: E501 - type # noqa: E501 + Type # noqa: E501 :return: The type of this AutoInvestPlanRecordItem. # noqa: E501 :rtype: str @@ -150,7 +150,7 @@ def type(self): def type(self, type): """Sets the type of this AutoInvestPlanRecordItem. - type # noqa: E501 + Type # noqa: E501 :param type: The type of this AutoInvestPlanRecordItem. # 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 deleted file mode 100644 index 8fcf3ba9..00000000 --- a/gate_api/models/candy_drop_v4_activity_cd01.py +++ /dev/null @@ -1,319 +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 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 deleted file mode 100644 index d5bc9370..00000000 --- a/gate_api/models/candy_drop_v4_activity_rules_cd03.py +++ /dev/null @@ -1,235 +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 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 deleted file mode 100644 index a1af2011..00000000 --- a/gate_api/models/candy_drop_v4_airdrop_record_cd06.py +++ /dev/null @@ -1,207 +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 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/candy_drop_v4_participation_record_cd05.py b/gate_api/models/candy_drop_v4_participation_record_cd05.py deleted file mode 100644 index 513665c6..00000000 --- a/gate_api/models/candy_drop_v4_participation_record_cd05.py +++ /dev/null @@ -1,207 +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 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 deleted file mode 100644 index ac4c9953..00000000 --- a/gate_api/models/candy_drop_v4_prize_pool_cd03.py +++ /dev/null @@ -1,207 +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 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_task_progress_cd04.py b/gate_api/models/candy_drop_v4_task_progress_cd04.py deleted file mode 100644 index dd78e4fe..00000000 --- a/gate_api/models/candy_drop_v4_task_progress_cd04.py +++ /dev/null @@ -1,235 +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 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 deleted file mode 100644 index debbf6a8..00000000 --- a/gate_api/models/candy_drop_v4_task_progress_item_cd04.py +++ /dev/null @@ -1,179 +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 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/close_position.py b/gate_api/models/close_position.py new file mode 100644 index 00000000..9d7d1925 --- /dev/null +++ b/gate_api/models/close_position.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class ClosePosition(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'ClosePositionData', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (ClosePositionData, int, Configuration) -> None + """ClosePosition - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this ClosePosition. # noqa: E501 + + + :return: The data of this ClosePosition. # noqa: E501 + :rtype: ClosePositionData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ClosePosition. + + + :param data: The data of this ClosePosition. # noqa: E501 + :type: ClosePositionData + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this ClosePosition. # noqa: E501 + + + :return: The timestamp of this ClosePosition. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ClosePosition. + + + :param timestamp: The timestamp of this ClosePosition. # 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, ClosePosition): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ClosePosition): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/redeem_launch_pool_response.py b/gate_api/models/close_position_data.py similarity index 69% rename from gate_api/models/redeem_launch_pool_response.py rename to gate_api/models/close_position_data.py index e13e062d..520cc1e3 100644 --- a/gate_api/models/redeem_launch_pool_response.py +++ b/gate_api/models/close_position_data.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class RedeemLaunchPoolResponse(object): +class ClosePositionData(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,48 +33,48 @@ class RedeemLaunchPoolResponse(object): and the value is json key in definition. """ openapi_types = { - 'success': 'bool' + 'order_id': 'int' } attribute_map = { - 'success': 'success' + 'order_id': 'order_id' } - def __init__(self, success=None, local_vars_configuration=None): # noqa: E501 - # type: (bool, Configuration) -> None - """RedeemLaunchPoolResponse - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """ClosePositionData - a 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._order_id = None self.discriminator = None - if success is not None: - self.success = success + if order_id is not None: + self.order_id = order_id @property - def success(self): - """Gets the success of this RedeemLaunchPoolResponse. # noqa: E501 + def order_id(self): + """Gets the order_id of this ClosePositionData. # noqa: E501 - Whether redemption was successful # noqa: E501 + Close order ID # noqa: E501 - :return: The success of this RedeemLaunchPoolResponse. # noqa: E501 - :rtype: bool + :return: The order_id of this ClosePositionData. # noqa: E501 + :rtype: int """ - return self._success + return self._order_id - @success.setter - def success(self, success): - """Sets the success of this RedeemLaunchPoolResponse. + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this ClosePositionData. - Whether redemption was successful # noqa: E501 + Close order ID # noqa: E501 - :param success: The success of this RedeemLaunchPoolResponse. # noqa: E501 - :type: bool + :param order_id: The order_id of this ClosePositionData. # noqa: E501 + :type: int """ - self._success = success + self._order_id = order_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, RedeemLaunchPoolResponse): + if not isinstance(other, ClosePositionData): return 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): + if not isinstance(other, ClosePositionData): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index c770abd6..5b6a01a2 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -787,7 +787,7 @@ def risk_limit_max(self, risk_limit_max): def order_size_min(self): """Gets the order_size_min of this Contract. # noqa: E501 - Minimum order size allowed by the contract # noqa: E501 + Minimum order quantity # noqa: E501 :return: The order_size_min of this Contract. # noqa: E501 :rtype: str @@ -798,7 +798,7 @@ def order_size_min(self): def order_size_min(self, order_size_min): """Sets the order_size_min of this Contract. - Minimum order size allowed by the contract # noqa: E501 + Minimum order quantity # noqa: E501 :param order_size_min: The order_size_min of this Contract. # noqa: E501 :type: str @@ -833,7 +833,7 @@ def enable_decimal(self, enable_decimal): def order_size_max(self): """Gets the order_size_max of this Contract. # noqa: E501 - Maximum order size allowed by the contract # noqa: E501 + Maximum order quantity # noqa: E501 :return: The order_size_max of this Contract. # noqa: E501 :rtype: str @@ -844,7 +844,7 @@ def order_size_max(self): def order_size_max(self, order_size_max): """Sets the order_size_max of this Contract. - Maximum order size allowed by the contract # noqa: E501 + Maximum order quantity # noqa: E501 :param order_size_max: The order_size_max of this Contract. # noqa: E501 :type: str diff --git a/gate_api/models/contract_detail_data_list.py b/gate_api/models/contract_detail_data_list.py index 3a7fb87d..d0c83c9a 100644 --- a/gate_api/models/contract_detail_data_list.py +++ b/gate_api/models/contract_detail_data_list.py @@ -298,7 +298,7 @@ def min_order_volume(self, min_order_volume): def leverage(self): """Gets the leverage of this ContractDetailDataList. # noqa: E501 - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :return: The leverage of this ContractDetailDataList. # noqa: E501 :rtype: str @@ -309,7 +309,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this ContractDetailDataList. - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :param leverage: The leverage of this ContractDetailDataList. # noqa: E501 :type: str diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py index 6c2adfb8..5c5a0164 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -55,8 +55,8 @@ class ContractStat(object): 'short_taker_size': 'str', 'top_long_account': 'int', 'top_short_account': 'int', - 'long_users': 'str', - 'short_users': 'str' + 'long_users': 'int', + 'short_users': 'int' } attribute_map = { @@ -87,7 +87,7 @@ class ContractStat(object): } 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 + # type: (int, float, float, str, float, float, float, str, float, float, float, str, float, float, str, float, str, str, str, str, int, int, int, int, Configuration) -> None """ContractStat - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -681,7 +681,7 @@ def long_users(self): Number of users holding long positions # noqa: E501 :return: The long_users of this ContractStat. # noqa: E501 - :rtype: str + :rtype: int """ return self._long_users @@ -692,7 +692,7 @@ def long_users(self, long_users): Number of users holding long positions # noqa: E501 :param long_users: The long_users of this ContractStat. # noqa: E501 - :type: str + :type: int """ self._long_users = long_users @@ -704,7 +704,7 @@ def short_users(self): Number of users holding short positions # noqa: E501 :return: The short_users of this ContractStat. # noqa: E501 - :rtype: str + :rtype: int """ return self._short_users @@ -715,7 +715,7 @@ def short_users(self, short_users): Number of users holding short positions # noqa: E501 :param short_users: The short_users of this ContractStat. # noqa: E501 - :type: str + :type: int """ self._short_users = short_users diff --git a/gate_api/models/create_order_v4.py b/gate_api/models/create_order_v4.py deleted file mode 100644 index 42adf9c5..00000000 --- a/gate_api/models/create_order_v4.py +++ /dev/null @@ -1,188 +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 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_transaction2.py b/gate_api/models/create_transaction2.py new file mode 100644 index 00000000..f3e03caf --- /dev/null +++ b/gate_api/models/create_transaction2.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 CreateTransaction2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (object, int, Configuration) -> None + """CreateTransaction2 - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this CreateTransaction2. # noqa: E501 + + Returns empty object on success # noqa: E501 + + :return: The data of this CreateTransaction2. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CreateTransaction2. + + Returns empty object on success # noqa: E501 + + :param data: The data of this CreateTransaction2. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this CreateTransaction2. # noqa: E501 + + + :return: The timestamp of this CreateTransaction2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this CreateTransaction2. + + + :param timestamp: The timestamp of this CreateTransaction2. # 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, CreateTransaction2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTransaction2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_user_resp_data.py b/gate_api/models/create_user_resp_data.py index 9b54a2b7..ac1b1b22 100644 --- a/gate_api/models/create_user_resp_data.py +++ b/gate_api/models/create_user_resp_data.py @@ -90,7 +90,7 @@ def status(self, status): def leverage(self): """Gets the leverage of this CreateUserRespData. # noqa: E501 - leverage # noqa: E501 + Leverage # noqa: E501 :return: The leverage of this CreateUserRespData. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this CreateUserRespData. - leverage # noqa: E501 + Leverage # noqa: E501 :param leverage: The leverage of this CreateUserRespData. # noqa: E501 :type: int diff --git a/gate_api/models/crossex_account_book_record.py b/gate_api/models/crossex_account_book_record.py index d8f0e001..b00e4455 100644 --- a/gate_api/models/crossex_account_book_record.py +++ b/gate_api/models/crossex_account_book_record.py @@ -39,6 +39,7 @@ class CrossexAccountBookRecord(object): 'statement_type': 'str', 'exchange_type': 'str', 'coin': 'str', + 'symbol': 'str', 'change': 'str', 'balance': 'str', 'create_time': 'str' @@ -51,13 +52,14 @@ class CrossexAccountBookRecord(object): 'statement_type': 'statement_type', 'exchange_type': 'exchange_type', 'coin': 'coin', + 'symbol': 'symbol', 'change': 'change', 'balance': 'balance', 'create_time': 'create_time' } - 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 + def __init__(self, id=None, user_id=None, business_id=None, statement_type=None, exchange_type=None, coin=None, symbol=None, change=None, balance=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None """CrossexAccountBookRecord - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -69,6 +71,7 @@ def __init__(self, id=None, user_id=None, business_id=None, statement_type=None, self._statement_type = None self._exchange_type = None self._coin = None + self._symbol = None self._change = None self._balance = None self._create_time = None @@ -80,6 +83,8 @@ def __init__(self, id=None, user_id=None, business_id=None, statement_type=None, self.statement_type = statement_type self.exchange_type = exchange_type self.coin = coin + if symbol is not None: + self.symbol = symbol self.change = change self.balance = balance self.create_time = create_time @@ -138,7 +143,7 @@ def user_id(self, user_id): def business_id(self): """Gets the business_id of this CrossexAccountBookRecord. # noqa: E501 - Business ID # noqa: E501 + Business ID. Its meaning varies by `statement_type`. `TRANSACTION`: order ID. `TRADING_FEE`: order ID. `LIQUIDATION_FEE`: liquidation order ID. `FUNDING_FEE`: position ID and funding fee settlement time. For other types, it is a system-generated processing ID with no business meaning. # noqa: E501 :return: The business_id of this CrossexAccountBookRecord. # noqa: E501 :rtype: str @@ -149,7 +154,7 @@ def business_id(self): def business_id(self, business_id): """Sets the business_id of this CrossexAccountBookRecord. - Business ID # noqa: E501 + Business ID. Its meaning varies by `statement_type`. `TRANSACTION`: order ID. `TRADING_FEE`: order ID. `LIQUIDATION_FEE`: liquidation order ID. `FUNDING_FEE`: position ID and funding fee settlement time. For other types, it is a system-generated processing ID with no business meaning. # noqa: E501 :param business_id: The business_id of this CrossexAccountBookRecord. # noqa: E501 :type: str @@ -234,6 +239,29 @@ def coin(self, coin): self._coin = coin + @property + def symbol(self): + """Gets the symbol of this CrossexAccountBookRecord. # noqa: E501 + + Trading Pair # noqa: E501 + + :return: The symbol of this CrossexAccountBookRecord. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this CrossexAccountBookRecord. + + Trading Pair # noqa: E501 + + :param symbol: The symbol of this CrossexAccountBookRecord. # noqa: E501 + :type: str + """ + + self._symbol = symbol + @property def change(self): """Gets the change of this CrossexAccountBookRecord. # noqa: E501 diff --git a/gate_api/models/crossex_account_update_request.py b/gate_api/models/crossex_account_update_request.py index dbb515b1..1b9ad177 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` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to adjust futures position mode. # noqa: E501 + Exchange (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT` / `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` / `KRAKEN` / `HYPERLIQUID` / `CROSSEX`). When account mode is `ISOLATED_EXCHANGE`, the exchange must be specified to adjust futures position mode. # noqa: E501 + Exchange (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT` / `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/crossex_account_update_response.py b/gate_api/models/crossex_account_update_response.py index fe63d592..edb3cb58 100644 --- a/gate_api/models/crossex_account_update_response.py +++ b/gate_api/models/crossex_account_update_response.py @@ -113,7 +113,7 @@ def account_mode(self, account_mode): def exchange_type(self): """Gets the exchange_type of this CrossexAccountUpdateResponse. # 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 + Exchange targeted by the requested change (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT` / `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 CrossexAccountUpdateResponse. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def exchange_type(self): def exchange_type(self, exchange_type): """Sets the exchange_type of this CrossexAccountUpdateResponse. - 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 + Exchange targeted by the requested change (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT` / `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 CrossexAccountUpdateResponse. # noqa: E501 :type: str diff --git a/gate_api/models/crossex_adl_rank.py b/gate_api/models/crossex_adl_rank.py index 5ac8a7fd..35ea49e5 100644 --- a/gate_api/models/crossex_adl_rank.py +++ b/gate_api/models/crossex_adl_rank.py @@ -143,7 +143,7 @@ def crossex_adl_rank(self, crossex_adl_rank): def exchange_adl_rank(self): """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 + Exchange raw information (BINANCE: 0-4, larger numbers rank higher; OKX: 0-5, larger numbers rank higher; GATE: 1-5, smaller numbers rank higher; Kraken: 20, 40, 80, 100, smaller numbers rank higher; BYBIT: 0-5, larger numbers rank higher) # noqa: E501 :return: The exchange_adl_rank of this CrossexAdlRank. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def exchange_adl_rank(self): def exchange_adl_rank(self, exchange_adl_rank): """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 + Exchange raw information (BINANCE: 0-4, larger numbers rank higher; OKX: 0-5, larger numbers rank higher; GATE: 1-5, smaller numbers rank higher; Kraken: 20, 40, 80, 100, smaller numbers rank higher; BYBIT: 0-5, larger numbers rank higher) # noqa: E501 :param exchange_adl_rank: The exchange_adl_rank of this CrossexAdlRank. # noqa: E501 :type: str diff --git a/gate_api/models/transaction_config.py b/gate_api/models/crossex_batch_cancel_order_request.py similarity index 55% rename from gate_api/models/transaction_config.py rename to gate_api/models/crossex_batch_cancel_order_request.py index 405392fb..c99f0011 100644 --- a/gate_api/models/transaction_config.py +++ b/gate_api/models/crossex_batch_cancel_order_request.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class TransactionConfig(object): +class CrossexBatchCancelOrderRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,76 +33,76 @@ class TransactionConfig(object): and the value is json key in definition. """ openapi_types = { - 'transaction_amount': 'float', - 'mortgage_limit': 'float' + 'order_id': 'str', + 'text': 'str' } attribute_map = { - 'transaction_amount': 'transaction_amount', - 'mortgage_limit': 'mortgage_limit' + 'order_id': 'order_id', + 'text': 'text' } - 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 + def __init__(self, order_id=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """CrossexBatchCancelOrderRequest - a 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._order_id = None + self._text = 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 + if order_id is not None: + self.order_id = order_id + if text is not None: + self.text = text @property - def transaction_amount(self): - """Gets the transaction_amount of this TransactionConfig. # noqa: E501 + def order_id(self): + """Gets the order_id of this CrossexBatchCancelOrderRequest. # noqa: E501 - Trading amount requirement # noqa: E501 + Order ID; either this field or text is required # noqa: E501 - :return: The transaction_amount of this TransactionConfig. # noqa: E501 - :rtype: float + :return: The order_id of this CrossexBatchCancelOrderRequest. # noqa: E501 + :rtype: str """ - return self._transaction_amount + return self._order_id - @transaction_amount.setter - def transaction_amount(self, transaction_amount): - """Sets the transaction_amount of this TransactionConfig. + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CrossexBatchCancelOrderRequest. - Trading amount requirement # noqa: E501 + Order ID; either this field or text is required # noqa: E501 - :param transaction_amount: The transaction_amount of this TransactionConfig. # noqa: E501 - :type: float + :param order_id: The order_id of this CrossexBatchCancelOrderRequest. # noqa: E501 + :type: str """ - self._transaction_amount = transaction_amount + self._order_id = order_id @property - def mortgage_limit(self): - """Gets the mortgage_limit of this TransactionConfig. # noqa: E501 + def text(self): + """Gets the text of this CrossexBatchCancelOrderRequest. # noqa: E501 - Pledge limit # noqa: E501 + Custom ID specified by the user when creating the order; either this field or order_id is required # noqa: E501 - :return: The mortgage_limit of this TransactionConfig. # noqa: E501 - :rtype: float + :return: The text of this CrossexBatchCancelOrderRequest. # noqa: E501 + :rtype: str """ - return self._mortgage_limit + return self._text - @mortgage_limit.setter - def mortgage_limit(self, mortgage_limit): - """Sets the mortgage_limit of this TransactionConfig. + @text.setter + def text(self, text): + """Sets the text of this CrossexBatchCancelOrderRequest. - Pledge limit # noqa: E501 + Custom ID specified by the user when creating the order; either this field or order_id is required # noqa: E501 - :param mortgage_limit: The mortgage_limit of this TransactionConfig. # noqa: E501 - :type: float + :param text: The text of this CrossexBatchCancelOrderRequest. # noqa: E501 + :type: str """ - self._mortgage_limit = mortgage_limit + self._text = text 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, TransactionConfig): + if not isinstance(other, CrossexBatchCancelOrderRequest): return 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): + if not isinstance(other, CrossexBatchCancelOrderRequest): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_batch_cancel_order_response.py b/gate_api/models/crossex_batch_cancel_order_response.py new file mode 100644 index 00000000..dd1d9d8f --- /dev/null +++ b/gate_api/models/crossex_batch_cancel_order_response.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 CrossexBatchCancelOrderResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'text': 'str', + 'accepted': 'str', + 'label': 'str', + 'message': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'text': 'text', + 'accepted': 'accepted', + 'label': 'label', + 'message': 'message' + } + + def __init__(self, order_id=None, text=None, accepted=None, label=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """CrossexBatchCancelOrderResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._text = None + self._accepted = None + self._label = None + self._message = None + self.discriminator = None + + self.order_id = order_id + self.text = text + self.accepted = accepted + self.label = label + self.message = message + + @property + def order_id(self): + """Gets the order_id of this CrossexBatchCancelOrderResponse. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this CrossexBatchCancelOrderResponse. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CrossexBatchCancelOrderResponse. + + Order ID # noqa: E501 + + :param order_id: The order_id of this CrossexBatchCancelOrderResponse. # 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 CrossexBatchCancelOrderResponse. # noqa: E501 + + Custom ID specified by the user when creating the order # noqa: E501 + + :return: The text of this CrossexBatchCancelOrderResponse. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this CrossexBatchCancelOrderResponse. + + Custom ID specified by the user when creating the order # noqa: E501 + + :param text: The text of this CrossexBatchCancelOrderResponse. # 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 accepted(self): + """Gets the accepted of this CrossexBatchCancelOrderResponse. # noqa: E501 + + Whether the request was accepted, as the string true or false # noqa: E501 + + :return: The accepted of this CrossexBatchCancelOrderResponse. # noqa: E501 + :rtype: str + """ + return self._accepted + + @accepted.setter + def accepted(self, accepted): + """Sets the accepted of this CrossexBatchCancelOrderResponse. + + Whether the request was accepted, as the string true or false # noqa: E501 + + :param accepted: The accepted of this CrossexBatchCancelOrderResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and accepted is None: # noqa: E501 + raise ValueError("Invalid value for `accepted`, must not be `None`") # noqa: E501 + + self._accepted = accepted + + @property + def label(self): + """Gets the label of this CrossexBatchCancelOrderResponse. # noqa: E501 + + Error label when the request is not accepted; empty on success # noqa: E501 + + :return: The label of this CrossexBatchCancelOrderResponse. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this CrossexBatchCancelOrderResponse. + + Error label when the request is not accepted; empty on success # noqa: E501 + + :param label: The label of this CrossexBatchCancelOrderResponse. # 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 + + self._label = label + + @property + def message(self): + """Gets the message of this CrossexBatchCancelOrderResponse. # noqa: E501 + + Error message when the request is not accepted; empty on success # noqa: E501 + + :return: The message of this CrossexBatchCancelOrderResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CrossexBatchCancelOrderResponse. + + Error message when the request is not accepted; empty on success # noqa: E501 + + :param message: The message of this CrossexBatchCancelOrderResponse. # 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, CrossexBatchCancelOrderResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossexBatchCancelOrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_isolated_margin_request.py b/gate_api/models/crossex_isolated_margin_request.py new file mode 100644 index 00000000..d5ca4111 --- /dev/null +++ b/gate_api/models/crossex_isolated_margin_request.py @@ -0,0 +1,187 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossexIsolatedMarginRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'margin': 'str', + 'position_side': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'margin': 'margin', + 'position_side': 'position_side' + } + + def __init__(self, symbol=None, margin=None, position_side=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """CrossexIsolatedMarginRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._margin = None + self._position_side = None + self.discriminator = None + + self.symbol = symbol + self.margin = margin + if position_side is not None: + self.position_side = position_side + + @property + def symbol(self): + """Gets the symbol of this CrossexIsolatedMarginRequest. # noqa: E501 + + Hyperliquid futures trading pair # noqa: E501 + + :return: The symbol of this CrossexIsolatedMarginRequest. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this CrossexIsolatedMarginRequest. + + Hyperliquid futures trading pair # noqa: E501 + + :param symbol: The symbol of this CrossexIsolatedMarginRequest. # 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 margin(self): + """Gets the margin of this CrossexIsolatedMarginRequest. # noqa: E501 + + Margin adjustment amount. Positive values increase margin, while negative values decrease margin. Values with more than two decimal places are truncated to two decimal places # noqa: E501 + + :return: The margin of this CrossexIsolatedMarginRequest. # noqa: E501 + :rtype: str + """ + return self._margin + + @margin.setter + def margin(self, margin): + """Sets the margin of this CrossexIsolatedMarginRequest. + + Margin adjustment amount. Positive values increase margin, while negative values decrease margin. Values with more than two decimal places are truncated to two decimal places # noqa: E501 + + :param margin: The margin of this CrossexIsolatedMarginRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and margin is None: # noqa: E501 + raise ValueError("Invalid value for `margin`, must not be `None`") # noqa: E501 + + self._margin = margin + + @property + def position_side(self): + """Gets the position_side of this CrossexIsolatedMarginRequest. # noqa: E501 + + Position side (NONE/LONG/SHORT). Defaults to NONE for one-way positions if omitted # noqa: E501 + + :return: The position_side of this CrossexIsolatedMarginRequest. # noqa: E501 + :rtype: str + """ + return self._position_side + + @position_side.setter + def position_side(self, position_side): + """Sets the position_side of this CrossexIsolatedMarginRequest. + + Position side (NONE/LONG/SHORT). Defaults to NONE for one-way positions if omitted # noqa: E501 + + :param position_side: The position_side of this CrossexIsolatedMarginRequest. # noqa: E501 + :type: str + """ + allowed_values = ["NONE", "LONG", "SHORT"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and position_side not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `position_side` ({0}), must be one of {1}" # noqa: E501 + .format(position_side, allowed_values) + ) + + self._position_side = position_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, CrossexIsolatedMarginRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossexIsolatedMarginRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_isolated_margin_response.py b/gate_api/models/crossex_isolated_margin_response.py new file mode 100644 index 00000000..ad781363 --- /dev/null +++ b/gate_api/models/crossex_isolated_margin_response.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 CrossexIsolatedMarginResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'margin': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'margin': 'margin' + } + + def __init__(self, symbol=None, margin=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """CrossexIsolatedMarginResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._margin = None + self.discriminator = None + + self.symbol = symbol + self.margin = margin + + @property + def symbol(self): + """Gets the symbol of this CrossexIsolatedMarginResponse. # noqa: E501 + + Futures trading pair # noqa: E501 + + :return: The symbol of this CrossexIsolatedMarginResponse. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this CrossexIsolatedMarginResponse. + + Futures trading pair # noqa: E501 + + :param symbol: The symbol of this CrossexIsolatedMarginResponse. # 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 margin(self): + """Gets the margin of this CrossexIsolatedMarginResponse. # noqa: E501 + + Amount of isolated margin increased or decreased in this request # noqa: E501 + + :return: The margin of this CrossexIsolatedMarginResponse. # noqa: E501 + :rtype: str + """ + return self._margin + + @margin.setter + def margin(self, margin): + """Sets the margin of this CrossexIsolatedMarginResponse. + + Amount of isolated margin increased or decreased in this request # noqa: E501 + + :param margin: The margin of this CrossexIsolatedMarginResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and margin is None: # noqa: E501 + raise ValueError("Invalid value for `margin`, must not be `None`") # noqa: E501 + + self._margin = margin + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossexIsolatedMarginResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossexIsolatedMarginResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_leverage_request.py b/gate_api/models/crossex_leverage_request.py index 45b1bf06..83fd73b3 100644 --- a/gate_api/models/crossex_leverage_request.py +++ b/gate_api/models/crossex_leverage_request.py @@ -85,7 +85,7 @@ def symbol(self, symbol): def leverage(self): """Gets the leverage of this CrossexLeverageRequest. # noqa: E501 - leverage # noqa: E501 + Leverage # noqa: E501 :return: The leverage of this CrossexLeverageRequest. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this CrossexLeverageRequest. - leverage # noqa: E501 + Leverage # noqa: E501 :param leverage: The leverage of this CrossexLeverageRequest. # noqa: E501 :type: str diff --git a/gate_api/models/launch_pool_v4_error_response.py b/gate_api/models/crossex_margin_mode_request.py similarity index 57% rename from gate_api/models/launch_pool_v4_error_response.py rename to gate_api/models/crossex_margin_mode_request.py index 83a7de6a..a9ab7356 100644 --- a/gate_api/models/launch_pool_v4_error_response.py +++ b/gate_api/models/crossex_margin_mode_request.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class LaunchPoolV4ErrorResponse(object): +class CrossexMarginModeRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,84 +33,84 @@ class LaunchPoolV4ErrorResponse(object): and the value is json key in definition. """ openapi_types = { - 'label': 'str', - 'message': 'str' + 'symbol': 'str', + 'margin_mode': 'str' } attribute_map = { - 'label': 'label', - 'message': 'message' + 'symbol': 'symbol', + 'margin_mode': 'margin_mode' } - def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, symbol=None, margin_mode=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """LaunchPoolV4ErrorResponse - a model defined in OpenAPI""" # noqa: E501 + """CrossexMarginModeRequest - a 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._symbol = None + self._margin_mode = None self.discriminator = None - self.label = label - self.message = message + self.symbol = symbol + self.margin_mode = margin_mode @property - def label(self): - """Gets the label of this LaunchPoolV4ErrorResponse. # noqa: E501 + def symbol(self): + """Gets the symbol of this CrossexMarginModeRequest. # noqa: E501 - Error label # noqa: E501 + Hyperliquid futures trading pair # noqa: E501 - :return: The label of this LaunchPoolV4ErrorResponse. # noqa: E501 + :return: The symbol of this CrossexMarginModeRequest. # noqa: E501 :rtype: str """ - return self._label + return self._symbol - @label.setter - def label(self, label): - """Sets the label of this LaunchPoolV4ErrorResponse. + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this CrossexMarginModeRequest. - Error label # noqa: E501 + Hyperliquid futures trading pair # noqa: E501 - :param label: The label of this LaunchPoolV4ErrorResponse. # noqa: E501 + :param symbol: The symbol of this CrossexMarginModeRequest. # 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) - ) + 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._label = label + self._symbol = symbol @property - def message(self): - """Gets the message of this LaunchPoolV4ErrorResponse. # noqa: E501 + def margin_mode(self): + """Gets the margin_mode of this CrossexMarginModeRequest. # noqa: E501 - Error message # noqa: E501 + Margin mode (CROSS/ISOLATED) # noqa: E501 - :return: The message of this LaunchPoolV4ErrorResponse. # noqa: E501 + :return: The margin_mode of this CrossexMarginModeRequest. # noqa: E501 :rtype: str """ - return self._message + return self._margin_mode - @message.setter - def message(self, message): - """Sets the message of this LaunchPoolV4ErrorResponse. + @margin_mode.setter + def margin_mode(self, margin_mode): + """Sets the margin_mode of this CrossexMarginModeRequest. - Error message # noqa: E501 + Margin mode (CROSS/ISOLATED) # noqa: E501 - :param message: The message of this LaunchPoolV4ErrorResponse. # noqa: E501 + :param margin_mode: The margin_mode of this CrossexMarginModeRequest. # 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 + if self.local_vars_configuration.client_side_validation and margin_mode is None: # noqa: E501 + raise ValueError("Invalid value for `margin_mode`, must not be `None`") # noqa: E501 + allowed_values = ["CROSS", "ISOLATED"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and margin_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `margin_mode` ({0}), must be one of {1}" # noqa: E501 + .format(margin_mode, allowed_values) + ) - self._message = message + self._margin_mode = margin_mode def to_dict(self): """Returns the model properties as a dict""" @@ -146,14 +146,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, LaunchPoolV4ErrorResponse): + if not isinstance(other, CrossexMarginModeRequest): return 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): + if not isinstance(other, CrossexMarginModeRequest): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_margin_mode_response.py b/gate_api/models/crossex_margin_mode_response.py new file mode 100644 index 00000000..e9009a44 --- /dev/null +++ b/gate_api/models/crossex_margin_mode_response.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 CrossexMarginModeResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'margin_mode': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'margin_mode': 'margin_mode' + } + + def __init__(self, symbol=None, margin_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """CrossexMarginModeResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._margin_mode = None + self.discriminator = None + + self.symbol = symbol + self.margin_mode = margin_mode + + @property + def symbol(self): + """Gets the symbol of this CrossexMarginModeResponse. # noqa: E501 + + Futures trading pair # noqa: E501 + + :return: The symbol of this CrossexMarginModeResponse. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this CrossexMarginModeResponse. + + Futures trading pair # noqa: E501 + + :param symbol: The symbol of this CrossexMarginModeResponse. # 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 margin_mode(self): + """Gets the margin_mode of this CrossexMarginModeResponse. # noqa: E501 + + Margin mode (CROSS/ISOLATED) # noqa: E501 + + :return: The margin_mode of this CrossexMarginModeResponse. # noqa: E501 + :rtype: str + """ + return self._margin_mode + + @margin_mode.setter + def margin_mode(self, margin_mode): + """Sets the margin_mode of this CrossexMarginModeResponse. + + Margin mode (CROSS/ISOLATED) # noqa: E501 + + :param margin_mode: The margin_mode of this CrossexMarginModeResponse. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and margin_mode is None: # noqa: E501 + raise ValueError("Invalid value for `margin_mode`, must not be `None`") # noqa: E501 + + self._margin_mode = 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, CrossexMarginModeResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossexMarginModeResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/crossex_order.py b/gate_api/models/crossex_order.py index 63198722..1014262a 100644 --- a/gate_api/models/crossex_order.py +++ b/gate_api/models/crossex_order.py @@ -364,7 +364,7 @@ def attribute(self, attribute): def exchange_type(self): """Gets the exchange_type of this CrossexOrder. # noqa: E501 - Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). # noqa: E501 :return: The exchange_type of this CrossexOrder. # noqa: E501 :rtype: str @@ -375,7 +375,7 @@ def exchange_type(self): def exchange_type(self, exchange_type): """Sets the exchange_type of this CrossexOrder. - Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). # noqa: E501 :param exchange_type: The exchange_type of this CrossexOrder. # noqa: E501 :type: str @@ -489,7 +489,7 @@ def price(self, price): def time_in_force(self): """Gets the time_in_force of this CrossexOrder. # noqa: E501 - Time in force (default `GTC`; enum: `GTC` / `IOC` / `FOK` / `POC`). # noqa: E501 + Time-in-force policy (default: GTC; allowed values: GTC, IOC, FOK, POC, and RPI) # noqa: E501 :return: The time_in_force of this CrossexOrder. # noqa: E501 :rtype: str @@ -500,7 +500,7 @@ def time_in_force(self): def time_in_force(self, time_in_force): """Sets the time_in_force of this CrossexOrder. - Time in force (default `GTC`; enum: `GTC` / `IOC` / `FOK` / `POC`). # noqa: E501 + Time-in-force policy (default: GTC; allowed values: GTC, IOC, FOK, POC, and RPI) # noqa: E501 :param time_in_force: The time_in_force of this CrossexOrder. # noqa: E501 :type: str diff --git a/gate_api/models/crossex_order_request.py b/gate_api/models/crossex_order_request.py index 8d9a8732..fd10b1ed 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 `{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 + 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`; For an ADA/USDC futures order on Deribit, use `DERIBIT_FUTURE_ADA_USDC`; Supports spot trades, USDT-margined perpetual futures, and spot margin templates. BYBIT and DERIBIT omit 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 `{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 + 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`; For an ADA/USDC futures order on Deribit, use `DERIBIT_FUTURE_ADA_USDC`; Supports spot trades, USDT-margined perpetual futures, and spot margin templates. BYBIT and DERIBIT omit 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 @@ -208,7 +208,7 @@ def type(self, type): def time_in_force(self): """Gets the time_in_force of this CrossexOrderRequest. # noqa: E501 - Default GTC, supports enumerated types: GTC, IOC, FOK, POC GTC: GoodTillCancelled IOC: ImmediateOrCancelled FOK: FillOrKill POC: PendingOrCancelled or PostOnly # noqa: E501 + Defaults to GTC. Supported values: `GTC`, `IOC`, `FOK`, `POC`, and `RPI` `GTC`: GoodTillCancelled `IOC`: ImmediateOrCancelled `FOK`: FillOrKill `POC`: PendingOrCancelled or PostOnly `RPI`: Retail Price Improvement # noqa: E501 :return: The time_in_force of this CrossexOrderRequest. # noqa: E501 :rtype: str @@ -219,12 +219,12 @@ def time_in_force(self): def time_in_force(self, time_in_force): """Sets the time_in_force of this CrossexOrderRequest. - Default GTC, supports enumerated types: GTC, IOC, FOK, POC GTC: GoodTillCancelled IOC: ImmediateOrCancelled FOK: FillOrKill POC: PendingOrCancelled or PostOnly # noqa: E501 + Defaults to GTC. Supported values: `GTC`, `IOC`, `FOK`, `POC`, and `RPI` `GTC`: GoodTillCancelled `IOC`: ImmediateOrCancelled `FOK`: FillOrKill `POC`: PendingOrCancelled or PostOnly `RPI`: Retail Price Improvement # noqa: E501 :param time_in_force: The time_in_force of this CrossexOrderRequest. # noqa: E501 :type: str """ - allowed_values = ["GTC", "IOC", "FOK", "POC"] # noqa: E501 + allowed_values = ["GTC", "IOC", "FOK", "POC", "RPI"] # noqa: E501 if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 diff --git a/gate_api/models/crossex_position.py b/gate_api/models/crossex_position.py index 100f0720..6d78ac50 100644 --- a/gate_api/models/crossex_position.py +++ b/gate_api/models/crossex_position.py @@ -38,12 +38,15 @@ class CrossexPosition(object): 'symbol': 'str', 'position_side': 'str', 'initial_margin': 'str', + 'isolated_margin': 'str', + 'margin_mode': 'str', 'maintenance_margin': 'str', 'position_qty': 'str', 'position_value': 'str', 'upnl': 'str', 'upnl_rate': 'str', 'entry_price': 'str', + 'liq_price': 'str', 'mark_price': 'str', 'leverage': 'str', 'max_leverage': 'str', @@ -62,12 +65,15 @@ class CrossexPosition(object): 'symbol': 'symbol', 'position_side': 'position_side', 'initial_margin': 'initial_margin', + 'isolated_margin': 'isolated_margin', + 'margin_mode': 'margin_mode', 'maintenance_margin': 'maintenance_margin', 'position_qty': 'position_qty', 'position_value': 'position_value', 'upnl': 'upnl', 'upnl_rate': 'upnl_rate', 'entry_price': 'entry_price', + 'liq_price': 'liq_price', 'mark_price': 'mark_price', 'leverage': 'leverage', 'max_leverage': 'max_leverage', @@ -80,8 +86,8 @@ class CrossexPosition(object): 'closed_pnl': 'closed_pnl' } - 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 + def __init__(self, user_id=None, position_id=None, symbol=None, position_side=None, initial_margin=None, isolated_margin=None, margin_mode=None, maintenance_margin=None, position_qty=None, position_value=None, upnl=None, upnl_rate=None, entry_price=None, liq_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, str, str, str, Configuration) -> None """CrossexPosition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -92,12 +98,15 @@ def __init__(self, user_id=None, position_id=None, symbol=None, position_side=No self._symbol = None self._position_side = None self._initial_margin = None + self._isolated_margin = None + self._margin_mode = None self._maintenance_margin = None self._position_qty = None self._position_value = None self._upnl = None self._upnl_rate = None self._entry_price = None + self._liq_price = None self._mark_price = None self._leverage = None self._max_leverage = None @@ -120,6 +129,10 @@ def __init__(self, user_id=None, position_id=None, symbol=None, position_side=No self.position_side = position_side if initial_margin is not None: self.initial_margin = initial_margin + if isolated_margin is not None: + self.isolated_margin = isolated_margin + if margin_mode is not None: + self.margin_mode = margin_mode if maintenance_margin is not None: self.maintenance_margin = maintenance_margin if position_qty is not None: @@ -132,6 +145,8 @@ def __init__(self, user_id=None, position_id=None, symbol=None, position_side=No self.upnl_rate = upnl_rate if entry_price is not None: self.entry_price = entry_price + if liq_price is not None: + self.liq_price = liq_price if mark_price is not None: self.mark_price = mark_price if leverage is not None: @@ -268,6 +283,52 @@ def initial_margin(self, initial_margin): self._initial_margin = initial_margin + @property + def isolated_margin(self): + """Gets the isolated_margin of this CrossexPosition. # noqa: E501 + + Isolated margin. It is 0 in cross margin mode and applies only to isolated margin positions # noqa: E501 + + :return: The isolated_margin of this CrossexPosition. # noqa: E501 + :rtype: str + """ + return self._isolated_margin + + @isolated_margin.setter + def isolated_margin(self, isolated_margin): + """Sets the isolated_margin of this CrossexPosition. + + Isolated margin. It is 0 in cross margin mode and applies only to isolated margin positions # noqa: E501 + + :param isolated_margin: The isolated_margin of this CrossexPosition. # noqa: E501 + :type: str + """ + + self._isolated_margin = isolated_margin + + @property + def margin_mode(self): + """Gets the margin_mode of this CrossexPosition. # noqa: E501 + + Margin mode (CROSS/ISOLATED) # noqa: E501 + + :return: The margin_mode of this CrossexPosition. # noqa: E501 + :rtype: str + """ + return self._margin_mode + + @margin_mode.setter + def margin_mode(self, margin_mode): + """Sets the margin_mode of this CrossexPosition. + + Margin mode (CROSS/ISOLATED) # noqa: E501 + + :param margin_mode: The margin_mode of this CrossexPosition. # noqa: E501 + :type: str + """ + + self._margin_mode = margin_mode + @property def maintenance_margin(self): """Gets the maintenance_margin of this CrossexPosition. # noqa: E501 @@ -406,6 +467,29 @@ def entry_price(self, entry_price): self._entry_price = entry_price + @property + def liq_price(self): + """Gets the liq_price of this CrossexPosition. # noqa: E501 + + Liquidation price. It is 0 in cross margin mode and applies only to isolated margin positions; 0 in isolated margin mode means the position will not be liquidated # noqa: E501 + + :return: The liq_price of this CrossexPosition. # noqa: E501 + :rtype: str + """ + return self._liq_price + + @liq_price.setter + def liq_price(self, liq_price): + """Sets the liq_price of this CrossexPosition. + + Liquidation price. It is 0 in cross margin mode and applies only to isolated margin positions; 0 in isolated margin mode means the position will not be liquidated # noqa: E501 + + :param liq_price: The liq_price of this CrossexPosition. # noqa: E501 + :type: str + """ + + self._liq_price = liq_price + @property def mark_price(self): """Gets the mark_price of this CrossexPosition. # noqa: E501 @@ -525,7 +609,7 @@ def fee(self, fee): def funding_fee(self): """Gets the funding_fee of this CrossexPosition. # noqa: E501 - Position Funding Fee # noqa: E501 + Accumulated position funding fee. A positive value indicates a gain, while a negative value indicates a loss. # noqa: E501 :return: The funding_fee of this CrossexPosition. # noqa: E501 :rtype: str @@ -536,7 +620,7 @@ def funding_fee(self): def funding_fee(self, funding_fee): """Sets the funding_fee of this CrossexPosition. - Position Funding Fee # noqa: E501 + Accumulated position funding fee. A positive value indicates a gain, while a negative value indicates a loss. # noqa: E501 :param funding_fee: The funding_fee of this CrossexPosition. # noqa: E501 :type: str diff --git a/gate_api/models/crossex_special_fee.py b/gate_api/models/crossex_special_fee.py index 5bd26fcb..4db992da 100644 --- a/gate_api/models/crossex_special_fee.py +++ b/gate_api/models/crossex_special_fee.py @@ -35,17 +35,19 @@ class CrossexSpecialFee(object): openapi_types = { 'symbol': 'str', 'taker_fee_rate': 'str', - 'maker_fee_rate': 'str' + 'maker_fee_rate': 'str', + 'rpi_fee_rate': 'str' } attribute_map = { 'symbol': 'symbol', 'taker_fee_rate': 'taker_fee_rate', - 'maker_fee_rate': 'maker_fee_rate' + 'maker_fee_rate': 'maker_fee_rate', + 'rpi_fee_rate': 'rpi_fee_rate' } - 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 + def __init__(self, symbol=None, taker_fee_rate=None, maker_fee_rate=None, rpi_fee_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None """CrossexSpecialFee - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -54,11 +56,14 @@ def __init__(self, symbol=None, taker_fee_rate=None, maker_fee_rate=None, local_ self._symbol = None self._taker_fee_rate = None self._maker_fee_rate = None + self._rpi_fee_rate = None self.discriminator = None self.symbol = symbol self.taker_fee_rate = taker_fee_rate self.maker_fee_rate = maker_fee_rate + if rpi_fee_rate is not None: + self.rpi_fee_rate = rpi_fee_rate @property def symbol(self): @@ -135,6 +140,29 @@ def maker_fee_rate(self, maker_fee_rate): self._maker_fee_rate = maker_fee_rate + @property + def rpi_fee_rate(self): + """Gets the rpi_fee_rate of this CrossexSpecialFee. # noqa: E501 + + RPI order maker fee rate # noqa: E501 + + :return: The rpi_fee_rate of this CrossexSpecialFee. # noqa: E501 + :rtype: str + """ + return self._rpi_fee_rate + + @rpi_fee_rate.setter + def rpi_fee_rate(self, rpi_fee_rate): + """Sets the rpi_fee_rate of this CrossexSpecialFee. + + RPI order maker fee rate # noqa: E501 + + :param rpi_fee_rate: The rpi_fee_rate of this CrossexSpecialFee. # noqa: E501 + :type: str + """ + + self._rpi_fee_rate = rpi_fee_rate + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/crossex_transfer_record.py b/gate_api/models/crossex_transfer_record.py index e068bbca..e3b154ab 100644 --- a/gate_api/models/crossex_transfer_record.py +++ b/gate_api/models/crossex_transfer_record.py @@ -148,7 +148,7 @@ def text(self, text): def from_account_type(self): """Gets the from_account_type of this CrossexTransferRecord. # 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 + `from` credit account touched by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `CROSSEX`, `SPOT`). # noqa: E501 :return: The from_account_type of this CrossexTransferRecord. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def from_account_type(self): def from_account_type(self, from_account_type): """Sets the from_account_type of this CrossexTransferRecord. - `from` credit account touched by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 + `from` credit account touched by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `CROSSEX`, `SPOT`). # noqa: E501 :param from_account_type: The from_account_type of this CrossexTransferRecord. # noqa: E501 :type: str @@ -173,7 +173,7 @@ def from_account_type(self, from_account_type): def to_account_type(self): """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 + `to` debit account handled by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `CROSSEX`, `SPOT`). # noqa: E501 :return: The to_account_type of this CrossexTransferRecord. # noqa: E501 :rtype: str @@ -184,7 +184,7 @@ def to_account_type(self): def to_account_type(self, to_account_type): """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 + `to` debit account handled by this operation (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `CROSSEX`, `SPOT`). # noqa: E501 :param to_account_type: The to_account_type of this CrossexTransferRecord. # noqa: E501 :type: str diff --git a/gate_api/models/crossex_transfer_request.py b/gate_api/models/crossex_transfer_request.py index dbd8048c..bc33815d 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 - `from` receiving account (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 + `from` receiving account (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `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. - `from` receiving account (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT`). # noqa: E501 + `from` receiving account (`CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `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 - `to` debit account (funds withdrawn from): `CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT` # noqa: E501 + `to` debit account (funds withdrawn from): `CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `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. - `to` debit account (funds withdrawn from): `CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX`, `SPOT` # noqa: E501 + `to` debit account (funds withdrawn from): `CROSSEX_BINANCE`, `CROSSEX_OKX`, `CROSSEX_GATE`, `CROSSEX_BYBIT`, `CROSSEX_KRAKEN`, `CROSSEX_HYPERLIQUID`, `CROSSEX_DERIBIT`, `CROSSEX`, `SPOT` # noqa: E501 :param to: The to of this CrossexTransferRequest. # noqa: E501 :type: str diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py index 227bb104..4feb9266 100644 --- a/gate_api/models/currency_pair.py +++ b/gate_api/models/currency_pair.py @@ -402,7 +402,7 @@ def max_quote_amount(self, max_quote_amount): def amount_precision(self): """Gets the amount_precision of this CurrencyPair. # noqa: E501 - Amount scale # noqa: E501 + Quantity precision # noqa: E501 :return: The amount_precision of this CurrencyPair. # noqa: E501 :rtype: int @@ -413,7 +413,7 @@ def amount_precision(self): def amount_precision(self, amount_precision): """Sets the amount_precision of this CurrencyPair. - Amount scale # noqa: E501 + Quantity precision # noqa: E501 :param amount_precision: The amount_precision of this CurrencyPair. # noqa: E501 :type: int @@ -425,7 +425,7 @@ def amount_precision(self, amount_precision): def precision(self): """Gets the precision of this CurrencyPair. # noqa: E501 - Price scale # noqa: E501 + Price precision # noqa: E501 :return: The precision of this CurrencyPair. # noqa: E501 :rtype: int @@ -436,7 +436,7 @@ def precision(self): def precision(self, precision): """Sets the precision of this CurrencyPair. - Price scale # noqa: E501 + Price precision # noqa: E501 :param precision: The precision of this CurrencyPair. # noqa: E501 :type: int @@ -684,7 +684,7 @@ def slippage(self, slippage): def market_order_max_stock(self): """Gets the market_order_max_stock of this CurrencyPair. # noqa: E501 - Maximum Market Order Quantity # noqa: E501 + Maximum market order quantity. `null` or `0` means no limit # noqa: E501 :return: The market_order_max_stock of this CurrencyPair. # noqa: E501 :rtype: str @@ -695,7 +695,7 @@ def market_order_max_stock(self): def market_order_max_stock(self, market_order_max_stock): """Sets the market_order_max_stock of this CurrencyPair. - Maximum Market Order Quantity # noqa: E501 + Maximum market order quantity. `null` or `0` means no limit # noqa: E501 :param market_order_max_stock: The market_order_max_stock of this CurrencyPair. # noqa: E501 :type: str @@ -707,7 +707,7 @@ def market_order_max_stock(self, market_order_max_stock): def market_order_max_money(self): """Gets the market_order_max_money of this CurrencyPair. # noqa: E501 - Maximum Market Order Amount # noqa: E501 + Maximum market order amount. `null` or `0` means no limit # noqa: E501 :return: The market_order_max_money of this CurrencyPair. # noqa: E501 :rtype: str @@ -718,7 +718,7 @@ def market_order_max_money(self): def market_order_max_money(self, market_order_max_money): """Sets the market_order_max_money of this CurrencyPair. - Maximum Market Order Amount # noqa: E501 + Maximum market order amount. `null` or `0` means no limit # noqa: E501 :param market_order_max_money: The market_order_max_money of this CurrencyPair. # noqa: E501 :type: str diff --git a/gate_api/models/delete_order.py b/gate_api/models/delete_order.py new file mode 100644 index 00000000..5783bfb1 --- /dev/null +++ b/gate_api/models/delete_order.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 DeleteOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (object, int, Configuration) -> None + """DeleteOrder - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this DeleteOrder. # noqa: E501 + + Returns empty object on success # noqa: E501 + + :return: The data of this DeleteOrder. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this DeleteOrder. + + Returns empty object on success # noqa: E501 + + :param data: The data of this DeleteOrder. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this DeleteOrder. # noqa: E501 + + + :return: The timestamp of this DeleteOrder. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this DeleteOrder. + + + :param timestamp: The timestamp of this DeleteOrder. # 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, DeleteOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/delivery_contract.py b/gate_api/models/delivery_contract.py index aaf4e491..9212fda9 100644 --- a/gate_api/models/delivery_contract.py +++ b/gate_api/models/delivery_contract.py @@ -858,7 +858,7 @@ def risk_limit_max(self, risk_limit_max): def order_size_min(self): """Gets the order_size_min of this DeliveryContract. # noqa: E501 - Minimum order size allowed by the contract # noqa: E501 + Minimum order quantity # noqa: E501 :return: The order_size_min of this DeliveryContract. # noqa: E501 :rtype: int @@ -869,7 +869,7 @@ def order_size_min(self): def order_size_min(self, order_size_min): """Sets the order_size_min of this DeliveryContract. - Minimum order size allowed by the contract # noqa: E501 + Minimum order quantity # noqa: E501 :param order_size_min: The order_size_min of this DeliveryContract. # noqa: E501 :type: int @@ -881,7 +881,7 @@ def order_size_min(self, order_size_min): def order_size_max(self): """Gets the order_size_max of this DeliveryContract. # noqa: E501 - Maximum order size allowed by the contract # noqa: E501 + Maximum order quantity # noqa: E501 :return: The order_size_max of this DeliveryContract. # noqa: E501 :rtype: int @@ -892,7 +892,7 @@ def order_size_max(self): def order_size_max(self, order_size_max): """Sets the order_size_max of this DeliveryContract. - Maximum order size allowed by the contract # noqa: E501 + Maximum order quantity # noqa: E501 :param order_size_max: The order_size_max of this DeliveryContract. # noqa: E501 :type: int diff --git a/gate_api/models/delivery_position.py b/gate_api/models/delivery_position.py index 6e00aa29..5bcab4d6 100644 --- a/gate_api/models/delivery_position.py +++ b/gate_api/models/delivery_position.py @@ -400,7 +400,7 @@ def value(self, value): def margin(self): """Gets the margin of this DeliveryPosition. # noqa: E501 - Position margin # noqa: E501 + Margin # noqa: E501 :return: The margin of this DeliveryPosition. # noqa: E501 :rtype: str @@ -411,7 +411,7 @@ def margin(self): def margin(self, margin): """Sets the margin of this DeliveryPosition. - Position margin # noqa: E501 + Margin # noqa: E501 :param margin: The margin of this DeliveryPosition. # noqa: E501 :type: str diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py index 1985a9b2..b1dc8d98 100644 --- a/gate_api/models/delivery_settlement.py +++ b/gate_api/models/delivery_settlement.py @@ -143,7 +143,7 @@ def contract(self, contract): def leverage(self): """Gets the leverage of this DeliverySettlement. # noqa: E501 - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :return: The leverage of this DeliverySettlement. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this DeliverySettlement. - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :param leverage: The leverage of this DeliverySettlement. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def size(self, size): def margin(self): """Gets the margin of this DeliverySettlement. # noqa: E501 - Position margin # noqa: E501 + Margin # noqa: E501 :return: The margin of this DeliverySettlement. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def margin(self): def margin(self, margin): """Sets the margin of this DeliverySettlement. - Position margin # noqa: E501 + Margin # noqa: E501 :param margin: The margin of this DeliverySettlement. # noqa: E501 :type: str diff --git a/gate_api/models/exchanges.py b/gate_api/models/exchanges.py new file mode 100644 index 00000000..ba0d1618 --- /dev/null +++ b/gate_api/models/exchanges.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Exchanges(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'ExchangesData', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (ExchangesData, int, Configuration) -> None + """Exchanges - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this Exchanges. # noqa: E501 + + + :return: The data of this Exchanges. # noqa: E501 + :rtype: ExchangesData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this Exchanges. + + + :param data: The data of this Exchanges. # noqa: E501 + :type: ExchangesData + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this Exchanges. # noqa: E501 + + + :return: The timestamp of this Exchanges. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this Exchanges. + + + :param timestamp: The timestamp of this Exchanges. # 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, Exchanges): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Exchanges): + 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/exchanges_data.py similarity index 63% rename from gate_api/models/hodler_airdrop_v4_order_response.py rename to gate_api/models/exchanges_data.py index 0c12c0ab..83a0d206 100644 --- a/gate_api/models/hodler_airdrop_v4_order_response.py +++ b/gate_api/models/exchanges_data.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class HodlerAirdropV4OrderResponse(object): +class ExchangesData(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,49 +33,46 @@ class HodlerAirdropV4OrderResponse(object): and the value is json key in definition. """ openapi_types = { - 'interest_coin': 'list[str]' + 'list': 'list[ExchangesDataList]' } attribute_map = { - 'interest_coin': 'interest_coin' + 'list': 'list' } - 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 + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[ExchangesDataList], Configuration) -> None + """ExchangesData - a 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._list = None self.discriminator = None - self.interest_coin = interest_coin + if list is not None: + self.list = list @property - def interest_coin(self): - """Gets the interest_coin of this HodlerAirdropV4OrderResponse. # noqa: E501 + def list(self): + """Gets the list of this ExchangesData. # noqa: E501 - Get the list of airdropped currencies # noqa: E501 - :return: The interest_coin of this HodlerAirdropV4OrderResponse. # noqa: E501 - :rtype: list[str] + :return: The list of this ExchangesData. # noqa: E501 + :rtype: list[ExchangesDataList] """ - return self._interest_coin + return self._list - @interest_coin.setter - def interest_coin(self, interest_coin): - """Sets the interest_coin of this HodlerAirdropV4OrderResponse. + @list.setter + def list(self, list): + """Sets the list of this ExchangesData. - Get the list of airdropped currencies # noqa: E501 - :param interest_coin: The interest_coin of this HodlerAirdropV4OrderResponse. # noqa: E501 - :type: list[str] + :param list: The list of this ExchangesData. # noqa: E501 + :type: list[ExchangesDataList] """ - 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 + self._list = list def to_dict(self): """Returns the model properties as a dict""" @@ -111,14 +108,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, HodlerAirdropV4OrderResponse): + if not isinstance(other, ExchangesData): return 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): + if not isinstance(other, ExchangesData): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/exchanges_data_list.py b/gate_api/models/exchanges_data_list.py new file mode 100644 index 00000000..13946f99 --- /dev/null +++ b/gate_api/models/exchanges_data_list.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class ExchangesDataList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'exchange': 'str', + 'exchange_desc': 'str', + 'icon_link': 'str', + 'support_transfer': 'bool' + } + + attribute_map = { + 'exchange': 'exchange', + 'exchange_desc': 'exchange_desc', + 'icon_link': 'icon_link', + 'support_transfer': 'support_transfer' + } + + def __init__(self, exchange=None, exchange_desc=None, icon_link=None, support_transfer=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, bool, Configuration) -> None + """ExchangesDataList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._exchange = None + self._exchange_desc = None + self._icon_link = None + self._support_transfer = None + self.discriminator = None + + if exchange is not None: + self.exchange = exchange + if exchange_desc is not None: + self.exchange_desc = exchange_desc + if icon_link is not None: + self.icon_link = icon_link + if support_transfer is not None: + self.support_transfer = support_transfer + + @property + def exchange(self): + """Gets the exchange of this ExchangesDataList. # noqa: E501 + + Trading market, supports us, hk, and kr # noqa: E501 + + :return: The exchange of this ExchangesDataList. # noqa: E501 + :rtype: str + """ + return self._exchange + + @exchange.setter + def exchange(self, exchange): + """Sets the exchange of this ExchangesDataList. + + Trading market, supports us, hk, and kr # noqa: E501 + + :param exchange: The exchange of this ExchangesDataList. # noqa: E501 + :type: str + """ + allowed_values = ["us", "hk", "kr"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and exchange not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `exchange` ({0}), must be one of {1}" # noqa: E501 + .format(exchange, allowed_values) + ) + + self._exchange = exchange + + @property + def exchange_desc(self): + """Gets the exchange_desc of this ExchangesDataList. # noqa: E501 + + Market display name # noqa: E501 + + :return: The exchange_desc of this ExchangesDataList. # noqa: E501 + :rtype: str + """ + return self._exchange_desc + + @exchange_desc.setter + def exchange_desc(self, exchange_desc): + """Sets the exchange_desc of this ExchangesDataList. + + Market display name # noqa: E501 + + :param exchange_desc: The exchange_desc of this ExchangesDataList. # noqa: E501 + :type: str + """ + + self._exchange_desc = exchange_desc + + @property + def icon_link(self): + """Gets the icon_link of this ExchangesDataList. # noqa: E501 + + Market icon # noqa: E501 + + :return: The icon_link of this ExchangesDataList. # noqa: E501 + :rtype: str + """ + return self._icon_link + + @icon_link.setter + def icon_link(self, icon_link): + """Sets the icon_link of this ExchangesDataList. + + Market icon # noqa: E501 + + :param icon_link: The icon_link of this ExchangesDataList. # noqa: E501 + :type: str + """ + + self._icon_link = icon_link + + @property + def support_transfer(self): + """Gets the support_transfer of this ExchangesDataList. # noqa: E501 + + Whether stock transfer is supported # noqa: E501 + + :return: The support_transfer of this ExchangesDataList. # noqa: E501 + :rtype: bool + """ + return self._support_transfer + + @support_transfer.setter + def support_transfer(self, support_transfer): + """Sets the support_transfer of this ExchangesDataList. + + Whether stock transfer is supported # noqa: E501 + + :param support_transfer: The support_transfer of this ExchangesDataList. # noqa: E501 + :type: bool + """ + + self._support_transfer = support_transfer + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExchangesDataList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExchangesDataList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fee_rate.py b/gate_api/models/fee_rate.py new file mode 100644 index 00000000..faaae98c --- /dev/null +++ b/gate_api/models/fee_rate.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FeeRate(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'FeeRateData', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (FeeRateData, int, Configuration) -> None + """FeeRate - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this FeeRate. # noqa: E501 + + + :return: The data of this FeeRate. # noqa: E501 + :rtype: FeeRateData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FeeRate. + + + :param data: The data of this FeeRate. # noqa: E501 + :type: FeeRateData + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this FeeRate. # noqa: E501 + + + :return: The timestamp of this FeeRate. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this FeeRate. + + + :param timestamp: The timestamp of this FeeRate. # 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, FeeRate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FeeRate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fee_rate_data.py b/gate_api/models/fee_rate_data.py new file mode 100644 index 00000000..e5534b56 --- /dev/null +++ b/gate_api/models/fee_rate_data.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 FeeRateData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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[FeeRateDataList]' + } + + attribute_map = { + 'list': 'list' + } + + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[FeeRateDataList], Configuration) -> None + """FeeRateData - a 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 FeeRateData. # noqa: E501 + + + :return: The list of this FeeRateData. # noqa: E501 + :rtype: list[FeeRateDataList] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this FeeRateData. + + + :param list: The list of this FeeRateData. # noqa: E501 + :type: list[FeeRateDataList] + """ + + 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, FeeRateData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FeeRateData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/fee_rate_data_list.py b/gate_api/models/fee_rate_data_list.py new file mode 100644 index 00000000..73bf6b9b --- /dev/null +++ b/gate_api/models/fee_rate_data_list.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FeeRateDataList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'vip_level': 'int', + 'maker_fee': 'str', + 'taker_fee': 'str' + } + + attribute_map = { + 'vip_level': 'vip_level', + 'maker_fee': 'maker_fee', + 'taker_fee': 'taker_fee' + } + + def __init__(self, vip_level=None, maker_fee=None, taker_fee=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, Configuration) -> None + """FeeRateDataList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._vip_level = None + self._maker_fee = None + self._taker_fee = None + self.discriminator = None + + if vip_level is not None: + self.vip_level = vip_level + if maker_fee is not None: + self.maker_fee = maker_fee + if taker_fee is not None: + self.taker_fee = taker_fee + + @property + def vip_level(self): + """Gets the vip_level of this FeeRateDataList. # noqa: E501 + + VIP level # noqa: E501 + + :return: The vip_level of this FeeRateDataList. # noqa: E501 + :rtype: int + """ + return self._vip_level + + @vip_level.setter + def vip_level(self, vip_level): + """Sets the vip_level of this FeeRateDataList. + + VIP level # noqa: E501 + + :param vip_level: The vip_level of this FeeRateDataList. # noqa: E501 + :type: int + """ + + self._vip_level = vip_level + + @property + def maker_fee(self): + """Gets the maker_fee of this FeeRateDataList. # noqa: E501 + + Maker fee rate for Japanese and Korean stocks # noqa: E501 + + :return: The maker_fee of this FeeRateDataList. # noqa: E501 + :rtype: str + """ + return self._maker_fee + + @maker_fee.setter + def maker_fee(self, maker_fee): + """Sets the maker_fee of this FeeRateDataList. + + Maker fee rate for Japanese and Korean stocks # noqa: E501 + + :param maker_fee: The maker_fee of this FeeRateDataList. # noqa: E501 + :type: str + """ + + self._maker_fee = maker_fee + + @property + def taker_fee(self): + """Gets the taker_fee of this FeeRateDataList. # noqa: E501 + + Taker fee rate for Japanese and Korean stocks # noqa: E501 + + :return: The taker_fee of this FeeRateDataList. # noqa: E501 + :rtype: str + """ + return self._taker_fee + + @taker_fee.setter + def taker_fee(self, taker_fee): + """Sets the taker_fee of this FeeRateDataList. + + Taker fee rate for Japanese and Korean stocks # noqa: E501 + + :param taker_fee: The taker_fee of this FeeRateDataList. # noqa: E501 + :type: str + """ + + self._taker_fee = taker_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, FeeRateDataList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FeeRateDataList): + 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 index 7afb5da9..f3a6ab5a 100644 --- a/gate_api/models/flash_swap_multi_currency_order.py +++ b/gate_api/models/flash_swap_multi_currency_order.py @@ -422,7 +422,7 @@ def price(self, price): def status(self): """Gets the status of this FlashSwapMultiCurrencyOrder. # noqa: E501 - Order Status # noqa: E501 + Order status # noqa: E501 :return: The status of this FlashSwapMultiCurrencyOrder. # noqa: E501 :rtype: int @@ -433,7 +433,7 @@ def status(self): def status(self, status): """Sets the status of this FlashSwapMultiCurrencyOrder. - Order Status # noqa: E501 + Order status # noqa: E501 :param status: The status of this FlashSwapMultiCurrencyOrder. # noqa: E501 :type: int diff --git a/gate_api/models/flash_swap_order_create_resp_data.py b/gate_api/models/flash_swap_order_create_resp_data.py index 4dace233..a2189de6 100644 --- a/gate_api/models/flash_swap_order_create_resp_data.py +++ b/gate_api/models/flash_swap_order_create_resp_data.py @@ -422,7 +422,7 @@ def price(self, price): def status(self): """Gets the status of this FlashSwapOrderCreateRespData. # noqa: E501 - Order Status # noqa: E501 + Order status # noqa: E501 :return: The status of this FlashSwapOrderCreateRespData. # noqa: E501 :rtype: int @@ -433,7 +433,7 @@ def status(self): def status(self, status): """Sets the status of this FlashSwapOrderCreateRespData. - Order Status # noqa: E501 + Order status # noqa: E501 :param status: The status of this FlashSwapOrderCreateRespData. # noqa: E501 :type: int diff --git a/gate_api/models/futures_leverage.py b/gate_api/models/futures_leverage.py index 286ad8c5..5828639b 100644 --- a/gate_api/models/futures_leverage.py +++ b/gate_api/models/futures_leverage.py @@ -57,7 +57,7 @@ def __init__(self, lever=None, local_vars_configuration=None): # noqa: E501 def lever(self): """Gets the lever of this FuturesLeverage. # noqa: E501 - leverage # noqa: E501 + Leverage # noqa: E501 :return: The lever of this FuturesLeverage. # noqa: E501 :rtype: str @@ -68,7 +68,7 @@ def lever(self): def lever(self, lever): """Sets the lever of this FuturesLeverage. - leverage # noqa: E501 + Leverage # noqa: E501 :param lever: The lever of this FuturesLeverage. # noqa: E501 :type: str diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py index 8d3c0441..b9117596 100644 --- a/gate_api/models/futures_liq_order.py +++ b/gate_api/models/futures_liq_order.py @@ -225,7 +225,7 @@ def fill_price(self, fill_price): def left(self): """Gets the left of this FuturesLiqOrder. # noqa: E501 - System liquidation order maker size # noqa: E501 + Reserved field with no current business significance. # noqa: E501 :return: The left of this FuturesLiqOrder. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def left(self): def left(self, left): """Sets the left of this FuturesLiqOrder. - System liquidation order maker size # noqa: E501 + Reserved field with no current business significance. # noqa: E501 :param left: The left of this FuturesLiqOrder. # noqa: E501 :type: str diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py index f02adc1a..626dd30c 100644 --- a/gate_api/models/futures_premium_index.py +++ b/gate_api/models/futures_premium_index.py @@ -123,7 +123,7 @@ def c(self, c): def h(self): """Gets the h of this FuturesPremiumIndex. # noqa: E501 - Highest price # noqa: E501 + High price # noqa: E501 :return: The h of this FuturesPremiumIndex. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def h(self): def h(self, h): """Sets the h of this FuturesPremiumIndex. - Highest price # noqa: E501 + High price # noqa: E501 :param h: The h of this FuturesPremiumIndex. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def h(self, h): def l(self): """Gets the l of this FuturesPremiumIndex. # noqa: E501 - Lowest price # noqa: E501 + Low price # noqa: E501 :return: The l of this FuturesPremiumIndex. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def l(self): def l(self, l): """Sets the l of this FuturesPremiumIndex. - Lowest price # noqa: E501 + Low price # noqa: E501 :param l: The l of this FuturesPremiumIndex. # noqa: E501 :type: str diff --git a/gate_api/models/hodler_airdrop_v4_project_item.py b/gate_api/models/hodler_airdrop_v4_project_item.py deleted file mode 100644 index b3294dcb..00000000 --- a/gate_api/models/hodler_airdrop_v4_project_item.py +++ /dev/null @@ -1,388 +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 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 deleted file mode 100644 index 6d6158fa..00000000 --- a/gate_api/models/hodler_airdrop_v4_user_airdrop_record.py +++ /dev/null @@ -1,266 +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 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 deleted file mode 100644 index 9d01dd5b..00000000 --- a/gate_api/models/hodler_airdrop_v4_user_order_record.py +++ /dev/null @@ -1,266 +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 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/i18n_txt.py b/gate_api/models/i18n_txt.py new file mode 100644 index 00000000..957b2b56 --- /dev/null +++ b/gate_api/models/i18n_txt.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class I18nTxt(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'lang': 'str', + 'value': 'str' + } + + attribute_map = { + 'lang': 'lang', + 'value': 'value' + } + + def __init__(self, lang=None, value=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """I18nTxt - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._lang = None + self._value = None + self.discriminator = None + + if lang is not None: + self.lang = lang + if value is not None: + self.value = value + + @property + def lang(self): + """Gets the lang of this I18nTxt. # noqa: E501 + + + :return: The lang of this I18nTxt. # noqa: E501 + :rtype: str + """ + return self._lang + + @lang.setter + def lang(self, lang): + """Sets the lang of this I18nTxt. + + + :param lang: The lang of this I18nTxt. # noqa: E501 + :type: str + """ + + self._lang = lang + + @property + def value(self): + """Gets the value of this I18nTxt. # noqa: E501 + + + :return: The value of this I18nTxt. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this I18nTxt. + + + :param value: The value of this I18nTxt. # 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, I18nTxt): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, I18nTxt): + 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 5bebd104..6c45cfd2 100644 --- a/gate_api/models/inline_response200.py +++ b/gate_api/models/inline_response200.py @@ -36,8 +36,10 @@ class InlineResponse200(object): 'exchange_type': 'str', 'spot_maker_fee': 'str', 'spot_taker_fee': 'str', + 'spot_rpi_maker_fee': 'str', 'future_maker_fee': 'str', 'future_taker_fee': 'str', + 'future_rpi_maker_fee': 'str', 'special_fee_list': 'list[CrossexSpecialFee]' } @@ -45,13 +47,15 @@ class InlineResponse200(object): 'exchange_type': 'exchange_type', 'spot_maker_fee': 'spot_maker_fee', 'spot_taker_fee': 'spot_taker_fee', + 'spot_rpi_maker_fee': 'spot_rpi_maker_fee', 'future_maker_fee': 'future_maker_fee', 'future_taker_fee': 'future_taker_fee', + 'future_rpi_maker_fee': 'future_rpi_maker_fee', 'special_fee_list': 'special_fee_list' } - 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 + def __init__(self, exchange_type=None, spot_maker_fee=None, spot_taker_fee=None, spot_rpi_maker_fee=None, future_maker_fee=None, future_taker_fee=None, future_rpi_maker_fee=None, special_fee_list=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, 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() @@ -60,8 +64,10 @@ def __init__(self, exchange_type=None, spot_maker_fee=None, spot_taker_fee=None, self._exchange_type = None self._spot_maker_fee = None self._spot_taker_fee = None + self._spot_rpi_maker_fee = None self._future_maker_fee = None self._future_taker_fee = None + self._future_rpi_maker_fee = None self._special_fee_list = None self.discriminator = None @@ -69,8 +75,12 @@ def __init__(self, exchange_type=None, spot_maker_fee=None, spot_taker_fee=None, self.exchange_type = exchange_type self.spot_maker_fee = spot_maker_fee self.spot_taker_fee = spot_taker_fee + if spot_rpi_maker_fee is not None: + self.spot_rpi_maker_fee = spot_rpi_maker_fee self.future_maker_fee = future_maker_fee self.future_taker_fee = future_taker_fee + if future_rpi_maker_fee is not None: + self.future_rpi_maker_fee = future_rpi_maker_fee self.special_fee_list = special_fee_list @property @@ -146,6 +156,29 @@ def spot_taker_fee(self, spot_taker_fee): self._spot_taker_fee = spot_taker_fee + @property + def spot_rpi_maker_fee(self): + """Gets the spot_rpi_maker_fee of this InlineResponse200. # noqa: E501 + + Spot RPI order maker fee rate # noqa: E501 + + :return: The spot_rpi_maker_fee of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._spot_rpi_maker_fee + + @spot_rpi_maker_fee.setter + def spot_rpi_maker_fee(self, spot_rpi_maker_fee): + """Sets the spot_rpi_maker_fee of this InlineResponse200. + + Spot RPI order maker fee rate # noqa: E501 + + :param spot_rpi_maker_fee: The spot_rpi_maker_fee of this InlineResponse200. # noqa: E501 + :type: str + """ + + self._spot_rpi_maker_fee = spot_rpi_maker_fee + @property def future_maker_fee(self): """Gets the future_maker_fee of this InlineResponse200. # noqa: E501 @@ -196,6 +229,29 @@ def future_taker_fee(self, future_taker_fee): self._future_taker_fee = future_taker_fee + @property + def future_rpi_maker_fee(self): + """Gets the future_rpi_maker_fee of this InlineResponse200. # noqa: E501 + + Futures RPI order maker fee rate # noqa: E501 + + :return: The future_rpi_maker_fee of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._future_rpi_maker_fee + + @future_rpi_maker_fee.setter + def future_rpi_maker_fee(self, future_rpi_maker_fee): + """Sets the future_rpi_maker_fee of this InlineResponse200. + + Futures RPI order maker fee rate # noqa: E501 + + :param future_rpi_maker_fee: The future_rpi_maker_fee of this InlineResponse200. # noqa: E501 + :type: str + """ + + self._future_rpi_maker_fee = future_rpi_maker_fee + @property def special_fee_list(self): """Gets the special_fee_list of this InlineResponse200. # noqa: E501 diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/inline_response2001.py new file mode 100644 index 00000000..31631fa8 --- /dev/null +++ b/gate_api/models/inline_response2001.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 InlineResponse2001(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'last_price': 'str', + 'open_24h': 'str', + 'low_24h': 'str', + 'high_24h': 'str', + 'volume_24h_base': 'str', + 'volume_24h_quote': 'str', + 'mark_price': 'str', + 'index_price': 'str', + 'open_interest': 'str', + 'open_interest_quote': 'str', + 'timestamp': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'last_price': 'last_price', + 'open_24h': 'open_24h', + 'low_24h': 'low_24h', + 'high_24h': 'high_24h', + 'volume_24h_base': 'volume_24h_base', + 'volume_24h_quote': 'volume_24h_quote', + 'mark_price': 'mark_price', + 'index_price': 'index_price', + 'open_interest': 'open_interest', + 'open_interest_quote': 'open_interest_quote', + 'timestamp': 'timestamp' + } + + def __init__(self, symbol=None, last_price=None, open_24h=None, low_24h=None, high_24h=None, volume_24h_base=None, volume_24h_quote=None, mark_price=None, index_price=None, open_interest=None, open_interest_quote=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """InlineResponse2001 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._last_price = None + self._open_24h = None + self._low_24h = None + self._high_24h = None + self._volume_24h_base = None + self._volume_24h_quote = None + self._mark_price = None + self._index_price = None + self._open_interest = None + self._open_interest_quote = None + self._timestamp = None + self.discriminator = None + + self.symbol = symbol + if last_price is not None: + self.last_price = last_price + if open_24h is not None: + self.open_24h = open_24h + if low_24h is not None: + self.low_24h = low_24h + if high_24h is not None: + self.high_24h = high_24h + if volume_24h_base is not None: + self.volume_24h_base = volume_24h_base + if volume_24h_quote is not None: + self.volume_24h_quote = volume_24h_quote + if mark_price is not None: + self.mark_price = mark_price + if index_price is not None: + self.index_price = index_price + if open_interest is not None: + self.open_interest = open_interest + if open_interest_quote is not None: + self.open_interest_quote = open_interest_quote + self.timestamp = timestamp + + @property + def symbol(self): + """Gets the symbol of this InlineResponse2001. # noqa: E501 + + Trading Pair # noqa: E501 + + :return: The symbol of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this InlineResponse2001. + + Trading Pair # noqa: E501 + + :param symbol: The symbol of this InlineResponse2001. # 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 last_price(self): + """Gets the last_price of this InlineResponse2001. # noqa: E501 + + Last price # noqa: E501 + + :return: The last_price of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._last_price + + @last_price.setter + def last_price(self, last_price): + """Sets the last_price of this InlineResponse2001. + + Last price # noqa: E501 + + :param last_price: The last_price of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._last_price = last_price + + @property + def open_24h(self): + """Gets the open_24h of this InlineResponse2001. # noqa: E501 + + 24-hour opening price # noqa: E501 + + :return: The open_24h of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._open_24h + + @open_24h.setter + def open_24h(self, open_24h): + """Sets the open_24h of this InlineResponse2001. + + 24-hour opening price # noqa: E501 + + :param open_24h: The open_24h of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._open_24h = open_24h + + @property + def low_24h(self): + """Gets the low_24h of this InlineResponse2001. # noqa: E501 + + 24h Low # noqa: E501 + + :return: The low_24h of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._low_24h + + @low_24h.setter + def low_24h(self, low_24h): + """Sets the low_24h of this InlineResponse2001. + + 24h Low # noqa: E501 + + :param low_24h: The low_24h of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._low_24h = low_24h + + @property + def high_24h(self): + """Gets the high_24h of this InlineResponse2001. # noqa: E501 + + 24h High # noqa: E501 + + :return: The high_24h of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._high_24h + + @high_24h.setter + def high_24h(self, high_24h): + """Sets the high_24h of this InlineResponse2001. + + 24h High # noqa: E501 + + :param high_24h: The high_24h of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._high_24h = high_24h + + @property + def volume_24h_base(self): + """Gets the volume_24h_base of this InlineResponse2001. # noqa: E501 + + 24-hour trading volume in base currency # noqa: E501 + + :return: The volume_24h_base of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._volume_24h_base + + @volume_24h_base.setter + def volume_24h_base(self, volume_24h_base): + """Sets the volume_24h_base of this InlineResponse2001. + + 24-hour trading volume in base currency # noqa: E501 + + :param volume_24h_base: The volume_24h_base of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._volume_24h_base = volume_24h_base + + @property + def volume_24h_quote(self): + """Gets the volume_24h_quote of this InlineResponse2001. # noqa: E501 + + 24-hour trading volume in quote currency # noqa: E501 + + :return: The volume_24h_quote of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._volume_24h_quote + + @volume_24h_quote.setter + def volume_24h_quote(self, volume_24h_quote): + """Sets the volume_24h_quote of this InlineResponse2001. + + 24-hour trading volume in quote currency # noqa: E501 + + :param volume_24h_quote: The volume_24h_quote of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._volume_24h_quote = volume_24h_quote + + @property + def mark_price(self): + """Gets the mark_price of this InlineResponse2001. # noqa: E501 + + Mark price # noqa: E501 + + :return: The mark_price of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this InlineResponse2001. + + Mark price # noqa: E501 + + :param mark_price: The mark_price of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def index_price(self): + """Gets the index_price of this InlineResponse2001. # noqa: E501 + + Index price # noqa: E501 + + :return: The index_price of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this InlineResponse2001. + + Index price # noqa: E501 + + :param index_price: The index_price of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def open_interest(self): + """Gets the open_interest of this InlineResponse2001. # noqa: E501 + + Open interest # noqa: E501 + + :return: The open_interest of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._open_interest + + @open_interest.setter + def open_interest(self, open_interest): + """Sets the open_interest of this InlineResponse2001. + + Open interest # noqa: E501 + + :param open_interest: The open_interest of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._open_interest = open_interest + + @property + def open_interest_quote(self): + """Gets the open_interest_quote of this InlineResponse2001. # noqa: E501 + + Open interest (in quote currency) # noqa: E501 + + :return: The open_interest_quote of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._open_interest_quote + + @open_interest_quote.setter + def open_interest_quote(self, open_interest_quote): + """Sets the open_interest_quote of this InlineResponse2001. + + Open interest (in quote currency) # noqa: E501 + + :param open_interest_quote: The open_interest_quote of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._open_interest_quote = open_interest_quote + + @property + def timestamp(self): + """Gets the timestamp of this InlineResponse2001. # noqa: E501 + + Update timestamp # noqa: E501 + + :return: The timestamp of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this InlineResponse2001. + + Update timestamp # noqa: E501 + + :param timestamp: The timestamp of this InlineResponse2001. # noqa: E501 + :type: str + """ + 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, InlineResponse2001): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineResponse2001): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response2002.py b/gate_api/models/inline_response2002.py new file mode 100644 index 00000000..a7d16d52 --- /dev/null +++ b/gate_api/models/inline_response2002.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 InlineResponse2002(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'funding_rate': 'str', + 'funding_interval': 'str', + 'funding_time': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'funding_rate': 'funding_rate', + 'funding_interval': 'funding_interval', + 'funding_time': 'funding_time' + } + + def __init__(self, symbol=None, funding_rate=None, funding_interval=None, funding_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """InlineResponse2002 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._funding_rate = None + self._funding_interval = None + self._funding_time = None + self.discriminator = None + + self.symbol = symbol + self.funding_rate = funding_rate + self.funding_interval = funding_interval + self.funding_time = funding_time + + @property + def symbol(self): + """Gets the symbol of this InlineResponse2002. # noqa: E501 + + Currency # noqa: E501 + + :return: The symbol of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this InlineResponse2002. + + Currency # noqa: E501 + + :param symbol: The symbol of this InlineResponse2002. # 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 funding_rate(self): + """Gets the funding_rate of this InlineResponse2002. # noqa: E501 + + Funding rate # noqa: E501 + + :return: The funding_rate of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._funding_rate + + @funding_rate.setter + def funding_rate(self, funding_rate): + """Sets the funding_rate of this InlineResponse2002. + + Funding rate # noqa: E501 + + :param funding_rate: The funding_rate of this InlineResponse2002. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and funding_rate is None: # noqa: E501 + raise ValueError("Invalid value for `funding_rate`, must not be `None`") # noqa: E501 + + self._funding_rate = funding_rate + + @property + def funding_interval(self): + """Gets the funding_interval of this InlineResponse2002. # noqa: E501 + + Tier # noqa: E501 + + :return: The funding_interval of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._funding_interval + + @funding_interval.setter + def funding_interval(self, funding_interval): + """Sets the funding_interval of this InlineResponse2002. + + Tier # noqa: E501 + + :param funding_interval: The funding_interval of this InlineResponse2002. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and funding_interval is None: # noqa: E501 + raise ValueError("Invalid value for `funding_interval`, must not be `None`") # noqa: E501 + + self._funding_interval = funding_interval + + @property + def funding_time(self): + """Gets the funding_time of this InlineResponse2002. # noqa: E501 + + Next funding time # noqa: E501 + + :return: The funding_time of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._funding_time + + @funding_time.setter + def funding_time(self, funding_time): + """Sets the funding_time of this InlineResponse2002. + + Next funding time # noqa: E501 + + :param funding_time: The funding_time of this InlineResponse2002. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and funding_time is None: # noqa: E501 + raise ValueError("Invalid value for `funding_time`, must not be `None`") # noqa: E501 + + self._funding_time = funding_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, InlineResponse2002): + return 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): + 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 deleted file mode 100644 index 44611afd..00000000 --- a/gate_api/models/launch_pool_v4_pledge_record.py +++ /dev/null @@ -1,269 +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 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 deleted file mode 100644 index 64117a80..00000000 --- a/gate_api/models/launch_pool_v4_project.py +++ /dev/null @@ -1,333 +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 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 deleted file mode 100644 index 2450e454..00000000 --- a/gate_api/models/launch_pool_v4_reward_pool.py +++ /dev/null @@ -1,297 +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 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 deleted file mode 100644 index 07ef5803..00000000 --- a/gate_api/models/launch_pool_v4_reward_record.py +++ /dev/null @@ -1,240 +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 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/candy_drop_v4_register_req_cd02.py b/gate_api/models/leverage_failed_currencies.py similarity index 59% rename from gate_api/models/candy_drop_v4_register_req_cd02.py rename to gate_api/models/leverage_failed_currencies.py index cf99cee7..d18e6266 100644 --- a/gate_api/models/candy_drop_v4_register_req_cd02.py +++ b/gate_api/models/leverage_failed_currencies.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class CandyDropV4RegisterReqCd02(object): +class LeverageFailedCurrencies(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,77 +33,76 @@ class CandyDropV4RegisterReqCd02(object): and the value is json key in definition. """ openapi_types = { - 'activity_id': 'int', - 'currency': 'str' + 'currency': 'str', + 'reason': 'str' } attribute_map = { - 'activity_id': 'activity_id', - 'currency': 'currency' + 'currency': 'currency', + 'reason': 'reason' } - 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 + def __init__(self, currency=None, reason=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """LeverageFailedCurrencies - a 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._reason = None self.discriminator = None - if activity_id is not None: - self.activity_id = activity_id - self.currency = currency + if currency is not None: + self.currency = currency + if reason is not None: + self.reason = reason @property - def activity_id(self): - """Gets the activity_id of this CandyDropV4RegisterReqCd02. # noqa: E501 + def currency(self): + """Gets the currency of this LeverageFailedCurrencies. # noqa: E501 - Activity ID (optional, used with currency) # noqa: E501 + Currency for which the update failed # noqa: E501 - :return: The activity_id of this CandyDropV4RegisterReqCd02. # noqa: E501 - :rtype: int + :return: The currency of this LeverageFailedCurrencies. # noqa: E501 + :rtype: str """ - return self._activity_id + return self._currency - @activity_id.setter - def activity_id(self, activity_id): - """Sets the activity_id of this CandyDropV4RegisterReqCd02. + @currency.setter + def currency(self, currency): + """Sets the currency of this LeverageFailedCurrencies. - Activity ID (optional, used with currency) # noqa: E501 + Currency for which the update failed # noqa: E501 - :param activity_id: The activity_id of this CandyDropV4RegisterReqCd02. # noqa: E501 - :type: int + :param currency: The currency of this LeverageFailedCurrencies. # noqa: E501 + :type: str """ - self._activity_id = activity_id + self._currency = currency @property - def currency(self): - """Gets the currency of this CandyDropV4RegisterReqCd02. # noqa: E501 + def reason(self): + """Gets the reason of this LeverageFailedCurrencies. # noqa: E501 - Project/currency name (required) # noqa: E501 + Reason the leverage update failed # noqa: E501 - :return: The currency of this CandyDropV4RegisterReqCd02. # noqa: E501 + :return: The reason of this LeverageFailedCurrencies. # noqa: E501 :rtype: str """ - return self._currency + return self._reason - @currency.setter - def currency(self, currency): - """Sets the currency of this CandyDropV4RegisterReqCd02. + @reason.setter + def reason(self, reason): + """Sets the reason of this LeverageFailedCurrencies. - Project/currency name (required) # noqa: E501 + Reason the leverage update failed # noqa: E501 - :param currency: The currency of this CandyDropV4RegisterReqCd02. # noqa: E501 + :param reason: The reason of this LeverageFailedCurrencies. # 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 + self._reason = reason def to_dict(self): """Returns the model properties as a dict""" @@ -139,14 +138,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, CandyDropV4RegisterReqCd02): + if not isinstance(other, LeverageFailedCurrencies): return 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): + if not isinstance(other, LeverageFailedCurrencies): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py index f0240103..6b91dff5 100644 --- a/gate_api/models/margin_market_leverage.py +++ b/gate_api/models/margin_market_leverage.py @@ -84,7 +84,7 @@ def currency_pair(self, currency_pair): def leverage(self): """Gets the leverage of this MarginMarketLeverage. # noqa: E501 - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :return: The leverage of this MarginMarketLeverage. # noqa: E501 :rtype: str @@ -95,7 +95,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this MarginMarketLeverage. - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :param leverage: The leverage of this MarginMarketLeverage. # noqa: E501 :type: str diff --git a/gate_api/models/margin_tiers.py b/gate_api/models/margin_tiers.py index 773adcb9..9ba7ba95 100644 --- a/gate_api/models/margin_tiers.py +++ b/gate_api/models/margin_tiers.py @@ -169,7 +169,7 @@ def upper_limit(self, upper_limit): def leverage(self): """Gets the leverage of this MarginTiers. # noqa: E501 - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :return: The leverage of this MarginTiers. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this MarginTiers. - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :param leverage: The leverage of this MarginTiers. # noqa: E501 :type: str diff --git a/gate_api/models/mt5_account_data.py b/gate_api/models/mt5_account_data.py index 2183fcf2..23e36172 100644 --- a/gate_api/models/mt5_account_data.py +++ b/gate_api/models/mt5_account_data.py @@ -95,7 +95,7 @@ def mt5_uid(self, mt5_uid): def leverage(self): """Gets the leverage of this Mt5AccountData. # noqa: E501 - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :return: The leverage of this Mt5AccountData. # noqa: E501 :rtype: int @@ -106,7 +106,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this Mt5AccountData. - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :param leverage: The leverage of this Mt5AccountData. # noqa: E501 :type: int diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py index b3233296..0aae5c2c 100644 --- a/gate_api/models/options_contract.py +++ b/gate_api/models/options_contract.py @@ -522,7 +522,7 @@ def mark_price_round(self, mark_price_round): def order_size_min(self): """Gets the order_size_min of this OptionsContract. # noqa: E501 - Minimum order size allowed by the contract # noqa: E501 + Minimum order quantity # noqa: E501 :return: The order_size_min of this OptionsContract. # noqa: E501 :rtype: int @@ -533,7 +533,7 @@ def order_size_min(self): def order_size_min(self, order_size_min): """Sets the order_size_min of this OptionsContract. - Minimum order size allowed by the contract # noqa: E501 + Minimum order quantity # noqa: E501 :param order_size_min: The order_size_min of this OptionsContract. # noqa: E501 :type: int @@ -545,7 +545,7 @@ def order_size_min(self, order_size_min): def order_size_max(self): """Gets the order_size_max of this OptionsContract. # noqa: E501 - Maximum order size allowed by the contract # noqa: E501 + Maximum order quantity # noqa: E501 :return: The order_size_max of this OptionsContract. # noqa: E501 :rtype: int @@ -556,7 +556,7 @@ def order_size_max(self): def order_size_max(self, order_size_max): """Sets the order_size_max of this OptionsContract. - Maximum order size allowed by the contract # noqa: E501 + Maximum order quantity # noqa: E501 :param order_size_max: The order_size_max of this OptionsContract. # noqa: E501 :type: int diff --git a/gate_api/models/order_book2.py b/gate_api/models/order_book2.py new file mode 100644 index 00000000..a97e4b0f --- /dev/null +++ b/gate_api/models/order_book2.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderBook2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'OrderBook2Data', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (OrderBook2Data, int, Configuration) -> None + """OrderBook2 - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this OrderBook2. # noqa: E501 + + + :return: The data of this OrderBook2. # noqa: E501 + :rtype: OrderBook2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OrderBook2. + + + :param data: The data of this OrderBook2. # noqa: E501 + :type: OrderBook2Data + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this OrderBook2. # noqa: E501 + + + :return: The timestamp of this OrderBook2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this OrderBook2. + + + :param timestamp: The timestamp of this OrderBook2. # 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, OrderBook2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderBook2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_book2_data.py b/gate_api/models/order_book2_data.py new file mode 100644 index 00000000..5e654693 --- /dev/null +++ b/gate_api/models/order_book2_data.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 OrderBook2Data(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'bids': 'list[OrderBookPrice]', + 'asks': 'list[OrderBookPrice]' + } + + attribute_map = { + 'symbol': 'symbol', + 'bids': 'bids', + 'asks': 'asks' + } + + def __init__(self, symbol=None, bids=None, asks=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[OrderBookPrice], list[OrderBookPrice], Configuration) -> None + """OrderBook2Data - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._bids = None + self._asks = None + self.discriminator = None + + if symbol is not None: + self.symbol = symbol + if bids is not None: + self.bids = bids + if asks is not None: + self.asks = asks + + @property + def symbol(self): + """Gets the symbol of this OrderBook2Data. # noqa: E501 + + Symbol # noqa: E501 + + :return: The symbol of this OrderBook2Data. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this OrderBook2Data. + + Symbol # noqa: E501 + + :param symbol: The symbol of this OrderBook2Data. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def bids(self): + """Gets the bids of this OrderBook2Data. # noqa: E501 + + Bid orders # noqa: E501 + + :return: The bids of this OrderBook2Data. # noqa: E501 + :rtype: list[OrderBookPrice] + """ + return self._bids + + @bids.setter + def bids(self, bids): + """Sets the bids of this OrderBook2Data. + + Bid orders # noqa: E501 + + :param bids: The bids of this OrderBook2Data. # noqa: E501 + :type: list[OrderBookPrice] + """ + + self._bids = bids + + @property + def asks(self): + """Gets the asks of this OrderBook2Data. # noqa: E501 + + Ask orders # noqa: E501 + + :return: The asks of this OrderBook2Data. # noqa: E501 + :rtype: list[OrderBookPrice] + """ + return self._asks + + @asks.setter + def asks(self, asks): + """Sets the asks of this OrderBook2Data. + + Ask orders # noqa: E501 + + :param asks: The asks of this OrderBook2Data. # noqa: E501 + :type: list[OrderBookPrice] + """ + + self._asks = asks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrderBook2Data): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderBook2Data): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_book_price.py b/gate_api/models/order_book_price.py new file mode 100644 index 00000000..ffdd6e3b --- /dev/null +++ b/gate_api/models/order_book_price.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 OrderBookPrice(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'p': 'str', + 'user_order': 'bool' + } + + attribute_map = { + 'p': 'p', + 'user_order': 'user_order' + } + + def __init__(self, p=None, user_order=None, local_vars_configuration=None): # noqa: E501 + # type: (str, bool, Configuration) -> None + """OrderBookPrice - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._p = None + self._user_order = None + self.discriminator = None + + if p is not None: + self.p = p + if user_order is not None: + self.user_order = user_order + + @property + def p(self): + """Gets the p of this OrderBookPrice. # noqa: E501 + + Price # noqa: E501 + + :return: The p of this OrderBookPrice. # noqa: E501 + :rtype: str + """ + return self._p + + @p.setter + def p(self, p): + """Sets the p of this OrderBookPrice. + + Price # noqa: E501 + + :param p: The p of this OrderBookPrice. # noqa: E501 + :type: str + """ + + self._p = p + + @property + def user_order(self): + """Gets the user_order of this OrderBookPrice. # noqa: E501 + + Whether it is the user's own order # noqa: E501 + + :return: The user_order of this OrderBookPrice. # noqa: E501 + :rtype: bool + """ + return self._user_order + + @user_order.setter + def user_order(self, user_order): + """Sets the user_order of this OrderBookPrice. + + Whether it is the user's own order # noqa: E501 + + :param user_order: The user_order of this OrderBookPrice. # noqa: E501 + :type: bool + """ + + self._user_order = user_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, OrderBookPrice): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderBookPrice): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_history_list2.py b/gate_api/models/order_history_list2.py new file mode 100644 index 00000000..0dc88f44 --- /dev/null +++ b/gate_api/models/order_history_list2.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderHistoryList2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'OrderHistoryList2Data', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (OrderHistoryList2Data, int, Configuration) -> None + """OrderHistoryList2 - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this OrderHistoryList2. # noqa: E501 + + + :return: The data of this OrderHistoryList2. # noqa: E501 + :rtype: OrderHistoryList2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OrderHistoryList2. + + + :param data: The data of this OrderHistoryList2. # noqa: E501 + :type: OrderHistoryList2Data + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this OrderHistoryList2. # noqa: E501 + + + :return: The timestamp of this OrderHistoryList2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this OrderHistoryList2. + + + :param timestamp: The timestamp of this OrderHistoryList2. # 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, OrderHistoryList2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderHistoryList2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_history_list2_data.py b/gate_api/models/order_history_list2_data.py new file mode 100644 index 00000000..f51b2857 --- /dev/null +++ b/gate_api/models/order_history_list2_data.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 OrderHistoryList2Data(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'total_page': 'int', + 'list': 'list[OrderHistoryListItem]' + } + + attribute_map = { + 'total': 'total', + 'total_page': 'total_page', + 'list': 'list' + } + + def __init__(self, total=None, total_page=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, list[OrderHistoryListItem], Configuration) -> None + """OrderHistoryList2Data - a 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 OrderHistoryList2Data. # noqa: E501 + + Total quantity # noqa: E501 + + :return: The total of this OrderHistoryList2Data. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this OrderHistoryList2Data. + + Total quantity # noqa: E501 + + :param total: The total of this OrderHistoryList2Data. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def total_page(self): + """Gets the total_page of this OrderHistoryList2Data. # noqa: E501 + + Total pages # noqa: E501 + + :return: The total_page of this OrderHistoryList2Data. # noqa: E501 + :rtype: int + """ + return self._total_page + + @total_page.setter + def total_page(self, total_page): + """Sets the total_page of this OrderHistoryList2Data. + + Total pages # noqa: E501 + + :param total_page: The total_page of this OrderHistoryList2Data. # noqa: E501 + :type: int + """ + + self._total_page = total_page + + @property + def list(self): + """Gets the list of this OrderHistoryList2Data. # noqa: E501 + + Query historical order list # noqa: E501 + + :return: The list of this OrderHistoryList2Data. # noqa: E501 + :rtype: list[OrderHistoryListItem] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this OrderHistoryList2Data. + + Query historical order list # noqa: E501 + + :param list: The list of this OrderHistoryList2Data. # noqa: E501 + :type: list[OrderHistoryListItem] + """ + + 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, OrderHistoryList2Data): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderHistoryList2Data): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_history_list_data_list.py b/gate_api/models/order_history_list_data_list.py index 200fdf51..8a7f9490 100644 --- a/gate_api/models/order_history_list_data_list.py +++ b/gate_api/models/order_history_list_data_list.py @@ -183,7 +183,7 @@ def symbol(self, symbol): def symbol_desc(self): """Gets the symbol_desc of this OrderHistoryListDataList. # noqa: E501 - Trading symbol description # noqa: E501 + Symbol description # noqa: E501 :return: The symbol_desc of this OrderHistoryListDataList. # noqa: E501 :rtype: str @@ -194,7 +194,7 @@ def symbol_desc(self): def symbol_desc(self, symbol_desc): """Sets the symbol_desc of this OrderHistoryListDataList. - Trading symbol description # noqa: E501 + Symbol description # noqa: E501 :param symbol_desc: The symbol_desc of this OrderHistoryListDataList. # noqa: E501 :type: str @@ -310,7 +310,7 @@ def state_desc(self, state_desc): def side(self): """Gets the side of this OrderHistoryListDataList. # noqa: E501 - Order side (1=sell, 2=buy) # noqa: E501 + Side (1=sell, 2=buy) # noqa: E501 :return: The side of this OrderHistoryListDataList. # noqa: E501 :rtype: int @@ -321,7 +321,7 @@ def side(self): def side(self, side): """Sets the side of this OrderHistoryListDataList. - Order side (1=sell, 2=buy) # noqa: E501 + Side (1=sell, 2=buy) # noqa: E501 :param side: The side of this OrderHistoryListDataList. # noqa: E501 :type: int @@ -339,7 +339,7 @@ def side(self, side): def volume(self): """Gets the volume of this OrderHistoryListDataList. # noqa: E501 - Order volume # noqa: E501 + Order quantity # noqa: E501 :return: The volume of this OrderHistoryListDataList. # noqa: E501 :rtype: str @@ -350,7 +350,7 @@ def volume(self): def volume(self, volume): """Sets the volume of this OrderHistoryListDataList. - Order volume # noqa: E501 + Order quantity # noqa: E501 :param volume: The volume of this OrderHistoryListDataList. # noqa: E501 :type: str diff --git a/gate_api/models/order_history_list_item.py b/gate_api/models/order_history_list_item.py new file mode 100644 index 00000000..81d6e680 --- /dev/null +++ b/gate_api/models/order_history_list_item.py @@ -0,0 +1,655 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderHistoryListItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'symbol': 'str', + 'exchange': 'str', + 'quote_currency': 'str', + 'fx_rate': 'str', + 'symbol_desc': 'str', + 'price_type': 'str', + 'status': 'int', + 'status_desc': 'str', + 'status_detail': 'OrderHistoryListItemStatusDetail', + 'finish_as': 'int', + 'side': 'int', + 'time_in_force': 'str', + 'volume': 'str', + 'fill_volume': 'str', + 'price': 'str', + 'avg_fill_price': 'str', + 'commission': 'str', + 'time_setup': 'int', + 'time_done': 'int' + } + + attribute_map = { + 'order_id': 'order_id', + 'symbol': 'symbol', + 'exchange': 'exchange', + 'quote_currency': 'quote_currency', + 'fx_rate': 'fx_rate', + 'symbol_desc': 'symbol_desc', + 'price_type': 'price_type', + 'status': 'status', + 'status_desc': 'status_desc', + 'status_detail': 'status_detail', + 'finish_as': 'finish_as', + 'side': 'side', + 'time_in_force': 'time_in_force', + 'volume': 'volume', + 'fill_volume': 'fill_volume', + 'price': 'price', + 'avg_fill_price': 'avg_fill_price', + 'commission': 'commission', + 'time_setup': 'time_setup', + 'time_done': 'time_done' + } + + def __init__(self, order_id=None, symbol=None, exchange=None, quote_currency=None, fx_rate=None, symbol_desc=None, price_type=None, status=None, status_desc=None, status_detail=None, finish_as=None, side=None, time_in_force=None, volume=None, fill_volume=None, price=None, avg_fill_price=None, commission=None, time_setup=None, time_done=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, int, str, OrderHistoryListItemStatusDetail, int, int, str, str, str, str, str, str, int, int, Configuration) -> None + """OrderHistoryListItem - a 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._symbol = None + self._exchange = None + self._quote_currency = None + self._fx_rate = None + self._symbol_desc = None + self._price_type = None + self._status = None + self._status_desc = None + self._status_detail = None + self._finish_as = None + self._side = None + self._time_in_force = None + self._volume = None + self._fill_volume = None + self._price = None + self._avg_fill_price = None + self._commission = None + self._time_setup = None + self._time_done = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if symbol is not None: + self.symbol = symbol + if exchange is not None: + self.exchange = exchange + if quote_currency is not None: + self.quote_currency = quote_currency + if fx_rate is not None: + self.fx_rate = fx_rate + if symbol_desc is not None: + self.symbol_desc = symbol_desc + if price_type is not None: + self.price_type = price_type + if status is not None: + self.status = status + if status_desc is not None: + self.status_desc = status_desc + self.status_detail = status_detail + if finish_as is not None: + self.finish_as = finish_as + if side is not None: + self.side = side + if time_in_force is not None: + self.time_in_force = time_in_force + if volume is not None: + self.volume = volume + if fill_volume is not None: + self.fill_volume = fill_volume + if price is not None: + self.price = price + self.avg_fill_price = avg_fill_price + if commission is not None: + self.commission = commission + if time_setup is not None: + self.time_setup = time_setup + if time_done is not None: + self.time_done = time_done + + @property + def order_id(self): + """Gets the order_id of this OrderHistoryListItem. # noqa: E501 + + + :return: The order_id of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this OrderHistoryListItem. + + + :param order_id: The order_id of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def symbol(self): + """Gets the symbol of this OrderHistoryListItem. # noqa: E501 + + + :return: The symbol of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this OrderHistoryListItem. + + + :param symbol: The symbol of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def exchange(self): + """Gets the exchange of this OrderHistoryListItem. # noqa: E501 + + Exchange, supports us, hk, and kr # noqa: E501 + + :return: The exchange of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._exchange + + @exchange.setter + def exchange(self, exchange): + """Sets the exchange of this OrderHistoryListItem. + + Exchange, supports us, hk, and kr # noqa: E501 + + :param exchange: The exchange of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + allowed_values = ["us", "hk", "kr"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and exchange not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `exchange` ({0}), must be one of {1}" # noqa: E501 + .format(exchange, allowed_values) + ) + + self._exchange = exchange + + @property + def quote_currency(self): + """Gets the quote_currency of this OrderHistoryListItem. # noqa: E501 + + + :return: The quote_currency of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._quote_currency + + @quote_currency.setter + def quote_currency(self, quote_currency): + """Sets the quote_currency of this OrderHistoryListItem. + + + :param quote_currency: The quote_currency of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._quote_currency = quote_currency + + @property + def fx_rate(self): + """Gets the fx_rate of this OrderHistoryListItem. # noqa: E501 + + Quote currency to USD exchange rate # noqa: E501 + + :return: The fx_rate of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._fx_rate + + @fx_rate.setter + def fx_rate(self, fx_rate): + """Sets the fx_rate of this OrderHistoryListItem. + + Quote currency to USD exchange rate # noqa: E501 + + :param fx_rate: The fx_rate of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._fx_rate = fx_rate + + @property + def symbol_desc(self): + """Gets the symbol_desc of this OrderHistoryListItem. # noqa: E501 + + + :return: The symbol_desc of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._symbol_desc + + @symbol_desc.setter + def symbol_desc(self, symbol_desc): + """Sets the symbol_desc of this OrderHistoryListItem. + + + :param symbol_desc: The symbol_desc of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._symbol_desc = symbol_desc + + @property + def price_type(self): + """Gets the price_type of this OrderHistoryListItem. # noqa: E501 + + Price type (market = market order, limit = limit order) # noqa: E501 + + :return: The price_type of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this OrderHistoryListItem. + + Price type (market = market order, limit = limit order) # noqa: E501 + + :param price_type: The price_type of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + allowed_values = ["market", "limit"] # 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 status(self): + """Gets the status of this OrderHistoryListItem. # noqa: E501 + + Order status # noqa: E501 + + :return: The status of this OrderHistoryListItem. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this OrderHistoryListItem. + + Order status # noqa: E501 + + :param status: The status of this OrderHistoryListItem. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def status_desc(self): + """Gets the status_desc of this OrderHistoryListItem. # noqa: E501 + + Order status description # noqa: E501 + + :return: The status_desc of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._status_desc + + @status_desc.setter + def status_desc(self, status_desc): + """Sets the status_desc of this OrderHistoryListItem. + + Order status description # noqa: E501 + + :param status_desc: The status_desc of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._status_desc = status_desc + + @property + def status_detail(self): + """Gets the status_detail of this OrderHistoryListItem. # noqa: E501 + + + :return: The status_detail of this OrderHistoryListItem. # noqa: E501 + :rtype: OrderHistoryListItemStatusDetail + """ + return self._status_detail + + @status_detail.setter + def status_detail(self, status_detail): + """Sets the status_detail of this OrderHistoryListItem. + + + :param status_detail: The status_detail of this OrderHistoryListItem. # noqa: E501 + :type: OrderHistoryListItemStatusDetail + """ + + self._status_detail = status_detail + + @property + def finish_as(self): + """Gets the finish_as of this OrderHistoryListItem. # noqa: E501 + + Order completion reason # noqa: E501 + + :return: The finish_as of this OrderHistoryListItem. # noqa: E501 + :rtype: int + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this OrderHistoryListItem. + + Order completion reason # noqa: E501 + + :param finish_as: The finish_as of this OrderHistoryListItem. # noqa: E501 + :type: int + """ + + self._finish_as = finish_as + + @property + def side(self): + """Gets the side of this OrderHistoryListItem. # noqa: E501 + + Side (1=sell, 2=buy) # noqa: E501 + + :return: The side of this OrderHistoryListItem. # noqa: E501 + :rtype: int + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this OrderHistoryListItem. + + Side (1=sell, 2=buy) # noqa: E501 + + :param side: The side of this OrderHistoryListItem. # 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 time_in_force(self): + """Gets the time_in_force of this OrderHistoryListItem. # noqa: E501 + + Time in force. - day: Day order. # noqa: E501 + + :return: The time_in_force of this OrderHistoryListItem. # 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 OrderHistoryListItem. + + Time in force. - day: Day order. # noqa: E501 + + :param time_in_force: The time_in_force of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + allowed_values = ["day"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 + .format(time_in_force, allowed_values) + ) + + self._time_in_force = time_in_force + + @property + def volume(self): + """Gets the volume of this OrderHistoryListItem. # noqa: E501 + + + :return: The volume of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._volume + + @volume.setter + def volume(self, volume): + """Sets the volume of this OrderHistoryListItem. + + + :param volume: The volume of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._volume = volume + + @property + def fill_volume(self): + """Gets the fill_volume of this OrderHistoryListItem. # noqa: E501 + + + :return: The fill_volume of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._fill_volume + + @fill_volume.setter + def fill_volume(self, fill_volume): + """Sets the fill_volume of this OrderHistoryListItem. + + + :param fill_volume: The fill_volume of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._fill_volume = fill_volume + + @property + def price(self): + """Gets the price of this OrderHistoryListItem. # noqa: E501 + + + :return: The price of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OrderHistoryListItem. + + + :param price: The price of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def avg_fill_price(self): + """Gets the avg_fill_price of this OrderHistoryListItem. # noqa: E501 + + + :return: The avg_fill_price of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._avg_fill_price + + @avg_fill_price.setter + def avg_fill_price(self, avg_fill_price): + """Sets the avg_fill_price of this OrderHistoryListItem. + + + :param avg_fill_price: The avg_fill_price of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._avg_fill_price = avg_fill_price + + @property + def commission(self): + """Gets the commission of this OrderHistoryListItem. # noqa: E501 + + fee # noqa: E501 + + :return: The commission of this OrderHistoryListItem. # noqa: E501 + :rtype: str + """ + return self._commission + + @commission.setter + def commission(self, commission): + """Sets the commission of this OrderHistoryListItem. + + fee # noqa: E501 + + :param commission: The commission of this OrderHistoryListItem. # noqa: E501 + :type: str + """ + + self._commission = commission + + @property + def time_setup(self): + """Gets the time_setup of this OrderHistoryListItem. # noqa: E501 + + + :return: The time_setup of this OrderHistoryListItem. # noqa: E501 + :rtype: int + """ + return self._time_setup + + @time_setup.setter + def time_setup(self, time_setup): + """Sets the time_setup of this OrderHistoryListItem. + + + :param time_setup: The time_setup of this OrderHistoryListItem. # noqa: E501 + :type: int + """ + + self._time_setup = time_setup + + @property + def time_done(self): + """Gets the time_done of this OrderHistoryListItem. # noqa: E501 + + + :return: The time_done of this OrderHistoryListItem. # noqa: E501 + :rtype: int + """ + return self._time_done + + @time_done.setter + def time_done(self, time_done): + """Sets the time_done of this OrderHistoryListItem. + + + :param time_done: The time_done of this OrderHistoryListItem. # noqa: E501 + :type: int + """ + + self._time_done = time_done + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrderHistoryListItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderHistoryListItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/candy_drop_v4_error_cd01.py b/gate_api/models/order_history_list_item_status_detail.py similarity index 70% rename from gate_api/models/candy_drop_v4_error_cd01.py rename to gate_api/models/order_history_list_item_status_detail.py index 16506757..c28c0b2e 100644 --- a/gate_api/models/candy_drop_v4_error_cd01.py +++ b/gate_api/models/order_history_list_item_status_detail.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class CandyDropV4ErrorCd01(object): +class OrderHistoryListItemStatusDetail(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,72 +33,68 @@ class CandyDropV4ErrorCd01(object): and the value is json key in definition. """ openapi_types = { - 'label': 'str', + 'title': 'str', 'message': 'str' } attribute_map = { - 'label': 'label', + 'title': 'title', 'message': 'message' } - def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, title=None, message=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """CandyDropV4ErrorCd01 - a model defined in OpenAPI""" # noqa: E501 + """OrderHistoryListItemStatusDetail - a 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._title = None self._message = None self.discriminator = None - if label is not None: - self.label = label + if title is not None: + self.title = title if message is not None: self.message = message @property - def label(self): - """Gets the label of this CandyDropV4ErrorCd01. # noqa: E501 + def title(self): + """Gets the title of this OrderHistoryListItemStatusDetail. # noqa: E501 - Error label # noqa: E501 - :return: The label of this CandyDropV4ErrorCd01. # noqa: E501 + :return: The title of this OrderHistoryListItemStatusDetail. # noqa: E501 :rtype: str """ - return self._label + return self._title - @label.setter - def label(self, label): - """Sets the label of this CandyDropV4ErrorCd01. + @title.setter + def title(self, title): + """Sets the title of this OrderHistoryListItemStatusDetail. - Error label # noqa: E501 - :param label: The label of this CandyDropV4ErrorCd01. # noqa: E501 + :param title: The title of this OrderHistoryListItemStatusDetail. # noqa: E501 :type: str """ - self._label = label + self._title = title @property def message(self): - """Gets the message of this CandyDropV4ErrorCd01. # noqa: E501 + """Gets the message of this OrderHistoryListItemStatusDetail. # noqa: E501 - Error message # noqa: E501 - :return: The message of this CandyDropV4ErrorCd01. # noqa: E501 + :return: The message of this OrderHistoryListItemStatusDetail. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this CandyDropV4ErrorCd01. + """Sets the message of this OrderHistoryListItemStatusDetail. - Error message # noqa: E501 - :param message: The message of this CandyDropV4ErrorCd01. # noqa: E501 + :param message: The message of this OrderHistoryListItemStatusDetail. # noqa: E501 :type: str """ @@ -138,14 +134,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, CandyDropV4ErrorCd01): + if not isinstance(other, OrderHistoryListItemStatusDetail): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, CandyDropV4ErrorCd01): + if not isinstance(other, OrderHistoryListItemStatusDetail): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_list2.py b/gate_api/models/order_list2.py new file mode 100644 index 00000000..5be698a4 --- /dev/null +++ b/gate_api/models/order_list2.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderList2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'OrderList2Data', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (OrderList2Data, int, Configuration) -> None + """OrderList2 - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this OrderList2. # noqa: E501 + + + :return: The data of this OrderList2. # noqa: E501 + :rtype: OrderList2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OrderList2. + + + :param data: The data of this OrderList2. # noqa: E501 + :type: OrderList2Data + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this OrderList2. # noqa: E501 + + + :return: The timestamp of this OrderList2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this OrderList2. + + + :param timestamp: The timestamp of this OrderList2. # 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, OrderList2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderList2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_list2_data.py b/gate_api/models/order_list2_data.py new file mode 100644 index 00000000..1a62b85d --- /dev/null +++ b/gate_api/models/order_list2_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 OrderList2Data(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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[OrderListItem]' + } + + attribute_map = { + 'list': 'list' + } + + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[OrderListItem], Configuration) -> None + """OrderList2Data - a 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 OrderList2Data. # noqa: E501 + + Query active order list # noqa: E501 + + :return: The list of this OrderList2Data. # noqa: E501 + :rtype: list[OrderListItem] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this OrderList2Data. + + Query active order list # noqa: E501 + + :param list: The list of this OrderList2Data. # noqa: E501 + :type: list[OrderListItem] + """ + + 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, OrderList2Data): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderList2Data): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_list_data_list.py b/gate_api/models/order_list_data_list.py index d8f6ac3a..f439c89e 100644 --- a/gate_api/models/order_list_data_list.py +++ b/gate_api/models/order_list_data_list.py @@ -163,7 +163,7 @@ def symbol(self, symbol): def symbol_desc(self): """Gets the symbol_desc of this OrderListDataList. # noqa: E501 - Trading symbol description # noqa: E501 + Symbol description # noqa: E501 :return: The symbol_desc of this OrderListDataList. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def symbol_desc(self): def symbol_desc(self, symbol_desc): """Sets the symbol_desc of this OrderListDataList. - Trading symbol description # noqa: E501 + Symbol description # noqa: E501 :param symbol_desc: The symbol_desc of this OrderListDataList. # noqa: E501 :type: str @@ -290,7 +290,7 @@ def finished(self, finished): def side(self): """Gets the side of this OrderListDataList. # noqa: E501 - Order side (1=sell, 2=buy) # noqa: E501 + Side (1=sell, 2=buy) # noqa: E501 :return: The side of this OrderListDataList. # noqa: E501 :rtype: int @@ -301,7 +301,7 @@ def side(self): def side(self, side): """Sets the side of this OrderListDataList. - Order side (1=sell, 2=buy) # noqa: E501 + Side (1=sell, 2=buy) # noqa: E501 :param side: The side of this OrderListDataList. # noqa: E501 :type: int @@ -319,7 +319,7 @@ def side(self, side): def volume(self): """Gets the volume of this OrderListDataList. # noqa: E501 - Order volume # noqa: E501 + Order quantity # noqa: E501 :return: The volume of this OrderListDataList. # noqa: E501 :rtype: str @@ -330,7 +330,7 @@ def volume(self): def volume(self, volume): """Sets the volume of this OrderListDataList. - Order volume # noqa: E501 + Order quantity # noqa: E501 :param volume: The volume of this OrderListDataList. # noqa: E501 :type: str diff --git a/gate_api/models/order_list_item.py b/gate_api/models/order_list_item.py new file mode 100644 index 00000000..e5b4b5eb --- /dev/null +++ b/gate_api/models/order_list_item.py @@ -0,0 +1,825 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderListItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'symbol': 'str', + 'exchange': 'str', + 'quote_currency': 'str', + 'fx_rate': 'str', + 'symbol_desc': 'str', + 'trade_status': 'str', + 'trade_mode': 'int', + 'price_type': 'str', + 'side': 'int', + 'status': 'int', + 'volume': 'str', + 'fill_volume': 'str', + 'price': 'str', + 'time_setup': 'int', + 'time_update': 'int', + 'max_order_volume': 'str', + 'step_order_volume': 'str', + 'min_order_volume': 'str', + 'price_precision': 'int', + 'price_protection': 'str', + 'sell_price_protection': 'str', + 'buy_price_protection': 'str', + 'commission_rate': 'str', + 'slippage_rate': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'symbol': 'symbol', + 'exchange': 'exchange', + 'quote_currency': 'quote_currency', + 'fx_rate': 'fx_rate', + 'symbol_desc': 'symbol_desc', + 'trade_status': 'trade_status', + 'trade_mode': 'trade_mode', + 'price_type': 'price_type', + 'side': 'side', + 'status': 'status', + 'volume': 'volume', + 'fill_volume': 'fill_volume', + 'price': 'price', + 'time_setup': 'time_setup', + 'time_update': 'time_update', + 'max_order_volume': 'max_order_volume', + 'step_order_volume': 'step_order_volume', + 'min_order_volume': 'min_order_volume', + 'price_precision': 'price_precision', + 'price_protection': 'price_protection', + 'sell_price_protection': 'sell_price_protection', + 'buy_price_protection': 'buy_price_protection', + 'commission_rate': 'commission_rate', + 'slippage_rate': 'slippage_rate' + } + + def __init__(self, order_id=None, symbol=None, exchange=None, quote_currency=None, fx_rate=None, symbol_desc=None, trade_status=None, trade_mode=None, price_type=None, side=None, status=None, volume=None, fill_volume=None, price=None, time_setup=None, time_update=None, max_order_volume=None, step_order_volume=None, min_order_volume=None, price_precision=None, price_protection=None, sell_price_protection=None, buy_price_protection=None, commission_rate=None, slippage_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, int, str, int, int, str, str, str, int, int, str, str, str, int, str, str, str, str, str, Configuration) -> None + """OrderListItem - a 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._symbol = None + self._exchange = None + self._quote_currency = None + self._fx_rate = None + self._symbol_desc = None + self._trade_status = None + self._trade_mode = None + self._price_type = None + self._side = None + self._status = None + self._volume = None + self._fill_volume = None + self._price = None + self._time_setup = None + self._time_update = None + self._max_order_volume = None + self._step_order_volume = None + self._min_order_volume = None + self._price_precision = None + self._price_protection = None + self._sell_price_protection = None + self._buy_price_protection = None + self._commission_rate = None + self._slippage_rate = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if symbol is not None: + self.symbol = symbol + if exchange is not None: + self.exchange = exchange + if quote_currency is not None: + self.quote_currency = quote_currency + if fx_rate is not None: + self.fx_rate = fx_rate + if symbol_desc is not None: + self.symbol_desc = symbol_desc + if trade_status is not None: + self.trade_status = trade_status + if trade_mode is not None: + self.trade_mode = trade_mode + if price_type is not None: + self.price_type = price_type + if side is not None: + self.side = side + if status is not None: + self.status = status + if volume is not None: + self.volume = volume + if fill_volume is not None: + self.fill_volume = fill_volume + if price is not None: + self.price = price + if time_setup is not None: + self.time_setup = time_setup + if time_update is not None: + self.time_update = time_update + if max_order_volume is not None: + self.max_order_volume = max_order_volume + if step_order_volume is not None: + self.step_order_volume = step_order_volume + if min_order_volume is not None: + self.min_order_volume = min_order_volume + if price_precision is not None: + self.price_precision = price_precision + if price_protection is not None: + self.price_protection = price_protection + if sell_price_protection is not None: + self.sell_price_protection = sell_price_protection + if buy_price_protection is not None: + self.buy_price_protection = buy_price_protection + if commission_rate is not None: + self.commission_rate = commission_rate + if slippage_rate is not None: + self.slippage_rate = slippage_rate + + @property + def order_id(self): + """Gets the order_id of this OrderListItem. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this OrderListItem. + + Order ID # noqa: E501 + + :param order_id: The order_id of this OrderListItem. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def symbol(self): + """Gets the symbol of this OrderListItem. # noqa: E501 + + Symbol # noqa: E501 + + :return: The symbol of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this OrderListItem. + + Symbol # noqa: E501 + + :param symbol: The symbol of this OrderListItem. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def exchange(self): + """Gets the exchange of this OrderListItem. # noqa: E501 + + Exchange, supports us, hk, and kr # noqa: E501 + + :return: The exchange of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._exchange + + @exchange.setter + def exchange(self, exchange): + """Sets the exchange of this OrderListItem. + + Exchange, supports us, hk, and kr # noqa: E501 + + :param exchange: The exchange of this OrderListItem. # noqa: E501 + :type: str + """ + allowed_values = ["us", "hk", "kr"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and exchange not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `exchange` ({0}), must be one of {1}" # noqa: E501 + .format(exchange, allowed_values) + ) + + self._exchange = exchange + + @property + def quote_currency(self): + """Gets the quote_currency of this OrderListItem. # noqa: E501 + + Quote currency # noqa: E501 + + :return: The quote_currency of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._quote_currency + + @quote_currency.setter + def quote_currency(self, quote_currency): + """Sets the quote_currency of this OrderListItem. + + Quote currency # noqa: E501 + + :param quote_currency: The quote_currency of this OrderListItem. # noqa: E501 + :type: str + """ + + self._quote_currency = quote_currency + + @property + def fx_rate(self): + """Gets the fx_rate of this OrderListItem. # noqa: E501 + + Quote currency to USD exchange rate # noqa: E501 + + :return: The fx_rate of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._fx_rate + + @fx_rate.setter + def fx_rate(self, fx_rate): + """Sets the fx_rate of this OrderListItem. + + Quote currency to USD exchange rate # noqa: E501 + + :param fx_rate: The fx_rate of this OrderListItem. # noqa: E501 + :type: str + """ + + self._fx_rate = fx_rate + + @property + def symbol_desc(self): + """Gets the symbol_desc of this OrderListItem. # noqa: E501 + + Symbol description # noqa: E501 + + :return: The symbol_desc of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._symbol_desc + + @symbol_desc.setter + def symbol_desc(self, symbol_desc): + """Sets the symbol_desc of this OrderListItem. + + Symbol description # noqa: E501 + + :param symbol_desc: The symbol_desc of this OrderListItem. # noqa: E501 + :type: str + """ + + self._symbol_desc = symbol_desc + + @property + def trade_status(self): + """Gets the trade_status of this OrderListItem. # noqa: E501 + + Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. # noqa: E501 + + :return: The trade_status of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._trade_status + + @trade_status.setter + def trade_status(self, trade_status): + """Sets the trade_status of this OrderListItem. + + Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. # noqa: E501 + + :param trade_status: The trade_status of this OrderListItem. # noqa: E501 + :type: str + """ + allowed_values = ["pre_market", "open", "post_market", "closed", "gt_lp"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trade_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trade_status` ({0}), must be one of {1}" # noqa: E501 + .format(trade_status, allowed_values) + ) + + self._trade_status = trade_status + + @property + def trade_mode(self): + """Gets the trade_mode of this OrderListItem. # noqa: E501 + + Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. # noqa: E501 + + :return: The trade_mode of this OrderListItem. # noqa: E501 + :rtype: int + """ + return self._trade_mode + + @trade_mode.setter + def trade_mode(self, trade_mode): + """Sets the trade_mode of this OrderListItem. + + Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. # noqa: E501 + + :param trade_mode: The trade_mode of this OrderListItem. # noqa: E501 + :type: int + """ + allowed_values = [0, 1, 2, 4] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trade_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trade_mode` ({0}), must be one of {1}" # noqa: E501 + .format(trade_mode, allowed_values) + ) + + self._trade_mode = trade_mode + + @property + def price_type(self): + """Gets the price_type of this OrderListItem. # noqa: E501 + + Price type (market = market order, limit = limit order) # noqa: E501 + + :return: The price_type of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this OrderListItem. + + Price type (market = market order, limit = limit order) # noqa: E501 + + :param price_type: The price_type of this OrderListItem. # noqa: E501 + :type: str + """ + allowed_values = ["market", "limit"] # 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 side(self): + """Gets the side of this OrderListItem. # noqa: E501 + + Side (1=sell, 2=buy) # noqa: E501 + + :return: The side of this OrderListItem. # noqa: E501 + :rtype: int + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this OrderListItem. + + Side (1=sell, 2=buy) # noqa: E501 + + :param side: The side of this OrderListItem. # 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 status(self): + """Gets the status of this OrderListItem. # noqa: E501 + + Order status # noqa: E501 + + :return: The status of this OrderListItem. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this OrderListItem. + + Order status # noqa: E501 + + :param status: The status of this OrderListItem. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def volume(self): + """Gets the volume of this OrderListItem. # noqa: E501 + + Order quantity # noqa: E501 + + :return: The volume of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._volume + + @volume.setter + def volume(self, volume): + """Sets the volume of this OrderListItem. + + Order quantity # noqa: E501 + + :param volume: The volume of this OrderListItem. # noqa: E501 + :type: str + """ + + self._volume = volume + + @property + def fill_volume(self): + """Gets the fill_volume of this OrderListItem. # noqa: E501 + + Trading size # noqa: E501 + + :return: The fill_volume of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._fill_volume + + @fill_volume.setter + def fill_volume(self, fill_volume): + """Sets the fill_volume of this OrderListItem. + + Trading size # noqa: E501 + + :param fill_volume: The fill_volume of this OrderListItem. # noqa: E501 + :type: str + """ + + self._fill_volume = fill_volume + + @property + def price(self): + """Gets the price of this OrderListItem. # noqa: E501 + + Order price # noqa: E501 + + :return: The price of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OrderListItem. + + Order price # noqa: E501 + + :param price: The price of this OrderListItem. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def time_setup(self): + """Gets the time_setup of this OrderListItem. # noqa: E501 + + Order creation time (Unix timestamp, seconds) # noqa: E501 + + :return: The time_setup of this OrderListItem. # noqa: E501 + :rtype: int + """ + return self._time_setup + + @time_setup.setter + def time_setup(self, time_setup): + """Sets the time_setup of this OrderListItem. + + Order creation time (Unix timestamp, seconds) # noqa: E501 + + :param time_setup: The time_setup of this OrderListItem. # noqa: E501 + :type: int + """ + + self._time_setup = time_setup + + @property + def time_update(self): + """Gets the time_update of this OrderListItem. # noqa: E501 + + Order update time (Unix timestamp, seconds) # noqa: E501 + + :return: The time_update of this OrderListItem. # noqa: E501 + :rtype: int + """ + return self._time_update + + @time_update.setter + def time_update(self, time_update): + """Sets the time_update of this OrderListItem. + + Order update time (Unix timestamp, seconds) # noqa: E501 + + :param time_update: The time_update of this OrderListItem. # noqa: E501 + :type: int + """ + + self._time_update = time_update + + @property + def max_order_volume(self): + """Gets the max_order_volume of this OrderListItem. # noqa: E501 + + Maximum order quantity # noqa: E501 + + :return: The max_order_volume of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._max_order_volume + + @max_order_volume.setter + def max_order_volume(self, max_order_volume): + """Sets the max_order_volume of this OrderListItem. + + Maximum order quantity # noqa: E501 + + :param max_order_volume: The max_order_volume of this OrderListItem. # noqa: E501 + :type: str + """ + + self._max_order_volume = max_order_volume + + @property + def step_order_volume(self): + """Gets the step_order_volume of this OrderListItem. # noqa: E501 + + Order step size # noqa: E501 + + :return: The step_order_volume of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._step_order_volume + + @step_order_volume.setter + def step_order_volume(self, step_order_volume): + """Sets the step_order_volume of this OrderListItem. + + Order step size # noqa: E501 + + :param step_order_volume: The step_order_volume of this OrderListItem. # noqa: E501 + :type: str + """ + + self._step_order_volume = step_order_volume + + @property + def min_order_volume(self): + """Gets the min_order_volume of this OrderListItem. # noqa: E501 + + Minimum order quantity # noqa: E501 + + :return: The min_order_volume of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._min_order_volume + + @min_order_volume.setter + def min_order_volume(self, min_order_volume): + """Sets the min_order_volume of this OrderListItem. + + Minimum order quantity # noqa: E501 + + :param min_order_volume: The min_order_volume of this OrderListItem. # noqa: E501 + :type: str + """ + + self._min_order_volume = min_order_volume + + @property + def price_precision(self): + """Gets the price_precision of this OrderListItem. # noqa: E501 + + Price precision # noqa: E501 + + :return: The price_precision of this OrderListItem. # noqa: E501 + :rtype: int + """ + return self._price_precision + + @price_precision.setter + def price_precision(self, price_precision): + """Sets the price_precision of this OrderListItem. + + Price precision # noqa: E501 + + :param price_precision: The price_precision of this OrderListItem. # noqa: E501 + :type: int + """ + + self._price_precision = price_precision + + @property + def price_protection(self): + """Gets the price_protection of this OrderListItem. # noqa: E501 + + Price protection range # noqa: E501 + + :return: The price_protection of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._price_protection + + @price_protection.setter + def price_protection(self, price_protection): + """Sets the price_protection of this OrderListItem. + + Price protection range # noqa: E501 + + :param price_protection: The price_protection of this OrderListItem. # noqa: E501 + :type: str + """ + + self._price_protection = price_protection + + @property + def sell_price_protection(self): + """Gets the sell_price_protection of this OrderListItem. # noqa: E501 + + Sell price protection rate # noqa: E501 + + :return: The sell_price_protection of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._sell_price_protection + + @sell_price_protection.setter + def sell_price_protection(self, sell_price_protection): + """Sets the sell_price_protection of this OrderListItem. + + Sell price protection rate # noqa: E501 + + :param sell_price_protection: The sell_price_protection of this OrderListItem. # noqa: E501 + :type: str + """ + + self._sell_price_protection = sell_price_protection + + @property + def buy_price_protection(self): + """Gets the buy_price_protection of this OrderListItem. # noqa: E501 + + Buy price protection rate # noqa: E501 + + :return: The buy_price_protection of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._buy_price_protection + + @buy_price_protection.setter + def buy_price_protection(self, buy_price_protection): + """Sets the buy_price_protection of this OrderListItem. + + Buy price protection rate # noqa: E501 + + :param buy_price_protection: The buy_price_protection of this OrderListItem. # noqa: E501 + :type: str + """ + + self._buy_price_protection = buy_price_protection + + @property + def commission_rate(self): + """Gets the commission_rate of this OrderListItem. # noqa: E501 + + Fee Rate # noqa: E501 + + :return: The commission_rate of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._commission_rate + + @commission_rate.setter + def commission_rate(self, commission_rate): + """Sets the commission_rate of this OrderListItem. + + Fee Rate # noqa: E501 + + :param commission_rate: The commission_rate of this OrderListItem. # noqa: E501 + :type: str + """ + + self._commission_rate = commission_rate + + @property + def slippage_rate(self): + """Gets the slippage_rate of this OrderListItem. # noqa: E501 + + Slippage # noqa: E501 + + :return: The slippage_rate of this OrderListItem. # noqa: E501 + :rtype: str + """ + return self._slippage_rate + + @slippage_rate.setter + def slippage_rate(self, slippage_rate): + """Sets the slippage_rate of this OrderListItem. + + Slippage # noqa: E501 + + :param slippage_rate: The slippage_rate of this OrderListItem. # noqa: E501 + :type: str + """ + + self._slippage_rate = slippage_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, OrderListItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderListItem): + 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 index 076c69b2..49526ff4 100644 --- a/gate_api/models/order_log_data.py +++ b/gate_api/models/order_log_data.py @@ -213,7 +213,7 @@ def state(self, state): def side(self): """Gets the side of this OrderLogData. # noqa: E501 - Order side (1=sell, 2=buy) # noqa: E501 + Side (1=sell, 2=buy) # noqa: E501 :return: The side of this OrderLogData. # noqa: E501 :rtype: int @@ -224,7 +224,7 @@ def side(self): def side(self, side): """Sets the side of this OrderLogData. - Order side (1=sell, 2=buy) # noqa: E501 + Side (1=sell, 2=buy) # noqa: E501 :param side: The side of this OrderLogData. # noqa: E501 :type: int @@ -242,7 +242,7 @@ def side(self, side): def volume(self): """Gets the volume of this OrderLogData. # noqa: E501 - Order volume # noqa: E501 + Order quantity # noqa: E501 :return: The volume of this OrderLogData. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def volume(self): def volume(self, volume): """Sets the volume of this OrderLogData. - Order volume # noqa: E501 + Order quantity # noqa: E501 :param volume: The volume of this OrderLogData. # noqa: E501 :type: str diff --git a/gate_api/models/otc_bank_create_multipart_request.py b/gate_api/models/otc_bank_create_multipart_request.py index 697de0b8..33a80bd7 100644 --- a/gate_api/models/otc_bank_create_multipart_request.py +++ b/gate_api/models/otc_bank_create_multipart_request.py @@ -296,7 +296,7 @@ def agent_bank_swift(self, agent_bank_swift): def documentation_file(self): """Gets the documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 - 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) # noqa: E501 + Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment) # noqa: E501 :return: The documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 :rtype: str @@ -307,7 +307,7 @@ def documentation_file(self): def documentation_file(self, documentation_file): """Sets the documentation_file of this OtcBankCreateMultipartRequest. - 开户证明文件内容(multipart 文件字段,二进制/Base64;jpg/jpeg/png/pdf 等,单文件≤4MB 以现网为准) # noqa: E501 + Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment) # noqa: E501 :param documentation_file: The documentation_file of this OtcBankCreateMultipartRequest. # noqa: E501 :type: str diff --git a/gate_api/models/otc_bank_list_item.py b/gate_api/models/otc_bank_list_item.py index cccd5a38..6f86d03a 100644 --- a/gate_api/models/otc_bank_list_item.py +++ b/gate_api/models/otc_bank_list_item.py @@ -38,8 +38,6 @@ class OtcBankListItem(object): 'bank_name': 'str', 'bank_country': 'str', 'bank_address': 'str', - 'bank_code': 'str', - 'branch_code': 'str', 'iban': 'str', 'swift': 'str', 'remittance_line_number': 'str', @@ -48,11 +46,7 @@ class OtcBankListItem(object): 'submit_time': 'str', 'update_time': 'str', 'status': 'str', - 'documentation_file_type': 'str', - 'memo': 'str', - 'is_default': 'int', - 'bank_id': 'str', - 'documentation_file_key_url': 'str' + 'is_default': 'int' } attribute_map = { @@ -61,8 +55,6 @@ class OtcBankListItem(object): 'bank_name': 'bank_name', 'bank_country': 'bank_country', 'bank_address': 'bank_address', - 'bank_code': 'bank_code', - 'branch_code': 'branch_code', 'iban': 'iban', 'swift': 'swift', 'remittance_line_number': 'remittance_line_number', @@ -71,15 +63,11 @@ class OtcBankListItem(object): 'submit_time': 'submit_time', 'update_time': 'update_time', 'status': 'status', - 'documentation_file_type': 'documentation_file_type', - 'memo': 'memo', - 'is_default': 'is_default', - 'bank_id': 'bank_id', - 'documentation_file_key_url': 'documentation_file_key_url' + 'is_default': 'is_default' } - 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 + def __init__(self, id=None, 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, submit_time=None, update_time=None, status=None, is_default=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, int, Configuration) -> None """OtcBankListItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -90,8 +78,6 @@ def __init__(self, id=None, bank_account_name=None, bank_name=None, bank_country self._bank_name = None self._bank_country = None self._bank_address = None - self._bank_code = None - self._branch_code = None self._iban = None self._swift = None self._remittance_line_number = None @@ -100,11 +86,7 @@ def __init__(self, id=None, bank_account_name=None, bank_name=None, bank_country self._submit_time = None self._update_time = None self._status = None - self._documentation_file_type = None - self._memo = None self._is_default = None - self._bank_id = None - self._documentation_file_key_url = None self.discriminator = None self.id = id @@ -114,10 +96,6 @@ def __init__(self, id=None, bank_account_name=None, bank_name=None, bank_country self.bank_country = bank_country if bank_address is not None: self.bank_address = bank_address - if bank_code is not None: - self.bank_code = bank_code - if branch_code is not None: - self.branch_code = branch_code if iban is not None: self.iban = iban if swift is not None: @@ -134,22 +112,14 @@ def __init__(self, id=None, bank_account_name=None, bank_name=None, bank_country self.update_time = update_time if status is not None: self.status = status - if documentation_file_type is not None: - self.documentation_file_type = documentation_file_type - if memo is not None: - self.memo = memo if is_default is not None: self.is_default = is_default - if bank_id is not None: - self.bank_id = bank_id - if documentation_file_key_url is not None: - self.documentation_file_key_url = documentation_file_key_url @property def id(self): """Gets the id of this OtcBankListItem. # noqa: E501 - Bank ID (required for order placement) # noqa: E501 + Bank card ID (used when placing an order; the synonymous `bank_id` field has been consolidated into `id`) # noqa: E501 :return: The id of this OtcBankListItem. # noqa: E501 :rtype: str @@ -160,7 +130,7 @@ def id(self): def id(self, id): """Sets the id of this OtcBankListItem. - Bank ID (required for order placement) # noqa: E501 + Bank card ID (used when placing an order; the synonymous `bank_id` field has been consolidated into `id`) # noqa: E501 :param id: The id of this OtcBankListItem. # noqa: E501 :type: str @@ -266,52 +236,6 @@ def bank_address(self, bank_address): self._bank_address = bank_address - @property - def bank_code(self): - """Gets the bank_code of this OtcBankListItem. # noqa: E501 - - Bank code # 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 OtcBankListItem. - - Bank code # noqa: E501 - - :param bank_code: The bank_code of this OtcBankListItem. # noqa: E501 - :type: str - """ - - self._bank_code = bank_code - - @property - def branch_code(self): - """Gets the branch_code of this OtcBankListItem. # noqa: E501 - - Branch code # 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 OtcBankListItem. - - Branch code # noqa: E501 - - :param branch_code: The branch_code of this OtcBankListItem. # noqa: E501 - :type: str - """ - - self._branch_code = branch_code - @property def iban(self): """Gets the iban of this OtcBankListItem. # noqa: E501 @@ -496,52 +420,6 @@ def status(self, status): self._status = status - @property - def documentation_file_type(self): - """Gets the documentation_file_type of this OtcBankListItem. # noqa: E501 - - Document file type # 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 OtcBankListItem. - - Document file type # noqa: E501 - - :param documentation_file_type: The documentation_file_type of this OtcBankListItem. # noqa: E501 - :type: str - """ - - self._documentation_file_type = documentation_file_type - - @property - def memo(self): - """Gets the memo of this OtcBankListItem. # noqa: E501 - - Remark # 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 OtcBankListItem. - - Remark # noqa: E501 - - :param memo: The memo of this OtcBankListItem. # noqa: E501 - :type: str - """ - - self._memo = memo - @property def is_default(self): """Gets the is_default of this OtcBankListItem. # noqa: E501 @@ -565,52 +443,6 @@ def is_default(self, is_default): self._is_default = is_default - @property - def bank_id(self): - """Gets the bank_id of this OtcBankListItem. # noqa: E501 - - Bank ID # 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 OtcBankListItem. - - Bank ID # noqa: E501 - - :param bank_id: The bank_id of this OtcBankListItem. # noqa: E501 - :type: str - """ - - self._bank_id = bank_id - - @property - def documentation_file_key_url(self): - """Gets the documentation_file_key_url of this OtcBankListItem. # noqa: E501 - - Document file URL # 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 OtcBankListItem. - - Document file URL # noqa: E501 - - :param documentation_file_key_url: The documentation_file_key_url of this OtcBankListItem. # noqa: E501 - :type: str - """ - - self._documentation_file_key_url = documentation_file_key_url - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/otc_bank_supplement_checklist_item.py b/gate_api/models/otc_bank_supplement_checklist_item.py index 2351e654..fbc81bb8 100644 --- a/gate_api/models/otc_bank_supplement_checklist_item.py +++ b/gate_api/models/otc_bank_supplement_checklist_item.py @@ -33,130 +33,49 @@ class OtcBankSupplementChecklistItem(object): and the value is json key in definition. """ openapi_types = { - 'code': 'str', - 'zh': 'str', - 'en': 'str', - 'required': 'bool' + 'description': 'str' } attribute_map = { - 'code': 'code', - 'zh': 'zh', - 'en': 'en', - 'required': 'required' + 'description': 'description' } - def __init__(self, code=None, zh=None, en=None, required=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, bool, Configuration) -> None + def __init__(self, description=None, local_vars_configuration=None): # noqa: E501 + # type: (str, 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._description = 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 + self.description = description @property - def code(self): - """Gets the code of this OtcBankSupplementChecklistItem. # noqa: E501 + def description(self): + """Gets the description of this OtcBankSupplementChecklistItem. # noqa: E501 - Material item code, corresponding to the top-level key of `relationship_proof` # noqa: E501 + Supplementary document submission description # noqa: E501 - :return: The code of this OtcBankSupplementChecklistItem. # noqa: E501 + :return: The description of this OtcBankSupplementChecklistItem. # noqa: E501 :rtype: str """ - return self._code + return self._description - @code.setter - def code(self, code): - """Sets the code of this OtcBankSupplementChecklistItem. + @description.setter + def description(self, description): + """Sets the description of this OtcBankSupplementChecklistItem. - Material item code, corresponding to the top-level key of `relationship_proof` # noqa: E501 + Supplementary document submission description # noqa: E501 - :param code: The code of this OtcBankSupplementChecklistItem. # noqa: E501 + :param description: The description 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 + if self.local_vars_configuration.client_side_validation and description is None: # noqa: E501 + raise ValueError("Invalid value for `description`, 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 + self._description = description def to_dict(self): """Returns the model properties as a 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 index 7684ae2b..816af303 100644 --- a/gate_api/models/otc_bank_supplement_checklist_response_data.py +++ b/gate_api/models/otc_bank_supplement_checklist_response_data.py @@ -60,7 +60,7 @@ def __init__(self, user_type=None, items=None, local_vars_configuration=None): def user_type(self): """Gets the user_type of this OtcBankSupplementChecklistResponseData. # noqa: E501 - personal or enterprise # noqa: E501 + `personal` or `enterprise`, matching the supplementary document submission type; `items[].description` describes the submission requirements for each item # noqa: E501 :return: The user_type of this OtcBankSupplementChecklistResponseData. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def user_type(self): def user_type(self, user_type): """Sets the user_type of this OtcBankSupplementChecklistResponseData. - personal or enterprise # noqa: E501 + `personal` or `enterprise`, matching the supplementary document submission type; `items[].description` describes the submission requirements for each item # noqa: E501 :param user_type: The user_type of this OtcBankSupplementChecklistResponseData. # noqa: E501 :type: str diff --git a/gate_api/models/otc_mark_order_paid_request.py b/gate_api/models/otc_mark_order_paid_request.py index 3128939a..1f775519 100644 --- a/gate_api/models/otc_mark_order_paid_request.py +++ b/gate_api/models/otc_mark_order_paid_request.py @@ -118,7 +118,7 @@ def client_order_id(self, client_order_id): 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 + User payment receipt: **required**. Stored as a file_key. One file; jpg/jpeg/png/pdf; maximum 10 MB. # noqa: E501 :return: The payment_receipt_file_key of this OtcMarkOrderPaidRequest. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def payment_receipt_file_key(self): 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 + User payment receipt: **required**. Stored as a file_key. One file; jpg/jpeg/png/pdf; maximum 10 MB. # noqa: E501 :param payment_receipt_file_key: The payment_receipt_file_key of this OtcMarkOrderPaidRequest. # noqa: E501 :type: str diff --git a/gate_api/models/otc_order_detail.py b/gate_api/models/otc_order_detail.py index dc57248c..a15345c0 100644 --- a/gate_api/models/otc_order_detail.py +++ b/gate_api/models/otc_order_detail.py @@ -41,15 +41,26 @@ class OtcOrderDetail(object): 'crypto_currency': 'str', 'crypto_amount': 'str', 'rate': 'str', - 'transfer_remark': 'str', - 'reference_code': 'str', + 'bank_account_name': 'str', + 'bank_name': 'str', + 'bank_country': 'str', + 'bank_address': 'str', + 'bank_account_number_iban': 'str', + 'swift_code': 'str', + 'intermediate_bank_name': 'str', + 'intermediary_bank_swift_code': 'str', + 'gate_bank_account_name': 'str', + 'gate_bank_name': 'str', + 'gate_bank_country': 'str', + 'gate_bank_address': 'str', + 'gate_bank_account_number_iban': 'str', + 'gate_swift_code': 'str', + 'gate_intermediary_bank_name': 'str', + 'gate_intermediary_bank_swift_code': 'str', + 'gate_transfer_remark': 'str', + 'gate_reference_code': 'str', 'status': 'str', - 'db_status': 'str', - 'create_time': 'str', - 'memo': 'str', - 'side': 'str', - 'promotion_code': 'str', - 'trade_no': 'str' + 'create_time': 'str' } attribute_map = { @@ -61,19 +72,30 @@ class OtcOrderDetail(object): 'crypto_currency': 'crypto_currency', 'crypto_amount': 'crypto_amount', 'rate': 'rate', - 'transfer_remark': 'transfer_remark', - 'reference_code': 'reference_code', + 'bank_account_name': 'bank_account_name', + 'bank_name': 'bank_name', + 'bank_country': 'bank_country', + 'bank_address': 'bank_address', + 'bank_account_number_iban': 'bank_account_number_iban', + 'swift_code': 'swift_code', + 'intermediate_bank_name': 'intermediate_bank_name', + 'intermediary_bank_swift_code': 'intermediary_bank_swift_code', + 'gate_bank_account_name': 'gate_bank_account_name', + 'gate_bank_name': 'gate_bank_name', + 'gate_bank_country': 'gate_bank_country', + 'gate_bank_address': 'gate_bank_address', + 'gate_bank_account_number_iban': 'gate_bank_account_number_iban', + 'gate_swift_code': 'gate_swift_code', + 'gate_intermediary_bank_name': 'gate_intermediary_bank_name', + 'gate_intermediary_bank_swift_code': 'gate_intermediary_bank_swift_code', + 'gate_transfer_remark': 'gate_transfer_remark', + 'gate_reference_code': 'gate_reference_code', 'status': 'status', - 'db_status': 'db_status', - 'create_time': 'create_time', - 'memo': 'memo', - 'side': 'side', - 'promotion_code': 'promotion_code', - 'trade_no': 'trade_no' + 'create_time': 'create_time' } - 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 + def __init__(self, order_id=None, uid=None, type=None, fiat_currency=None, fiat_amount=None, crypto_currency=None, crypto_amount=None, rate=None, bank_account_name=None, bank_name=None, bank_country=None, bank_address=None, bank_account_number_iban=None, swift_code=None, intermediate_bank_name=None, intermediary_bank_swift_code=None, gate_bank_account_name=None, gate_bank_name=None, gate_bank_country=None, gate_bank_address=None, gate_bank_account_number_iban=None, gate_swift_code=None, gate_intermediary_bank_name=None, gate_intermediary_bank_swift_code=None, gate_transfer_remark=None, gate_reference_code=None, status=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, 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() @@ -87,15 +109,26 @@ def __init__(self, order_id=None, uid=None, type=None, fiat_currency=None, fiat_ self._crypto_currency = None self._crypto_amount = None self._rate = None - self._transfer_remark = None - self._reference_code = None + self._bank_account_name = None + self._bank_name = None + self._bank_country = None + self._bank_address = None + self._bank_account_number_iban = None + self._swift_code = None + self._intermediate_bank_name = None + self._intermediary_bank_swift_code = None + self._gate_bank_account_name = None + self._gate_bank_name = None + self._gate_bank_country = None + self._gate_bank_address = None + self._gate_bank_account_number_iban = None + self._gate_swift_code = None + self._gate_intermediary_bank_name = None + self._gate_intermediary_bank_swift_code = None + self._gate_transfer_remark = None + self._gate_reference_code = None self._status = None - self._db_status = None self._create_time = None - self._memo = None - self._side = None - self._promotion_code = None - self._trade_no = None self.discriminator = None self.order_id = order_id @@ -106,16 +139,44 @@ def __init__(self, order_id=None, uid=None, type=None, fiat_currency=None, fiat_ self.crypto_currency = crypto_currency self.crypto_amount = crypto_amount self.rate = rate - self.transfer_remark = transfer_remark - if reference_code is not None: - self.reference_code = reference_code + if bank_account_name is not None: + self.bank_account_name = bank_account_name + if bank_name is not None: + self.bank_name = bank_name + if bank_country is not None: + self.bank_country = bank_country + if bank_address is not None: + self.bank_address = bank_address + if bank_account_number_iban is not None: + self.bank_account_number_iban = bank_account_number_iban + if swift_code is not None: + self.swift_code = swift_code + if intermediate_bank_name is not None: + self.intermediate_bank_name = intermediate_bank_name + if intermediary_bank_swift_code is not None: + self.intermediary_bank_swift_code = intermediary_bank_swift_code + if gate_bank_account_name is not None: + self.gate_bank_account_name = gate_bank_account_name + if gate_bank_name is not None: + self.gate_bank_name = gate_bank_name + if gate_bank_country is not None: + self.gate_bank_country = gate_bank_country + if gate_bank_address is not None: + self.gate_bank_address = gate_bank_address + if gate_bank_account_number_iban is not None: + self.gate_bank_account_number_iban = gate_bank_account_number_iban + if gate_swift_code is not None: + self.gate_swift_code = gate_swift_code + if gate_intermediary_bank_name is not None: + self.gate_intermediary_bank_name = gate_intermediary_bank_name + if gate_intermediary_bank_swift_code is not None: + self.gate_intermediary_bank_swift_code = gate_intermediary_bank_swift_code + if gate_transfer_remark is not None: + self.gate_transfer_remark = gate_transfer_remark + if gate_reference_code is not None: + self.gate_reference_code = gate_reference_code self.status = status - self.db_status = db_status self.create_time = create_time - self.memo = memo - self.side = side - self.promotion_code = promotion_code - self.trade_no = trade_no @property def order_id(self): @@ -196,7 +257,7 @@ def type(self, type): def fiat_currency(self): """Gets the fiat_currency of this OtcOrderDetail. # noqa: E501 - Fiat type # noqa: E501 + Fiat currency # noqa: E501 :return: The fiat_currency of this OtcOrderDetail. # noqa: E501 :rtype: str @@ -207,7 +268,7 @@ def fiat_currency(self): def fiat_currency(self, fiat_currency): """Sets the fiat_currency of this OtcOrderDetail. - Fiat type # noqa: E501 + Fiat currency # noqa: E501 :param fiat_currency: The fiat_currency of this OtcOrderDetail. # noqa: E501 :type: str @@ -246,7 +307,7 @@ def fiat_amount(self, fiat_amount): def crypto_currency(self): """Gets the crypto_currency of this OtcOrderDetail. # noqa: E501 - Stablecoin # noqa: E501 + Digital currency # noqa: E501 :return: The crypto_currency of this OtcOrderDetail. # noqa: E501 :rtype: str @@ -257,7 +318,7 @@ def crypto_currency(self): def crypto_currency(self, crypto_currency): """Sets the crypto_currency of this OtcOrderDetail. - Stablecoin # noqa: E501 + Digital currency # noqa: E501 :param crypto_currency: The crypto_currency of this OtcOrderDetail. # noqa: E501 :type: str @@ -271,7 +332,7 @@ def crypto_currency(self, crypto_currency): def crypto_amount(self): """Gets the crypto_amount of this OtcOrderDetail. # noqa: E501 - Stablecoin amount # noqa: E501 + Cryptocurrency amount # noqa: E501 :return: The crypto_amount of this OtcOrderDetail. # noqa: E501 :rtype: str @@ -282,7 +343,7 @@ def crypto_amount(self): def crypto_amount(self, crypto_amount): """Sets the crypto_amount of this OtcOrderDetail. - Stablecoin amount # noqa: E501 + Cryptocurrency amount # noqa: E501 :param crypto_amount: The crypto_amount of this OtcOrderDetail. # noqa: E501 :type: str @@ -318,225 +379,468 @@ def rate(self, rate): self._rate = rate @property - def transfer_remark(self): - """Gets the transfer_remark of this OtcOrderDetail. # noqa: E501 + def bank_account_name(self): + """Gets the bank_account_name of this OtcOrderDetail. # noqa: E501 - Transfer remark (mutually exclusive with reference_code; empty string when the deposit buy order has a reference code) # noqa: E501 + User payment/receiving name # noqa: E501 - :return: The transfer_remark of this OtcOrderDetail. # noqa: E501 + :return: The bank_account_name of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._transfer_remark + return self._bank_account_name - @transfer_remark.setter - def transfer_remark(self, transfer_remark): - """Sets the transfer_remark of this OtcOrderDetail. + @bank_account_name.setter + def bank_account_name(self, bank_account_name): + """Sets the bank_account_name of this OtcOrderDetail. - Transfer remark (mutually exclusive with reference_code; empty string when the deposit buy order has a reference code) # noqa: E501 + User payment/receiving name # noqa: E501 - :param transfer_remark: The transfer_remark of this OtcOrderDetail. # noqa: E501 + :param bank_account_name: The bank_account_name of this OtcOrderDetail. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and transfer_remark is None: # noqa: E501 - raise ValueError("Invalid value for `transfer_remark`, must not be `None`") # noqa: E501 - self._transfer_remark = transfer_remark + self._bank_account_name = bank_account_name @property - def reference_code(self): - """Gets the reference_code of this OtcOrderDetail. # noqa: E501 + def bank_name(self): + """Gets the bank_name of this OtcOrderDetail. # noqa: E501 - Unique bank transfer reference code for deposit buy orders (SGB deposit scenario; mutually exclusive with transfer_remark) # noqa: E501 + User payment/receiving bank name # noqa: E501 - :return: The reference_code of this OtcOrderDetail. # noqa: E501 + :return: The bank_name of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._reference_code + return self._bank_name - @reference_code.setter - def reference_code(self, reference_code): - """Sets the reference_code of this OtcOrderDetail. + @bank_name.setter + def bank_name(self, bank_name): + """Sets the bank_name of this OtcOrderDetail. - Unique bank transfer reference code for deposit buy orders (SGB deposit scenario; mutually exclusive with transfer_remark) # noqa: E501 + User payment/receiving bank name # noqa: E501 - :param reference_code: The reference_code of this OtcOrderDetail. # noqa: E501 + :param bank_name: The bank_name of this OtcOrderDetail. # noqa: E501 :type: str """ - self._reference_code = reference_code + self._bank_name = bank_name @property - def status(self): - """Gets the status of this OtcOrderDetail. # noqa: E501 + def bank_country(self): + """Gets the bank_country of this OtcOrderDetail. # noqa: E501 - Status # noqa: E501 + User payment/receiving bank country # noqa: E501 - :return: The status of this OtcOrderDetail. # noqa: E501 + :return: The bank_country of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._status + return self._bank_country - @status.setter - def status(self, status): - """Sets the status of this OtcOrderDetail. + @bank_country.setter + def bank_country(self, bank_country): + """Sets the bank_country of this OtcOrderDetail. - Status # noqa: E501 + User payment/receiving bank country # noqa: E501 - :param status: The status of this OtcOrderDetail. # noqa: E501 + :param bank_country: The bank_country of this OtcOrderDetail. # 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 + self._bank_country = bank_country @property - def db_status(self): - """Gets the db_status of this OtcOrderDetail. # noqa: E501 + def bank_address(self): + """Gets the bank_address of this OtcOrderDetail. # noqa: E501 + User payment/receiving bank address # noqa: E501 - :return: The db_status of this OtcOrderDetail. # noqa: E501 + :return: The bank_address of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._db_status + return self._bank_address - @db_status.setter - def db_status(self, db_status): - """Sets the db_status of this OtcOrderDetail. + @bank_address.setter + def bank_address(self, bank_address): + """Sets the bank_address of this OtcOrderDetail. + User payment/receiving bank address # noqa: E501 - :param db_status: The db_status of this OtcOrderDetail. # noqa: E501 + :param bank_address: The bank_address of this OtcOrderDetail. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and db_status is None: # noqa: E501 - raise ValueError("Invalid value for `db_status`, must not be `None`") # noqa: E501 - self._db_status = db_status + self._bank_address = bank_address @property - def create_time(self): - """Gets the create_time of this OtcOrderDetail. # noqa: E501 + def bank_account_number_iban(self): + """Gets the bank_account_number_iban of this OtcOrderDetail. # noqa: E501 - Created time # noqa: E501 + User payment/receiving bank account number/IBAN # noqa: E501 - :return: The create_time of this OtcOrderDetail. # noqa: E501 + :return: The bank_account_number_iban of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._create_time + return self._bank_account_number_iban - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this OtcOrderDetail. + @bank_account_number_iban.setter + def bank_account_number_iban(self, bank_account_number_iban): + """Sets the bank_account_number_iban of this OtcOrderDetail. - Created time # noqa: E501 + User payment/receiving bank account number/IBAN # noqa: E501 - :param create_time: The create_time of this OtcOrderDetail. # noqa: E501 + :param bank_account_number_iban: The bank_account_number_iban of this OtcOrderDetail. # 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 + self._bank_account_number_iban = bank_account_number_iban + + @property + def swift_code(self): + """Gets the swift_code of this OtcOrderDetail. # noqa: E501 + + User payment/receiving bank SWIFT code # noqa: E501 + + :return: The swift_code of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._swift_code + + @swift_code.setter + def swift_code(self, swift_code): + """Sets the swift_code of this OtcOrderDetail. + + User payment/receiving bank SWIFT code # noqa: E501 + + :param swift_code: The swift_code of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._swift_code = swift_code + + @property + def intermediate_bank_name(self): + """Gets the intermediate_bank_name of this OtcOrderDetail. # noqa: E501 + + User payment/receiving intermediary bank name # noqa: E501 + + :return: The intermediate_bank_name of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._intermediate_bank_name + + @intermediate_bank_name.setter + def intermediate_bank_name(self, intermediate_bank_name): + """Sets the intermediate_bank_name of this OtcOrderDetail. + + User payment/receiving intermediary bank name # noqa: E501 + + :param intermediate_bank_name: The intermediate_bank_name of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._intermediate_bank_name = intermediate_bank_name + + @property + def intermediary_bank_swift_code(self): + """Gets the intermediary_bank_swift_code of this OtcOrderDetail. # noqa: E501 + + User payment/receiving intermediary bank SWIFT code # noqa: E501 + + :return: The intermediary_bank_swift_code of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._intermediary_bank_swift_code + + @intermediary_bank_swift_code.setter + def intermediary_bank_swift_code(self, intermediary_bank_swift_code): + """Sets the intermediary_bank_swift_code of this OtcOrderDetail. + + User payment/receiving intermediary bank SWIFT code # noqa: E501 + + :param intermediary_bank_swift_code: The intermediary_bank_swift_code of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._intermediary_bank_swift_code = intermediary_bank_swift_code + + @property + def gate_bank_account_name(self): + """Gets the gate_bank_account_name of this OtcOrderDetail. # noqa: E501 + + Gate beneficiary name, shown for BUY only # noqa: E501 + + :return: The gate_bank_account_name of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._gate_bank_account_name + + @gate_bank_account_name.setter + def gate_bank_account_name(self, gate_bank_account_name): + """Sets the gate_bank_account_name of this OtcOrderDetail. + + Gate beneficiary name, shown for BUY only # noqa: E501 + + :param gate_bank_account_name: The gate_bank_account_name of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._gate_bank_account_name = gate_bank_account_name + + @property + def gate_bank_name(self): + """Gets the gate_bank_name of this OtcOrderDetail. # noqa: E501 + + Gate beneficiary bank name, shown for BUY only # noqa: E501 + + :return: The gate_bank_name of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._gate_bank_name + + @gate_bank_name.setter + def gate_bank_name(self, gate_bank_name): + """Sets the gate_bank_name of this OtcOrderDetail. + + Gate beneficiary bank name, shown for BUY only # noqa: E501 + + :param gate_bank_name: The gate_bank_name of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._gate_bank_name = gate_bank_name + + @property + def gate_bank_country(self): + """Gets the gate_bank_country of this OtcOrderDetail. # noqa: E501 + + Gate beneficiary bank country, shown for BUY only # noqa: E501 + + :return: The gate_bank_country of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._gate_bank_country + + @gate_bank_country.setter + def gate_bank_country(self, gate_bank_country): + """Sets the gate_bank_country of this OtcOrderDetail. + + Gate beneficiary bank country, shown for BUY only # noqa: E501 + + :param gate_bank_country: The gate_bank_country of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._gate_bank_country = gate_bank_country + + @property + def gate_bank_address(self): + """Gets the gate_bank_address of this OtcOrderDetail. # noqa: E501 + + Gate beneficiary bank address, shown for BUY only # noqa: E501 + + :return: The gate_bank_address of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._gate_bank_address + + @gate_bank_address.setter + def gate_bank_address(self, gate_bank_address): + """Sets the gate_bank_address of this OtcOrderDetail. + + Gate beneficiary bank address, shown for BUY only # noqa: E501 + + :param gate_bank_address: The gate_bank_address of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._gate_bank_address = gate_bank_address + + @property + def gate_bank_account_number_iban(self): + """Gets the gate_bank_account_number_iban of this OtcOrderDetail. # noqa: E501 + + Gate beneficiary bank account number/IBAN, shown for BUY only # noqa: E501 + + :return: The gate_bank_account_number_iban of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._gate_bank_account_number_iban + + @gate_bank_account_number_iban.setter + def gate_bank_account_number_iban(self, gate_bank_account_number_iban): + """Sets the gate_bank_account_number_iban of this OtcOrderDetail. + + Gate beneficiary bank account number/IBAN, shown for BUY only # noqa: E501 + + :param gate_bank_account_number_iban: The gate_bank_account_number_iban of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._gate_bank_account_number_iban = gate_bank_account_number_iban + + @property + def gate_swift_code(self): + """Gets the gate_swift_code of this OtcOrderDetail. # noqa: E501 + + Gate beneficiary bank SWIFT code, shown for BUY only # noqa: E501 + + :return: The gate_swift_code of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._gate_swift_code + + @gate_swift_code.setter + def gate_swift_code(self, gate_swift_code): + """Sets the gate_swift_code of this OtcOrderDetail. + + Gate beneficiary bank SWIFT code, shown for BUY only # noqa: E501 + + :param gate_swift_code: The gate_swift_code of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._gate_swift_code = gate_swift_code + + @property + def gate_intermediary_bank_name(self): + """Gets the gate_intermediary_bank_name of this OtcOrderDetail. # noqa: E501 + + Gate beneficiary intermediary bank name, shown for BUY only # noqa: E501 + + :return: The gate_intermediary_bank_name of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._gate_intermediary_bank_name + + @gate_intermediary_bank_name.setter + def gate_intermediary_bank_name(self, gate_intermediary_bank_name): + """Sets the gate_intermediary_bank_name of this OtcOrderDetail. + + Gate beneficiary intermediary bank name, shown for BUY only # noqa: E501 + + :param gate_intermediary_bank_name: The gate_intermediary_bank_name of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._gate_intermediary_bank_name = gate_intermediary_bank_name @property - def memo(self): - """Gets the memo of this OtcOrderDetail. # noqa: E501 + def gate_intermediary_bank_swift_code(self): + """Gets the gate_intermediary_bank_swift_code of this OtcOrderDetail. # noqa: E501 - Cancellation or rejection reason # noqa: E501 + Gate beneficiary intermediary bank SWIFT code, shown for BUY only # noqa: E501 - :return: The memo of this OtcOrderDetail. # noqa: E501 + :return: The gate_intermediary_bank_swift_code of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._memo + return self._gate_intermediary_bank_swift_code - @memo.setter - def memo(self, memo): - """Sets the memo of this OtcOrderDetail. + @gate_intermediary_bank_swift_code.setter + def gate_intermediary_bank_swift_code(self, gate_intermediary_bank_swift_code): + """Sets the gate_intermediary_bank_swift_code of this OtcOrderDetail. - Cancellation or rejection reason # noqa: E501 + Gate beneficiary intermediary bank SWIFT code, shown for BUY only # noqa: E501 - :param memo: The memo of this OtcOrderDetail. # noqa: E501 + :param gate_intermediary_bank_swift_code: The gate_intermediary_bank_swift_code of this OtcOrderDetail. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and memo is None: # noqa: E501 - raise ValueError("Invalid value for `memo`, must not be `None`") # noqa: E501 - self._memo = memo + self._gate_intermediary_bank_swift_code = gate_intermediary_bank_swift_code @property - def side(self): - """Gets the side of this OtcOrderDetail. # noqa: E501 + def gate_transfer_remark(self): + """Gets the gate_transfer_remark of this OtcOrderDetail. # noqa: E501 - Quote direction # noqa: E501 + Transfer remark (mutually exclusive with `gate_reference_code`; empty when a BUY deposit order has a reference code), shown for BUY only # noqa: E501 - :return: The side of this OtcOrderDetail. # noqa: E501 + :return: The gate_transfer_remark of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._side + return self._gate_transfer_remark - @side.setter - def side(self, side): - """Sets the side of this OtcOrderDetail. + @gate_transfer_remark.setter + def gate_transfer_remark(self, gate_transfer_remark): + """Sets the gate_transfer_remark of this OtcOrderDetail. - Quote direction # noqa: E501 + Transfer remark (mutually exclusive with `gate_reference_code`; empty when a BUY deposit order has a reference code), shown for BUY only # noqa: E501 - :param side: The side of this OtcOrderDetail. # noqa: E501 + :param gate_transfer_remark: The gate_transfer_remark of this OtcOrderDetail. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 - raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501 - self._side = side + self._gate_transfer_remark = gate_transfer_remark @property - def promotion_code(self): - """Gets the promotion_code of this OtcOrderDetail. # noqa: E501 + def gate_reference_code(self): + """Gets the gate_reference_code of this OtcOrderDetail. # noqa: E501 + + Be sure to include the reference code when making the transfer so that your order can be processed promptly. (Mutually exclusive with `gate_transfer_remark`.) # noqa: E501 + + :return: The gate_reference_code of this OtcOrderDetail. # noqa: E501 + :rtype: str + """ + return self._gate_reference_code - Promotion code # noqa: E501 + @gate_reference_code.setter + def gate_reference_code(self, gate_reference_code): + """Sets the gate_reference_code of this OtcOrderDetail. + + Be sure to include the reference code when making the transfer so that your order can be processed promptly. (Mutually exclusive with `gate_transfer_remark`.) # noqa: E501 + + :param gate_reference_code: The gate_reference_code of this OtcOrderDetail. # noqa: E501 + :type: str + """ + + self._gate_reference_code = gate_reference_code + + @property + def status(self): + """Gets the status of this OtcOrderDetail. # noqa: E501 + + Status # noqa: E501 - :return: The promotion_code of this OtcOrderDetail. # noqa: E501 + :return: The status of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._promotion_code + return self._status - @promotion_code.setter - def promotion_code(self, promotion_code): - """Sets the promotion_code of this OtcOrderDetail. + @status.setter + def status(self, status): + """Sets the status of this OtcOrderDetail. - Promotion code # noqa: E501 + Status # noqa: E501 - :param promotion_code: The promotion_code of this OtcOrderDetail. # noqa: E501 + :param status: The status of this OtcOrderDetail. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and promotion_code is None: # noqa: E501 - raise ValueError("Invalid value for `promotion_code`, must not be `None`") # noqa: E501 + 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._promotion_code = promotion_code + self._status = status @property - def trade_no(self): - """Gets the trade_no of this OtcOrderDetail. # noqa: E501 + def create_time(self): + """Gets the create_time of this OtcOrderDetail. # noqa: E501 - Trade number # noqa: E501 + Created time # noqa: E501 - :return: The trade_no of this OtcOrderDetail. # noqa: E501 + :return: The create_time of this OtcOrderDetail. # noqa: E501 :rtype: str """ - return self._trade_no + return self._create_time - @trade_no.setter - def trade_no(self, trade_no): - """Sets the trade_no of this OtcOrderDetail. + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this OtcOrderDetail. - Trade number # noqa: E501 + Created time # noqa: E501 - :param trade_no: The trade_no of this OtcOrderDetail. # noqa: E501 + :param create_time: The create_time of this OtcOrderDetail. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and trade_no is None: # noqa: E501 - raise ValueError("Invalid value for `trade_no`, must not be `None`") # noqa: E501 + 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._trade_no = trade_no + self._create_time = create_time def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/otc_order_list_item.py b/gate_api/models/otc_order_list_item.py index d8e0b4b7..565c1132 100644 --- a/gate_api/models/otc_order_list_item.py +++ b/gate_api/models/otc_order_list_item.py @@ -39,7 +39,6 @@ class OtcOrderListItem(object): 'trade_no': 'str', 'type': 'str', 'status': 'str', - 'db_status': 'str', 'fiat_currency': 'str', 'fiat_currency_info': 'OtcOrderListFiatCurrencyInfo', 'fiat_amount': 'str', @@ -47,9 +46,6 @@ class OtcOrderListItem(object): 'crypto_currency_info': 'OtcOrderListCryptoCurrencyInfo', 'crypto_amount': 'str', 'rate': 'str', - 'transfer_remark': 'str', - 'reference_code': 'str', - 'gate_bank_account_iban': 'str', 'promotion_code': 'str' } @@ -60,7 +56,6 @@ class OtcOrderListItem(object): 'trade_no': 'trade_no', 'type': 'type', 'status': 'status', - 'db_status': 'db_status', 'fiat_currency': 'fiat_currency', 'fiat_currency_info': 'fiat_currency_info', 'fiat_amount': 'fiat_amount', @@ -68,14 +63,11 @@ class OtcOrderListItem(object): 'crypto_currency_info': 'crypto_currency_info', '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, 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 + def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type=None, status=None, fiat_currency=None, fiat_currency_info=None, fiat_amount=None, crypto_currency=None, crypto_currency_info=None, crypto_amount=None, rate=None, promotion_code=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, str, str, str, OtcOrderListFiatCurrencyInfo, str, str, OtcOrderListCryptoCurrencyInfo, str, str, str, Configuration) -> None """OtcOrderListItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -87,7 +79,6 @@ def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type self._trade_no = None self._type = None self._status = None - self._db_status = None self._fiat_currency = None self._fiat_currency_info = None self._fiat_amount = None @@ -95,9 +86,6 @@ def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type self._crypto_currency_info = None 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 @@ -113,8 +101,6 @@ def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type self.type = type if status is not None: self.status = status - if db_status is not None: - self.db_status = db_status if fiat_currency is not None: self.fiat_currency = fiat_currency if fiat_currency_info is not None: @@ -129,12 +115,6 @@ def __init__(self, time=None, timestamp=None, order_id=None, trade_no=None, type self.crypto_amount = crypto_amount if rate is not None: 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: self.promotion_code = promotion_code @@ -234,7 +214,7 @@ def trade_no(self, trade_no): def type(self): """Gets the type of this OtcOrderListItem. # noqa: E501 - Quote direction buy/sell/all # noqa: E501 + BUY deposit / SELL withdrawal # noqa: E501 :return: The type of this OtcOrderListItem. # noqa: E501 :rtype: str @@ -245,7 +225,7 @@ def type(self): def type(self, type): """Sets the type of this OtcOrderListItem. - Quote direction buy/sell/all # noqa: E501 + BUY deposit / SELL withdrawal # noqa: E501 :param type: The type of this OtcOrderListItem. # noqa: E501 :type: str @@ -257,7 +237,7 @@ def type(self, type): def status(self): """Gets the status of this OtcOrderListItem. # noqa: E501 - Order Status # noqa: E501 + Order status # noqa: E501 :return: The status of this OtcOrderListItem. # noqa: E501 :rtype: str @@ -268,7 +248,7 @@ def status(self): def status(self, status): """Sets the status of this OtcOrderListItem. - Order Status # noqa: E501 + Order status # noqa: E501 :param status: The status of this OtcOrderListItem. # noqa: E501 :type: str @@ -276,32 +256,11 @@ def status(self, status): self._status = status - @property - def db_status(self): - """Gets the db_status of this OtcOrderListItem. # 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 OtcOrderListItem. - - - :param db_status: The db_status of this OtcOrderListItem. # noqa: E501 - :type: str - """ - - self._db_status = db_status - @property def fiat_currency(self): """Gets the fiat_currency of this OtcOrderListItem. # noqa: E501 - Fiat type # noqa: E501 + Fiat currency # noqa: E501 :return: The fiat_currency of this OtcOrderListItem. # noqa: E501 :rtype: str @@ -312,7 +271,7 @@ def fiat_currency(self): def fiat_currency(self, fiat_currency): """Sets the fiat_currency of this OtcOrderListItem. - Fiat type # noqa: E501 + Fiat currency # noqa: E501 :param fiat_currency: The fiat_currency of this OtcOrderListItem. # noqa: E501 :type: str @@ -368,7 +327,7 @@ def fiat_amount(self, fiat_amount): def crypto_currency(self): """Gets the crypto_currency of this OtcOrderListItem. # noqa: E501 - Stablecoin # noqa: E501 + Digital currency # noqa: E501 :return: The crypto_currency of this OtcOrderListItem. # noqa: E501 :rtype: str @@ -379,7 +338,7 @@ def crypto_currency(self): def crypto_currency(self, crypto_currency): """Sets the crypto_currency of this OtcOrderListItem. - Stablecoin # noqa: E501 + Digital currency # noqa: E501 :param crypto_currency: The crypto_currency of this OtcOrderListItem. # noqa: E501 :type: str @@ -412,7 +371,7 @@ def crypto_currency_info(self, crypto_currency_info): def crypto_amount(self): """Gets the crypto_amount of this OtcOrderListItem. # noqa: E501 - Stablecoin amount # noqa: E501 + Cryptocurrency amount # noqa: E501 :return: The crypto_amount of this OtcOrderListItem. # noqa: E501 :rtype: str @@ -423,7 +382,7 @@ def crypto_amount(self): def crypto_amount(self, crypto_amount): """Sets the crypto_amount of this OtcOrderListItem. - Stablecoin amount # noqa: E501 + Cryptocurrency amount # noqa: E501 :param crypto_amount: The crypto_amount of this OtcOrderListItem. # noqa: E501 :type: str @@ -454,75 +413,6 @@ def rate(self, rate): self._rate = rate - @property - def transfer_remark(self): - """Gets the transfer_remark of this OtcOrderListItem. # 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 OtcOrderListItem. # noqa: E501 - :rtype: str - """ - return self._transfer_remark - - @transfer_remark.setter - def transfer_remark(self, transfer_remark): - """Sets the transfer_remark of this OtcOrderListItem. - - 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 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 OtcOrderListItem. # noqa: E501 - - Bank account # 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 OtcOrderListItem. - - Bank account # noqa: E501 - - :param gate_bank_account_iban: The gate_bank_account_iban of this OtcOrderListItem. # noqa: E501 - :type: str - """ - - self._gate_bank_account_iban = gate_bank_account_iban - @property def promotion_code(self): """Gets the promotion_code of this OtcOrderListItem. # noqa: E501 diff --git a/gate_api/models/otc_order_request.py b/gate_api/models/otc_order_request.py index a077feed..26cd914a 100644 --- a/gate_api/models/otc_order_request.py +++ b/gate_api/models/otc_order_request.py @@ -114,7 +114,7 @@ def type(self, type): def side(self): """Gets the side of this OtcOrderRequest. # noqa: E501 - Quote direction returned by the quote API (used for order validation) # noqa: E501 + The side returned by the quote endpoint (used for order validation). For backward compatibility, `FIAT`/`CRYPTO` or `PAY`/`GET` are accepted; new integrations should use the value returned by the quote response. # noqa: E501 :return: The side of this OtcOrderRequest. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def side(self): def side(self, side): """Sets the side of this OtcOrderRequest. - Quote direction returned by the quote API (used for order validation) # noqa: E501 + The side returned by the quote endpoint (used for order validation). For backward compatibility, `FIAT`/`CRYPTO` or `PAY`/`GET` are accepted; new integrations should use the value returned by the quote response. # noqa: E501 :param side: The side of this OtcOrderRequest. # noqa: E501 :type: str @@ -287,7 +287,7 @@ def quote_token(self, quote_token): def bank_id(self): """Gets the bank_id of this OtcOrderRequest. # 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 + Bank card ID used to place the order. Select one from the list returned by `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. - 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 + Bank card ID used to place the order. Select one from the list returned by `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/otc_quote_request.py b/gate_api/models/otc_quote_request.py index 4c0479ee..b403bd91 100644 --- a/gate_api/models/otc_quote_request.py +++ b/gate_api/models/otc_quote_request.py @@ -84,7 +84,7 @@ def __init__(self, side=None, pay_coin=None, get_coin=None, pay_amount=None, get def side(self): """Gets the side of this OtcQuoteRequest. # noqa: E501 - PAY/GET quote direction. PAY means user inputs pay amount, GET means user inputs get amount. If PAY, pay_amount is required. If GET, get_amount is required # noqa: E501 + PAY: specify the payment amount (`pay_amount` is required); GET: specify the receive amount (`get_amount` is required). # noqa: E501 :return: The side of this OtcQuoteRequest. # noqa: E501 :rtype: str @@ -95,7 +95,7 @@ def side(self): def side(self, side): """Sets the side of this OtcQuoteRequest. - PAY/GET quote direction. PAY means user inputs pay amount, GET means user inputs get amount. If PAY, pay_amount is required. If GET, get_amount is required # noqa: E501 + PAY: specify the payment amount (`pay_amount` is required); GET: specify the receive amount (`get_amount` is required). # noqa: E501 :param side: The side of this OtcQuoteRequest. # noqa: E501 :type: str @@ -109,7 +109,7 @@ def side(self, side): def pay_coin(self): """Gets the pay_coin of this OtcQuoteRequest. # noqa: E501 - Currency the user pays. Supported currencies can be found on the OTC web quote page. # noqa: E501 + Payment currency. Supported currencies are available on the OTC web quote page. # noqa: E501 :return: The pay_coin of this OtcQuoteRequest. # noqa: E501 :rtype: str @@ -120,7 +120,7 @@ def pay_coin(self): def pay_coin(self, pay_coin): """Sets the pay_coin of this OtcQuoteRequest. - Currency the user pays. Supported currencies can be found on the OTC web quote page. # noqa: E501 + Payment currency. Supported currencies are available on the OTC web quote page. # noqa: E501 :param pay_coin: The pay_coin of this OtcQuoteRequest. # noqa: E501 :type: str @@ -134,7 +134,7 @@ def pay_coin(self, pay_coin): def get_coin(self): """Gets the get_coin of this OtcQuoteRequest. # noqa: E501 - Currency the user receives. Supported currencies can be found on the OTC web quote page. # noqa: E501 + Receive currency. Supported currencies are available on the OTC web quote page. # noqa: E501 :return: The get_coin of this OtcQuoteRequest. # noqa: E501 :rtype: str @@ -145,7 +145,7 @@ def get_coin(self): def get_coin(self, get_coin): """Sets the get_coin of this OtcQuoteRequest. - Currency the user receives. Supported currencies can be found on the OTC web quote page. # noqa: E501 + Receive currency. Supported currencies are available on the OTC web quote page. # noqa: E501 :param get_coin: The get_coin of this OtcQuoteRequest. # noqa: E501 :type: str @@ -228,7 +228,7 @@ def create_quote_token(self, create_quote_token): def promotion_code(self): """Gets the promotion_code of this OtcQuoteRequest. # noqa: E501 - Promotion code (optional) # noqa: E501 + Promotion code # noqa: E501 :return: The promotion_code of this OtcQuoteRequest. # noqa: E501 :rtype: str @@ -239,7 +239,7 @@ def promotion_code(self): def promotion_code(self, promotion_code): """Sets the promotion_code of this OtcQuoteRequest. - Promotion code (optional) # noqa: E501 + Promotion code # noqa: E501 :param promotion_code: The promotion_code of this OtcQuoteRequest. # noqa: E501 :type: str diff --git a/gate_api/models/otc_quote_response.py b/gate_api/models/otc_quote_response.py index d1a89334..8048fd22 100644 --- a/gate_api/models/otc_quote_response.py +++ b/gate_api/models/otc_quote_response.py @@ -35,17 +35,19 @@ class OtcQuoteResponse(object): openapi_types = { 'code': 'int', 'message': 'str', - 'data': 'OtcQuoteResult' + 'data': 'OtcQuoteResult', + 'timestamp': 'int' } attribute_map = { 'code': 'code', 'message': 'message', - 'data': 'data' + 'data': 'data', + 'timestamp': 'timestamp' } - def __init__(self, code=None, message=None, data=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, OtcQuoteResult, Configuration) -> None + def __init__(self, code=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, OtcQuoteResult, int, Configuration) -> None """OtcQuoteResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -54,11 +56,13 @@ def __init__(self, code=None, message=None, data=None, 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): @@ -129,6 +133,31 @@ def data(self, data): self._data = data + @property + def timestamp(self): + """Gets the timestamp of this OtcQuoteResponse. # noqa: E501 + + Server Unix timestamp in seconds # noqa: E501 + + :return: The timestamp of this OtcQuoteResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this OtcQuoteResponse. + + Server Unix timestamp in seconds # noqa: E501 + + :param timestamp: The timestamp of this OtcQuoteResponse. # 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 = {} diff --git a/gate_api/models/otc_quote_result.py b/gate_api/models/otc_quote_result.py index 6fc4dc17..b396910b 100644 --- a/gate_api/models/otc_quote_result.py +++ b/gate_api/models/otc_quote_result.py @@ -43,7 +43,10 @@ class OtcQuoteResult(object): 'promotion_code': 'str', 'side': 'str', 'order_type': 'str', - 'quote_token': 'str' + 'quote_token': 'str', + 'validity_period': 'str', + 'refresh_limit': 'int', + 'refresh_limit_msg': 'str' } attribute_map = { @@ -57,11 +60,14 @@ class OtcQuoteResult(object): 'promotion_code': 'promotion_code', 'side': 'side', 'order_type': 'order_type', - 'quote_token': 'quote_token' + 'quote_token': 'quote_token', + 'validity_period': 'validity_period', + 'refresh_limit': 'refresh_limit', + 'refresh_limit_msg': 'refresh_limit_msg' } - 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 + 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, validity_period=None, refresh_limit=None, refresh_limit_msg=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, int, str, Configuration) -> None """OtcQuoteResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -78,6 +84,9 @@ def __init__(self, type=None, pay_coin=None, get_coin=None, pay_amount=None, get self._side = None self._order_type = None self._quote_token = None + self._validity_period = None + self._refresh_limit = None + self._refresh_limit_msg = None self.discriminator = None self.type = type @@ -91,6 +100,12 @@ def __init__(self, type=None, pay_coin=None, get_coin=None, pay_amount=None, get self.side = side self.order_type = order_type self.quote_token = quote_token + if validity_period is not None: + self.validity_period = validity_period + if refresh_limit is not None: + self.refresh_limit = refresh_limit + if refresh_limit_msg is not None: + self.refresh_limit_msg = refresh_limit_msg @property def type(self): @@ -367,6 +382,75 @@ def quote_token(self, quote_token): self._quote_token = quote_token + @property + def validity_period(self): + """Gets the validity_period of this OtcQuoteResult. # noqa: E501 + + Quote validity period (seconds) # noqa: E501 + + :return: The validity_period of this OtcQuoteResult. # noqa: E501 + :rtype: str + """ + return self._validity_period + + @validity_period.setter + def validity_period(self, validity_period): + """Sets the validity_period of this OtcQuoteResult. + + Quote validity period (seconds) # noqa: E501 + + :param validity_period: The validity_period of this OtcQuoteResult. # noqa: E501 + :type: str + """ + + self._validity_period = validity_period + + @property + def refresh_limit(self): + """Gets the refresh_limit of this OtcQuoteResult. # noqa: E501 + + Quote refresh limit # noqa: E501 + + :return: The refresh_limit of this OtcQuoteResult. # noqa: E501 + :rtype: int + """ + return self._refresh_limit + + @refresh_limit.setter + def refresh_limit(self, refresh_limit): + """Sets the refresh_limit of this OtcQuoteResult. + + Quote refresh limit # noqa: E501 + + :param refresh_limit: The refresh_limit of this OtcQuoteResult. # noqa: E501 + :type: int + """ + + self._refresh_limit = refresh_limit + + @property + def refresh_limit_msg(self): + """Gets the refresh_limit_msg of this OtcQuoteResult. # noqa: E501 + + Quote refresh limit message # noqa: E501 + + :return: The refresh_limit_msg of this OtcQuoteResult. # noqa: E501 + :rtype: str + """ + return self._refresh_limit_msg + + @refresh_limit_msg.setter + def refresh_limit_msg(self, refresh_limit_msg): + """Sets the refresh_limit_msg of this OtcQuoteResult. + + Quote refresh limit message # noqa: E501 + + :param refresh_limit_msg: The refresh_limit_msg of this OtcQuoteResult. # noqa: E501 + :type: str + """ + + self._refresh_limit_msg = refresh_limit_msg + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/otc_stable_coin_order_create_response.py b/gate_api/models/otc_stable_coin_order_create_response.py index 7e552ee7..7444894d 100644 --- a/gate_api/models/otc_stable_coin_order_create_response.py +++ b/gate_api/models/otc_stable_coin_order_create_response.py @@ -34,16 +34,18 @@ class OtcStableCoinOrderCreateResponse(object): """ openapi_types = { 'code': 'int', - 'message': 'str' + 'message': 'str', + 'timestamp': 'int' } attribute_map = { 'code': 'code', - 'message': 'message' + 'message': 'message', + 'timestamp': 'timestamp' } - def __init__(self, code=None, message=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, Configuration) -> None + def __init__(self, code=None, message=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, Configuration) -> None """OtcStableCoinOrderCreateResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -51,15 +53,18 @@ def __init__(self, code=None, message=None, local_vars_configuration=None): # n self._code = None self._message = None + self._timestamp = None self.discriminator = None self.code = code self.message = message + self.timestamp = timestamp @property def code(self): """Gets the code of this OtcStableCoinOrderCreateResponse. # noqa: E501 + Business code; 0 indicates success # noqa: E501 :return: The code of this OtcStableCoinOrderCreateResponse. # noqa: E501 :rtype: int @@ -70,6 +75,7 @@ def code(self): def code(self, code): """Sets the code of this OtcStableCoinOrderCreateResponse. + Business code; 0 indicates success # noqa: E501 :param code: The code of this OtcStableCoinOrderCreateResponse. # noqa: E501 :type: int @@ -83,6 +89,7 @@ def code(self, code): def message(self): """Gets the message of this OtcStableCoinOrderCreateResponse. # noqa: E501 + Message # noqa: E501 :return: The message of this OtcStableCoinOrderCreateResponse. # noqa: E501 :rtype: str @@ -93,6 +100,7 @@ def message(self): def message(self, message): """Sets the message of this OtcStableCoinOrderCreateResponse. + Message # noqa: E501 :param message: The message of this OtcStableCoinOrderCreateResponse. # noqa: E501 :type: str @@ -102,6 +110,31 @@ def message(self, message): self._message = message + @property + def timestamp(self): + """Gets the timestamp of this OtcStableCoinOrderCreateResponse. # noqa: E501 + + Server Unix timestamp in seconds # noqa: E501 + + :return: The timestamp of this OtcStableCoinOrderCreateResponse. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this OtcStableCoinOrderCreateResponse. + + Server Unix timestamp in seconds # noqa: E501 + + :param timestamp: The timestamp of this OtcStableCoinOrderCreateResponse. # 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 = {} diff --git a/gate_api/models/otc_stable_coin_order_list_item.py b/gate_api/models/otc_stable_coin_order_list_item.py index 1bac92e2..8dc2e99e 100644 --- a/gate_api/models/otc_stable_coin_order_list_item.py +++ b/gate_api/models/otc_stable_coin_order_list_item.py @@ -36,8 +36,10 @@ class OtcStableCoinOrderListItem(object): 'id': 'int', 'trade_no': 'str', 'pay_coin': 'str', + 'pay_icon': 'str', 'pay_amount': 'str', 'get_coin': 'str', + 'get_icon': 'str', 'get_amount': 'str', 'rate': 'str', 'rate_reci': 'str', @@ -50,8 +52,10 @@ class OtcStableCoinOrderListItem(object): 'id': 'id', 'trade_no': 'trade_no', 'pay_coin': 'pay_coin', + 'pay_icon': 'pay_icon', 'pay_amount': 'pay_amount', 'get_coin': 'get_coin', + 'get_icon': 'get_icon', 'get_amount': 'get_amount', 'rate': 'rate', 'rate_reci': 'rate_reci', @@ -60,8 +64,8 @@ class OtcStableCoinOrderListItem(object): 'create_time': 'create_time' } - 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 + def __init__(self, id=None, trade_no=None, pay_coin=None, pay_icon=None, pay_amount=None, get_coin=None, get_icon=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, str, str, int, str, Configuration) -> None """OtcStableCoinOrderListItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -70,8 +74,10 @@ def __init__(self, id=None, trade_no=None, pay_coin=None, pay_amount=None, get_c self._id = None self._trade_no = None self._pay_coin = None + self._pay_icon = None self._pay_amount = None self._get_coin = None + self._get_icon = None self._get_amount = None self._rate = None self._rate_reci = None @@ -86,10 +92,14 @@ def __init__(self, id=None, trade_no=None, pay_coin=None, pay_amount=None, get_c self.trade_no = trade_no if pay_coin is not None: self.pay_coin = pay_coin + if pay_icon is not None: + self.pay_icon = pay_icon if pay_amount is not None: self.pay_amount = pay_amount if get_coin is not None: self.get_coin = get_coin + if get_icon is not None: + self.get_icon = get_icon if get_amount is not None: self.get_amount = get_amount if rate is not None: @@ -172,6 +182,29 @@ def pay_coin(self, pay_coin): self._pay_coin = pay_coin + @property + def pay_icon(self): + """Gets the pay_icon of this OtcStableCoinOrderListItem. # noqa: E501 + + Payment currency icon # noqa: E501 + + :return: The pay_icon of this OtcStableCoinOrderListItem. # noqa: E501 + :rtype: str + """ + return self._pay_icon + + @pay_icon.setter + def pay_icon(self, pay_icon): + """Sets the pay_icon of this OtcStableCoinOrderListItem. + + Payment currency icon # noqa: E501 + + :param pay_icon: The pay_icon of this OtcStableCoinOrderListItem. # noqa: E501 + :type: str + """ + + self._pay_icon = pay_icon + @property def pay_amount(self): """Gets the pay_amount of this OtcStableCoinOrderListItem. # noqa: E501 @@ -218,6 +251,29 @@ def get_coin(self, get_coin): self._get_coin = get_coin + @property + def get_icon(self): + """Gets the get_icon of this OtcStableCoinOrderListItem. # noqa: E501 + + Received currency icon # noqa: E501 + + :return: The get_icon of this OtcStableCoinOrderListItem. # noqa: E501 + :rtype: str + """ + return self._get_icon + + @get_icon.setter + def get_icon(self, get_icon): + """Sets the get_icon of this OtcStableCoinOrderListItem. + + Received currency icon # noqa: E501 + + :param get_icon: The get_icon of this OtcStableCoinOrderListItem. # noqa: E501 + :type: str + """ + + self._get_icon = get_icon + @property def get_amount(self): """Gets the get_amount of this OtcStableCoinOrderListItem. # noqa: E501 @@ -314,7 +370,7 @@ def status(self, status): def create_timest(self): """Gets the create_timest of this OtcStableCoinOrderListItem. # noqa: E501 - timetimestamp # noqa: E501 + Created time # noqa: E501 :return: The create_timest of this OtcStableCoinOrderListItem. # noqa: E501 :rtype: int @@ -325,7 +381,7 @@ def create_timest(self): def create_timest(self, create_timest): """Sets the create_timest of this OtcStableCoinOrderListItem. - timetimestamp # noqa: E501 + Created time # noqa: E501 :param create_timest: The create_timest of this OtcStableCoinOrderListItem. # noqa: E501 :type: int diff --git a/gate_api/models/otc_stable_coin_order_request.py b/gate_api/models/otc_stable_coin_order_request.py index fb457af9..b8a51abb 100644 --- a/gate_api/models/otc_stable_coin_order_request.py +++ b/gate_api/models/otc_stable_coin_order_request.py @@ -68,20 +68,14 @@ def __init__(self, pay_coin=None, get_coin=None, pay_amount=None, get_amount=Non self._quote_token = None self.discriminator = None - if pay_coin is not None: - self.pay_coin = pay_coin - if get_coin is not None: - self.get_coin = get_coin - if pay_amount is not None: - self.pay_amount = pay_amount - if get_amount is not None: - self.get_amount = get_amount - if side is not None: - self.side = side + self.pay_coin = pay_coin + self.get_coin = get_coin + self.pay_amount = pay_amount + self.get_amount = get_amount + self.side = side if promotion_code is not None: self.promotion_code = promotion_code - if quote_token is not None: - self.quote_token = quote_token + self.quote_token = quote_token @property def pay_coin(self): @@ -103,6 +97,8 @@ def pay_coin(self, pay_coin): :param pay_coin: The pay_coin of this OtcStableCoinOrderRequest. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and pay_coin is None: # noqa: E501 + raise ValueError("Invalid value for `pay_coin`, must not be `None`") # noqa: E501 self._pay_coin = pay_coin @@ -126,6 +122,8 @@ def get_coin(self, get_coin): :param get_coin: The get_coin of this OtcStableCoinOrderRequest. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and get_coin is None: # noqa: E501 + raise ValueError("Invalid value for `get_coin`, must not be `None`") # noqa: E501 self._get_coin = get_coin @@ -149,6 +147,8 @@ def pay_amount(self, pay_amount): :param pay_amount: The pay_amount of this OtcStableCoinOrderRequest. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and pay_amount is None: # noqa: E501 + raise ValueError("Invalid value for `pay_amount`, must not be `None`") # noqa: E501 self._pay_amount = pay_amount @@ -172,6 +172,8 @@ def get_amount(self, get_amount): :param get_amount: The get_amount of this OtcStableCoinOrderRequest. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and get_amount is None: # noqa: E501 + raise ValueError("Invalid value for `get_amount`, must not be `None`") # noqa: E501 self._get_amount = get_amount @@ -179,7 +181,7 @@ def get_amount(self, get_amount): def side(self): """Gets the side of this OtcStableCoinOrderRequest. # noqa: E501 - Quote direction returned by the quote API (used for order validation) # noqa: E501 + The side returned by the quote endpoint (used for order validation). For backward compatibility, `PAY`/`GET` are accepted; new integrations should use the value returned by the quote response. # noqa: E501 :return: The side of this OtcStableCoinOrderRequest. # noqa: E501 :rtype: str @@ -190,11 +192,13 @@ def side(self): def side(self, side): """Sets the side of this OtcStableCoinOrderRequest. - Quote direction returned by the quote API (used for order validation) # noqa: E501 + The side returned by the quote endpoint (used for order validation). For backward compatibility, `PAY`/`GET` are accepted; new integrations should use the value returned by the quote response. # noqa: E501 :param side: The side of this OtcStableCoinOrderRequest. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 + raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501 self._side = side @@ -202,7 +206,7 @@ def side(self, side): def promotion_code(self): """Gets the promotion_code of this OtcStableCoinOrderRequest. # noqa: E501 - promotion code # noqa: E501 + Promotion code (optional) # noqa: E501 :return: The promotion_code of this OtcStableCoinOrderRequest. # noqa: E501 :rtype: str @@ -213,7 +217,7 @@ def promotion_code(self): def promotion_code(self, promotion_code): """Sets the promotion_code of this OtcStableCoinOrderRequest. - promotion code # noqa: E501 + Promotion code (optional) # noqa: E501 :param promotion_code: The promotion_code of this OtcStableCoinOrderRequest. # noqa: E501 :type: str @@ -241,6 +245,8 @@ def quote_token(self, quote_token): :param quote_token: The quote_token of this OtcStableCoinOrderRequest. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and quote_token is None: # noqa: E501 + raise ValueError("Invalid value for `quote_token`, must not be `None`") # noqa: E501 self._quote_token = quote_token diff --git a/gate_api/models/p2p_ad_detail.py b/gate_api/models/p2p_ad_detail.py index ce8f7011..32da439c 100644 --- a/gate_api/models/p2p_ad_detail.py +++ b/gate_api/models/p2p_ad_detail.py @@ -38,6 +38,10 @@ class P2pAdDetail(object): 'amount': 'str', 'min_amount': 'str', 'max_amount': 'str', + 'fiat_min_amount': 'str', + 'fiat_max_amount': 'str', + 'limit_basis': 'int', + 'limit_basis_text': 'str', 'total': 'str', 'pay_ali': 'int', 'pay_bank': 'int', @@ -62,6 +66,7 @@ class P2pAdDetail(object): 'tier_limit': 'int', 'reg_time_limit': 'int', 'advertisers_limit': 'int', + 'polymarket_limit': 'int', 'min_completed_limit': 'int', 'max_completed_limit': 'int', 'user_orders_limit': 'int', @@ -78,6 +83,10 @@ class P2pAdDetail(object): 'amount': 'amount', 'min_amount': 'min_amount', 'max_amount': 'max_amount', + 'fiat_min_amount': 'fiat_min_amount', + 'fiat_max_amount': 'fiat_max_amount', + 'limit_basis': 'limit_basis', + 'limit_basis_text': 'limit_basis_text', 'total': 'total', 'pay_ali': 'pay_ali', 'pay_bank': 'pay_bank', @@ -102,6 +111,7 @@ class P2pAdDetail(object): 'tier_limit': 'tier_limit', 'reg_time_limit': 'reg_time_limit', 'advertisers_limit': 'advertisers_limit', + 'polymarket_limit': 'polymarket_limit', 'min_completed_limit': 'min_completed_limit', 'max_completed_limit': 'max_completed_limit', 'user_orders_limit': 'user_orders_limit', @@ -112,8 +122,8 @@ class P2pAdDetail(object): '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, 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 + def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amount=None, fiat_min_amount=None, fiat_max_amount=None, limit_basis=None, limit_basis_text=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, polymarket_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, str, int, 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, 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() @@ -124,6 +134,10 @@ def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amoun self._amount = None self._min_amount = None self._max_amount = None + self._fiat_min_amount = None + self._fiat_max_amount = None + self._limit_basis = None + self._limit_basis_text = None self._total = None self._pay_ali = None self._pay_bank = None @@ -148,6 +162,7 @@ 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._polymarket_limit = None self._min_completed_limit = None self._max_completed_limit = None self._user_orders_limit = None @@ -168,6 +183,14 @@ def __init__(self, rate=None, type=None, amount=None, min_amount=None, max_amoun self.min_amount = min_amount if max_amount is not None: self.max_amount = max_amount + if fiat_min_amount is not None: + self.fiat_min_amount = fiat_min_amount + if fiat_max_amount is not None: + self.fiat_max_amount = fiat_max_amount + if limit_basis is not None: + self.limit_basis = limit_basis + if limit_basis_text is not None: + self.limit_basis_text = limit_basis_text if total is not None: self.total = total if pay_ali is not None: @@ -216,6 +239,8 @@ 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 polymarket_limit is not None: + self.polymarket_limit = polymarket_limit if min_completed_limit is not None: self.min_completed_limit = min_completed_limit if max_completed_limit is not None: @@ -306,7 +331,7 @@ def amount(self, amount): def min_amount(self): """Gets the min_amount of this P2pAdDetail. # noqa: E501 - Minimum trade amount in `want_type`. # noqa: E501 + Minimum quantity per order, denominated by currency_type # noqa: E501 :return: The min_amount of this P2pAdDetail. # noqa: E501 :rtype: str @@ -317,7 +342,7 @@ def min_amount(self): def min_amount(self, min_amount): """Sets the min_amount of this P2pAdDetail. - Minimum trade amount in `want_type`. # noqa: E501 + Minimum quantity per order, denominated by currency_type # noqa: E501 :param min_amount: The min_amount of this P2pAdDetail. # noqa: E501 :type: str @@ -329,7 +354,7 @@ def min_amount(self, min_amount): def max_amount(self): """Gets the max_amount of this P2pAdDetail. # noqa: E501 - Maximum trade amount priced in `want_type`. # noqa: E501 + Maximum quantity per order, denominated by currency_type # noqa: E501 :return: The max_amount of this P2pAdDetail. # noqa: E501 :rtype: str @@ -340,7 +365,7 @@ def max_amount(self): def max_amount(self, max_amount): """Sets the max_amount of this P2pAdDetail. - Maximum trade amount priced in `want_type`. # noqa: E501 + Maximum quantity per order, denominated by currency_type # noqa: E501 :param max_amount: The max_amount of this P2pAdDetail. # noqa: E501 :type: str @@ -348,6 +373,110 @@ def max_amount(self, max_amount): self._max_amount = max_amount + @property + def fiat_min_amount(self): + """Gets the fiat_min_amount of this P2pAdDetail. # noqa: E501 + + Minimum trade amount in `want_type`. # noqa: E501 + + :return: The fiat_min_amount of this P2pAdDetail. # noqa: E501 + :rtype: str + """ + return self._fiat_min_amount + + @fiat_min_amount.setter + def fiat_min_amount(self, fiat_min_amount): + """Sets the fiat_min_amount of this P2pAdDetail. + + Minimum trade amount in `want_type`. # noqa: E501 + + :param fiat_min_amount: The fiat_min_amount of this P2pAdDetail. # noqa: E501 + :type: str + """ + + self._fiat_min_amount = fiat_min_amount + + @property + def fiat_max_amount(self): + """Gets the fiat_max_amount of this P2pAdDetail. # noqa: E501 + + Maximum trade amount priced in `want_type`. # noqa: E501 + + :return: The fiat_max_amount of this P2pAdDetail. # noqa: E501 + :rtype: str + """ + return self._fiat_max_amount + + @fiat_max_amount.setter + def fiat_max_amount(self, fiat_max_amount): + """Sets the fiat_max_amount of this P2pAdDetail. + + Maximum trade amount priced in `want_type`. # noqa: E501 + + :param fiat_max_amount: The fiat_max_amount of this P2pAdDetail. # noqa: E501 + :type: str + """ + + self._fiat_max_amount = fiat_max_amount + + @property + def limit_basis(self): + """Gets the limit_basis of this P2pAdDetail. # noqa: E501 + + Trading limit unit. 0: crypto quantity, 1: fiat amount # noqa: E501 + + :return: The limit_basis of this P2pAdDetail. # noqa: E501 + :rtype: int + """ + return self._limit_basis + + @limit_basis.setter + def limit_basis(self, limit_basis): + """Sets the limit_basis of this P2pAdDetail. + + Trading limit unit. 0: crypto quantity, 1: fiat amount # noqa: E501 + + :param limit_basis: The limit_basis of this P2pAdDetail. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and limit_basis not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `limit_basis` ({0}), must be one of {1}" # noqa: E501 + .format(limit_basis, allowed_values) + ) + + self._limit_basis = limit_basis + + @property + def limit_basis_text(self): + """Gets the limit_basis_text of this P2pAdDetail. # noqa: E501 + + Trading limit unit label. crypto: crypto quantity, fiat: fiat amount # noqa: E501 + + :return: The limit_basis_text of this P2pAdDetail. # noqa: E501 + :rtype: str + """ + return self._limit_basis_text + + @limit_basis_text.setter + def limit_basis_text(self, limit_basis_text): + """Sets the limit_basis_text of this P2pAdDetail. + + Trading limit unit label. crypto: crypto quantity, fiat: fiat amount # noqa: E501 + + :param limit_basis_text: The limit_basis_text of this P2pAdDetail. # noqa: E501 + :type: str + """ + allowed_values = ["crypto", "fiat"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and limit_basis_text not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `limit_basis_text` ({0}), must be one of {1}" # noqa: E501 + .format(limit_basis_text, allowed_values) + ) + + self._limit_basis_text = limit_basis_text + @property def total(self): """Gets the total of this P2pAdDetail. # noqa: E501 @@ -900,6 +1029,29 @@ def advertisers_limit(self, advertisers_limit): self._advertisers_limit = advertisers_limit + @property + def polymarket_limit(self): + """Gets the polymarket_limit of this P2pAdDetail. # noqa: E501 + + Whether to restrict trading with Polymarket users. 0: no restriction, 1: restricted # noqa: E501 + + :return: The polymarket_limit of this P2pAdDetail. # noqa: E501 + :rtype: int + """ + return self._polymarket_limit + + @polymarket_limit.setter + def polymarket_limit(self, polymarket_limit): + """Sets the polymarket_limit of this P2pAdDetail. + + Whether to restrict trading with Polymarket users. 0: no restriction, 1: restricted # noqa: E501 + + :param polymarket_limit: The polymarket_limit of this P2pAdDetail. # noqa: E501 + :type: int + """ + + self._polymarket_limit = polymarket_limit + @property def min_completed_limit(self): """Gets the min_completed_limit of this P2pAdDetail. # noqa: E501 diff --git a/gate_api/models/p2p_ads_list_item.py b/gate_api/models/p2p_ads_list_item.py index d46d8413..6ac1b1f0 100644 --- a/gate_api/models/p2p_ads_list_item.py +++ b/gate_api/models/p2p_ads_list_item.py @@ -38,8 +38,14 @@ class P2pAdsListItem(object): 'fiat_unit': 'str', 'adv_no': 'int', 'price': 'str', + 'surplus_amount': 'str', 'max_single_trans_amount': 'str', 'min_single_trans_amount': 'str', + 'fiat_min_amount': 'str', + 'fiat_max_amount': 'str', + 'limit_basis': 'int', + 'limit_basis_text': 'str', + 'trade_methods': 'list[P2pAdsListTradeMethod]', 'nick_name': 'str' } @@ -49,13 +55,19 @@ class P2pAdsListItem(object): 'fiat_unit': 'fiat_unit', 'adv_no': 'adv_no', 'price': 'price', + 'surplus_amount': 'surplus_amount', 'max_single_trans_amount': 'max_single_trans_amount', 'min_single_trans_amount': 'min_single_trans_amount', + 'fiat_min_amount': 'fiat_min_amount', + 'fiat_max_amount': 'fiat_max_amount', + 'limit_basis': 'limit_basis', + 'limit_basis_text': 'limit_basis_text', + 'trade_methods': 'trade_methods', 'nick_name': 'nick_name' } - 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 + def __init__(self, index=None, asset=None, fiat_unit=None, adv_no=None, price=None, surplus_amount=None, max_single_trans_amount=None, min_single_trans_amount=None, fiat_min_amount=None, fiat_max_amount=None, limit_basis=None, limit_basis_text=None, trade_methods=None, nick_name=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, str, str, str, str, str, str, int, str, list[P2pAdsListTradeMethod], str, Configuration) -> None """P2pAdsListItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -66,8 +78,14 @@ def __init__(self, index=None, asset=None, fiat_unit=None, adv_no=None, price=No self._fiat_unit = None self._adv_no = None self._price = None + self._surplus_amount = None self._max_single_trans_amount = None self._min_single_trans_amount = None + self._fiat_min_amount = None + self._fiat_max_amount = None + self._limit_basis = None + self._limit_basis_text = None + self._trade_methods = None self._nick_name = None self.discriminator = None @@ -81,10 +99,22 @@ def __init__(self, index=None, asset=None, fiat_unit=None, adv_no=None, price=No self.adv_no = adv_no if price is not None: self.price = price + if surplus_amount is not None: + self.surplus_amount = surplus_amount if max_single_trans_amount is not None: self.max_single_trans_amount = max_single_trans_amount if min_single_trans_amount is not None: self.min_single_trans_amount = min_single_trans_amount + if fiat_min_amount is not None: + self.fiat_min_amount = fiat_min_amount + if fiat_max_amount is not None: + self.fiat_max_amount = fiat_max_amount + if limit_basis is not None: + self.limit_basis = limit_basis + if limit_basis_text is not None: + self.limit_basis_text = limit_basis_text + if trade_methods is not None: + self.trade_methods = trade_methods if nick_name is not None: self.nick_name = nick_name @@ -203,6 +233,29 @@ def price(self, price): self._price = price + @property + def surplus_amount(self): + """Gets the surplus_amount of this P2pAdsListItem. # noqa: E501 + + Remaining tradable crypto quantity # noqa: E501 + + :return: The surplus_amount of this P2pAdsListItem. # noqa: E501 + :rtype: str + """ + return self._surplus_amount + + @surplus_amount.setter + def surplus_amount(self, surplus_amount): + """Sets the surplus_amount of this P2pAdsListItem. + + Remaining tradable crypto quantity # noqa: E501 + + :param surplus_amount: The surplus_amount of this P2pAdsListItem. # noqa: E501 + :type: str + """ + + self._surplus_amount = surplus_amount + @property def max_single_trans_amount(self): """Gets the max_single_trans_amount of this P2pAdsListItem. # noqa: E501 @@ -249,6 +302,133 @@ def min_single_trans_amount(self, min_single_trans_amount): self._min_single_trans_amount = min_single_trans_amount + @property + def fiat_min_amount(self): + """Gets the fiat_min_amount of this P2pAdsListItem. # noqa: E501 + + Minimum fiat amount per order # noqa: E501 + + :return: The fiat_min_amount of this P2pAdsListItem. # noqa: E501 + :rtype: str + """ + return self._fiat_min_amount + + @fiat_min_amount.setter + def fiat_min_amount(self, fiat_min_amount): + """Sets the fiat_min_amount of this P2pAdsListItem. + + Minimum fiat amount per order # noqa: E501 + + :param fiat_min_amount: The fiat_min_amount of this P2pAdsListItem. # noqa: E501 + :type: str + """ + + self._fiat_min_amount = fiat_min_amount + + @property + def fiat_max_amount(self): + """Gets the fiat_max_amount of this P2pAdsListItem. # noqa: E501 + + Maximum fiat amount per order # noqa: E501 + + :return: The fiat_max_amount of this P2pAdsListItem. # noqa: E501 + :rtype: str + """ + return self._fiat_max_amount + + @fiat_max_amount.setter + def fiat_max_amount(self, fiat_max_amount): + """Sets the fiat_max_amount of this P2pAdsListItem. + + Maximum fiat amount per order # noqa: E501 + + :param fiat_max_amount: The fiat_max_amount of this P2pAdsListItem. # noqa: E501 + :type: str + """ + + self._fiat_max_amount = fiat_max_amount + + @property + def limit_basis(self): + """Gets the limit_basis of this P2pAdsListItem. # noqa: E501 + + Trading limit unit. 0: crypto quantity, 1: fiat amount # noqa: E501 + + :return: The limit_basis of this P2pAdsListItem. # noqa: E501 + :rtype: int + """ + return self._limit_basis + + @limit_basis.setter + def limit_basis(self, limit_basis): + """Sets the limit_basis of this P2pAdsListItem. + + Trading limit unit. 0: crypto quantity, 1: fiat amount # noqa: E501 + + :param limit_basis: The limit_basis of this P2pAdsListItem. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and limit_basis not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `limit_basis` ({0}), must be one of {1}" # noqa: E501 + .format(limit_basis, allowed_values) + ) + + self._limit_basis = limit_basis + + @property + def limit_basis_text(self): + """Gets the limit_basis_text of this P2pAdsListItem. # noqa: E501 + + Trading limit unit label. crypto: crypto quantity, fiat: fiat amount # noqa: E501 + + :return: The limit_basis_text of this P2pAdsListItem. # noqa: E501 + :rtype: str + """ + return self._limit_basis_text + + @limit_basis_text.setter + def limit_basis_text(self, limit_basis_text): + """Sets the limit_basis_text of this P2pAdsListItem. + + Trading limit unit label. crypto: crypto quantity, fiat: fiat amount # noqa: E501 + + :param limit_basis_text: The limit_basis_text of this P2pAdsListItem. # noqa: E501 + :type: str + """ + allowed_values = ["crypto", "fiat"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and limit_basis_text not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `limit_basis_text` ({0}), must be one of {1}" # noqa: E501 + .format(limit_basis_text, allowed_values) + ) + + self._limit_basis_text = limit_basis_text + + @property + def trade_methods(self): + """Gets the trade_methods of this P2pAdsListItem. # noqa: E501 + + Supported payment methods list # noqa: E501 + + :return: The trade_methods of this P2pAdsListItem. # noqa: E501 + :rtype: list[P2pAdsListTradeMethod] + """ + return self._trade_methods + + @trade_methods.setter + def trade_methods(self, trade_methods): + """Sets the trade_methods of this P2pAdsListItem. + + Supported payment methods list # noqa: E501 + + :param trade_methods: The trade_methods of this P2pAdsListItem. # noqa: E501 + :type: list[P2pAdsListTradeMethod] + """ + + self._trade_methods = trade_methods + @property def nick_name(self): """Gets the nick_name of this P2pAdsListItem. # noqa: E501 diff --git a/gate_api/models/p2p_ads_list_trade_method.py b/gate_api/models/p2p_ads_list_trade_method.py new file mode 100644 index 00000000..2a8883e6 --- /dev/null +++ b/gate_api/models/p2p_ads_list_trade_method.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 P2pAdsListTradeMethod(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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_color': 'str', + 'identifier': 'str', + 'pay_id': 'str', + 'pay_type': 'str', + 'trade_method_name': 'str' + } + + attribute_map = { + 'icon_url_color': 'icon_url_color', + 'identifier': 'identifier', + 'pay_id': 'pay_id', + 'pay_type': 'pay_type', + 'trade_method_name': 'trade_method_name' + } + + def __init__(self, icon_url_color=None, identifier=None, pay_id=None, pay_type=None, trade_method_name=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """P2pAdsListTradeMethod - a 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_color = None + self._identifier = None + self._pay_id = None + self._pay_type = None + self._trade_method_name = None + self.discriminator = None + + if icon_url_color is not None: + self.icon_url_color = icon_url_color + if identifier is not None: + self.identifier = identifier + if pay_id is not None: + self.pay_id = pay_id + if pay_type is not None: + self.pay_type = pay_type + if trade_method_name is not None: + self.trade_method_name = trade_method_name + + @property + def icon_url_color(self): + """Gets the icon_url_color of this P2pAdsListTradeMethod. # noqa: E501 + + Payment method color icon URL # noqa: E501 + + :return: The icon_url_color of this P2pAdsListTradeMethod. # noqa: E501 + :rtype: str + """ + return self._icon_url_color + + @icon_url_color.setter + def icon_url_color(self, icon_url_color): + """Sets the icon_url_color of this P2pAdsListTradeMethod. + + Payment method color icon URL # noqa: E501 + + :param icon_url_color: The icon_url_color of this P2pAdsListTradeMethod. # noqa: E501 + :type: str + """ + + self._icon_url_color = icon_url_color + + @property + def identifier(self): + """Gets the identifier of this P2pAdsListTradeMethod. # noqa: E501 + + Payment method identifier # noqa: E501 + + :return: The identifier of this P2pAdsListTradeMethod. # noqa: E501 + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """Sets the identifier of this P2pAdsListTradeMethod. + + Payment method identifier # noqa: E501 + + :param identifier: The identifier of this P2pAdsListTradeMethod. # noqa: E501 + :type: str + """ + + self._identifier = identifier + + @property + def pay_id(self): + """Gets the pay_id of this P2pAdsListTradeMethod. # noqa: E501 + + Payment method ID # noqa: E501 + + :return: The pay_id of this P2pAdsListTradeMethod. # noqa: E501 + :rtype: str + """ + return self._pay_id + + @pay_id.setter + def pay_id(self, pay_id): + """Sets the pay_id of this P2pAdsListTradeMethod. + + Payment method ID # noqa: E501 + + :param pay_id: The pay_id of this P2pAdsListTradeMethod. # noqa: E501 + :type: str + """ + + self._pay_id = pay_id + + @property + def pay_type(self): + """Gets the pay_type of this P2pAdsListTradeMethod. # noqa: E501 + + Payment method type # noqa: E501 + + :return: The pay_type of this P2pAdsListTradeMethod. # noqa: E501 + :rtype: str + """ + return self._pay_type + + @pay_type.setter + def pay_type(self, pay_type): + """Sets the pay_type of this P2pAdsListTradeMethod. + + Payment method type # noqa: E501 + + :param pay_type: The pay_type of this P2pAdsListTradeMethod. # noqa: E501 + :type: str + """ + + self._pay_type = pay_type + + @property + def trade_method_name(self): + """Gets the trade_method_name of this P2pAdsListTradeMethod. # noqa: E501 + + Payment method name # noqa: E501 + + :return: The trade_method_name of this P2pAdsListTradeMethod. # noqa: E501 + :rtype: str + """ + return self._trade_method_name + + @trade_method_name.setter + def trade_method_name(self, trade_method_name): + """Sets the trade_method_name of this P2pAdsListTradeMethod. + + Payment method name # noqa: E501 + + :param trade_method_name: The trade_method_name of this P2pAdsListTradeMethod. # noqa: E501 + :type: str + """ + + self._trade_method_name = trade_method_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, P2pAdsListTradeMethod): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, P2pAdsListTradeMethod): + 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 ddd462f1..7e5b372f 100644 --- a/gate_api/models/place_biz_push_order.py +++ b/gate_api/models/place_biz_push_order.py @@ -44,10 +44,14 @@ class PlaceBizPushOrder(object): 'oid': 'str', 'min_amount': 'str', 'max_amount': 'str', + 'limit_basis': 'int', + 'fiat_min_amount': 'str', + 'fiat_max_amount': 'str', 'tier_limit': 'str', 'verified_limit': 'str', 'reg_time_limit': 'str', 'advertisers_limit': 'str', + 'polymarket_limit': 'int', 'expire_min': 'str', 'trade_tips': 'str', 'auto_reply': 'str', @@ -74,10 +78,14 @@ class PlaceBizPushOrder(object): 'oid': 'oid', 'min_amount': 'minAmount', 'max_amount': 'maxAmount', + 'limit_basis': 'limitBasis', + 'fiat_min_amount': 'fiatMinAmount', + 'fiat_max_amount': 'fiatMaxAmount', 'tier_limit': 'tierLimit', 'verified_limit': 'verifiedLimit', 'reg_time_limit': 'regTimeLimit', 'advertisers_limit': 'advertisersLimit', + 'polymarket_limit': 'polymarket_limit', 'expire_min': 'expire_min', 'trade_tips': 'trade_tips', 'auto_reply': 'auto_reply', @@ -92,8 +100,8 @@ class PlaceBizPushOrder(object): '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, 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 + 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, limit_basis=None, fiat_min_amount=None, fiat_max_amount=None, tier_limit=None, verified_limit=None, reg_time_limit=None, advertisers_limit=None, polymarket_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, int, str, str, str, str, str, str, int, 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: local_vars_configuration = Configuration() @@ -110,10 +118,14 @@ def __init__(self, currency_type=None, exchange_type=None, type=None, unit_price self._oid = None self._min_amount = None self._max_amount = None + self._limit_basis = None + self._fiat_min_amount = None + self._fiat_max_amount = None self._tier_limit = None self._verified_limit = None self._reg_time_limit = None self._advertisers_limit = None + self._polymarket_limit = None self._expire_min = None self._trade_tips = None self._auto_reply = None @@ -140,8 +152,16 @@ def __init__(self, currency_type=None, exchange_type=None, type=None, unit_price self.rate_fixed = rate_fixed if oid is not None: self.oid = oid - self.min_amount = min_amount - self.max_amount = max_amount + if min_amount is not None: + self.min_amount = min_amount + if max_amount is not None: + self.max_amount = max_amount + if limit_basis is not None: + self.limit_basis = limit_basis + if fiat_min_amount is not None: + self.fiat_min_amount = fiat_min_amount + if fiat_max_amount is not None: + self.fiat_max_amount = fiat_max_amount if tier_limit is not None: self.tier_limit = tier_limit if verified_limit is not None: @@ -150,6 +170,8 @@ 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 polymarket_limit is not None: + self.polymarket_limit = polymarket_limit if expire_min is not None: self.expire_min = expire_min if trade_tips is not None: @@ -310,7 +332,7 @@ def number(self, number): def pay_type(self): """Gets the pay_type of this PlaceBizPushOrder. # noqa: E501 - Payment types, comma-separated; from pay type list `pay_type`, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 + Payment types enabled for the ad, comma-separated; values can be obtained from `pay_type` in the payment method list, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. `pay_type_json` uses the types in this field as keys to specify the corresponding payment accounts. # noqa: E501 :return: The pay_type of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -321,7 +343,7 @@ def pay_type(self): def pay_type(self, pay_type): """Sets the pay_type of this PlaceBizPushOrder. - Payment types, comma-separated; from pay type list `pay_type`, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. # noqa: E501 + Payment types enabled for the ad, comma-separated; values can be obtained from `pay_type` in the payment method list, e.g. `bank`, `alipay`, `wechat`, `paypal`, `swift`, `wu`. `pay_type_json` uses the types in this field as keys to specify the corresponding payment accounts. # noqa: E501 :param pay_type: The pay_type of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -335,7 +357,7 @@ def pay_type(self, pay_type): def pay_type_json(self): """Gets the pay_type_json of this PlaceBizPushOrder. # noqa: E501 - JSON map of payment type -> user's payment method ID. # noqa: E501 + JSON string of specific payment accounts corresponding to `payType`. Each key is a payment type listed in `payType`, and each value is the current user's payment method ID for that type. For example, when `payType` is `bank,swift`, this field can be {\"bank\":\"10001\",\"swift\":\"10002\"}. # noqa: E501 :return: The pay_type_json of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -346,7 +368,7 @@ def pay_type_json(self): def pay_type_json(self, pay_type_json): """Sets the pay_type_json of this PlaceBizPushOrder. - JSON map of payment type -> user's payment method ID. # noqa: E501 + JSON string of specific payment accounts corresponding to `payType`. Each key is a payment type listed in `payType`, and each value is the current user's payment method ID for that type. For example, when `payType` is `bank,swift`, this field can be {\"bank\":\"10001\",\"swift\":\"10002\"}. # noqa: E501 :param pay_type_json: The pay_type_json of this PlaceBizPushOrder. # noqa: E501 :type: str @@ -404,7 +426,7 @@ def oid(self, oid): def min_amount(self): """Gets the min_amount of this PlaceBizPushOrder. # noqa: E501 - Minimum trade amount in `exchangeType`. # noqa: E501 + Minimum quantity per order, denominated by currencyType; required when limitBasis is not passed or is 0 # noqa: E501 :return: The min_amount of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -415,13 +437,11 @@ def min_amount(self): def min_amount(self, min_amount): """Sets the min_amount of this PlaceBizPushOrder. - Minimum trade amount in `exchangeType`. # noqa: E501 + Minimum quantity per order, denominated by currencyType; required when limitBasis is not passed or is 0 # noqa: E501 :param min_amount: The min_amount of this PlaceBizPushOrder. # 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 @@ -429,7 +449,7 @@ def min_amount(self, min_amount): def max_amount(self): """Gets the max_amount of this PlaceBizPushOrder. # noqa: E501 - Maximum amount per trade in `exchangeType` fiat units. # noqa: E501 + Maximum quantity per order, denominated by currencyType; required when limitBasis is not passed or is 0 # noqa: E501 :return: The max_amount of this PlaceBizPushOrder. # noqa: E501 :rtype: str @@ -440,16 +460,89 @@ def max_amount(self): def max_amount(self, max_amount): """Sets the max_amount of this PlaceBizPushOrder. - Maximum amount per trade in `exchangeType` fiat units. # noqa: E501 + Maximum quantity per order, denominated by currencyType; required when limitBasis is not passed or is 0 # noqa: E501 :param max_amount: The max_amount of this PlaceBizPushOrder. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and max_amount is None: # noqa: E501 - raise ValueError("Invalid value for `max_amount`, must not be `None`") # noqa: E501 self._max_amount = max_amount + @property + def limit_basis(self): + """Gets the limit_basis of this PlaceBizPushOrder. # noqa: E501 + + Trading limit unit. 0: by crypto quantity, 1: by fiat amount; defaults to 0 when not passed for a new ad. The limit unit of an existing ad cannot be changed when editing; a fiat-limit ad must keep passing 1 when edited # noqa: E501 + + :return: The limit_basis of this PlaceBizPushOrder. # noqa: E501 + :rtype: int + """ + return self._limit_basis + + @limit_basis.setter + def limit_basis(self, limit_basis): + """Sets the limit_basis of this PlaceBizPushOrder. + + Trading limit unit. 0: by crypto quantity, 1: by fiat amount; defaults to 0 when not passed for a new ad. The limit unit of an existing ad cannot be changed when editing; a fiat-limit ad must keep passing 1 when edited # noqa: E501 + + :param limit_basis: The limit_basis of this PlaceBizPushOrder. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and limit_basis not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `limit_basis` ({0}), must be one of {1}" # noqa: E501 + .format(limit_basis, allowed_values) + ) + + self._limit_basis = limit_basis + + @property + def fiat_min_amount(self): + """Gets the fiat_min_amount of this PlaceBizPushOrder. # noqa: E501 + + Minimum amount per order, denominated by exchangeType; required when limitBasis is 1 # noqa: E501 + + :return: The fiat_min_amount of this PlaceBizPushOrder. # noqa: E501 + :rtype: str + """ + return self._fiat_min_amount + + @fiat_min_amount.setter + def fiat_min_amount(self, fiat_min_amount): + """Sets the fiat_min_amount of this PlaceBizPushOrder. + + Minimum amount per order, denominated by exchangeType; required when limitBasis is 1 # noqa: E501 + + :param fiat_min_amount: The fiat_min_amount of this PlaceBizPushOrder. # noqa: E501 + :type: str + """ + + self._fiat_min_amount = fiat_min_amount + + @property + def fiat_max_amount(self): + """Gets the fiat_max_amount of this PlaceBizPushOrder. # noqa: E501 + + Maximum amount per order, denominated by exchangeType; required when limitBasis is 1, and must not exceed the total fiat value of the ad quantity converted at the price # noqa: E501 + + :return: The fiat_max_amount of this PlaceBizPushOrder. # noqa: E501 + :rtype: str + """ + return self._fiat_max_amount + + @fiat_max_amount.setter + def fiat_max_amount(self, fiat_max_amount): + """Sets the fiat_max_amount of this PlaceBizPushOrder. + + Maximum amount per order, denominated by exchangeType; required when limitBasis is 1, and must not exceed the total fiat value of the ad quantity converted at the price # noqa: E501 + + :param fiat_max_amount: The fiat_max_amount of this PlaceBizPushOrder. # noqa: E501 + :type: str + """ + + self._fiat_max_amount = fiat_max_amount + @property def tier_limit(self): """Gets the tier_limit of this PlaceBizPushOrder. # noqa: E501 @@ -542,6 +635,35 @@ def advertisers_limit(self, advertisers_limit): self._advertisers_limit = advertisers_limit + @property + def polymarket_limit(self): + """Gets the polymarket_limit of this PlaceBizPushOrder. # noqa: E501 + + Whether to restrict trading with Polymarket users. 0: no restriction, 1: restricted # noqa: E501 + + :return: The polymarket_limit of this PlaceBizPushOrder. # noqa: E501 + :rtype: int + """ + return self._polymarket_limit + + @polymarket_limit.setter + def polymarket_limit(self, polymarket_limit): + """Sets the polymarket_limit of this PlaceBizPushOrder. + + Whether to restrict trading with Polymarket users. 0: no restriction, 1: restricted # noqa: E501 + + :param polymarket_limit: The polymarket_limit of this PlaceBizPushOrder. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and polymarket_limit not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `polymarket_limit` ({0}), must be one of {1}" # noqa: E501 + .format(polymarket_limit, allowed_values) + ) + + self._polymarket_limit = polymarket_limit + @property def expire_min(self): """Gets the expire_min of this PlaceBizPushOrder. # noqa: E501 diff --git a/gate_api/models/position.py b/gate_api/models/position.py index c1f3e29b..7923b9e8 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -505,7 +505,7 @@ def value(self, value): def margin(self): """Gets the margin of this Position. # noqa: E501 - Position margin # noqa: E501 + Margin # noqa: E501 :return: The margin of this Position. # noqa: E501 :rtype: str @@ -516,7 +516,7 @@ def margin(self): def margin(self, margin): """Sets the margin of this Position. - Position margin # noqa: E501 + Margin # noqa: E501 :param margin: The margin of this Position. # noqa: E501 :type: str diff --git a/gate_api/models/position_history_list_data_close_detail.py b/gate_api/models/position_history_list_data_close_detail.py index bb39ee88..931ce0b4 100644 --- a/gate_api/models/position_history_list_data_close_detail.py +++ b/gate_api/models/position_history_list_data_close_detail.py @@ -95,7 +95,7 @@ def margin_level(self, margin_level): def margin(self): """Gets the margin of this PositionHistoryListDataCloseDetail. # noqa: E501 - Position margin # noqa: E501 + Margin # noqa: E501 :return: The margin of this PositionHistoryListDataCloseDetail. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def margin(self): def margin(self, margin): """Sets the margin of this PositionHistoryListDataCloseDetail. - Position margin # noqa: E501 + Margin # noqa: E501 :param margin: The margin of this PositionHistoryListDataCloseDetail. # noqa: E501 :type: str diff --git a/gate_api/models/position_list2.py b/gate_api/models/position_list2.py new file mode 100644 index 00000000..a6fb7da2 --- /dev/null +++ b/gate_api/models/position_list2.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PositionList2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'PositionList2Data', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (PositionList2Data, int, Configuration) -> None + """PositionList2 - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this PositionList2. # noqa: E501 + + + :return: The data of this PositionList2. # noqa: E501 + :rtype: PositionList2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PositionList2. + + + :param data: The data of this PositionList2. # noqa: E501 + :type: PositionList2Data + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this PositionList2. # noqa: E501 + + + :return: The timestamp of this PositionList2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this PositionList2. + + + :param timestamp: The timestamp of this PositionList2. # 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, PositionList2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PositionList2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position_list2_data.py b/gate_api/models/position_list2_data.py new file mode 100644 index 00000000..7611b771 --- /dev/null +++ b/gate_api/models/position_list2_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 PositionList2Data(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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[PositionListItem]' + } + + attribute_map = { + 'list': 'list' + } + + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[PositionListItem], Configuration) -> None + """PositionList2Data - a 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 PositionList2Data. # noqa: E501 + + Query active position list # noqa: E501 + + :return: The list of this PositionList2Data. # noqa: E501 + :rtype: list[PositionListItem] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this PositionList2Data. + + Query active position list # noqa: E501 + + :param list: The list of this PositionList2Data. # noqa: E501 + :type: list[PositionListItem] + """ + + 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, PositionList2Data): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PositionList2Data): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position_list_item.py b/gate_api/models/position_list_item.py new file mode 100644 index 00000000..552d99f4 --- /dev/null +++ b/gate_api/models/position_list_item.py @@ -0,0 +1,956 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PositionListItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'exchange': 'str', + 'quote_currency': 'str', + 'quote_currency_precision': 'int', + 'fx_rate': 'str', + 'trade_status': 'str', + 'symbol_desc': 'str', + 'position_pnl': 'str', + 'today_pnl': 'str', + 'pnl_rate': 'str', + 'today_sell_amount': 'str', + 'today_buy_amount': 'str', + 'today_sell_volume': 'str', + 'today_buy_volume': 'str', + 'yesterday_volume': 'str', + 'volume': 'str', + 'available': 'str', + 'transfer_out_pending_qty': 'str', + 'avg_cost_price': 'str', + 'diluted_cost_price': 'str', + 'last_price': 'str', + 'extended_last_price': 'str', + 'max_order_volume': 'str', + 'step_order_volume': 'str', + 'min_order_volume': 'str', + 'price_precision': 'int', + 'price_protection': 'str', + 'sell_price_protection': 'str', + 'buy_price_protection': 'str', + 'commission_rate': 'str', + 'slippage_rate': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'exchange': 'exchange', + 'quote_currency': 'quote_currency', + 'quote_currency_precision': 'quote_currency_precision', + 'fx_rate': 'fx_rate', + 'trade_status': 'trade_status', + 'symbol_desc': 'symbol_desc', + 'position_pnl': 'position_pnl', + 'today_pnl': 'today_pnl', + 'pnl_rate': 'pnl_rate', + 'today_sell_amount': 'today_sell_amount', + 'today_buy_amount': 'today_buy_amount', + 'today_sell_volume': 'today_sell_volume', + 'today_buy_volume': 'today_buy_volume', + 'yesterday_volume': 'yesterday_volume', + 'volume': 'volume', + 'available': 'available', + 'transfer_out_pending_qty': 'transfer_out_pending_qty', + 'avg_cost_price': 'avg_cost_price', + 'diluted_cost_price': 'diluted_cost_price', + 'last_price': 'last_price', + 'extended_last_price': 'extended_last_price', + 'max_order_volume': 'max_order_volume', + 'step_order_volume': 'step_order_volume', + 'min_order_volume': 'min_order_volume', + 'price_precision': 'price_precision', + 'price_protection': 'price_protection', + 'sell_price_protection': 'sell_price_protection', + 'buy_price_protection': 'buy_price_protection', + 'commission_rate': 'commission_rate', + 'slippage_rate': 'slippage_rate' + } + + def __init__(self, symbol=None, exchange=None, quote_currency=None, quote_currency_precision=None, fx_rate=None, trade_status=None, symbol_desc=None, position_pnl=None, today_pnl=None, pnl_rate=None, today_sell_amount=None, today_buy_amount=None, today_sell_volume=None, today_buy_volume=None, yesterday_volume=None, volume=None, available=None, transfer_out_pending_qty=None, avg_cost_price=None, diluted_cost_price=None, last_price=None, extended_last_price=None, max_order_volume=None, step_order_volume=None, min_order_volume=None, price_precision=None, price_protection=None, sell_price_protection=None, buy_price_protection=None, commission_rate=None, slippage_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, str, str, str, str, str, Configuration) -> None + """PositionListItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._exchange = None + self._quote_currency = None + self._quote_currency_precision = None + self._fx_rate = None + self._trade_status = None + self._symbol_desc = None + self._position_pnl = None + self._today_pnl = None + self._pnl_rate = None + self._today_sell_amount = None + self._today_buy_amount = None + self._today_sell_volume = None + self._today_buy_volume = None + self._yesterday_volume = None + self._volume = None + self._available = None + self._transfer_out_pending_qty = None + self._avg_cost_price = None + self._diluted_cost_price = None + self._last_price = None + self._extended_last_price = None + self._max_order_volume = None + self._step_order_volume = None + self._min_order_volume = None + self._price_precision = None + self._price_protection = None + self._sell_price_protection = None + self._buy_price_protection = None + self._commission_rate = None + self._slippage_rate = None + self.discriminator = None + + if symbol is not None: + self.symbol = symbol + if exchange is not None: + self.exchange = exchange + if quote_currency is not None: + self.quote_currency = quote_currency + if quote_currency_precision is not None: + self.quote_currency_precision = quote_currency_precision + if fx_rate is not None: + self.fx_rate = fx_rate + if trade_status is not None: + self.trade_status = trade_status + if symbol_desc is not None: + self.symbol_desc = symbol_desc + if position_pnl is not None: + self.position_pnl = position_pnl + if today_pnl is not None: + self.today_pnl = today_pnl + if pnl_rate is not None: + self.pnl_rate = pnl_rate + if today_sell_amount is not None: + self.today_sell_amount = today_sell_amount + if today_buy_amount is not None: + self.today_buy_amount = today_buy_amount + if today_sell_volume is not None: + self.today_sell_volume = today_sell_volume + if today_buy_volume is not None: + self.today_buy_volume = today_buy_volume + if yesterday_volume is not None: + self.yesterday_volume = yesterday_volume + if volume is not None: + self.volume = volume + if available is not None: + self.available = available + if transfer_out_pending_qty is not None: + self.transfer_out_pending_qty = transfer_out_pending_qty + if avg_cost_price is not None: + self.avg_cost_price = avg_cost_price + if diluted_cost_price is not None: + self.diluted_cost_price = diluted_cost_price + if last_price is not None: + self.last_price = last_price + self.extended_last_price = extended_last_price + if max_order_volume is not None: + self.max_order_volume = max_order_volume + if step_order_volume is not None: + self.step_order_volume = step_order_volume + if min_order_volume is not None: + self.min_order_volume = min_order_volume + if price_precision is not None: + self.price_precision = price_precision + if price_protection is not None: + self.price_protection = price_protection + if sell_price_protection is not None: + self.sell_price_protection = sell_price_protection + if buy_price_protection is not None: + self.buy_price_protection = buy_price_protection + if commission_rate is not None: + self.commission_rate = commission_rate + if slippage_rate is not None: + self.slippage_rate = slippage_rate + + @property + def symbol(self): + """Gets the symbol of this PositionListItem. # noqa: E501 + + Symbol # noqa: E501 + + :return: The symbol of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this PositionListItem. + + Symbol # noqa: E501 + + :param symbol: The symbol of this PositionListItem. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def exchange(self): + """Gets the exchange of this PositionListItem. # noqa: E501 + + Exchange, supports us, hk, and kr # noqa: E501 + + :return: The exchange of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._exchange + + @exchange.setter + def exchange(self, exchange): + """Sets the exchange of this PositionListItem. + + Exchange, supports us, hk, and kr # noqa: E501 + + :param exchange: The exchange of this PositionListItem. # noqa: E501 + :type: str + """ + allowed_values = ["us", "hk", "kr"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and exchange not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `exchange` ({0}), must be one of {1}" # noqa: E501 + .format(exchange, allowed_values) + ) + + self._exchange = exchange + + @property + def quote_currency(self): + """Gets the quote_currency of this PositionListItem. # noqa: E501 + + Quote currency # noqa: E501 + + :return: The quote_currency of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._quote_currency + + @quote_currency.setter + def quote_currency(self, quote_currency): + """Sets the quote_currency of this PositionListItem. + + Quote currency # noqa: E501 + + :param quote_currency: The quote_currency of this PositionListItem. # noqa: E501 + :type: str + """ + + self._quote_currency = quote_currency + + @property + def quote_currency_precision(self): + """Gets the quote_currency_precision of this PositionListItem. # noqa: E501 + + Quote currency precision # noqa: E501 + + :return: The quote_currency_precision of this PositionListItem. # noqa: E501 + :rtype: int + """ + return self._quote_currency_precision + + @quote_currency_precision.setter + def quote_currency_precision(self, quote_currency_precision): + """Sets the quote_currency_precision of this PositionListItem. + + Quote currency precision # noqa: E501 + + :param quote_currency_precision: The quote_currency_precision of this PositionListItem. # noqa: E501 + :type: int + """ + + self._quote_currency_precision = quote_currency_precision + + @property + def fx_rate(self): + """Gets the fx_rate of this PositionListItem. # noqa: E501 + + Quote currency to USD exchange rate # noqa: E501 + + :return: The fx_rate of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._fx_rate + + @fx_rate.setter + def fx_rate(self, fx_rate): + """Sets the fx_rate of this PositionListItem. + + Quote currency to USD exchange rate # noqa: E501 + + :param fx_rate: The fx_rate of this PositionListItem. # noqa: E501 + :type: str + """ + + self._fx_rate = fx_rate + + @property + def trade_status(self): + """Gets the trade_status of this PositionListItem. # noqa: E501 + + Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. # noqa: E501 + + :return: The trade_status of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._trade_status + + @trade_status.setter + def trade_status(self, trade_status): + """Sets the trade_status of this PositionListItem. + + Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. # noqa: E501 + + :param trade_status: The trade_status of this PositionListItem. # noqa: E501 + :type: str + """ + allowed_values = ["pre_market", "open", "post_market", "closed", "gt_lp"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trade_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trade_status` ({0}), must be one of {1}" # noqa: E501 + .format(trade_status, allowed_values) + ) + + self._trade_status = trade_status + + @property + def symbol_desc(self): + """Gets the symbol_desc of this PositionListItem. # noqa: E501 + + + :return: The symbol_desc of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._symbol_desc + + @symbol_desc.setter + def symbol_desc(self, symbol_desc): + """Sets the symbol_desc of this PositionListItem. + + + :param symbol_desc: The symbol_desc of this PositionListItem. # noqa: E501 + :type: str + """ + + self._symbol_desc = symbol_desc + + @property + def position_pnl(self): + """Gets the position_pnl of this PositionListItem. # noqa: E501 + + Position P&L # noqa: E501 + + :return: The position_pnl of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._position_pnl + + @position_pnl.setter + def position_pnl(self, position_pnl): + """Sets the position_pnl of this PositionListItem. + + Position P&L # noqa: E501 + + :param position_pnl: The position_pnl of this PositionListItem. # noqa: E501 + :type: str + """ + + self._position_pnl = position_pnl + + @property + def today_pnl(self): + """Gets the today_pnl of this PositionListItem. # noqa: E501 + + Today's P&L # noqa: E501 + + :return: The today_pnl of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._today_pnl + + @today_pnl.setter + def today_pnl(self, today_pnl): + """Sets the today_pnl of this PositionListItem. + + Today's P&L # noqa: E501 + + :param today_pnl: The today_pnl of this PositionListItem. # noqa: E501 + :type: str + """ + + self._today_pnl = today_pnl + + @property + def pnl_rate(self): + """Gets the pnl_rate of this PositionListItem. # noqa: E501 + + Yield # noqa: E501 + + :return: The pnl_rate of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._pnl_rate + + @pnl_rate.setter + def pnl_rate(self, pnl_rate): + """Sets the pnl_rate of this PositionListItem. + + Yield # noqa: E501 + + :param pnl_rate: The pnl_rate of this PositionListItem. # noqa: E501 + :type: str + """ + + self._pnl_rate = pnl_rate + + @property + def today_sell_amount(self): + """Gets the today_sell_amount of this PositionListItem. # noqa: E501 + + Today's sales amount # noqa: E501 + + :return: The today_sell_amount of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._today_sell_amount + + @today_sell_amount.setter + def today_sell_amount(self, today_sell_amount): + """Sets the today_sell_amount of this PositionListItem. + + Today's sales amount # noqa: E501 + + :param today_sell_amount: The today_sell_amount of this PositionListItem. # noqa: E501 + :type: str + """ + + self._today_sell_amount = today_sell_amount + + @property + def today_buy_amount(self): + """Gets the today_buy_amount of this PositionListItem. # noqa: E501 + + Today's purchase amount # noqa: E501 + + :return: The today_buy_amount of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._today_buy_amount + + @today_buy_amount.setter + def today_buy_amount(self, today_buy_amount): + """Sets the today_buy_amount of this PositionListItem. + + Today's purchase amount # noqa: E501 + + :param today_buy_amount: The today_buy_amount of this PositionListItem. # noqa: E501 + :type: str + """ + + self._today_buy_amount = today_buy_amount + + @property + def today_sell_volume(self): + """Gets the today_sell_volume of this PositionListItem. # noqa: E501 + + Today's sell volume # noqa: E501 + + :return: The today_sell_volume of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._today_sell_volume + + @today_sell_volume.setter + def today_sell_volume(self, today_sell_volume): + """Sets the today_sell_volume of this PositionListItem. + + Today's sell volume # noqa: E501 + + :param today_sell_volume: The today_sell_volume of this PositionListItem. # noqa: E501 + :type: str + """ + + self._today_sell_volume = today_sell_volume + + @property + def today_buy_volume(self): + """Gets the today_buy_volume of this PositionListItem. # noqa: E501 + + Today's buy volume # noqa: E501 + + :return: The today_buy_volume of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._today_buy_volume + + @today_buy_volume.setter + def today_buy_volume(self, today_buy_volume): + """Sets the today_buy_volume of this PositionListItem. + + Today's buy volume # noqa: E501 + + :param today_buy_volume: The today_buy_volume of this PositionListItem. # noqa: E501 + :type: str + """ + + self._today_buy_volume = today_buy_volume + + @property + def yesterday_volume(self): + """Gets the yesterday_volume of this PositionListItem. # noqa: E501 + + Previous close position quantity # noqa: E501 + + :return: The yesterday_volume of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._yesterday_volume + + @yesterday_volume.setter + def yesterday_volume(self, yesterday_volume): + """Sets the yesterday_volume of this PositionListItem. + + Previous close position quantity # noqa: E501 + + :param yesterday_volume: The yesterday_volume of this PositionListItem. # noqa: E501 + :type: str + """ + + self._yesterday_volume = yesterday_volume + + @property + def volume(self): + """Gets the volume of this PositionListItem. # noqa: E501 + + Position quantity # noqa: E501 + + :return: The volume of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._volume + + @volume.setter + def volume(self, volume): + """Sets the volume of this PositionListItem. + + Position quantity # noqa: E501 + + :param volume: The volume of this PositionListItem. # noqa: E501 + :type: str + """ + + self._volume = volume + + @property + def available(self): + """Gets the available of this PositionListItem. # noqa: E501 + + Available position quantity # noqa: E501 + + :return: The available of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this PositionListItem. + + Available position quantity # noqa: E501 + + :param available: The available of this PositionListItem. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def transfer_out_pending_qty(self): + """Gets the transfer_out_pending_qty of this PositionListItem. # noqa: E501 + + Stock transfer in progress quantity # noqa: E501 + + :return: The transfer_out_pending_qty of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._transfer_out_pending_qty + + @transfer_out_pending_qty.setter + def transfer_out_pending_qty(self, transfer_out_pending_qty): + """Sets the transfer_out_pending_qty of this PositionListItem. + + Stock transfer in progress quantity # noqa: E501 + + :param transfer_out_pending_qty: The transfer_out_pending_qty of this PositionListItem. # noqa: E501 + :type: str + """ + + self._transfer_out_pending_qty = transfer_out_pending_qty + + @property + def avg_cost_price(self): + """Gets the avg_cost_price of this PositionListItem. # noqa: E501 + + Cost price # noqa: E501 + + :return: The avg_cost_price of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._avg_cost_price + + @avg_cost_price.setter + def avg_cost_price(self, avg_cost_price): + """Sets the avg_cost_price of this PositionListItem. + + Cost price # noqa: E501 + + :param avg_cost_price: The avg_cost_price of this PositionListItem. # noqa: E501 + :type: str + """ + + self._avg_cost_price = avg_cost_price + + @property + def diluted_cost_price(self): + """Gets the diluted_cost_price of this PositionListItem. # noqa: E501 + + Diluted cost price # noqa: E501 + + :return: The diluted_cost_price of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._diluted_cost_price + + @diluted_cost_price.setter + def diluted_cost_price(self, diluted_cost_price): + """Sets the diluted_cost_price of this PositionListItem. + + Diluted cost price # noqa: E501 + + :param diluted_cost_price: The diluted_cost_price of this PositionListItem. # noqa: E501 + :type: str + """ + + self._diluted_cost_price = diluted_cost_price + + @property + def last_price(self): + """Gets the last_price of this PositionListItem. # noqa: E501 + + Latest price # noqa: E501 + + :return: The last_price of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._last_price + + @last_price.setter + def last_price(self, last_price): + """Sets the last_price of this PositionListItem. + + Latest price # noqa: E501 + + :param last_price: The last_price of this PositionListItem. # noqa: E501 + :type: str + """ + + self._last_price = last_price + + @property + def extended_last_price(self): + """Gets the extended_last_price of this PositionListItem. # noqa: E501 + + Extended hours latest price # noqa: E501 + + :return: The extended_last_price of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._extended_last_price + + @extended_last_price.setter + def extended_last_price(self, extended_last_price): + """Sets the extended_last_price of this PositionListItem. + + Extended hours latest price # noqa: E501 + + :param extended_last_price: The extended_last_price of this PositionListItem. # noqa: E501 + :type: str + """ + + self._extended_last_price = extended_last_price + + @property + def max_order_volume(self): + """Gets the max_order_volume of this PositionListItem. # noqa: E501 + + + :return: The max_order_volume of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._max_order_volume + + @max_order_volume.setter + def max_order_volume(self, max_order_volume): + """Sets the max_order_volume of this PositionListItem. + + + :param max_order_volume: The max_order_volume of this PositionListItem. # noqa: E501 + :type: str + """ + + self._max_order_volume = max_order_volume + + @property + def step_order_volume(self): + """Gets the step_order_volume of this PositionListItem. # noqa: E501 + + + :return: The step_order_volume of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._step_order_volume + + @step_order_volume.setter + def step_order_volume(self, step_order_volume): + """Sets the step_order_volume of this PositionListItem. + + + :param step_order_volume: The step_order_volume of this PositionListItem. # noqa: E501 + :type: str + """ + + self._step_order_volume = step_order_volume + + @property + def min_order_volume(self): + """Gets the min_order_volume of this PositionListItem. # noqa: E501 + + + :return: The min_order_volume of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._min_order_volume + + @min_order_volume.setter + def min_order_volume(self, min_order_volume): + """Sets the min_order_volume of this PositionListItem. + + + :param min_order_volume: The min_order_volume of this PositionListItem. # noqa: E501 + :type: str + """ + + self._min_order_volume = min_order_volume + + @property + def price_precision(self): + """Gets the price_precision of this PositionListItem. # noqa: E501 + + + :return: The price_precision of this PositionListItem. # noqa: E501 + :rtype: int + """ + return self._price_precision + + @price_precision.setter + def price_precision(self, price_precision): + """Sets the price_precision of this PositionListItem. + + + :param price_precision: The price_precision of this PositionListItem. # noqa: E501 + :type: int + """ + + self._price_precision = price_precision + + @property + def price_protection(self): + """Gets the price_protection of this PositionListItem. # noqa: E501 + + + :return: The price_protection of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._price_protection + + @price_protection.setter + def price_protection(self, price_protection): + """Sets the price_protection of this PositionListItem. + + + :param price_protection: The price_protection of this PositionListItem. # noqa: E501 + :type: str + """ + + self._price_protection = price_protection + + @property + def sell_price_protection(self): + """Gets the sell_price_protection of this PositionListItem. # noqa: E501 + + + :return: The sell_price_protection of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._sell_price_protection + + @sell_price_protection.setter + def sell_price_protection(self, sell_price_protection): + """Sets the sell_price_protection of this PositionListItem. + + + :param sell_price_protection: The sell_price_protection of this PositionListItem. # noqa: E501 + :type: str + """ + + self._sell_price_protection = sell_price_protection + + @property + def buy_price_protection(self): + """Gets the buy_price_protection of this PositionListItem. # noqa: E501 + + + :return: The buy_price_protection of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._buy_price_protection + + @buy_price_protection.setter + def buy_price_protection(self, buy_price_protection): + """Sets the buy_price_protection of this PositionListItem. + + + :param buy_price_protection: The buy_price_protection of this PositionListItem. # noqa: E501 + :type: str + """ + + self._buy_price_protection = buy_price_protection + + @property + def commission_rate(self): + """Gets the commission_rate of this PositionListItem. # noqa: E501 + + Fee Rate # noqa: E501 + + :return: The commission_rate of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._commission_rate + + @commission_rate.setter + def commission_rate(self, commission_rate): + """Sets the commission_rate of this PositionListItem. + + Fee Rate # noqa: E501 + + :param commission_rate: The commission_rate of this PositionListItem. # noqa: E501 + :type: str + """ + + self._commission_rate = commission_rate + + @property + def slippage_rate(self): + """Gets the slippage_rate of this PositionListItem. # noqa: E501 + + + :return: The slippage_rate of this PositionListItem. # noqa: E501 + :rtype: str + """ + return self._slippage_rate + + @slippage_rate.setter + def slippage_rate(self, slippage_rate): + """Sets the slippage_rate of this PositionListItem. + + + :param slippage_rate: The slippage_rate of this PositionListItem. # noqa: E501 + :type: str + """ + + self._slippage_rate = slippage_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, PositionListItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PositionListItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position_timerange.py b/gate_api/models/position_timerange.py index d14e6933..5963885d 100644 --- a/gate_api/models/position_timerange.py +++ b/gate_api/models/position_timerange.py @@ -275,7 +275,7 @@ def maintenance_rate(self, maintenance_rate): def margin(self): """Gets the margin of this PositionTimerange. # noqa: E501 - Position margin # noqa: E501 + Margin # noqa: E501 :return: The margin of this PositionTimerange. # noqa: E501 :rtype: str @@ -286,7 +286,7 @@ def margin(self): def margin(self, margin): """Sets the margin of this PositionTimerange. - Position margin # noqa: E501 + Margin # noqa: E501 :param margin: The margin of this PositionTimerange. # noqa: E501 :type: str diff --git a/gate_api/models/redeem_v4.py b/gate_api/models/redeem_v4.py deleted file mode 100644 index 166914e0..00000000 --- a/gate_api/models/redeem_v4.py +++ /dev/null @@ -1,188 +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 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/spot_account.py b/gate_api/models/spot_account.py deleted file mode 100644 index e4f1aba0..00000000 --- a/gate_api/models/spot_account.py +++ /dev/null @@ -1,207 +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 SpotAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'locked': 'str', - 'update_id': 'int' - } - - attribute_map = { - 'currency': 'currency', - 'available': 'available', - 'locked': 'locked', - 'update_id': 'update_id' - } - - def __init__(self, currency=None, available=None, locked=None, update_id=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, int, Configuration) -> None - """SpotAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._available = None - self._locked = None - self._update_id = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if available is not None: - self.available = available - if locked is not None: - self.locked = locked - if update_id is not None: - self.update_id = update_id - - @property - def currency(self): - """Gets the currency of this SpotAccount. # noqa: E501 - - Currency detail # noqa: E501 - - :return: The currency of this SpotAccount. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this SpotAccount. - - Currency detail # noqa: E501 - - :param currency: The currency of this SpotAccount. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def available(self): - """Gets the available of this SpotAccount. # noqa: E501 - - Available amount # noqa: E501 - - :return: The available of this SpotAccount. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this SpotAccount. - - Available amount # noqa: E501 - - :param available: The available of this SpotAccount. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def locked(self): - """Gets the locked of this SpotAccount. # noqa: E501 - - Locked amount, used in trading # noqa: E501 - - :return: The locked of this SpotAccount. # noqa: E501 - :rtype: str - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this SpotAccount. - - Locked amount, used in trading # noqa: E501 - - :param locked: The locked of this SpotAccount. # noqa: E501 - :type: str - """ - - self._locked = locked - - @property - def update_id(self): - """Gets the update_id of this SpotAccount. # noqa: E501 - - Version number # noqa: E501 - - :return: The update_id of this SpotAccount. # noqa: E501 - :rtype: int - """ - return self._update_id - - @update_id.setter - def update_id(self, update_id): - """Sets the update_id of this SpotAccount. - - Version number # noqa: E501 - - :param update_id: The update_id of this SpotAccount. # noqa: E501 - :type: int - """ - - self._update_id = update_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SpotAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SpotAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_pov_order.py b/gate_api/models/spot_pov_order.py new file mode 100644 index 00000000..a2ee8541 --- /dev/null +++ b/gate_api/models/spot_pov_order.py @@ -0,0 +1,551 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotPovOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'currency_pair': 'str', + 'side': 'str', + 'amount': 'str', + 'participation_rate': 'int', + 'ttl': 'str', + 'limit_price': 'str', + 'trigger_price': 'str', + 'status': 'str', + 'terminated_as': 'str', + 'start_time_ms': 'int', + 'end_time_ms': 'int', + 'expire_time_ms': 'int', + 'create_time_ms': 'int', + 'update_time_ms': 'int', + 'text': 'str' + } + + attribute_map = { + 'id': 'id', + 'currency_pair': 'currency_pair', + 'side': 'side', + 'amount': 'amount', + 'participation_rate': 'participation_rate', + 'ttl': 'ttl', + 'limit_price': 'limit_price', + 'trigger_price': 'trigger_price', + 'status': 'status', + 'terminated_as': 'terminated_as', + 'start_time_ms': 'start_time_ms', + 'end_time_ms': 'end_time_ms', + 'expire_time_ms': 'expire_time_ms', + 'create_time_ms': 'create_time_ms', + 'update_time_ms': 'update_time_ms', + 'text': 'text' + } + + def __init__(self, id=None, currency_pair=None, side=None, amount=None, participation_rate=None, ttl=None, limit_price=None, trigger_price=None, status=None, terminated_as=None, start_time_ms=None, end_time_ms=None, expire_time_ms=None, create_time_ms=None, update_time_ms=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, str, str, str, str, str, int, int, int, int, int, str, Configuration) -> None + """SpotPovOrder - a 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_pair = None + self._side = None + self._amount = None + self._participation_rate = None + self._ttl = None + self._limit_price = None + self._trigger_price = None + self._status = None + self._terminated_as = None + self._start_time_ms = None + self._end_time_ms = None + self._expire_time_ms = None + self._create_time_ms = None + self._update_time_ms = None + self._text = None + self.discriminator = None + + self.id = id + self.currency_pair = currency_pair + self.side = side + self.amount = amount + self.participation_rate = participation_rate + self.ttl = ttl + if limit_price is not None: + self.limit_price = limit_price + if trigger_price is not None: + self.trigger_price = trigger_price + self.status = status + if terminated_as is not None: + self.terminated_as = terminated_as + if start_time_ms is not None: + self.start_time_ms = start_time_ms + if end_time_ms is not None: + self.end_time_ms = end_time_ms + if expire_time_ms is not None: + self.expire_time_ms = expire_time_ms + self.create_time_ms = create_time_ms + if update_time_ms is not None: + self.update_time_ms = update_time_ms + if text is not None: + self.text = text + + @property + def id(self): + """Gets the id of this SpotPovOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SpotPovOrder. + + Order ID # noqa: E501 + + :param id: The id of this SpotPovOrder. # 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 currency_pair(self): + """Gets the currency_pair of this SpotPovOrder. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this SpotPovOrder. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this SpotPovOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 + raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 + + self._currency_pair = currency_pair + + @property + def side(self): + """Gets the side of this SpotPovOrder. # noqa: E501 + + Buy or sell order # noqa: E501 + + :return: The side of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this SpotPovOrder. + + Buy or sell order # noqa: E501 + + :param side: The side of this SpotPovOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 + raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501 + + self._side = side + + @property + def amount(self): + """Gets the amount of this SpotPovOrder. # noqa: E501 + + Trade amount # noqa: E501 + + :return: The amount of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SpotPovOrder. + + Trade amount # noqa: E501 + + :param amount: The amount of this SpotPovOrder. # 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 participation_rate(self): + """Gets the participation_rate of this SpotPovOrder. # noqa: E501 + + Target participation rate as a percentage. Allowed values: 5, 10, 20, and 40 # noqa: E501 + + :return: The participation_rate of this SpotPovOrder. # noqa: E501 + :rtype: int + """ + return self._participation_rate + + @participation_rate.setter + def participation_rate(self, participation_rate): + """Sets the participation_rate of this SpotPovOrder. + + Target participation rate as a percentage. Allowed values: 5, 10, 20, and 40 # noqa: E501 + + :param participation_rate: The participation_rate of this SpotPovOrder. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and participation_rate is None: # noqa: E501 + raise ValueError("Invalid value for `participation_rate`, must not be `None`") # noqa: E501 + + self._participation_rate = participation_rate + + @property + def ttl(self): + """Gets the ttl of this SpotPovOrder. # noqa: E501 + + Time to live. Valid values: 1h, 6h, 12h, 1d, 2d, 3d, 4d, 5d, 6d, and 7d # noqa: E501 + + :return: The ttl of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._ttl + + @ttl.setter + def ttl(self, ttl): + """Sets the ttl of this SpotPovOrder. + + Time to live. Valid values: 1h, 6h, 12h, 1d, 2d, 3d, 4d, 5d, 6d, and 7d # noqa: E501 + + :param ttl: The ttl of this SpotPovOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and ttl is None: # noqa: E501 + raise ValueError("Invalid value for `ttl`, must not be `None`") # noqa: E501 + + self._ttl = ttl + + @property + def limit_price(self): + """Gets the limit_price of this SpotPovOrder. # noqa: E501 + + Limit price. If omitted, the market price is used # noqa: E501 + + :return: The limit_price of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._limit_price + + @limit_price.setter + def limit_price(self, limit_price): + """Sets the limit_price of this SpotPovOrder. + + Limit price. If omitted, the market price is used # noqa: E501 + + :param limit_price: The limit_price of this SpotPovOrder. # noqa: E501 + :type: str + """ + + self._limit_price = limit_price + + @property + def trigger_price(self): + """Gets the trigger_price of this SpotPovOrder. # noqa: E501 + + Trigger price. If omitted, the order is triggered immediately # noqa: E501 + + :return: The trigger_price of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this SpotPovOrder. + + Trigger price. If omitted, the order is triggered immediately # noqa: E501 + + :param trigger_price: The trigger_price of this SpotPovOrder. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def status(self): + """Gets the status of this SpotPovOrder. # noqa: E501 + + Order status - CREATED: Created - CANCELING: Canceling - RUNNING: Running - COMPLETED: Completed - EXPIRED: Expired - TERMINATED: Terminated # noqa: E501 + + :return: The status of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this SpotPovOrder. + + Order status - CREATED: Created - CANCELING: Canceling - RUNNING: Running - COMPLETED: Completed - EXPIRED: Expired - TERMINATED: Terminated # noqa: E501 + + :param status: The status of this SpotPovOrder. # 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 terminated_as(self): + """Gets the terminated_as of this SpotPovOrder. # noqa: E501 + + Order termination reason code # noqa: E501 + + :return: The terminated_as of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._terminated_as + + @terminated_as.setter + def terminated_as(self, terminated_as): + """Sets the terminated_as of this SpotPovOrder. + + Order termination reason code # noqa: E501 + + :param terminated_as: The terminated_as of this SpotPovOrder. # noqa: E501 + :type: str + """ + + self._terminated_as = terminated_as + + @property + def start_time_ms(self): + """Gets the start_time_ms of this SpotPovOrder. # noqa: E501 + + Order execution start time in milliseconds # noqa: E501 + + :return: The start_time_ms of this SpotPovOrder. # noqa: E501 + :rtype: int + """ + return self._start_time_ms + + @start_time_ms.setter + def start_time_ms(self, start_time_ms): + """Sets the start_time_ms of this SpotPovOrder. + + Order execution start time in milliseconds # noqa: E501 + + :param start_time_ms: The start_time_ms of this SpotPovOrder. # noqa: E501 + :type: int + """ + + self._start_time_ms = start_time_ms + + @property + def end_time_ms(self): + """Gets the end_time_ms of this SpotPovOrder. # noqa: E501 + + Order execution end time in milliseconds # noqa: E501 + + :return: The end_time_ms of this SpotPovOrder. # noqa: E501 + :rtype: int + """ + return self._end_time_ms + + @end_time_ms.setter + def end_time_ms(self, end_time_ms): + """Sets the end_time_ms of this SpotPovOrder. + + Order execution end time in milliseconds # noqa: E501 + + :param end_time_ms: The end_time_ms of this SpotPovOrder. # noqa: E501 + :type: int + """ + + self._end_time_ms = end_time_ms + + @property + def expire_time_ms(self): + """Gets the expire_time_ms of this SpotPovOrder. # noqa: E501 + + Order expiration time in milliseconds # noqa: E501 + + :return: The expire_time_ms of this SpotPovOrder. # noqa: E501 + :rtype: int + """ + return self._expire_time_ms + + @expire_time_ms.setter + def expire_time_ms(self, expire_time_ms): + """Sets the expire_time_ms of this SpotPovOrder. + + Order expiration time in milliseconds # noqa: E501 + + :param expire_time_ms: The expire_time_ms of this SpotPovOrder. # noqa: E501 + :type: int + """ + + self._expire_time_ms = expire_time_ms + + @property + def create_time_ms(self): + """Gets the create_time_ms of this SpotPovOrder. # noqa: E501 + + Creation time of order (in milliseconds) # noqa: E501 + + :return: The create_time_ms of this SpotPovOrder. # 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 SpotPovOrder. + + Creation time of order (in milliseconds) # noqa: E501 + + :param create_time_ms: The create_time_ms of this SpotPovOrder. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and create_time_ms is None: # noqa: E501 + raise ValueError("Invalid value for `create_time_ms`, must not be `None`") # noqa: E501 + + self._create_time_ms = create_time_ms + + @property + def update_time_ms(self): + """Gets the update_time_ms of this SpotPovOrder. # noqa: E501 + + Last modification time of order (in milliseconds) # noqa: E501 + + :return: The update_time_ms of this SpotPovOrder. # noqa: E501 + :rtype: int + """ + return self._update_time_ms + + @update_time_ms.setter + def update_time_ms(self, update_time_ms): + """Sets the update_time_ms of this SpotPovOrder. + + Last modification time of order (in milliseconds) # noqa: E501 + + :param update_time_ms: The update_time_ms of this SpotPovOrder. # noqa: E501 + :type: int + """ + + self._update_time_ms = update_time_ms + + @property + def text(self): + """Gets the text of this SpotPovOrder. # noqa: E501 + + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :return: The text of this SpotPovOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this SpotPovOrder. + + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :param text: The text of this SpotPovOrder. # noqa: E501 + :type: str + """ + + self._text = text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotPovOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotPovOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_pov_order_creator.py b/gate_api/models/spot_pov_order_creator.py new file mode 100644 index 00000000..f08ceddf --- /dev/null +++ b/gate_api/models/spot_pov_order_creator.py @@ -0,0 +1,330 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotPovOrderCreator(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency_pair': 'str', + 'side': 'str', + 'amount': 'str', + 'participation_rate': 'int', + 'ttl': 'str', + 'limit_price': 'str', + 'trigger_price': 'str', + 'text': 'str' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'side': 'side', + 'amount': 'amount', + 'participation_rate': 'participation_rate', + 'ttl': 'ttl', + 'limit_price': 'limit_price', + 'trigger_price': 'trigger_price', + 'text': 'text' + } + + def __init__(self, currency_pair=None, side=None, amount=None, participation_rate=None, ttl=None, limit_price=None, trigger_price=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, str, str, str, str, Configuration) -> None + """SpotPovOrderCreator - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pair = None + self._side = None + self._amount = None + self._participation_rate = None + self._ttl = None + self._limit_price = None + self._trigger_price = None + self._text = None + self.discriminator = None + + self.currency_pair = currency_pair + self.side = side + self.amount = amount + self.participation_rate = participation_rate + self.ttl = ttl + if limit_price is not None: + self.limit_price = limit_price + if trigger_price is not None: + self.trigger_price = trigger_price + if text is not None: + self.text = text + + @property + def currency_pair(self): + """Gets the currency_pair of this SpotPovOrderCreator. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this SpotPovOrderCreator. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this SpotPovOrderCreator. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this SpotPovOrderCreator. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 + raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 + + self._currency_pair = currency_pair + + @property + def side(self): + """Gets the side of this SpotPovOrderCreator. # noqa: E501 + + Buy or sell order # noqa: E501 + + :return: The side of this SpotPovOrderCreator. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this SpotPovOrderCreator. + + Buy or sell order # noqa: E501 + + :param side: The side of this SpotPovOrderCreator. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 + raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501 + allowed_values = ["buy", "sell"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501 + .format(side, allowed_values) + ) + + self._side = side + + @property + def amount(self): + """Gets the amount of this SpotPovOrderCreator. # noqa: E501 + + Trade amount # noqa: E501 + + :return: The amount of this SpotPovOrderCreator. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SpotPovOrderCreator. + + Trade amount # noqa: E501 + + :param amount: The amount of this SpotPovOrderCreator. # 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 participation_rate(self): + """Gets the participation_rate of this SpotPovOrderCreator. # noqa: E501 + + Target participation rate as a percentage. Valid values: 5, 10, 20, and 40 # noqa: E501 + + :return: The participation_rate of this SpotPovOrderCreator. # noqa: E501 + :rtype: int + """ + return self._participation_rate + + @participation_rate.setter + def participation_rate(self, participation_rate): + """Sets the participation_rate of this SpotPovOrderCreator. + + Target participation rate as a percentage. Valid values: 5, 10, 20, and 40 # noqa: E501 + + :param participation_rate: The participation_rate of this SpotPovOrderCreator. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and participation_rate is None: # noqa: E501 + raise ValueError("Invalid value for `participation_rate`, must not be `None`") # noqa: E501 + + self._participation_rate = participation_rate + + @property + def ttl(self): + """Gets the ttl of this SpotPovOrderCreator. # noqa: E501 + + Time to live. Valid values: 1h, 6h, 12h, 1d, 2d, 3d, 4d, 5d, 6d, and 7d # noqa: E501 + + :return: The ttl of this SpotPovOrderCreator. # noqa: E501 + :rtype: str + """ + return self._ttl + + @ttl.setter + def ttl(self, ttl): + """Sets the ttl of this SpotPovOrderCreator. + + Time to live. Valid values: 1h, 6h, 12h, 1d, 2d, 3d, 4d, 5d, 6d, and 7d # noqa: E501 + + :param ttl: The ttl of this SpotPovOrderCreator. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and ttl is None: # noqa: E501 + raise ValueError("Invalid value for `ttl`, must not be `None`") # noqa: E501 + + self._ttl = ttl + + @property + def limit_price(self): + """Gets the limit_price of this SpotPovOrderCreator. # noqa: E501 + + Limit price. If omitted, the market price is used # noqa: E501 + + :return: The limit_price of this SpotPovOrderCreator. # noqa: E501 + :rtype: str + """ + return self._limit_price + + @limit_price.setter + def limit_price(self, limit_price): + """Sets the limit_price of this SpotPovOrderCreator. + + Limit price. If omitted, the market price is used # noqa: E501 + + :param limit_price: The limit_price of this SpotPovOrderCreator. # noqa: E501 + :type: str + """ + + self._limit_price = limit_price + + @property + def trigger_price(self): + """Gets the trigger_price of this SpotPovOrderCreator. # noqa: E501 + + Trigger price. If omitted, the order is triggered immediately # noqa: E501 + + :return: The trigger_price of this SpotPovOrderCreator. # noqa: E501 + :rtype: str + """ + return self._trigger_price + + @trigger_price.setter + def trigger_price(self, trigger_price): + """Sets the trigger_price of this SpotPovOrderCreator. + + Trigger price. If omitted, the order is triggered immediately # noqa: E501 + + :param trigger_price: The trigger_price of this SpotPovOrderCreator. # noqa: E501 + :type: str + """ + + self._trigger_price = trigger_price + + @property + def text(self): + """Gets the text of this SpotPovOrderCreator. # noqa: E501 + + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :return: The text of this SpotPovOrderCreator. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this SpotPovOrderCreator. + + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :param text: The text of this SpotPovOrderCreator. # noqa: E501 + :type: str + """ + + self._text = text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotPovOrderCreator): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotPovOrderCreator): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_cross_margin_account.py b/gate_api/models/sub_cross_margin_account.py index 0e43bca8..34cb0745 100644 --- a/gate_api/models/sub_cross_margin_account.py +++ b/gate_api/models/sub_cross_margin_account.py @@ -291,7 +291,7 @@ def net(self, net): def leverage(self): """Gets the leverage of this SubCrossMarginAccount. # noqa: E501 - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :return: The leverage of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -302,7 +302,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this SubCrossMarginAccount. - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :param leverage: The leverage of this SubCrossMarginAccount. # noqa: E501 :type: str diff --git a/gate_api/models/swap_coin_struct.py b/gate_api/models/swap_coin_struct.py index 8a7ae01e..ea3d9a0f 100644 --- a/gate_api/models/swap_coin_struct.py +++ b/gate_api/models/swap_coin_struct.py @@ -334,7 +334,7 @@ def exchange_amount(self, exchange_amount): def update_stamp(self): """Gets the update_stamp of this SwapCoinStruct. # noqa: E501 - UpdateTimestamp # noqa: E501 + Update timestamp # noqa: E501 :return: The update_stamp of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -345,7 +345,7 @@ def update_stamp(self): def update_stamp(self, update_stamp): """Sets the update_stamp of this SwapCoinStruct. - UpdateTimestamp # noqa: E501 + Update timestamp # noqa: E501 :param update_stamp: The update_stamp of this SwapCoinStruct. # noqa: E501 :type: int diff --git a/gate_api/models/symbol.py b/gate_api/models/symbol.py index f05655eb..12d1aae9 100644 --- a/gate_api/models/symbol.py +++ b/gate_api/models/symbol.py @@ -46,7 +46,8 @@ class Symbol(object): 'max_limit_size': 'str', 'contract_size': 'str', 'liquidation_fee': 'str', - 'delist_time': 'str' + 'delist_time': 'str', + 'support_rpi': 'str' } attribute_map = { @@ -63,11 +64,12 @@ class Symbol(object): 'max_limit_size': 'max_limit_size', 'contract_size': 'contract_size', 'liquidation_fee': 'liquidation_fee', - 'delist_time': 'delist_time' + 'delist_time': 'delist_time', + 'support_rpi': 'support_rpi' } - def __init__(self, symbol=None, exchange_type=None, business_type=None, state=None, min_size=None, min_notional=None, lot_size=None, tick_size=None, max_num_orders=None, max_market_size=None, max_limit_size=None, contract_size=None, liquidation_fee=None, delist_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + def __init__(self, symbol=None, exchange_type=None, business_type=None, state=None, min_size=None, min_notional=None, lot_size=None, tick_size=None, max_num_orders=None, max_market_size=None, max_limit_size=None, contract_size=None, liquidation_fee=None, delist_time=None, support_rpi=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None """Symbol - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -87,6 +89,7 @@ def __init__(self, symbol=None, exchange_type=None, business_type=None, state=No self._contract_size = None self._liquidation_fee = None self._delist_time = None + self._support_rpi = None self.discriminator = None self.symbol = symbol @@ -103,6 +106,8 @@ def __init__(self, symbol=None, exchange_type=None, business_type=None, state=No self.contract_size = contract_size self.liquidation_fee = liquidation_fee self.delist_time = delist_time + if support_rpi is not None: + self.support_rpi = support_rpi @property def symbol(self): @@ -133,7 +138,7 @@ def symbol(self, symbol): def exchange_type(self): """Gets the exchange_type of this Symbol. # noqa: E501 - Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). # noqa: E501 :return: The exchange_type of this Symbol. # noqa: E501 :rtype: str @@ -144,7 +149,7 @@ def exchange_type(self): def exchange_type(self, exchange_type): """Sets the exchange_type of this Symbol. - Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID`). # noqa: E501 + Venue bucket (`BINANCE` / `OKX` / `GATE` / `BYBIT` / `KRAKEN` / `HYPERLIQUID` / `DERIBIT`). # noqa: E501 :param exchange_type: The exchange_type of this Symbol. # noqa: E501 :type: str @@ -208,7 +213,7 @@ def state(self, state): def min_size(self): """Gets the min_size of this Symbol. # noqa: E501 - Minimum order size allowed by the contract # noqa: E501 + Minimum order quantity # noqa: E501 :return: The min_size of this Symbol. # noqa: E501 :rtype: str @@ -219,7 +224,7 @@ def min_size(self): def min_size(self, min_size): """Sets the min_size of this Symbol. - Minimum order size allowed by the contract # noqa: E501 + Minimum order quantity # noqa: E501 :param min_size: The min_size of this Symbol. # noqa: E501 :type: str @@ -383,7 +388,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 (deprecated; quantity is used uniformly) # noqa: E501 :return: The contract_size of this Symbol. # noqa: E501 :rtype: str @@ -394,7 +399,7 @@ def contract_size(self): def contract_size(self, contract_size): """Sets the contract_size of this Symbol. - Contract Multiplier # noqa: E501 + Contract multiplier (deprecated; quantity is used uniformly) # noqa: E501 :param contract_size: The contract_size of this Symbol. # noqa: E501 :type: str @@ -454,6 +459,29 @@ def delist_time(self, delist_time): self._delist_time = delist_time + @property + def support_rpi(self): + """Gets the support_rpi of this Symbol. # noqa: E501 + + Whether RPI order placement is supported (true if supported; false otherwise) # noqa: E501 + + :return: The support_rpi of this Symbol. # noqa: E501 + :rtype: str + """ + return self._support_rpi + + @support_rpi.setter + def support_rpi(self, support_rpi): + """Sets the support_rpi of this Symbol. + + Whether RPI order placement is supported (true if supported; false otherwise) # noqa: E501 + + :param support_rpi: The support_rpi of this Symbol. # noqa: E501 + :type: str + """ + + self._support_rpi = support_rpi + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/symbol_commissions.py b/gate_api/models/symbol_commissions.py new file mode 100644 index 00000000..5be9383b --- /dev/null +++ b/gate_api/models/symbol_commissions.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 SymbolCommissions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'SymbolCommissionsData' + } + + attribute_map = { + 'timestamp': 'timestamp', + 'data': 'data' + } + + def __init__(self, timestamp=None, data=None, local_vars_configuration=None): # noqa: E501 + # type: (int, SymbolCommissionsData, Configuration) -> None + """SymbolCommissions - a 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 SymbolCommissions. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this SymbolCommissions. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this SymbolCommissions. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this SymbolCommissions. # noqa: E501 + :type: int + """ + + self._timestamp = timestamp + + @property + def data(self): + """Gets the data of this SymbolCommissions. # noqa: E501 + + + :return: The data of this SymbolCommissions. # noqa: E501 + :rtype: SymbolCommissionsData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this SymbolCommissions. + + + :param data: The data of this SymbolCommissions. # noqa: E501 + :type: SymbolCommissionsData + """ + + 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, SymbolCommissions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SymbolCommissions): + 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/symbol_commissions_data.py similarity index 69% rename from gate_api/models/candy_drop_v4_register_resp_cd02.py rename to gate_api/models/symbol_commissions_data.py index 506d8e15..21e5a988 100644 --- a/gate_api/models/candy_drop_v4_register_resp_cd02.py +++ b/gate_api/models/symbol_commissions_data.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class CandyDropV4RegisterRespCd02(object): +class SymbolCommissionsData(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,48 +33,48 @@ class CandyDropV4RegisterRespCd02(object): and the value is json key in definition. """ openapi_types = { - 'success': 'bool' + 'list': 'list[SymbolCommissionsDataList]' } attribute_map = { - 'success': 'success' + 'list': 'list' } - def __init__(self, success=None, local_vars_configuration=None): # noqa: E501 - # type: (bool, Configuration) -> None - """CandyDropV4RegisterRespCd02 - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[SymbolCommissionsDataList], Configuration) -> None + """SymbolCommissionsData - a 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._list = None self.discriminator = None - if success is not None: - self.success = success + if list is not None: + self.list = list @property - def success(self): - """Gets the success of this CandyDropV4RegisterRespCd02. # noqa: E501 + def list(self): + """Gets the list of this SymbolCommissionsData. # noqa: E501 - Whether the registration is successful # noqa: E501 + List of symbol commission rates # noqa: E501 - :return: The success of this CandyDropV4RegisterRespCd02. # noqa: E501 - :rtype: bool + :return: The list of this SymbolCommissionsData. # noqa: E501 + :rtype: list[SymbolCommissionsDataList] """ - return self._success + return self._list - @success.setter - def success(self, success): - """Sets the success of this CandyDropV4RegisterRespCd02. + @list.setter + def list(self, list): + """Sets the list of this SymbolCommissionsData. - Whether the registration is successful # noqa: E501 + List of symbol commission rates # noqa: E501 - :param success: The success of this CandyDropV4RegisterRespCd02. # noqa: E501 - :type: bool + :param list: The list of this SymbolCommissionsData. # noqa: E501 + :type: list[SymbolCommissionsDataList] """ - self._success = success + self._list = list 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, CandyDropV4RegisterRespCd02): + if not isinstance(other, SymbolCommissionsData): return 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): + if not isinstance(other, SymbolCommissionsData): 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/symbol_commissions_data_list.py similarity index 53% rename from gate_api/models/candy_drop_v4_task_cd03.py rename to gate_api/models/symbol_commissions_data_list.py index a47f7f07..e539c601 100644 --- a/gate_api/models/candy_drop_v4_task_cd03.py +++ b/gate_api/models/symbol_commissions_data_list.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class CandyDropV4TaskCd03(object): +class SymbolCommissionsDataList(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,104 +33,104 @@ class CandyDropV4TaskCd03(object): and the value is json key in definition. """ openapi_types = { - 'task_name': 'str', - 'task_desc': 'str', - 'exclusive_label': 'str' + 'category_code': 'str', + 'symbol': 'str', + 'fee_per_lot': 'str' } attribute_map = { - 'task_name': 'task_name', - 'task_desc': 'task_desc', - 'exclusive_label': 'exclusive_label' + 'category_code': 'category_code', + 'symbol': 'symbol', + 'fee_per_lot': 'fee_per_lot' } - def __init__(self, task_name=None, task_desc=None, exclusive_label=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, category_code=None, symbol=None, fee_per_lot=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, str, Configuration) -> None - """CandyDropV4TaskCd03 - a model defined in OpenAPI""" # noqa: E501 + """SymbolCommissionsDataList - a 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._category_code = None + self._symbol = None + self._fee_per_lot = 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 + if category_code is not None: + self.category_code = category_code + if symbol is not None: + self.symbol = symbol + if fee_per_lot is not None: + self.fee_per_lot = fee_per_lot @property - def task_name(self): - """Gets the task_name of this CandyDropV4TaskCd03. # noqa: E501 + def category_code(self): + """Gets the category_code of this SymbolCommissionsDataList. # noqa: E501 - Task main title # noqa: E501 + Category code # noqa: E501 - :return: The task_name of this CandyDropV4TaskCd03. # noqa: E501 + :return: The category_code of this SymbolCommissionsDataList. # noqa: E501 :rtype: str """ - return self._task_name + return self._category_code - @task_name.setter - def task_name(self, task_name): - """Sets the task_name of this CandyDropV4TaskCd03. + @category_code.setter + def category_code(self, category_code): + """Sets the category_code of this SymbolCommissionsDataList. - Task main title # noqa: E501 + Category code # noqa: E501 - :param task_name: The task_name of this CandyDropV4TaskCd03. # noqa: E501 + :param category_code: The category_code of this SymbolCommissionsDataList. # noqa: E501 :type: str """ - self._task_name = task_name + self._category_code = category_code @property - def task_desc(self): - """Gets the task_desc of this CandyDropV4TaskCd03. # noqa: E501 + def symbol(self): + """Gets the symbol of this SymbolCommissionsDataList. # noqa: E501 - Task subtitle, if none is returned - # noqa: E501 + Trading symbol code # noqa: E501 - :return: The task_desc of this CandyDropV4TaskCd03. # noqa: E501 + :return: The symbol of this SymbolCommissionsDataList. # noqa: E501 :rtype: str """ - return self._task_desc + return self._symbol - @task_desc.setter - def task_desc(self, task_desc): - """Sets the task_desc of this CandyDropV4TaskCd03. + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this SymbolCommissionsDataList. - Task subtitle, if none is returned - # noqa: E501 + Trading symbol code # noqa: E501 - :param task_desc: The task_desc of this CandyDropV4TaskCd03. # noqa: E501 + :param symbol: The symbol of this SymbolCommissionsDataList. # noqa: E501 :type: str """ - self._task_desc = task_desc + self._symbol = symbol @property - def exclusive_label(self): - """Gets the exclusive_label of this CandyDropV4TaskCd03. # noqa: E501 + def fee_per_lot(self): + """Gets the fee_per_lot of this SymbolCommissionsDataList. # noqa: E501 - Exclusive task label copywriting, if not configured, it will return - # noqa: E501 + Commission rate per lot # noqa: E501 - :return: The exclusive_label of this CandyDropV4TaskCd03. # noqa: E501 + :return: The fee_per_lot of this SymbolCommissionsDataList. # noqa: E501 :rtype: str """ - return self._exclusive_label + return self._fee_per_lot - @exclusive_label.setter - def exclusive_label(self, exclusive_label): - """Sets the exclusive_label of this CandyDropV4TaskCd03. + @fee_per_lot.setter + def fee_per_lot(self, fee_per_lot): + """Sets the fee_per_lot of this SymbolCommissionsDataList. - Exclusive task label copywriting, if not configured, it will return - # noqa: E501 + Commission rate per lot # noqa: E501 - :param exclusive_label: The exclusive_label of this CandyDropV4TaskCd03. # noqa: E501 + :param fee_per_lot: The fee_per_lot of this SymbolCommissionsDataList. # noqa: E501 :type: str """ - self._exclusive_label = exclusive_label + self._fee_per_lot = fee_per_lot 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, CandyDropV4TaskCd03): + if not isinstance(other, SymbolCommissionsDataList): return 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): + if not isinstance(other, SymbolCommissionsDataList): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/symbol_detail.py b/gate_api/models/symbol_detail.py new file mode 100644 index 00000000..c72e0fe2 --- /dev/null +++ b/gate_api/models/symbol_detail.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SymbolDetail(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'SymbolDetailData', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (SymbolDetailData, int, Configuration) -> None + """SymbolDetail - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this SymbolDetail. # noqa: E501 + + + :return: The data of this SymbolDetail. # noqa: E501 + :rtype: SymbolDetailData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this SymbolDetail. + + + :param data: The data of this SymbolDetail. # noqa: E501 + :type: SymbolDetailData + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this SymbolDetail. # noqa: E501 + + + :return: The timestamp of this SymbolDetail. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this SymbolDetail. + + + :param timestamp: The timestamp of this SymbolDetail. # 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, SymbolDetail): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SymbolDetail): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/symbol_detail_data.py b/gate_api/models/symbol_detail_data.py new file mode 100644 index 00000000..f784acaa --- /dev/null +++ b/gate_api/models/symbol_detail_data.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SymbolDetailData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'total_page': 'int', + 'list': 'list[SymbolDetailItem]' + } + + attribute_map = { + 'total': 'total', + 'total_page': 'total_page', + 'list': 'list' + } + + def __init__(self, total=None, total_page=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, list[SymbolDetailItem], Configuration) -> None + """SymbolDetailData - a 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 SymbolDetailData. # noqa: E501 + + + :return: The total of this SymbolDetailData. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this SymbolDetailData. + + + :param total: The total of this SymbolDetailData. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def total_page(self): + """Gets the total_page of this SymbolDetailData. # noqa: E501 + + + :return: The total_page of this SymbolDetailData. # noqa: E501 + :rtype: int + """ + return self._total_page + + @total_page.setter + def total_page(self, total_page): + """Sets the total_page of this SymbolDetailData. + + + :param total_page: The total_page of this SymbolDetailData. # noqa: E501 + :type: int + """ + + self._total_page = total_page + + @property + def list(self): + """Gets the list of this SymbolDetailData. # noqa: E501 + + + :return: The list of this SymbolDetailData. # noqa: E501 + :rtype: list[SymbolDetailItem] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this SymbolDetailData. + + + :param list: The list of this SymbolDetailData. # noqa: E501 + :type: list[SymbolDetailItem] + """ + + 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, SymbolDetailData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SymbolDetailData): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/symbol_detail_item.py b/gate_api/models/symbol_detail_item.py new file mode 100644 index 00000000..7e46766c --- /dev/null +++ b/gate_api/models/symbol_detail_item.py @@ -0,0 +1,809 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SymbolDetailItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'exchange': 'str', + 'exchange_desc': 'str', + 'quote_currency': 'str', + 'quote_currency_precision': 'int', + 'fx_rate': 'str', + 'symbol_desc': 'str', + 'category': 'str', + 'settlement_currency': 'str', + 'max_order_volume': 'str', + 'step_order_volume': 'str', + 'min_order_volume': 'str', + 'price_precision': 'int', + 'volume_precision': 'int', + 'is_ipo': 'bool', + 'ipo_price': 'str', + 'price_protection': 'str', + 'sell_price_protection': 'str', + 'buy_price_protection': 'str', + 'slippage_rate': 'str', + 'commission_rate': 'str', + 'trade_status': 'str', + 'trade_mode': 'int', + 'order_fill_timing': 'int', + 'symbol_descs': 'list[SymbolDetailItemSymbolDescs]', + 'icon_link': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'exchange': 'exchange', + 'exchange_desc': 'exchange_desc', + 'quote_currency': 'quote_currency', + 'quote_currency_precision': 'quote_currency_precision', + 'fx_rate': 'fx_rate', + 'symbol_desc': 'symbol_desc', + 'category': 'category', + 'settlement_currency': 'settlement_currency', + 'max_order_volume': 'max_order_volume', + 'step_order_volume': 'step_order_volume', + 'min_order_volume': 'min_order_volume', + 'price_precision': 'price_precision', + 'volume_precision': 'volume_precision', + 'is_ipo': 'is_ipo', + 'ipo_price': 'ipo_price', + 'price_protection': 'price_protection', + 'sell_price_protection': 'sell_price_protection', + 'buy_price_protection': 'buy_price_protection', + 'slippage_rate': 'slippage_rate', + 'commission_rate': 'commission_rate', + 'trade_status': 'trade_status', + 'trade_mode': 'trade_mode', + 'order_fill_timing': 'order_fill_timing', + 'symbol_descs': 'symbol_descs', + 'icon_link': 'icon_link' + } + + def __init__(self, symbol=None, exchange=None, exchange_desc=None, quote_currency=None, quote_currency_precision=None, fx_rate=None, symbol_desc=None, category=None, settlement_currency=None, max_order_volume=None, step_order_volume=None, min_order_volume=None, price_precision=None, volume_precision=None, is_ipo=None, ipo_price=None, price_protection=None, sell_price_protection=None, buy_price_protection=None, slippage_rate=None, commission_rate=None, trade_status=None, trade_mode=None, order_fill_timing=None, symbol_descs=None, icon_link=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, str, str, str, str, str, str, str, int, int, bool, str, str, str, str, str, str, str, int, int, list[SymbolDetailItemSymbolDescs], str, Configuration) -> None + """SymbolDetailItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._exchange = None + self._exchange_desc = None + self._quote_currency = None + self._quote_currency_precision = None + self._fx_rate = None + self._symbol_desc = None + self._category = None + self._settlement_currency = None + self._max_order_volume = None + self._step_order_volume = None + self._min_order_volume = None + self._price_precision = None + self._volume_precision = None + self._is_ipo = None + self._ipo_price = None + self._price_protection = None + self._sell_price_protection = None + self._buy_price_protection = None + self._slippage_rate = None + self._commission_rate = None + self._trade_status = None + self._trade_mode = None + self._order_fill_timing = None + self._symbol_descs = None + self._icon_link = None + self.discriminator = None + + if symbol is not None: + self.symbol = symbol + if exchange is not None: + self.exchange = exchange + if exchange_desc is not None: + self.exchange_desc = exchange_desc + if quote_currency is not None: + self.quote_currency = quote_currency + if quote_currency_precision is not None: + self.quote_currency_precision = quote_currency_precision + if fx_rate is not None: + self.fx_rate = fx_rate + if symbol_desc is not None: + self.symbol_desc = symbol_desc + if category is not None: + self.category = category + if settlement_currency is not None: + self.settlement_currency = settlement_currency + if max_order_volume is not None: + self.max_order_volume = max_order_volume + if step_order_volume is not None: + self.step_order_volume = step_order_volume + if min_order_volume is not None: + self.min_order_volume = min_order_volume + if price_precision is not None: + self.price_precision = price_precision + if volume_precision is not None: + self.volume_precision = volume_precision + if is_ipo is not None: + self.is_ipo = is_ipo + if ipo_price is not None: + self.ipo_price = ipo_price + if price_protection is not None: + self.price_protection = price_protection + if sell_price_protection is not None: + self.sell_price_protection = sell_price_protection + if buy_price_protection is not None: + self.buy_price_protection = buy_price_protection + if slippage_rate is not None: + self.slippage_rate = slippage_rate + if commission_rate is not None: + self.commission_rate = commission_rate + if trade_status is not None: + self.trade_status = trade_status + if trade_mode is not None: + self.trade_mode = trade_mode + if order_fill_timing is not None: + self.order_fill_timing = order_fill_timing + if symbol_descs is not None: + self.symbol_descs = symbol_descs + if icon_link is not None: + self.icon_link = icon_link + + @property + def symbol(self): + """Gets the symbol of this SymbolDetailItem. # noqa: E501 + + + :return: The symbol of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this SymbolDetailItem. + + + :param symbol: The symbol of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def exchange(self): + """Gets the exchange of this SymbolDetailItem. # noqa: E501 + + Exchange, supports us, hk, and kr # noqa: E501 + + :return: The exchange of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._exchange + + @exchange.setter + def exchange(self, exchange): + """Sets the exchange of this SymbolDetailItem. + + Exchange, supports us, hk, and kr # noqa: E501 + + :param exchange: The exchange of this SymbolDetailItem. # noqa: E501 + :type: str + """ + allowed_values = ["us", "hk", "kr"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and exchange not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `exchange` ({0}), must be one of {1}" # noqa: E501 + .format(exchange, allowed_values) + ) + + self._exchange = exchange + + @property + def exchange_desc(self): + """Gets the exchange_desc of this SymbolDetailItem. # noqa: E501 + + + :return: The exchange_desc of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._exchange_desc + + @exchange_desc.setter + def exchange_desc(self, exchange_desc): + """Sets the exchange_desc of this SymbolDetailItem. + + + :param exchange_desc: The exchange_desc of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._exchange_desc = exchange_desc + + @property + def quote_currency(self): + """Gets the quote_currency of this SymbolDetailItem. # noqa: E501 + + + :return: The quote_currency of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._quote_currency + + @quote_currency.setter + def quote_currency(self, quote_currency): + """Sets the quote_currency of this SymbolDetailItem. + + + :param quote_currency: The quote_currency of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._quote_currency = quote_currency + + @property + def quote_currency_precision(self): + """Gets the quote_currency_precision of this SymbolDetailItem. # noqa: E501 + + + :return: The quote_currency_precision of this SymbolDetailItem. # noqa: E501 + :rtype: int + """ + return self._quote_currency_precision + + @quote_currency_precision.setter + def quote_currency_precision(self, quote_currency_precision): + """Sets the quote_currency_precision of this SymbolDetailItem. + + + :param quote_currency_precision: The quote_currency_precision of this SymbolDetailItem. # noqa: E501 + :type: int + """ + + self._quote_currency_precision = quote_currency_precision + + @property + def fx_rate(self): + """Gets the fx_rate of this SymbolDetailItem. # noqa: E501 + + Quote currency to USD exchange rate # noqa: E501 + + :return: The fx_rate of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._fx_rate + + @fx_rate.setter + def fx_rate(self, fx_rate): + """Sets the fx_rate of this SymbolDetailItem. + + Quote currency to USD exchange rate # noqa: E501 + + :param fx_rate: The fx_rate of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._fx_rate = fx_rate + + @property + def symbol_desc(self): + """Gets the symbol_desc of this SymbolDetailItem. # noqa: E501 + + + :return: The symbol_desc of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._symbol_desc + + @symbol_desc.setter + def symbol_desc(self, symbol_desc): + """Sets the symbol_desc of this SymbolDetailItem. + + + :param symbol_desc: The symbol_desc of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._symbol_desc = symbol_desc + + @property + def category(self): + """Gets the category of this SymbolDetailItem. # noqa: E501 + + + :return: The category of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._category + + @category.setter + def category(self, category): + """Sets the category of this SymbolDetailItem. + + + :param category: The category of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._category = category + + @property + def settlement_currency(self): + """Gets the settlement_currency of this SymbolDetailItem. # noqa: E501 + + + :return: The settlement_currency of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._settlement_currency + + @settlement_currency.setter + def settlement_currency(self, settlement_currency): + """Sets the settlement_currency of this SymbolDetailItem. + + + :param settlement_currency: The settlement_currency of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._settlement_currency = settlement_currency + + @property + def max_order_volume(self): + """Gets the max_order_volume of this SymbolDetailItem. # noqa: E501 + + + :return: The max_order_volume of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._max_order_volume + + @max_order_volume.setter + def max_order_volume(self, max_order_volume): + """Sets the max_order_volume of this SymbolDetailItem. + + + :param max_order_volume: The max_order_volume of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._max_order_volume = max_order_volume + + @property + def step_order_volume(self): + """Gets the step_order_volume of this SymbolDetailItem. # noqa: E501 + + + :return: The step_order_volume of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._step_order_volume + + @step_order_volume.setter + def step_order_volume(self, step_order_volume): + """Sets the step_order_volume of this SymbolDetailItem. + + + :param step_order_volume: The step_order_volume of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._step_order_volume = step_order_volume + + @property + def min_order_volume(self): + """Gets the min_order_volume of this SymbolDetailItem. # noqa: E501 + + + :return: The min_order_volume of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._min_order_volume + + @min_order_volume.setter + def min_order_volume(self, min_order_volume): + """Sets the min_order_volume of this SymbolDetailItem. + + + :param min_order_volume: The min_order_volume of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._min_order_volume = min_order_volume + + @property + def price_precision(self): + """Gets the price_precision of this SymbolDetailItem. # noqa: E501 + + Price precision # noqa: E501 + + :return: The price_precision of this SymbolDetailItem. # noqa: E501 + :rtype: int + """ + return self._price_precision + + @price_precision.setter + def price_precision(self, price_precision): + """Sets the price_precision of this SymbolDetailItem. + + Price precision # noqa: E501 + + :param price_precision: The price_precision of this SymbolDetailItem. # noqa: E501 + :type: int + """ + + self._price_precision = price_precision + + @property + def volume_precision(self): + """Gets the volume_precision of this SymbolDetailItem. # noqa: E501 + + + :return: The volume_precision of this SymbolDetailItem. # noqa: E501 + :rtype: int + """ + return self._volume_precision + + @volume_precision.setter + def volume_precision(self, volume_precision): + """Sets the volume_precision of this SymbolDetailItem. + + + :param volume_precision: The volume_precision of this SymbolDetailItem. # noqa: E501 + :type: int + """ + + self._volume_precision = volume_precision + + @property + def is_ipo(self): + """Gets the is_ipo of this SymbolDetailItem. # noqa: E501 + + + :return: The is_ipo of this SymbolDetailItem. # noqa: E501 + :rtype: bool + """ + return self._is_ipo + + @is_ipo.setter + def is_ipo(self, is_ipo): + """Sets the is_ipo of this SymbolDetailItem. + + + :param is_ipo: The is_ipo of this SymbolDetailItem. # noqa: E501 + :type: bool + """ + + self._is_ipo = is_ipo + + @property + def ipo_price(self): + """Gets the ipo_price of this SymbolDetailItem. # noqa: E501 + + + :return: The ipo_price of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._ipo_price + + @ipo_price.setter + def ipo_price(self, ipo_price): + """Sets the ipo_price of this SymbolDetailItem. + + + :param ipo_price: The ipo_price of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._ipo_price = ipo_price + + @property + def price_protection(self): + """Gets the price_protection of this SymbolDetailItem. # noqa: E501 + + + :return: The price_protection of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._price_protection + + @price_protection.setter + def price_protection(self, price_protection): + """Sets the price_protection of this SymbolDetailItem. + + + :param price_protection: The price_protection of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._price_protection = price_protection + + @property + def sell_price_protection(self): + """Gets the sell_price_protection of this SymbolDetailItem. # noqa: E501 + + + :return: The sell_price_protection of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._sell_price_protection + + @sell_price_protection.setter + def sell_price_protection(self, sell_price_protection): + """Sets the sell_price_protection of this SymbolDetailItem. + + + :param sell_price_protection: The sell_price_protection of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._sell_price_protection = sell_price_protection + + @property + def buy_price_protection(self): + """Gets the buy_price_protection of this SymbolDetailItem. # noqa: E501 + + + :return: The buy_price_protection of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._buy_price_protection + + @buy_price_protection.setter + def buy_price_protection(self, buy_price_protection): + """Sets the buy_price_protection of this SymbolDetailItem. + + + :param buy_price_protection: The buy_price_protection of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._buy_price_protection = buy_price_protection + + @property + def slippage_rate(self): + """Gets the slippage_rate of this SymbolDetailItem. # noqa: E501 + + + :return: The slippage_rate of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._slippage_rate + + @slippage_rate.setter + def slippage_rate(self, slippage_rate): + """Sets the slippage_rate of this SymbolDetailItem. + + + :param slippage_rate: The slippage_rate of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._slippage_rate = slippage_rate + + @property + def commission_rate(self): + """Gets the commission_rate of this SymbolDetailItem. # noqa: E501 + + Fee Rate # noqa: E501 + + :return: The commission_rate of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._commission_rate + + @commission_rate.setter + def commission_rate(self, commission_rate): + """Sets the commission_rate of this SymbolDetailItem. + + Fee Rate # noqa: E501 + + :param commission_rate: The commission_rate of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._commission_rate = commission_rate + + @property + def trade_status(self): + """Gets the trade_status of this SymbolDetailItem. # noqa: E501 + + Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. # noqa: E501 + + :return: The trade_status of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._trade_status + + @trade_status.setter + def trade_status(self, trade_status): + """Sets the trade_status of this SymbolDetailItem. + + Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. # noqa: E501 + + :param trade_status: The trade_status of this SymbolDetailItem. # noqa: E501 + :type: str + """ + allowed_values = ["pre_market", "open", "post_market", "closed", "gt_lp"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trade_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trade_status` ({0}), must be one of {1}" # noqa: E501 + .format(trade_status, allowed_values) + ) + + self._trade_status = trade_status + + @property + def trade_mode(self): + """Gets the trade_mode of this SymbolDetailItem. # noqa: E501 + + Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. # noqa: E501 + + :return: The trade_mode of this SymbolDetailItem. # noqa: E501 + :rtype: int + """ + return self._trade_mode + + @trade_mode.setter + def trade_mode(self, trade_mode): + """Sets the trade_mode of this SymbolDetailItem. + + Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. # noqa: E501 + + :param trade_mode: The trade_mode of this SymbolDetailItem. # noqa: E501 + :type: int + """ + allowed_values = [0, 1, 2, 4] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trade_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trade_mode` ({0}), must be one of {1}" # noqa: E501 + .format(trade_mode, allowed_values) + ) + + self._trade_mode = trade_mode + + @property + def order_fill_timing(self): + """Gets the order_fill_timing of this SymbolDetailItem. # noqa: E501 + + Order fill timing (1=immediate, 2=after pre-market opens, 3=after regular session opens) # noqa: E501 + + :return: The order_fill_timing of this SymbolDetailItem. # noqa: E501 + :rtype: int + """ + return self._order_fill_timing + + @order_fill_timing.setter + def order_fill_timing(self, order_fill_timing): + """Sets the order_fill_timing of this SymbolDetailItem. + + Order fill timing (1=immediate, 2=after pre-market opens, 3=after regular session opens) # noqa: E501 + + :param order_fill_timing: The order_fill_timing of this SymbolDetailItem. # noqa: E501 + :type: int + """ + allowed_values = [1, 2, 3] # noqa: E501 + if self.local_vars_configuration.client_side_validation and order_fill_timing not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `order_fill_timing` ({0}), must be one of {1}" # noqa: E501 + .format(order_fill_timing, allowed_values) + ) + + self._order_fill_timing = order_fill_timing + + @property + def symbol_descs(self): + """Gets the symbol_descs of this SymbolDetailItem. # noqa: E501 + + + :return: The symbol_descs of this SymbolDetailItem. # noqa: E501 + :rtype: list[SymbolDetailItemSymbolDescs] + """ + return self._symbol_descs + + @symbol_descs.setter + def symbol_descs(self, symbol_descs): + """Sets the symbol_descs of this SymbolDetailItem. + + + :param symbol_descs: The symbol_descs of this SymbolDetailItem. # noqa: E501 + :type: list[SymbolDetailItemSymbolDescs] + """ + + self._symbol_descs = symbol_descs + + @property + def icon_link(self): + """Gets the icon_link of this SymbolDetailItem. # noqa: E501 + + + :return: The icon_link of this SymbolDetailItem. # noqa: E501 + :rtype: str + """ + return self._icon_link + + @icon_link.setter + def icon_link(self, icon_link): + """Sets the icon_link of this SymbolDetailItem. + + + :param icon_link: The icon_link of this SymbolDetailItem. # noqa: E501 + :type: str + """ + + self._icon_link = icon_link + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SymbolDetailItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SymbolDetailItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/symbol_detail_item_symbol_descs.py b/gate_api/models/symbol_detail_item_symbol_descs.py new file mode 100644 index 00000000..5ad3dcd4 --- /dev/null +++ b/gate_api/models/symbol_detail_item_symbol_descs.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SymbolDetailItemSymbolDescs(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'lang': 'str', + 'value': 'str' + } + + attribute_map = { + 'lang': 'lang', + 'value': 'value' + } + + def __init__(self, lang=None, value=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """SymbolDetailItemSymbolDescs - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._lang = None + self._value = None + self.discriminator = None + + if lang is not None: + self.lang = lang + if value is not None: + self.value = value + + @property + def lang(self): + """Gets the lang of this SymbolDetailItemSymbolDescs. # noqa: E501 + + + :return: The lang of this SymbolDetailItemSymbolDescs. # noqa: E501 + :rtype: str + """ + return self._lang + + @lang.setter + def lang(self, lang): + """Sets the lang of this SymbolDetailItemSymbolDescs. + + + :param lang: The lang of this SymbolDetailItemSymbolDescs. # noqa: E501 + :type: str + """ + + self._lang = lang + + @property + def value(self): + """Gets the value of this SymbolDetailItemSymbolDescs. # noqa: E501 + + + :return: The value of this SymbolDetailItemSymbolDescs. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this SymbolDetailItemSymbolDescs. + + + :param value: The value of this SymbolDetailItemSymbolDescs. # 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, SymbolDetailItemSymbolDescs): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SymbolDetailItemSymbolDescs): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/symbol_list_item.py b/gate_api/models/symbol_list_item.py new file mode 100644 index 00000000..2d03bd1a --- /dev/null +++ b/gate_api/models/symbol_list_item.py @@ -0,0 +1,679 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SymbolListItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'exchange': 'str', + 'exchange_desc': 'str', + 'quote_currency': 'str', + 'quote_currency_precision': 'int', + 'fx_rate': 'str', + 'symbol_desc': 'str', + 'category': 'str', + 'trade_status': 'str', + 'trade_mode': 'int', + 'order_fill_timing': 'int', + 'icon_link': 'str', + 'quote_currency_symbol': 'str', + 'price_precision': 'int', + 'volume_precision': 'int', + 'is_ipo': 'bool', + 'ipo_price': 'str', + 'sell_price_protection': 'str', + 'buy_price_protection': 'str', + 'symbol_descs': 'list[I18nTxt]' + } + + attribute_map = { + 'symbol': 'symbol', + 'exchange': 'exchange', + 'exchange_desc': 'exchange_desc', + 'quote_currency': 'quote_currency', + 'quote_currency_precision': 'quote_currency_precision', + 'fx_rate': 'fx_rate', + 'symbol_desc': 'symbol_desc', + 'category': 'category', + 'trade_status': 'trade_status', + 'trade_mode': 'trade_mode', + 'order_fill_timing': 'order_fill_timing', + 'icon_link': 'icon_link', + 'quote_currency_symbol': 'quote_currency_symbol', + 'price_precision': 'price_precision', + 'volume_precision': 'volume_precision', + 'is_ipo': 'is_ipo', + 'ipo_price': 'ipo_price', + 'sell_price_protection': 'sell_price_protection', + 'buy_price_protection': 'buy_price_protection', + 'symbol_descs': 'symbol_descs' + } + + def __init__(self, symbol=None, exchange=None, exchange_desc=None, quote_currency=None, quote_currency_precision=None, fx_rate=None, symbol_desc=None, category=None, trade_status=None, trade_mode=None, order_fill_timing=None, icon_link=None, quote_currency_symbol=None, price_precision=None, volume_precision=None, is_ipo=None, ipo_price=None, sell_price_protection=None, buy_price_protection=None, symbol_descs=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, str, str, str, str, int, int, str, str, int, int, bool, str, str, str, list[I18nTxt], Configuration) -> None + """SymbolListItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._exchange = None + self._exchange_desc = None + self._quote_currency = None + self._quote_currency_precision = None + self._fx_rate = None + self._symbol_desc = None + self._category = None + self._trade_status = None + self._trade_mode = None + self._order_fill_timing = None + self._icon_link = None + self._quote_currency_symbol = None + self._price_precision = None + self._volume_precision = None + self._is_ipo = None + self._ipo_price = None + self._sell_price_protection = None + self._buy_price_protection = None + self._symbol_descs = None + self.discriminator = None + + if symbol is not None: + self.symbol = symbol + if exchange is not None: + self.exchange = exchange + if exchange_desc is not None: + self.exchange_desc = exchange_desc + if quote_currency is not None: + self.quote_currency = quote_currency + if quote_currency_precision is not None: + self.quote_currency_precision = quote_currency_precision + if fx_rate is not None: + self.fx_rate = fx_rate + if symbol_desc is not None: + self.symbol_desc = symbol_desc + if category is not None: + self.category = category + if trade_status is not None: + self.trade_status = trade_status + if trade_mode is not None: + self.trade_mode = trade_mode + if order_fill_timing is not None: + self.order_fill_timing = order_fill_timing + if icon_link is not None: + self.icon_link = icon_link + if quote_currency_symbol is not None: + self.quote_currency_symbol = quote_currency_symbol + if price_precision is not None: + self.price_precision = price_precision + if volume_precision is not None: + self.volume_precision = volume_precision + if is_ipo is not None: + self.is_ipo = is_ipo + if ipo_price is not None: + self.ipo_price = ipo_price + if sell_price_protection is not None: + self.sell_price_protection = sell_price_protection + if buy_price_protection is not None: + self.buy_price_protection = buy_price_protection + if symbol_descs is not None: + self.symbol_descs = symbol_descs + + @property + def symbol(self): + """Gets the symbol of this SymbolListItem. # noqa: E501 + + Symbol # noqa: E501 + + :return: The symbol of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this SymbolListItem. + + Symbol # noqa: E501 + + :param symbol: The symbol of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def exchange(self): + """Gets the exchange of this SymbolListItem. # noqa: E501 + + Exchange, supports us, hk, and kr # noqa: E501 + + :return: The exchange of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._exchange + + @exchange.setter + def exchange(self, exchange): + """Sets the exchange of this SymbolListItem. + + Exchange, supports us, hk, and kr # noqa: E501 + + :param exchange: The exchange of this SymbolListItem. # noqa: E501 + :type: str + """ + allowed_values = ["us", "hk", "kr"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and exchange not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `exchange` ({0}), must be one of {1}" # noqa: E501 + .format(exchange, allowed_values) + ) + + self._exchange = exchange + + @property + def exchange_desc(self): + """Gets the exchange_desc of this SymbolListItem. # noqa: E501 + + Exchange description # noqa: E501 + + :return: The exchange_desc of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._exchange_desc + + @exchange_desc.setter + def exchange_desc(self, exchange_desc): + """Sets the exchange_desc of this SymbolListItem. + + Exchange description # noqa: E501 + + :param exchange_desc: The exchange_desc of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._exchange_desc = exchange_desc + + @property + def quote_currency(self): + """Gets the quote_currency of this SymbolListItem. # noqa: E501 + + Quote currency # noqa: E501 + + :return: The quote_currency of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._quote_currency + + @quote_currency.setter + def quote_currency(self, quote_currency): + """Sets the quote_currency of this SymbolListItem. + + Quote currency # noqa: E501 + + :param quote_currency: The quote_currency of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._quote_currency = quote_currency + + @property + def quote_currency_precision(self): + """Gets the quote_currency_precision of this SymbolListItem. # noqa: E501 + + Quote currency precision # noqa: E501 + + :return: The quote_currency_precision of this SymbolListItem. # noqa: E501 + :rtype: int + """ + return self._quote_currency_precision + + @quote_currency_precision.setter + def quote_currency_precision(self, quote_currency_precision): + """Sets the quote_currency_precision of this SymbolListItem. + + Quote currency precision # noqa: E501 + + :param quote_currency_precision: The quote_currency_precision of this SymbolListItem. # noqa: E501 + :type: int + """ + + self._quote_currency_precision = quote_currency_precision + + @property + def fx_rate(self): + """Gets the fx_rate of this SymbolListItem. # noqa: E501 + + Quote currency to USD exchange rate # noqa: E501 + + :return: The fx_rate of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._fx_rate + + @fx_rate.setter + def fx_rate(self, fx_rate): + """Sets the fx_rate of this SymbolListItem. + + Quote currency to USD exchange rate # noqa: E501 + + :param fx_rate: The fx_rate of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._fx_rate = fx_rate + + @property + def symbol_desc(self): + """Gets the symbol_desc of this SymbolListItem. # noqa: E501 + + Symbol description # noqa: E501 + + :return: The symbol_desc of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._symbol_desc + + @symbol_desc.setter + def symbol_desc(self, symbol_desc): + """Sets the symbol_desc of this SymbolListItem. + + Symbol description # noqa: E501 + + :param symbol_desc: The symbol_desc of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._symbol_desc = symbol_desc + + @property + def category(self): + """Gets the category of this SymbolListItem. # noqa: E501 + + Category # noqa: E501 + + :return: The category of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._category + + @category.setter + def category(self, category): + """Sets the category of this SymbolListItem. + + Category # noqa: E501 + + :param category: The category of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._category = category + + @property + def trade_status(self): + """Gets the trade_status of this SymbolListItem. # noqa: E501 + + Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. # noqa: E501 + + :return: The trade_status of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._trade_status + + @trade_status.setter + def trade_status(self, trade_status): + """Sets the trade_status of this SymbolListItem. + + Trading status. - pre_market: Pre-market. - open: Regular trading session. - post_market: Post-market. - closed: Market closed. - gt_lp: GT LP session. # noqa: E501 + + :param trade_status: The trade_status of this SymbolListItem. # noqa: E501 + :type: str + """ + allowed_values = ["pre_market", "open", "post_market", "closed", "gt_lp"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trade_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trade_status` ({0}), must be one of {1}" # noqa: E501 + .format(trade_status, allowed_values) + ) + + self._trade_status = trade_status + + @property + def trade_mode(self): + """Gets the trade_mode of this SymbolListItem. # noqa: E501 + + Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. # noqa: E501 + + :return: The trade_mode of this SymbolListItem. # noqa: E501 + :rtype: int + """ + return self._trade_mode + + @trade_mode.setter + def trade_mode(self, trade_mode): + """Sets the trade_mode of this SymbolListItem. + + Current session trading mode. - 0: Trading disabled. - 1: Buy only. - 2: Sell only. - 4: Buy and sell supported. # noqa: E501 + + :param trade_mode: The trade_mode of this SymbolListItem. # noqa: E501 + :type: int + """ + allowed_values = [0, 1, 2, 4] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trade_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trade_mode` ({0}), must be one of {1}" # noqa: E501 + .format(trade_mode, allowed_values) + ) + + self._trade_mode = trade_mode + + @property + def order_fill_timing(self): + """Gets the order_fill_timing of this SymbolListItem. # noqa: E501 + + Order fill timing (1=immediate, 2=after pre-market opens, 3=after regular session opens) # noqa: E501 + + :return: The order_fill_timing of this SymbolListItem. # noqa: E501 + :rtype: int + """ + return self._order_fill_timing + + @order_fill_timing.setter + def order_fill_timing(self, order_fill_timing): + """Sets the order_fill_timing of this SymbolListItem. + + Order fill timing (1=immediate, 2=after pre-market opens, 3=after regular session opens) # noqa: E501 + + :param order_fill_timing: The order_fill_timing of this SymbolListItem. # noqa: E501 + :type: int + """ + allowed_values = [1, 2, 3] # noqa: E501 + if self.local_vars_configuration.client_side_validation and order_fill_timing not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `order_fill_timing` ({0}), must be one of {1}" # noqa: E501 + .format(order_fill_timing, allowed_values) + ) + + self._order_fill_timing = order_fill_timing + + @property + def icon_link(self): + """Gets the icon_link of this SymbolListItem. # noqa: E501 + + Icon URL # noqa: E501 + + :return: The icon_link of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._icon_link + + @icon_link.setter + def icon_link(self, icon_link): + """Sets the icon_link of this SymbolListItem. + + Icon URL # noqa: E501 + + :param icon_link: The icon_link of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._icon_link = icon_link + + @property + def quote_currency_symbol(self): + """Gets the quote_currency_symbol of this SymbolListItem. # noqa: E501 + + Quote currency symbol # noqa: E501 + + :return: The quote_currency_symbol of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._quote_currency_symbol + + @quote_currency_symbol.setter + def quote_currency_symbol(self, quote_currency_symbol): + """Sets the quote_currency_symbol of this SymbolListItem. + + Quote currency symbol # noqa: E501 + + :param quote_currency_symbol: The quote_currency_symbol of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._quote_currency_symbol = quote_currency_symbol + + @property + def price_precision(self): + """Gets the price_precision of this SymbolListItem. # noqa: E501 + + Price precision # noqa: E501 + + :return: The price_precision of this SymbolListItem. # noqa: E501 + :rtype: int + """ + return self._price_precision + + @price_precision.setter + def price_precision(self, price_precision): + """Sets the price_precision of this SymbolListItem. + + Price precision # noqa: E501 + + :param price_precision: The price_precision of this SymbolListItem. # noqa: E501 + :type: int + """ + + self._price_precision = price_precision + + @property + def volume_precision(self): + """Gets the volume_precision of this SymbolListItem. # noqa: E501 + + Quantity precision # noqa: E501 + + :return: The volume_precision of this SymbolListItem. # noqa: E501 + :rtype: int + """ + return self._volume_precision + + @volume_precision.setter + def volume_precision(self, volume_precision): + """Sets the volume_precision of this SymbolListItem. + + Quantity precision # noqa: E501 + + :param volume_precision: The volume_precision of this SymbolListItem. # noqa: E501 + :type: int + """ + + self._volume_precision = volume_precision + + @property + def is_ipo(self): + """Gets the is_ipo of this SymbolListItem. # noqa: E501 + + Whether it is an IPO symbol # noqa: E501 + + :return: The is_ipo of this SymbolListItem. # noqa: E501 + :rtype: bool + """ + return self._is_ipo + + @is_ipo.setter + def is_ipo(self, is_ipo): + """Sets the is_ipo of this SymbolListItem. + + Whether it is an IPO symbol # noqa: E501 + + :param is_ipo: The is_ipo of this SymbolListItem. # noqa: E501 + :type: bool + """ + + self._is_ipo = is_ipo + + @property + def ipo_price(self): + """Gets the ipo_price of this SymbolListItem. # noqa: E501 + + IPO price # noqa: E501 + + :return: The ipo_price of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._ipo_price + + @ipo_price.setter + def ipo_price(self, ipo_price): + """Sets the ipo_price of this SymbolListItem. + + IPO price # noqa: E501 + + :param ipo_price: The ipo_price of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._ipo_price = ipo_price + + @property + def sell_price_protection(self): + """Gets the sell_price_protection of this SymbolListItem. # noqa: E501 + + Sell price protection rate # noqa: E501 + + :return: The sell_price_protection of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._sell_price_protection + + @sell_price_protection.setter + def sell_price_protection(self, sell_price_protection): + """Sets the sell_price_protection of this SymbolListItem. + + Sell price protection rate # noqa: E501 + + :param sell_price_protection: The sell_price_protection of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._sell_price_protection = sell_price_protection + + @property + def buy_price_protection(self): + """Gets the buy_price_protection of this SymbolListItem. # noqa: E501 + + Buy price protection rate # noqa: E501 + + :return: The buy_price_protection of this SymbolListItem. # noqa: E501 + :rtype: str + """ + return self._buy_price_protection + + @buy_price_protection.setter + def buy_price_protection(self, buy_price_protection): + """Sets the buy_price_protection of this SymbolListItem. + + Buy price protection rate # noqa: E501 + + :param buy_price_protection: The buy_price_protection of this SymbolListItem. # noqa: E501 + :type: str + """ + + self._buy_price_protection = buy_price_protection + + @property + def symbol_descs(self): + """Gets the symbol_descs of this SymbolListItem. # noqa: E501 + + Multilingual symbol description # noqa: E501 + + :return: The symbol_descs of this SymbolListItem. # noqa: E501 + :rtype: list[I18nTxt] + """ + return self._symbol_descs + + @symbol_descs.setter + def symbol_descs(self, symbol_descs): + """Sets the symbol_descs of this SymbolListItem. + + Multilingual symbol description # noqa: E501 + + :param symbol_descs: The symbol_descs of this SymbolListItem. # noqa: E501 + :type: list[I18nTxt] + """ + + self._symbol_descs = symbol_descs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SymbolListItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SymbolListItem): + 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/symbols2.py similarity index 63% rename from gate_api/models/hodler_airdrop_v4_order_request.py rename to gate_api/models/symbols2.py index d7499f14..1e8865e2 100644 --- a/gate_api/models/hodler_airdrop_v4_order_request.py +++ b/gate_api/models/symbols2.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class HodlerAirdropV4OrderRequest(object): +class Symbols2(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,52 +33,72 @@ class HodlerAirdropV4OrderRequest(object): and the value is json key in definition. """ openapi_types = { - 'hodler_id': 'int' + 'data': 'Symbols2Data', + 'timestamp': 'int' } attribute_map = { - 'hodler_id': 'hodler_id' + 'data': 'data', + 'timestamp': 'timestamp' } - def __init__(self, hodler_id=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """HodlerAirdropV4OrderRequest - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (Symbols2Data, int, Configuration) -> None + """Symbols2 - a 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._data = None + self._timestamp = None self.discriminator = None - self.hodler_id = hodler_id + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp @property - def hodler_id(self): - """Gets the hodler_id of this HodlerAirdropV4OrderRequest. # noqa: E501 + def data(self): + """Gets the data of this Symbols2. # noqa: E501 - Activity ID, required # noqa: E501 - :return: The hodler_id of this HodlerAirdropV4OrderRequest. # noqa: E501 + :return: The data of this Symbols2. # noqa: E501 + :rtype: Symbols2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this Symbols2. + + + :param data: The data of this Symbols2. # noqa: E501 + :type: Symbols2Data + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this Symbols2. # noqa: E501 + + + :return: The timestamp of this Symbols2. # noqa: E501 :rtype: int """ - return self._hodler_id + return self._timestamp - @hodler_id.setter - def hodler_id(self, hodler_id): - """Sets the hodler_id of this HodlerAirdropV4OrderRequest. + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this Symbols2. - Activity ID, required # noqa: E501 - :param hodler_id: The hodler_id of this HodlerAirdropV4OrderRequest. # noqa: E501 + :param timestamp: The timestamp of this Symbols2. # 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 + self._timestamp = timestamp def to_dict(self): """Returns the model properties as a dict""" @@ -114,14 +134,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, HodlerAirdropV4OrderRequest): + if not isinstance(other, Symbols2): return 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): + if not isinstance(other, Symbols2): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/symbols2_data.py b/gate_api/models/symbols2_data.py new file mode 100644 index 00000000..e166921b --- /dev/null +++ b/gate_api/models/symbols2_data.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 Symbols2Data(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'total_page': 'int', + 'list': 'list[SymbolListItem]' + } + + attribute_map = { + 'total': 'total', + 'total_page': 'total_page', + 'list': 'list' + } + + def __init__(self, total=None, total_page=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, list[SymbolListItem], Configuration) -> None + """Symbols2Data - a 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 Symbols2Data. # noqa: E501 + + Total quantity # noqa: E501 + + :return: The total of this Symbols2Data. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this Symbols2Data. + + Total quantity # noqa: E501 + + :param total: The total of this Symbols2Data. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def total_page(self): + """Gets the total_page of this Symbols2Data. # noqa: E501 + + Total pages # noqa: E501 + + :return: The total_page of this Symbols2Data. # noqa: E501 + :rtype: int + """ + return self._total_page + + @total_page.setter + def total_page(self, total_page): + """Sets the total_page of this Symbols2Data. + + Total pages # noqa: E501 + + :param total_page: The total_page of this Symbols2Data. # noqa: E501 + :type: int + """ + + self._total_page = total_page + + @property + def list(self): + """Gets the list of this Symbols2Data. # noqa: E501 + + Symbol list # noqa: E501 + + :return: The list of this Symbols2Data. # noqa: E501 + :rtype: list[SymbolListItem] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this Symbols2Data. + + Symbol list # noqa: E501 + + :param list: The list of this Symbols2Data. # noqa: E501 + :type: list[SymbolListItem] + """ + + 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, Symbols2Data): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Symbols2Data): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/tokens.py b/gate_api/models/tokens.py index bf577e6b..e5fb0a8e 100644 --- a/gate_api/models/tokens.py +++ b/gate_api/models/tokens.py @@ -179,7 +179,7 @@ def address(self, address): def amount_precision(self): """Gets the amount_precision of this Tokens. # noqa: E501 - Amount scale # noqa: E501 + Quantity precision # noqa: E501 :return: The amount_precision of this Tokens. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def amount_precision(self): def amount_precision(self, amount_precision): """Sets the amount_precision of this Tokens. - Amount scale # noqa: E501 + Quantity precision # noqa: E501 :param amount_precision: The amount_precision of this Tokens. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def amount_precision(self, amount_precision): def precision(self): """Gets the precision of this Tokens. # noqa: E501 - Price scale # noqa: E501 + Price precision # noqa: E501 :return: The precision of this Tokens. # noqa: E501 :rtype: int @@ -213,7 +213,7 @@ def precision(self): def precision(self, precision): """Sets the precision of this Tokens. - Price scale # noqa: E501 + Price precision # noqa: E501 :param precision: The precision of this Tokens. # noqa: E501 :type: int diff --git a/gate_api/models/trad_fi_order_request.py b/gate_api/models/trad_fi_order_request.py index f68942c3..72919a06 100644 --- a/gate_api/models/trad_fi_order_request.py +++ b/gate_api/models/trad_fi_order_request.py @@ -138,7 +138,7 @@ def price_type(self, price_type): def side(self): """Gets the side of this TradFiOrderRequest. # noqa: E501 - Order side (1=sell, 2=buy) # noqa: E501 + Side (1=sell, 2=buy) # noqa: E501 :return: The side of this TradFiOrderRequest. # noqa: E501 :rtype: int @@ -149,7 +149,7 @@ def side(self): def side(self, side): """Sets the side of this TradFiOrderRequest. - Order side (1=sell, 2=buy) # noqa: E501 + Side (1=sell, 2=buy) # noqa: E501 :param side: The side of this TradFiOrderRequest. # noqa: E501 :type: int @@ -194,7 +194,7 @@ def symbol(self, symbol): def volume(self): """Gets the volume of this TradFiOrderRequest. # noqa: E501 - Order volume # noqa: E501 + Order quantity # noqa: E501 :return: The volume of this TradFiOrderRequest. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def volume(self): def volume(self, volume): """Sets the volume of this TradFiOrderRequest. - Order volume # noqa: E501 + Order quantity # noqa: E501 :param volume: The volume of this TradFiOrderRequest. # noqa: E501 :type: str diff --git a/gate_api/models/trad_fi_spot_close_position_request.py b/gate_api/models/trad_fi_spot_close_position_request.py new file mode 100644 index 00000000..1b3432fd --- /dev/null +++ b/gate_api/models/trad_fi_spot_close_position_request.py @@ -0,0 +1,187 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TradFiSpotClosePositionRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'close_volume': 'str', + 'close_type': 'int' + } + + attribute_map = { + 'symbol': 'symbol', + 'close_volume': 'close_volume', + 'close_type': 'close_type' + } + + def __init__(self, symbol=None, close_volume=None, close_type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, Configuration) -> None + """TradFiSpotClosePositionRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._close_volume = None + self._close_type = None + self.discriminator = None + + self.symbol = symbol + if close_volume is not None: + self.close_volume = close_volume + self.close_type = close_type + + @property + def symbol(self): + """Gets the symbol of this TradFiSpotClosePositionRequest. # noqa: E501 + + Symbol # noqa: E501 + + :return: The symbol of this TradFiSpotClosePositionRequest. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this TradFiSpotClosePositionRequest. + + Symbol # noqa: E501 + + :param symbol: The symbol of this TradFiSpotClosePositionRequest. # 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 close_volume(self): + """Gets the close_volume of this TradFiSpotClosePositionRequest. # noqa: E501 + + Close quantity; required for partial close # noqa: E501 + + :return: The close_volume of this TradFiSpotClosePositionRequest. # noqa: E501 + :rtype: str + """ + return self._close_volume + + @close_volume.setter + def close_volume(self, close_volume): + """Sets the close_volume of this TradFiSpotClosePositionRequest. + + Close quantity; required for partial close # noqa: E501 + + :param close_volume: The close_volume of this TradFiSpotClosePositionRequest. # noqa: E501 + :type: str + """ + + self._close_volume = close_volume + + @property + def close_type(self): + """Gets the close_type of this TradFiSpotClosePositionRequest. # noqa: E501 + + Close type (1=partial close, 2=close all) # noqa: E501 + + :return: The close_type of this TradFiSpotClosePositionRequest. # noqa: E501 + :rtype: int + """ + return self._close_type + + @close_type.setter + def close_type(self, close_type): + """Sets the close_type of this TradFiSpotClosePositionRequest. + + Close type (1=partial close, 2=close all) # noqa: E501 + + :param close_type: The close_type of this TradFiSpotClosePositionRequest. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and close_type is None: # noqa: E501 + raise ValueError("Invalid value for `close_type`, must not be `None`") # noqa: E501 + allowed_values = [1, 2] # noqa: E501 + if self.local_vars_configuration.client_side_validation and close_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `close_type` ({0}), must be one of {1}" # noqa: E501 + .format(close_type, allowed_values) + ) + + self._close_type = close_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, TradFiSpotClosePositionRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TradFiSpotClosePositionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trad_fi_spot_error.py b/gate_api/models/trad_fi_spot_error.py new file mode 100644 index 00000000..839fd39e --- /dev/null +++ b/gate_api/models/trad_fi_spot_error.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TradFiSpotError(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'data': 'object', + 'timestamp': 'int' + } + + attribute_map = { + 'label': 'label', + 'message': 'message', + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, label=None, message=None, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, object, int, Configuration) -> None + """TradFiSpotError - a 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._data = None + self._timestamp = None + self.discriminator = None + + if label is not None: + self.label = label + if message is not None: + self.message = message + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def label(self): + """Gets the label of this TradFiSpotError. # noqa: E501 + + Business error label # noqa: E501 + + :return: The label of this TradFiSpotError. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this TradFiSpotError. + + Business error label # noqa: E501 + + :param label: The label of this TradFiSpotError. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this TradFiSpotError. # noqa: E501 + + Error message # noqa: E501 + + :return: The message of this TradFiSpotError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this TradFiSpotError. + + Error message # noqa: E501 + + :param message: The message of this TradFiSpotError. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this TradFiSpotError. # noqa: E501 + + Error additional data # noqa: E501 + + :return: The data of this TradFiSpotError. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this TradFiSpotError. + + Error additional data # noqa: E501 + + :param data: The data of this TradFiSpotError. # noqa: E501 + :type: object + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this TradFiSpotError. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this TradFiSpotError. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this TradFiSpotError. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this TradFiSpotError. # 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, TradFiSpotError): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TradFiSpotError): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trad_fi_spot_order_request.py b/gate_api/models/trad_fi_spot_order_request.py new file mode 100644 index 00000000..3d1cf461 --- /dev/null +++ b/gate_api/models/trad_fi_spot_order_request.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 TradFiSpotOrderRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'volume': 'str', + 'symbol': 'str', + 'side': 'int', + 'price_type': 'str', + 'trading_session': 'str', + 'time_in_force': 'str', + 'price': 'str', + 'client_order_id': 'str' + } + + attribute_map = { + 'volume': 'volume', + 'symbol': 'symbol', + 'side': 'side', + 'price_type': 'price_type', + 'trading_session': 'trading_session', + 'time_in_force': 'time_in_force', + 'price': 'price', + 'client_order_id': 'client_order_id' + } + + def __init__(self, volume=None, symbol=None, side=None, price_type=None, trading_session=None, time_in_force=None, price=None, client_order_id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, str, str, str, str, str, Configuration) -> None + """TradFiSpotOrderRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._volume = None + self._symbol = None + self._side = None + self._price_type = None + self._trading_session = None + self._time_in_force = None + self._price = None + self._client_order_id = None + self.discriminator = None + + self.volume = volume + self.symbol = symbol + self.side = side + self.price_type = price_type + self.trading_session = trading_session + self.time_in_force = time_in_force + if price is not None: + self.price = price + if client_order_id is not None: + self.client_order_id = client_order_id + + @property + def volume(self): + """Gets the volume of this TradFiSpotOrderRequest. # noqa: E501 + + Order quantity # noqa: E501 + + :return: The volume of this TradFiSpotOrderRequest. # noqa: E501 + :rtype: str + """ + return self._volume + + @volume.setter + def volume(self, volume): + """Sets the volume of this TradFiSpotOrderRequest. + + Order quantity # noqa: E501 + + :param volume: The volume of this TradFiSpotOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and volume is None: # noqa: E501 + raise ValueError("Invalid value for `volume`, must not be `None`") # noqa: E501 + + self._volume = volume + + @property + def symbol(self): + """Gets the symbol of this TradFiSpotOrderRequest. # noqa: E501 + + Symbol # noqa: E501 + + :return: The symbol of this TradFiSpotOrderRequest. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this TradFiSpotOrderRequest. + + Symbol # noqa: E501 + + :param symbol: The symbol of this TradFiSpotOrderRequest. # 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 side(self): + """Gets the side of this TradFiSpotOrderRequest. # noqa: E501 + + Side (1=sell, 2=buy) # noqa: E501 + + :return: The side of this TradFiSpotOrderRequest. # noqa: E501 + :rtype: int + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this TradFiSpotOrderRequest. + + Side (1=sell, 2=buy) # noqa: E501 + + :param side: The side of this TradFiSpotOrderRequest. # 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 + 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 price_type(self): + """Gets the price_type of this TradFiSpotOrderRequest. # noqa: E501 + + Price type (market = market order, limit = limit order) # noqa: E501 + + :return: The price_type of this TradFiSpotOrderRequest. # noqa: E501 + :rtype: str + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this TradFiSpotOrderRequest. + + Price type (market = market order, limit = limit order) # noqa: E501 + + :param price_type: The price_type of this TradFiSpotOrderRequest. # noqa: E501 + :type: str + """ + 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 = ["market", "limit"] # 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 trading_session(self): + """Gets the trading_session of this TradFiSpotOrderRequest. # noqa: E501 + + Trading session. Limit orders support only All, while market orders support only Regular. # noqa: E501 + + :return: The trading_session of this TradFiSpotOrderRequest. # noqa: E501 + :rtype: str + """ + return self._trading_session + + @trading_session.setter + def trading_session(self, trading_session): + """Sets the trading_session of this TradFiSpotOrderRequest. + + Trading session. Limit orders support only All, while market orders support only Regular. # noqa: E501 + + :param trading_session: The trading_session of this TradFiSpotOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and trading_session is None: # noqa: E501 + raise ValueError("Invalid value for `trading_session`, must not be `None`") # noqa: E501 + allowed_values = ["regular", "all"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trading_session not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trading_session` ({0}), must be one of {1}" # noqa: E501 + .format(trading_session, allowed_values) + ) + + self._trading_session = trading_session + + @property + def time_in_force(self): + """Gets the time_in_force of this TradFiSpotOrderRequest. # noqa: E501 + + Time in force. - day: Day order. # noqa: E501 + + :return: The time_in_force of this TradFiSpotOrderRequest. # 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 TradFiSpotOrderRequest. + + Time in force. - day: Day order. # noqa: E501 + + :param time_in_force: The time_in_force of this TradFiSpotOrderRequest. # 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 = ["day"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 + .format(time_in_force, allowed_values) + ) + + self._time_in_force = time_in_force + + @property + def price(self): + """Gets the price of this TradFiSpotOrderRequest. # noqa: E501 + + Order price, used for limit orders # noqa: E501 + + :return: The price of this TradFiSpotOrderRequest. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this TradFiSpotOrderRequest. + + Order price, used for limit orders # noqa: E501 + + :param price: The price of this TradFiSpotOrderRequest. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def client_order_id(self): + """Gets the client_order_id of this TradFiSpotOrderRequest. # noqa: E501 + + Client-defined order ID # noqa: E501 + + :return: The client_order_id of this TradFiSpotOrderRequest. # 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 TradFiSpotOrderRequest. + + Client-defined order ID # noqa: E501 + + :param client_order_id: The client_order_id of this TradFiSpotOrderRequest. # noqa: E501 + :type: str + """ + + self._client_order_id = client_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, TradFiSpotOrderRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TradFiSpotOrderRequest): + 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/trad_fi_spot_order_update_request.py similarity index 57% rename from gate_api/models/hodler_airdrop_v4_error_response.py rename to gate_api/models/trad_fi_spot_order_update_request.py index 4bbd9f3a..69458998 100644 --- a/gate_api/models/hodler_airdrop_v4_error_response.py +++ b/gate_api/models/trad_fi_spot_order_update_request.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class HodlerAirdropV4ErrorResponse(object): +class TradFiSpotOrderUpdateRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,84 +33,78 @@ class HodlerAirdropV4ErrorResponse(object): and the value is json key in definition. """ openapi_types = { - 'label': 'str', - 'message': 'str' + 'volume': 'str', + 'price': 'str' } attribute_map = { - 'label': 'label', - 'message': 'message' + 'volume': 'volume', + 'price': 'price' } - def __init__(self, label=None, message=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, volume=None, price=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """HodlerAirdropV4ErrorResponse - a model defined in OpenAPI""" # noqa: E501 + """TradFiSpotOrderUpdateRequest - a 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._volume = None + self._price = None self.discriminator = None - self.label = label - self.message = message + self.volume = volume + self.price = price @property - def label(self): - """Gets the label of this HodlerAirdropV4ErrorResponse. # noqa: E501 + def volume(self): + """Gets the volume of this TradFiSpotOrderUpdateRequest. # noqa: E501 - Error label # noqa: E501 + Modified order quantity # noqa: E501 - :return: The label of this HodlerAirdropV4ErrorResponse. # noqa: E501 + :return: The volume of this TradFiSpotOrderUpdateRequest. # noqa: E501 :rtype: str """ - return self._label + return self._volume - @label.setter - def label(self, label): - """Sets the label of this HodlerAirdropV4ErrorResponse. + @volume.setter + def volume(self, volume): + """Sets the volume of this TradFiSpotOrderUpdateRequest. - Error label # noqa: E501 + Modified order quantity # noqa: E501 - :param label: The label of this HodlerAirdropV4ErrorResponse. # noqa: E501 + :param volume: The volume of this TradFiSpotOrderUpdateRequest. # 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) - ) + if self.local_vars_configuration.client_side_validation and volume is None: # noqa: E501 + raise ValueError("Invalid value for `volume`, must not be `None`") # noqa: E501 - self._label = label + self._volume = volume @property - def message(self): - """Gets the message of this HodlerAirdropV4ErrorResponse. # noqa: E501 + def price(self): + """Gets the price of this TradFiSpotOrderUpdateRequest. # noqa: E501 - Error messages (multilingual) # noqa: E501 + Modified order price # noqa: E501 - :return: The message of this HodlerAirdropV4ErrorResponse. # noqa: E501 + :return: The price of this TradFiSpotOrderUpdateRequest. # noqa: E501 :rtype: str """ - return self._message + return self._price - @message.setter - def message(self, message): - """Sets the message of this HodlerAirdropV4ErrorResponse. + @price.setter + def price(self, price): + """Sets the price of this TradFiSpotOrderUpdateRequest. - Error messages (multilingual) # noqa: E501 + Modified order price # noqa: E501 - :param message: The message of this HodlerAirdropV4ErrorResponse. # noqa: E501 + :param price: The price of this TradFiSpotOrderUpdateRequest. # 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 + 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._message = message + self._price = price def to_dict(self): """Returns the model properties as a dict""" @@ -146,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, HodlerAirdropV4ErrorResponse): + if not isinstance(other, TradFiSpotOrderUpdateRequest): return 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): + if not isinstance(other, TradFiSpotOrderUpdateRequest): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trad_fi_spot_transaction_request.py b/gate_api/models/trad_fi_spot_transaction_request.py new file mode 100644 index 00000000..ca9a0e4f --- /dev/null +++ b/gate_api/models/trad_fi_spot_transaction_request.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TradFiSpotTransactionRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'change': 'str', + 'type': 'str', + 'ref_id': 'str' + } + + attribute_map = { + 'asset': 'asset', + 'change': 'change', + 'type': 'type', + 'ref_id': 'ref_id' + } + + def __init__(self, asset=None, change=None, type=None, ref_id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """TradFiSpotTransactionRequest - a 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._change = None + self._type = None + self._ref_id = None + self.discriminator = None + + self.asset = asset + self.change = change + self.type = type + self.ref_id = ref_id + + @property + def asset(self): + """Gets the asset of this TradFiSpotTransactionRequest. # noqa: E501 + + Asset, USDT only # noqa: E501 + + :return: The asset of this TradFiSpotTransactionRequest. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this TradFiSpotTransactionRequest. + + Asset, USDT only # noqa: E501 + + :param asset: The asset of this TradFiSpotTransactionRequest. # 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 + allowed_values = ["USDT"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and asset not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `asset` ({0}), must be one of {1}" # noqa: E501 + .format(asset, allowed_values) + ) + + self._asset = asset + + @property + def change(self): + """Gets the change of this TradFiSpotTransactionRequest. # noqa: E501 + + Change amount # noqa: E501 + + :return: The change of this TradFiSpotTransactionRequest. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this TradFiSpotTransactionRequest. + + Change amount # noqa: E501 + + :param change: The change of this TradFiSpotTransactionRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and change is None: # noqa: E501 + raise ValueError("Invalid value for `change`, must not be `None`") # noqa: E501 + + self._change = change + + @property + def type(self): + """Gets the type of this TradFiSpotTransactionRequest. # noqa: E501 + + Transaction type (deposit=deposit, withdraw=withdrawal) # noqa: E501 + + :return: The type of this TradFiSpotTransactionRequest. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this TradFiSpotTransactionRequest. + + Transaction type (deposit=deposit, withdraw=withdrawal) # noqa: E501 + + :param type: The type of this TradFiSpotTransactionRequest. # 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 = ["deposit", "withdraw"] # 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 ref_id(self): + """Gets the ref_id of this TradFiSpotTransactionRequest. # noqa: E501 + + Business idempotent ID # noqa: E501 + + :return: The ref_id of this TradFiSpotTransactionRequest. # noqa: E501 + :rtype: str + """ + return self._ref_id + + @ref_id.setter + def ref_id(self, ref_id): + """Sets the ref_id of this TradFiSpotTransactionRequest. + + Business idempotent ID # noqa: E501 + + :param ref_id: The ref_id of this TradFiSpotTransactionRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and ref_id is None: # noqa: E501 + raise ValueError("Invalid value for `ref_id`, must not be `None`") # noqa: E501 + + self._ref_id = ref_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, TradFiSpotTransactionRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TradFiSpotTransactionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trad_fi_ticker_data.py b/gate_api/models/trad_fi_ticker_data.py index 2752547b..842f4bb1 100644 --- a/gate_api/models/trad_fi_ticker_data.py +++ b/gate_api/models/trad_fi_ticker_data.py @@ -132,7 +132,7 @@ def __init__(self, highest_price=None, lowest_price=None, price_change=None, pri def highest_price(self): """Gets the highest_price of this TradFiTickerData. # noqa: E501 - Highest price # noqa: E501 + High price # noqa: E501 :return: The highest_price of this TradFiTickerData. # noqa: E501 :rtype: str @@ -143,7 +143,7 @@ def highest_price(self): def highest_price(self, highest_price): """Sets the highest_price of this TradFiTickerData. - Highest price # noqa: E501 + High price # noqa: E501 :param highest_price: The highest_price of this TradFiTickerData. # noqa: E501 :type: str @@ -155,7 +155,7 @@ def highest_price(self, highest_price): def lowest_price(self): """Gets the lowest_price of this TradFiTickerData. # noqa: E501 - Lowest price # noqa: E501 + Low price # noqa: E501 :return: The lowest_price of this TradFiTickerData. # noqa: E501 :rtype: str @@ -166,7 +166,7 @@ def lowest_price(self): def lowest_price(self, lowest_price): """Sets the lowest_price of this TradFiTickerData. - Lowest price # noqa: E501 + Low price # noqa: E501 :param lowest_price: The lowest_price of this TradFiTickerData. # noqa: E501 :type: str diff --git a/gate_api/models/trail_order.py b/gate_api/models/trail_order.py index 687af15f..fa589d3a 100644 --- a/gate_api/models/trail_order.py +++ b/gate_api/models/trail_order.py @@ -1133,7 +1133,7 @@ def error_label(self, error_label): def leverage(self): """Gets the leverage of this TrailOrder. # noqa: E501 - leverage # noqa: E501 + Leverage # noqa: E501 :return: The leverage of this TrailOrder. # noqa: E501 :rtype: str @@ -1144,7 +1144,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this TrailOrder. - leverage # noqa: E501 + Leverage # noqa: E501 :param leverage: The leverage of this TrailOrder. # noqa: E501 :type: str diff --git a/gate_api/models/transaction_item.py b/gate_api/models/transaction_item.py new file mode 100644 index 00000000..bc510adc --- /dev/null +++ b/gate_api/models/transaction_item.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 TransactionItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'symbol': 'str', + 'symbol_display': 'str', + 'type': 'str', + 'type_desc': 'str', + 'change': 'str', + 'balance': 'str', + 'ref_id': 'str', + 'time': 'int', + 'unit_text': 'str', + 'detail': 'dict(str, object)' + } + + attribute_map = { + 'asset': 'asset', + 'symbol': 'symbol', + 'symbol_display': 'symbol_display', + 'type': 'type', + 'type_desc': 'type_desc', + 'change': 'change', + 'balance': 'balance', + 'ref_id': 'ref_id', + 'time': 'time', + 'unit_text': 'unit_text', + 'detail': 'detail' + } + + def __init__(self, asset=None, symbol=None, symbol_display=None, type=None, type_desc=None, change=None, balance=None, ref_id=None, time=None, unit_text=None, detail=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, int, str, dict(str, object), Configuration) -> None + """TransactionItem - a 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._symbol = None + self._symbol_display = None + self._type = None + self._type_desc = None + self._change = None + self._balance = None + self._ref_id = None + self._time = None + self._unit_text = None + self._detail = None + self.discriminator = None + + if asset is not None: + self.asset = asset + if symbol is not None: + self.symbol = symbol + if symbol_display is not None: + self.symbol_display = symbol_display + if type is not None: + self.type = type + if type_desc is not None: + self.type_desc = type_desc + if change is not None: + self.change = change + if balance is not None: + self.balance = balance + if ref_id is not None: + self.ref_id = ref_id + if time is not None: + self.time = time + if unit_text is not None: + self.unit_text = unit_text + if detail is not None: + self.detail = detail + + @property + def asset(self): + """Gets the asset of this TransactionItem. # noqa: E501 + + Asset # noqa: E501 + + :return: The asset of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this TransactionItem. + + Asset # noqa: E501 + + :param asset: The asset of this TransactionItem. # noqa: E501 + :type: str + """ + + self._asset = asset + + @property + def symbol(self): + """Gets the symbol of this TransactionItem. # noqa: E501 + + Symbol # noqa: E501 + + :return: The symbol of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this TransactionItem. + + Symbol # noqa: E501 + + :param symbol: The symbol of this TransactionItem. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def symbol_display(self): + """Gets the symbol_display of this TransactionItem. # noqa: E501 + + Symbol display name # noqa: E501 + + :return: The symbol_display of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._symbol_display + + @symbol_display.setter + def symbol_display(self, symbol_display): + """Sets the symbol_display of this TransactionItem. + + Symbol display name # noqa: E501 + + :param symbol_display: The symbol_display of this TransactionItem. # noqa: E501 + :type: str + """ + + self._symbol_display = symbol_display + + @property + def type(self): + """Gets the type of this TransactionItem. # noqa: E501 + + Transaction type. - deposit: Funds transfer in. - withdraw: Funds transfer out. - fee: Trading fee. - dividend: Dividend payout. - sell: Stock sale credit. - buy: Stock purchase debit. - award: Airdrop reward. - stock_transfer_in: Stock transfer in. - stock_transfer_out: Stock transfer out. # noqa: E501 + + :return: The type of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this TransactionItem. + + Transaction type. - deposit: Funds transfer in. - withdraw: Funds transfer out. - fee: Trading fee. - dividend: Dividend payout. - sell: Stock sale credit. - buy: Stock purchase debit. - award: Airdrop reward. - stock_transfer_in: Stock transfer in. - stock_transfer_out: Stock transfer out. # noqa: E501 + + :param type: The type of this TransactionItem. # noqa: E501 + :type: str + """ + allowed_values = ["deposit", "withdraw", "fee", "dividend", "sell", "buy", "award", "stock_transfer_in", "stock_transfer_out"] # 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 type_desc(self): + """Gets the type_desc of this TransactionItem. # noqa: E501 + + Transaction type description # noqa: E501 + + :return: The type_desc of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._type_desc + + @type_desc.setter + def type_desc(self, type_desc): + """Sets the type_desc of this TransactionItem. + + Transaction type description # noqa: E501 + + :param type_desc: The type_desc of this TransactionItem. # noqa: E501 + :type: str + """ + + self._type_desc = type_desc + + @property + def change(self): + """Gets the change of this TransactionItem. # noqa: E501 + + Change amount # noqa: E501 + + :return: The change of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this TransactionItem. + + Change amount # noqa: E501 + + :param change: The change of this TransactionItem. # noqa: E501 + :type: str + """ + + self._change = change + + @property + def balance(self): + """Gets the balance of this TransactionItem. # noqa: E501 + + Balance after change # noqa: E501 + + :return: The balance of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this TransactionItem. + + Balance after change # noqa: E501 + + :param balance: The balance of this TransactionItem. # noqa: E501 + :type: str + """ + + self._balance = balance + + @property + def ref_id(self): + """Gets the ref_id of this TransactionItem. # noqa: E501 + + Business idempotent ID # noqa: E501 + + :return: The ref_id of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._ref_id + + @ref_id.setter + def ref_id(self, ref_id): + """Sets the ref_id of this TransactionItem. + + Business idempotent ID # noqa: E501 + + :param ref_id: The ref_id of this TransactionItem. # noqa: E501 + :type: str + """ + + self._ref_id = ref_id + + @property + def time(self): + """Gets the time of this TransactionItem. # noqa: E501 + + Unix timestamp (seconds) # noqa: E501 + + :return: The time of this TransactionItem. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this TransactionItem. + + Unix timestamp (seconds) # noqa: E501 + + :param time: The time of this TransactionItem. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def unit_text(self): + """Gets the unit_text of this TransactionItem. # noqa: E501 + + Unit display text # noqa: E501 + + :return: The unit_text of this TransactionItem. # noqa: E501 + :rtype: str + """ + return self._unit_text + + @unit_text.setter + def unit_text(self, unit_text): + """Sets the unit_text of this TransactionItem. + + Unit display text # noqa: E501 + + :param unit_text: The unit_text of this TransactionItem. # noqa: E501 + :type: str + """ + + self._unit_text = unit_text + + @property + def detail(self): + """Gets the detail of this TransactionItem. # noqa: E501 + + Business details # noqa: E501 + + :return: The detail of this TransactionItem. # noqa: E501 + :rtype: dict(str, object) + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this TransactionItem. + + Business details # noqa: E501 + + :param detail: The detail of this TransactionItem. # noqa: E501 + :type: dict(str, object) + """ + + self._detail = detail + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransactionItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transaction_list2.py b/gate_api/models/transaction_list2.py new file mode 100644 index 00000000..f8fcaa72 --- /dev/null +++ b/gate_api/models/transaction_list2.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TransactionList2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'TransactionList2Data', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (TransactionList2Data, int, Configuration) -> None + """TransactionList2 - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this TransactionList2. # noqa: E501 + + + :return: The data of this TransactionList2. # noqa: E501 + :rtype: TransactionList2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this TransactionList2. + + + :param data: The data of this TransactionList2. # noqa: E501 + :type: TransactionList2Data + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this TransactionList2. # noqa: E501 + + + :return: The timestamp of this TransactionList2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this TransactionList2. + + + :param timestamp: The timestamp of this TransactionList2. # 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, TransactionList2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransactionList2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transaction_list2_data.py b/gate_api/models/transaction_list2_data.py new file mode 100644 index 00000000..ec5adef7 --- /dev/null +++ b/gate_api/models/transaction_list2_data.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 TransactionList2Data(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'total_page': 'int', + 'list': 'list[TransactionItem]' + } + + attribute_map = { + 'total': 'total', + 'total_page': 'total_page', + 'list': 'list' + } + + def __init__(self, total=None, total_page=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, list[TransactionItem], Configuration) -> None + """TransactionList2Data - a 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 TransactionList2Data. # noqa: E501 + + + :return: The total of this TransactionList2Data. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this TransactionList2Data. + + + :param total: The total of this TransactionList2Data. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def total_page(self): + """Gets the total_page of this TransactionList2Data. # noqa: E501 + + + :return: The total_page of this TransactionList2Data. # noqa: E501 + :rtype: int + """ + return self._total_page + + @total_page.setter + def total_page(self, total_page): + """Sets the total_page of this TransactionList2Data. + + + :param total_page: The total_page of this TransactionList2Data. # noqa: E501 + :type: int + """ + + self._total_page = total_page + + @property + def list(self): + """Gets the list of this TransactionList2Data. # noqa: E501 + + Transaction record list # noqa: E501 + + :return: The list of this TransactionList2Data. # noqa: E501 + :rtype: list[TransactionItem] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this TransactionList2Data. + + Transaction record list # noqa: E501 + + :param list: The list of this TransactionList2Data. # noqa: E501 + :type: list[TransactionItem] + """ + + 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, TransactionList2Data): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransactionList2Data): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transaction_list_data_list.py b/gate_api/models/transaction_list_data_list.py index 3daccc18..e1f6c8ac 100644 --- a/gate_api/models/transaction_list_data_list.py +++ b/gate_api/models/transaction_list_data_list.py @@ -157,7 +157,7 @@ def type_desc(self, type_desc): def change(self): """Gets the change of this TransactionListDataList. # noqa: E501 - Change Quantity # noqa: E501 + Change amount # noqa: E501 :return: The change of this TransactionListDataList. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def change(self): def change(self, change): """Sets the change of this TransactionListDataList. - Change Quantity # noqa: E501 + Change amount # noqa: E501 :param change: The change of this TransactionListDataList. # noqa: E501 :type: str diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py index 362d6b17..4e87b9cd 100644 --- a/gate_api/models/uni_currency_pair.py +++ b/gate_api/models/uni_currency_pair.py @@ -141,7 +141,7 @@ def quote_min_borrow_amount(self, quote_min_borrow_amount): def leverage(self): """Gets the leverage of this UniCurrencyPair. # noqa: E501 - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :return: The leverage of this UniCurrencyPair. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this UniCurrencyPair. - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :param leverage: The leverage of this UniCurrencyPair. # noqa: E501 :type: str diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py index 1487ce8a..fbb9b4a8 100644 --- a/gate_api/models/unified_discount_tiers.py +++ b/gate_api/models/unified_discount_tiers.py @@ -169,7 +169,7 @@ def upper_limit(self, upper_limit): def leverage(self): """Gets the leverage of this UnifiedDiscountTiers. # noqa: E501 - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :return: The leverage of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this UnifiedDiscountTiers. - Position leverage # noqa: E501 + Leverage multiplier # noqa: E501 :param leverage: The leverage of this UnifiedDiscountTiers. # noqa: E501 :type: str diff --git a/gate_api/models/update_order2.py b/gate_api/models/update_order2.py new file mode 100644 index 00000000..ff42589a --- /dev/null +++ b/gate_api/models/update_order2.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UpdateOrder2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'UpdateOrder2Data', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (UpdateOrder2Data, int, Configuration) -> None + """UpdateOrder2 - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this UpdateOrder2. # noqa: E501 + + + :return: The data of this UpdateOrder2. # noqa: E501 + :rtype: UpdateOrder2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this UpdateOrder2. + + + :param data: The data of this UpdateOrder2. # noqa: E501 + :type: UpdateOrder2Data + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this UpdateOrder2. # noqa: E501 + + + :return: The timestamp of this UpdateOrder2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this UpdateOrder2. + + + :param timestamp: The timestamp of this UpdateOrder2. # 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, UpdateOrder2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateOrder2): + 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/update_order2_data.py similarity index 70% rename from gate_api/models/launch_pool_v4_create_order_response.py rename to gate_api/models/update_order2_data.py index 6c1ce7d8..b5f2d5dc 100644 --- a/gate_api/models/launch_pool_v4_create_order_response.py +++ b/gate_api/models/update_order2_data.py @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class LaunchPoolV4CreateOrderResponse(object): +class UpdateOrder2Data(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,49 +33,48 @@ class LaunchPoolV4CreateOrderResponse(object): and the value is json key in definition. """ openapi_types = { - 'flow_id': 'int' + 'order_id': 'int' } attribute_map = { - 'flow_id': 'flow_id' + 'order_id': 'order_id' } - def __init__(self, flow_id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 # type: (int, Configuration) -> None - """LaunchPoolV4CreateOrderResponse - a model defined in OpenAPI""" # noqa: E501 + """UpdateOrder2Data - a 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._order_id = None self.discriminator = None - self.flow_id = flow_id + if order_id is not None: + self.order_id = order_id @property - def flow_id(self): - """Gets the flow_id of this LaunchPoolV4CreateOrderResponse. # noqa: E501 + def order_id(self): + """Gets the order_id of this UpdateOrder2Data. # noqa: E501 Order ID # noqa: E501 - :return: The flow_id of this LaunchPoolV4CreateOrderResponse. # noqa: E501 + :return: The order_id of this UpdateOrder2Data. # noqa: E501 :rtype: int """ - return self._flow_id + return self._order_id - @flow_id.setter - def flow_id(self, flow_id): - """Sets the flow_id of this LaunchPoolV4CreateOrderResponse. + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this UpdateOrder2Data. Order ID # noqa: E501 - :param flow_id: The flow_id of this LaunchPoolV4CreateOrderResponse. # noqa: E501 + :param order_id: The order_id of this UpdateOrder2Data. # 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 + self._order_id = order_id def to_dict(self): """Returns the model properties as a dict""" @@ -111,14 +110,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, LaunchPoolV4CreateOrderResponse): + if not isinstance(other, UpdateOrder2Data): return 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): + if not isinstance(other, UpdateOrder2Data): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/update_order_data.py b/gate_api/models/update_order_data.py index fdfc0f40..a31ff2d8 100644 --- a/gate_api/models/update_order_data.py +++ b/gate_api/models/update_order_data.py @@ -156,7 +156,7 @@ def state(self, state): def volume(self): """Gets the volume of this UpdateOrderData. # noqa: E501 - Order volume # noqa: E501 + Order quantity # noqa: E501 :return: The volume of this UpdateOrderData. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def volume(self): def volume(self, volume): """Sets the volume of this UpdateOrderData. - Order volume # noqa: E501 + Order quantity # noqa: E501 :param volume: The volume of this UpdateOrderData. # noqa: E501 :type: str diff --git a/gate_api/models/user_asset_resp2.py b/gate_api/models/user_asset_resp2.py new file mode 100644 index 00000000..206aa922 --- /dev/null +++ b/gate_api/models/user_asset_resp2.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 UserAssetResp2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'UserAssetResp2Data', + 'timestamp': 'int' + } + + attribute_map = { + 'data': 'data', + 'timestamp': 'timestamp' + } + + def __init__(self, data=None, timestamp=None, local_vars_configuration=None): # noqa: E501 + # type: (UserAssetResp2Data, int, Configuration) -> None + """UserAssetResp2 - a 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._timestamp = None + self.discriminator = None + + if data is not None: + self.data = data + if timestamp is not None: + self.timestamp = timestamp + + @property + def data(self): + """Gets the data of this UserAssetResp2. # noqa: E501 + + + :return: The data of this UserAssetResp2. # noqa: E501 + :rtype: UserAssetResp2Data + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this UserAssetResp2. + + + :param data: The data of this UserAssetResp2. # noqa: E501 + :type: UserAssetResp2Data + """ + + self._data = data + + @property + def timestamp(self): + """Gets the timestamp of this UserAssetResp2. # noqa: E501 + + Server timestamp (milliseconds) # noqa: E501 + + :return: The timestamp of this UserAssetResp2. # noqa: E501 + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this UserAssetResp2. + + Server timestamp (milliseconds) # noqa: E501 + + :param timestamp: The timestamp of this UserAssetResp2. # 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, UserAssetResp2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserAssetResp2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_asset_resp2_data.py b/gate_api/models/user_asset_resp2_data.py new file mode 100644 index 00000000..c7954a50 --- /dev/null +++ b/gate_api/models/user_asset_resp2_data.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 UserAssetResp2Data(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'equity': 'str', + 'balance': 'str', + 'available': 'str', + 'position_market_value': 'str', + 'position_pnl': 'str', + 'today_pnl': 'str', + 'user_exists': 'bool' + } + + attribute_map = { + 'equity': 'equity', + 'balance': 'balance', + 'available': 'available', + 'position_market_value': 'position_market_value', + 'position_pnl': 'position_pnl', + 'today_pnl': 'today_pnl', + 'user_exists': 'user_exists' + } + + def __init__(self, equity=None, balance=None, available=None, position_market_value=None, position_pnl=None, today_pnl=None, user_exists=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, bool, Configuration) -> None + """UserAssetResp2Data - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._equity = None + self._balance = None + self._available = None + self._position_market_value = None + self._position_pnl = None + self._today_pnl = None + self._user_exists = None + self.discriminator = None + + if equity is not None: + self.equity = equity + if balance is not None: + self.balance = balance + if available is not None: + self.available = available + if position_market_value is not None: + self.position_market_value = position_market_value + if position_pnl is not None: + self.position_pnl = position_pnl + if today_pnl is not None: + self.today_pnl = today_pnl + if user_exists is not None: + self.user_exists = user_exists + + @property + def equity(self): + """Gets the equity of this UserAssetResp2Data. # noqa: E501 + + Account equity # noqa: E501 + + :return: The equity of this UserAssetResp2Data. # noqa: E501 + :rtype: str + """ + return self._equity + + @equity.setter + def equity(self, equity): + """Sets the equity of this UserAssetResp2Data. + + Account equity # noqa: E501 + + :param equity: The equity of this UserAssetResp2Data. # noqa: E501 + :type: str + """ + + self._equity = equity + + @property + def balance(self): + """Gets the balance of this UserAssetResp2Data. # noqa: E501 + + Account Balance # noqa: E501 + + :return: The balance of this UserAssetResp2Data. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this UserAssetResp2Data. + + Account Balance # noqa: E501 + + :param balance: The balance of this UserAssetResp2Data. # noqa: E501 + :type: str + """ + + self._balance = balance + + @property + def available(self): + """Gets the available of this UserAssetResp2Data. # noqa: E501 + + Available Balance # noqa: E501 + + :return: The available of this UserAssetResp2Data. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this UserAssetResp2Data. + + Available Balance # noqa: E501 + + :param available: The available of this UserAssetResp2Data. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def position_market_value(self): + """Gets the position_market_value of this UserAssetResp2Data. # noqa: E501 + + Position market value # noqa: E501 + + :return: The position_market_value of this UserAssetResp2Data. # noqa: E501 + :rtype: str + """ + return self._position_market_value + + @position_market_value.setter + def position_market_value(self, position_market_value): + """Sets the position_market_value of this UserAssetResp2Data. + + Position market value # noqa: E501 + + :param position_market_value: The position_market_value of this UserAssetResp2Data. # noqa: E501 + :type: str + """ + + self._position_market_value = position_market_value + + @property + def position_pnl(self): + """Gets the position_pnl of this UserAssetResp2Data. # noqa: E501 + + Position P&L # noqa: E501 + + :return: The position_pnl of this UserAssetResp2Data. # noqa: E501 + :rtype: str + """ + return self._position_pnl + + @position_pnl.setter + def position_pnl(self, position_pnl): + """Sets the position_pnl of this UserAssetResp2Data. + + Position P&L # noqa: E501 + + :param position_pnl: The position_pnl of this UserAssetResp2Data. # noqa: E501 + :type: str + """ + + self._position_pnl = position_pnl + + @property + def today_pnl(self): + """Gets the today_pnl of this UserAssetResp2Data. # noqa: E501 + + Today's P&L # noqa: E501 + + :return: The today_pnl of this UserAssetResp2Data. # noqa: E501 + :rtype: str + """ + return self._today_pnl + + @today_pnl.setter + def today_pnl(self, today_pnl): + """Sets the today_pnl of this UserAssetResp2Data. + + Today's P&L # noqa: E501 + + :param today_pnl: The today_pnl of this UserAssetResp2Data. # noqa: E501 + :type: str + """ + + self._today_pnl = today_pnl + + @property + def user_exists(self): + """Gets the user_exists of this UserAssetResp2Data. # noqa: E501 + + Whether the user has activated the service # noqa: E501 + + :return: The user_exists of this UserAssetResp2Data. # noqa: E501 + :rtype: bool + """ + return self._user_exists + + @user_exists.setter + def user_exists(self, user_exists): + """Sets the user_exists of this UserAssetResp2Data. + + Whether the user has activated the service # noqa: E501 + + :param user_exists: The user_exists of this UserAssetResp2Data. # noqa: E501 + :type: bool + """ + + self._user_exists = user_exists + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserAssetResp2Data): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserAssetResp2Data): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_leverage_setting.py b/gate_api/models/user_leverage_setting.py new file mode 100644 index 00000000..db43bf48 --- /dev/null +++ b/gate_api/models/user_leverage_setting.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 UserLeverageSetting(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'leverage': 'str' + } + + attribute_map = { + 'leverage': 'leverage' + } + + def __init__(self, leverage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, Configuration) -> None + """UserLeverageSetting - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._leverage = None + self.discriminator = None + + if leverage is not None: + self.leverage = leverage + + @property + def leverage(self): + """Gets the leverage of this UserLeverageSetting. # noqa: E501 + + Leverage. Values exceeding a currency's leverage limit are capped at that limit. # noqa: E501 + + :return: The leverage of this UserLeverageSetting. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this UserLeverageSetting. + + Leverage. Values exceeding a currency's leverage limit are capped at that limit. # noqa: E501 + + :param leverage: The leverage of this UserLeverageSetting. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserLeverageSetting): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserLeverageSetting): + return True + + return self.to_dict() != other.to_dict() diff --git a/setup.py b/setup.py index a85d28d3..06376623 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.100" +VERSION = "7.2.123" # To install the library, run the following # # python setup.py install